Hi Robert,

Thanks for the quick reply. I'm not sure whether the trade-off would be beneficial, but what if VPB was modified to generate normal maps as the terrain database was generated. This would save run-time normal map computations, but increase the size of the database. And since the normal map requires floating point resolution, I guess one would have to add a "normal map field" instead of using an image layer for this... Your thoughts?

Best regards,
John

On 04/24/2012 03:08 PM, Robert Osfield wrote:
Hi John,

Avoiding popping is a challenge for sure.  However even with the
popping it's a rather nice model BTW :-)

Given the lighting changes looked to be the most obvious perhaps
directly addressing this by using a normal map texture as well as a
colour texture would be appropriate.  This would require a custom
fragment shader and the creation of the normal map texture when
building the database.

Another alternative might be to have a custom TerrainTechnique read a
high res height field - the same res as the texture map so 256x256
rather than normal default 64x64, then have the TerrainTechnique down
sample the data for geometry rendering but also create a normal map
automatically from the height field.

Another approach would be to read the height field in vertex shader
and in the fragment shader use the same height field to compute
normals for lighting purpose.

One complication in doing the normal computation is that it's a whole
earth model so one would need to compute the normals in local coords
that fit the overal curvature of the geocentric model.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to