Re: [osg-users] zbuffer issue

2009-06-15 Thread Robert Osfield
Hi Christian,

I really doubt you have a general z-buffer issue, but from the
pictures is looks like you have problems with geometry that is
overlapping that shouldn't be. Any chance that you are accidentally
creating quads that overlap in your code?

Robert.


On Sun, Jun 14, 2009 at 11:06 PM, Christian Samosgfo...@tevs.eu wrote:
 Hi community,

 i noticed an annoying rendering problem in my application. my application is 
 based on the osgforest example, with the difference that not every tree is 
 represented with its own drawable, but many trees are merge into a handful of 
 drawables, placed at a regular-grid.

 the rendering problem occurs only when i use real-world coordinates for the 
 tree postions: e.g. 683006, 213213, 0. instead of localized equivalent of  
 6, 213, 0 and when using the approach described above.
 there are no problems when i use such large coordinates with one-drawable 
 per tree, like in the original osgforest implementation.

 it happens when i zoom in very near, the trees (only the trees, not the 
 terrain or anything else) begin to flicker and overlapped faces of the tree's 
 double-quads gets revealed, while others gets hidden. after i zoom out, 
 rendering problems stops.

 maybe some z-buffer resolution related issue? i hope i described it in a way 
 you can imagine it. if not i can send the whole example/resources.

 btw. i'm using osg-2.8.0

 best regards,
 christian

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




 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] zbuffer issue

2009-06-15 Thread Christian Sam
Hi, thanks for all the reply

like colin noted, the render problem vanished as i stripped off the offsets 
which caused the large coordinates and work now with localized coordinates.

if i ever need to display the real coordinates in an text-insert, i can re-add 
the stripped offset before display them.

Thank you!

Cheers,
Christian

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] zbuffer issue

2009-06-14 Thread Christian Sam
i forgot three things to mention:

1.) 
as i mentioned above, i place adjacent trees  into one geometry. 
e.g. a geometries' vertex-array has numberOfAdjacentTrees*8 (=double quads ) 
entries. but i use only one primitiveSet to construct the geometry. i hope this 
is okay.

geometry-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS, 0, 
vertices-size()));

2.)
the geometries aren't generated from back to front.

3.)
the problem also occurs when i don't use blending, alphafunc or even textures.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] zbuffer issue

2009-06-14 Thread Christian Sam
Sorry, for another posting:

i just tested the original one drawable per tree implementation with such 
large coordinates again and noticed that it also tends to flicker, as well 
hidden faces were revealed also. i couldn't encounter the outer mentioned 
problems.

thanks in advance,
christian

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org