I'm not very experienced in OSG and I spoke to a co-worker about this approach. The thought is that there might be some performance implications with this approach. This is because there may be multiple surface feature types and they can be enabled/disabled separately. For example, if there are lakes and forests they will be created in the texture but each time one of them is enabled disabled this process has to be repeated and each texture would be approx 1k x 1k. I'm going to give it a shot and see how it performs. Any other thoughts in the mean time?
James From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Jerald Sent: Wednesday, October 21, 2009 2:16 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] z-fighting issue with coplanar polygons Can you project onto a texture and then apply the texture to the geometry? Either in a modeling package or algorithmically by rendering to a texture and then project that texture onto the terrain by planar uv mapping? Jason From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of James Adkison ARA/CFD Sent: Wednesday, October 21, 2009 10:25 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] z-fighting issue with coplanar polygons I'm using an Heightfield to represent my terrain and parts of the terrain could have a surface feature (e.g. a lake). The lake is being drawn as a polygon directly on the surface of the terrain. This, of course, is causing z-fighting to occur between the terrain and the surface feature. I have been trying to solve this problem and have run across a couple solutions but they aren't working for me. I have tried using polygon offset with the GL_OFFSET_POLYGON_FILL mode, which works when zoomed out far but up close z-fighting still occurs. I have tried using a stencil buffer approach but I can't get it to work properly. I can get the surface feature to stencil out the area of terrain but if you rotate the scene so that the surface feature is behind a mountain the stencil is still in place and the feature is rendered through the mountain. Hopefully, I am doing something wrong and someone can explain how I can make this work. James
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org