<div dir="ltr">Thanks Sebastion, Robert,<div><br></div><div>I did indeed dump the part of the scene into osgt and here is the hierarchy (GeometryTechnique used):</div><div>PagedLOD->Group->TerrainTile (4x these)->MatrixTransform->Geode</div><div><br></div><div>After some experiments I am successful now in injecting my own node (simply replaced the Geode with my own Geometry). I am after replacing the TerrainTile with Group or MatrixTransform. Havn't looked into TerrainTile but probably this contains some transformation (which one, the local to ECEF??) since simply replacing it by Group is not working</div><div><br></div><div>Also, In my replacement of the original VPB Geode, I am using Geometry where I am generating normals with osgUtil::SmoothingVisitor, and these are wrong in the final output as well. Any clue?</div><div><br></div><div>Thanks a bunch for so far</div><div><br></div><div>Nick</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 3, 2016 at 5:04 PM, Sebastian Messerschmidt <span dir="ltr"><<a href="mailto:sebastian.messerschmidt@gmx.de" target="_blank">sebastian.messerschmidt@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi Nick, <br><span class="">
<blockquote type="cite">
<div dir="ltr">Hi Robert, Community,
<div><br>
</div>
<div>I am hacking the VPB process again :-). </div>
<div><br>
</div>
<div>The story is this: I transform tiles back from ECEF to
local, do something with the Geometry and I want to replace
the tile with my own Node. Spent already hours reading and
trying to understand the SceneGraph with all this transforms,
and I am failing.</div>
</div>
</blockquote>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Any words of how these tiles in the QuadTree are
represented? I mean the tree and the transforms, I know the
facts that they are coming from TerrainTiles with proper
Locators, but after when the GeometryTechnique is applied.</div>
</div>
</blockquote></span>
I worked it out some years ago, where I needed to capture the
transformations for a query-representation. Basically you will have
a height field-layer inside the terrain-tile, which describes itself
via a Locator and the height-values in a normalized coordinate
frame. IIRC the complete ECEF-Transform is captured inside the
locator. It simply assumes the height-field as being centered around
the geographic position when creating the world-geometry. <br>
Some snippet to retrieve the world-coordinates of the terrain-tile's
center:<br>
<code><br>
osgTerrain::TerrainTile& terrain_tile =
dynamic_cast<osgTerrain::<wbr>TerrainTile&>(node);<br>
osgTerrain::HeightFieldLayer* hf_layer=
dynamic_cast<osgTerrain::<wbr>HeightFieldLayer*>(terrain_<wbr>tile.getElevationLayer());<br>
osgTerrain::Locator* locator = terrain_tile.getLocator();<br>
osg::EllipsoidModel* es = locator->getEllipsoidModel();<br>
<br>
//compute center transform <br>
osg::Vec3d center_model;<br>
tile ->convertLocalToModel(osg::<wbr>Vec3d(0.5,0.5,0.0),
center_model);<br>
<br>
</code><br>
I'm not quite sure which coordinate frame is used in the quadtree
itself, but it should be easy enough to put some subgraph to an osgt
to inspect.<br>
<br>
Cheers<span class="HOEnZb"><font color="#888888"><br>
Sebastian <br>
</font></span><blockquote type="cite"><span class="">
<div dir="ltr">
<div><br>
</div>
<div>Thanks so much for any word on this. It is the last bump in
my current dev</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Nick<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_-2066987221026862038gmail_signature" data-smartmail="gmail_signature">trajce
nikolov nick<br>
</div>
</div>
</div>
<br>
<fieldset class="m_-2066987221026862038mimeAttachmentHeader"></fieldset>
<br>
</span><span class=""><pre>______________________________<wbr>_________________
osg-users mailing list
<a class="m_-2066987221026862038moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.<wbr>openscenegraph.org</a>
<a class="m_-2066987221026862038moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a>
</pre>
</span></blockquote>
<br>
</div>
<br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>