the visibility of undergroud model clamped to terrain

3 messages
Open this post in threaded view
|
Report Content as Inappropriate

the visibility of undergroud model clamped to terrain

 Hi,     In my scene, there is a .ive model clamped to the terrain undergroundly(Actually, a hole modeled as a cylinder is dug into the ground). So, I write the earth file as:                                                                                                           D:\dom\tms.xml                        256                                                        D:\dem\tms.xml                        32                                                        hole.ive.10,10,10.scale                        99.534 27.414 4000                        And I get a reletivly acceptable result by adjusting (try many times) the Z value to 4000 in location element(b.t.w, the height of the hole(or cylinder) is 2000):     So, my question is: Is there any way to handle my case without adjusting the Z value manually? Any hint will be appreciated.
Open this post in threaded view
|
Report Content as Inappropriate

Re: the visibility of undergroud model clamped to terrain

 Peckham, If you are trying to match the top of your model to the terrain, you might be better off with a Model annotation. Please refer to the annotation.earth example, here: https://github.com/gwaldron/osgearth/blob/master/tests/annotation.earth#L162In your case, you don't want the auto-scaling of course. But using a position with no Z coordinate should cause it to automatically "clamp" to the terrain at the model's origin (0,0,0) coordinate. Good luck, hope this helps. Glenn Waldron / Pelican Mapping