Camera fov, yaw, pitch and position from a photo GPS and metadata?

Started by KirillK, November 14, 2018, 12:35:02 pm

Previous topic - Next topic


   I guess it should be possible somehow to precisely  project a photo onto a USGS elevation based terrain  but I couldn't figure out how

What I see in Mavic pro drone captured image metadata for example :




How could I translate that 39,31.7746N and 119,37.7523W and altitude to Terragen values?    Would be nice if it could be set automatically somehow


There is no existing functionality for this, you'd need to convert the Lat/Long into meters from the north pole, in the default setup. And that would only get you position, not camera orientation, etc. But once you figured out the calculations for position offset you could probably make a simple script or calculator to reproducibly derive these values, even programmatically from the drone data.

Or if you (or someone else who is interested) has coding ability you could probably use the SDK to create a drone movement data importer for camera data.

- Oshyan


I think I figured it out. In other part of metadata those gps values are exactly in Terragen numbers. Same as in DEM loader.    Yaw and Pitch also seems comparable. Still I am getting kind of wrongly framed  landscape.(although very close)   I think it's in camera fov and film aperture. 

Could somebody explain please what  should I use there. There is very little info in the help.  "Focal length  in mm" I guess is 35mm equivalent, right?  and what should I put in Film apperture in mm for a Mavic Pro drone camera ?

Or it's a bad idea maybe ?   GPS data has just not enough precision to project an image back to the ground precisely?     I hoped it would be good enough for background things.

ps .They dig out lots of the ground in the picture so some mismatch is because of that. Otherwise I think it's a camera fov difference or something


BTW, do somebody know in what  texture painting soft it would be possible to load terrain geometry and cameras and use them for projective painting with an ability to morph the image slightly  to conform the terrain geometry?
Can I load cameras in Photoshop for example?  Or Mari ? 


This seems beyond me as I've never really played too much with GPS data, but it does look like the native terrain is in a wider shot. You may be able to zoom out you camera a bit to obtain similar.
Check out the Terragen Community on Facebook:


I set the focus length  exactly as in the image metadata. So my guess it's "film aperture" probably.  Not sure I understand what it is


As far as I know you should not need to change the aperture as long as the FoV measurements you have are 35mm equivalent, which is the standard in the digital photography world.

- Oshyana


Quote from: Oshyan on November 16, 2018, 01:34:43 am
As far as I know you should not need to change the aperture as long as the FoV measurements you have are 35mm equivalent, which is the standard in the digital photography world.

- Oshyana

Thanks Oshyan, I have another question .

The only way I could set a camera in proper position is to put gps data in "39.5295785555; -119.629201361167"  format I found in  all cameras exif metadata ( looks like iphone writes yaw too as "direction")      as a planets "lat long at apex".     Same way I do to find where imported DEM is.     So I put only height  and yaw/pitch in camera dialog.

The question is how to make it stay where it is when I need to set a next camera projection and need to change planet Long lat apex again?

I bet the program code is already have something to put DEMs in proper position  based on same digits  so why not a camera?   Should be pretty simple vector math to add an altitude and gimbal /yaw / pitch/ roll values.        Could you make same panel as for georeferenced image please or maybe a camera input in the node?

Unfortunately i have zero programming skills myself.

Maybe It could be done in some 3d party soft and then be imported trough FBX or something?  Do somebody know one ?


I don't know of a way to automate that in Terragen currently. I would look into some kind of external tool to convert and save to FBX or CHAN (Nuke format).

- Oshyan