Setting camera location by Latitude and longitude?

Started by DanielHruby, May 03, 2016, 01:03:18 PM

Previous topic - Next topic

DanielHruby

I have downloaded a 1/3 arc IMG file from USGS Seamless server.  The resulting geometry is huge and takes several seconds to resolve into something recognizable.  It is very difficult to find the precise location of the property I am interested in placing a building on (a home) so I can render some views of the surrounding mountains.  What I am looking for, but can not find, is a way to enter the latitude and longitude of the property so that the camera will jump into the precise location.  From there, I should be able to have better camera control.  I assume though, that it is not possible to do this as the coordinates are based on meters from the original rather than lat/long.

Is there a way to do this?  If not, is this something the developers could add in an upcoming release?

ajcgi

If your coords are as one numerical metric value rather than degrees, mins, secs, put those coords into the Lat Long at apex of the Planet. Now that is effectively North Pole, ie 0,0,0 in world space. Put your camera above there.
That would be my current approach.

DanielHruby

Thank you for the suggestion.  But that is the problem, there is no way to determine any metric value of the location of the project site.  It is only possible to get Lat/Long from google earth.  The IMG file from seamless server is like a 10 mile x 10 mile chunk of land and I need to find a site that is about 300x300 feet.  It is impossible to know where to measure that from or how to even aquire such measurements.  That is why I suggest providing a means of entering lat/long for camera and maybe even for objects too.

bobbystahr

#3
If you right click anywhere in your terrain and select the Copy Coordinate option you can paste that into your Camera, then raise it above the terrain as it will wind up at ground level and have a look around, and then do that till you find your spot is the best I can suggest.
Above the 3D preview there is a Measure tool, a little ruler icon which works well from a top down view as well for the measuring query.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

DanielHruby

Thank you Bobby.  I am aware of that functionality and use it all the time.  But it presumes I am at the correct location already.  If I have a 10 mile x 10 mile model of mountains and have no point of reference, it is hard to pinpoint the location of a specific piece of small property.  I can enter the address in google earth, see the latitude and longitude and if were able to enter that into the camera, it would jump to the location I want to be within the 10 mile section of land.  It is very hard to look at a roughly generated model and know exactly where a small postage stamp sized plot of land is.  But if I know the Lat long, I should be able to enter that into he camera and jump to it precisely. 

bobbystahr

Quote from: DanielHruby on May 04, 2016, 12:54:45 PM
Thank you Bobby.  I am aware of that functionality and use it all the time.  But it presumes I am at the correct location already.  If I have a 10 mile x 10 mile model of mountains and have no point of reference, it is hard to pinpoint the location of a specific piece of small property.  I can enter the address in google earth, see the latitude and longitude and if were able to enter that into the camera, it would jump to the location I want to be within the 10 mile section of land.  It is very hard to look at a roughly generated model and know exactly where a small postage stamp sized plot of land is.  But if I know the Lat long, I should be able to enter that into he camera and jump to it precisely. 


Right click and Center on heightfield?
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Hetzen

I'd use Global Mapper to set up your Terragen scene to work around the planet origin. You can input geo ref dems, map overlays and leave a lat long marker on the tile of terrain you then export to use in TG.

bobbystahr

Quote from: Hetzen on May 04, 2016, 04:27:58 PM
I'd use Global Mapper to set up your Terragen scene to work around the planet origin. You can input geo ref dems, map overlays and leave a lat long marker on the tile of terrain you then export to use in TG.

Finally someone who knows...great tip man.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

DanielHruby

Unfortunately, Global mapper is not compatible with OSX.  It also seems like a long road to go down for something that could be much easier to do.  Obviously this is turning into a feature request.  I might need to suggest somewhere else in the forum....

Thank you all.

Matt

I've replied here:

http://www.planetside.co.uk/forums/index.php/topic,21512.msg216151.html#msg216151

It's basically the same as what ajcgi suggested above. Enter the lat-long coordinates. When ajcgi said "metric" he was talking about decimal lat-long coordinates. E.g. 24°30'E in degrees and minutes = 24.5 in decimal degrees.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

DanielHruby

OK, I think see the approach to do it now.  Thanks for clearing that up.  I will try it out.

bobbystahr

Love this forum, I just learned something as well. Thanks Matt.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

DanielHruby

So, I have tried this, but I am probably missing something still.  I have archived my data to create this in hopes that if anyone is interested in following though with this to help or even learn how to do it themselves, maybe I will be able to pick up on the workflow. 

https://www.dropbox.com/s/wfsf7tvi9sis7q4/Terrain%20Data.zip?dl=0

Included is:

1. A Google earth view of the Site with Lat and long coordinates in the bottom right corner.
2. A 1/3 arc DEM of the site with he property roughly in the center somewhere, but possibly not.  It might be that the DEM is of the Quadrant that the site lives in and therefore not centered.
3. My TGD file with the DEM loaded and positioned with Apex matching the site coordinated from google earth.

Goals:

1.  Position camera near or on site.
2.  Somehow Mark the site, so I have a reference of where it is in case I get lost navigating the camera later.
3.  How can I get/apply a texture map of the entire DEM terrain (similar to the quality of what google earth provides).  Obviously it would need to register perfectly and the distant hills would look textured.
4.  Finally, I would like to know how I can then export the textured terrain model as OBJ or FBX (with camera and maybe sun?) so I can bring it all into Modo for further rendering.

As an architect, I would almost always be dealing with real terrain and imagery and I would be very happy to learn this process.  Hopefully, others here would also find this to be a valuable lesson to accomplish the same tasks.  Anyone up for the challenge? 

Thanks in advance!



Hetzen

#13
I didn't know that you could lat long offset the planet, but then I haven't really needed to. Useful to know. Thanks Bobby I've only done this a few times, I think Ryan Archer has written some good posts on this subject, that's where I got most of my method from.

Looking at your 4 goals Daniel:

A trick I use to mark things and also reference scale, is position a sphere usually 50m radius at the location I'm interested in. You can easily disable the node to turn it off. I've just placed one on your scene and 50m is too large, 5 or 10 should do it.

For point 3, using Global Mapper makes this so much easier. All maps have some sort of method of flattening out a spherical texture, which always brings in distortion. Google Earth has it's own unique Projection Datum to the Dem you've downloaded. Manually lining up Google Earth to Dems doesn't really work. Parts line up, then drift quite quickly. So without proper mapping tools you won't get the two to line up exactly. If this is something you and your practice want to offer your clients, I would  consider in investing in GM and dual boot one of your Macs. You can get all sorts of serious data in and out of it, like shape files (vector maps created for civil interests like land usage, roads and forest areas), Lidar data and premium image content. You draw an area of interest, then export your layers of .ter and image/mask maps to use in TG at (0,0,0)

I see this is around San Diego. Below is Open Street data layered over your dem.

Exporting geometry into Modo should be quite straight forward. Position a camera to look straight down on your scene, set it to orthographic and tap in the area size you want to export. Then add a Micro exporter to your scene, give it a file name. Then go to your render node attach the new camera and check Micro Exporter in the Sequence/Output tab. Set quality low to start off with and a small image size, hit render, then see how it looks in Modo. You can always increase the poly count by increasing the image size at render. You can also use the same camera to export just a hi rez top view to texture your Modo object. It's also a good technique to get an image out to create masks in a paint package, like a driveway, lawns, etc.

Anyway that's the way I'd go. I'm sure there are other ways.

Jon




DanielHruby

Thank you for the info Jon.  Send like I should consider the Global Mapper and set up Bootcamp.  That will be a while though. 

Yes, I was in contact with Ryan about this after reading his tutorial on working with DEM files.  He helped me get the terrain to where I could see it, but then I just couldn't find my site.  A little like finding a needle in a haystack. 

And thanks for remaining me about he micro exporter.  I was looking for an OBJ Exporter, but only found importer.  Forgot about Micro Exporter and how it worked.  That will be helpful for sure.  I think it will be easier to move the site around in mod and find my bearings, but it would be nice to accurately mark the location with the sphere first.

Have a nice weekend!