[osg-users] Straight lines are broken during rotation

Adrian Jelffs adrian.jelffs at makai.com
Fri Jan 26 19:32:27 PST 2018


Hi Robert,

Many thanks for your reply. I found that when I add the following lines it fixes the 2D terrain problem.


Code:

camera->setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES);
	camera->setCullingMode(osg::CullSettings::NO_CULLING);




If I add the following line of code then the problem is much worst:

 
Code:

camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
 



Would it be possible for you to explain what these are doing or send me a link where I can read about it? I find that the online information is not descriptive enough.

If I add a 3D terrain underneath the 2D terrain then the problem comes back again and the problem looks like the attached image. Even when I add a significant offset to the 2D terrain from the 3D terrain I still get the same results.

I put an offset on the line to check if it was a precision issue and the problem still happens to the line. So I am thinking it must be a Z fighting issue. However, the problem doesn't go away when I zoom in so I thought Z fighting would only be an issue when I zoom out.

When I turn off the 3D and 2D terrains then the single line is fine.

Is there a way to fix this line breaking up issue?

Many thanks for your help!!!

Adrian

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72875#72875



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2JPG.JPG
Type: image/jpeg
Size: 36010 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180127/95170533/attachment-0003.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.JPG
Type: image/jpeg
Size: 38645 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180127/95170533/attachment-0004.jpe>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0.JPG
Type: image/jpeg
Size: 27422 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180127/95170533/attachment-0005.jpe>


More information about the osg-users mailing list