Re: z buffer issue

"Christian Van Brussel" <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.devel
Message-ID <[email protected]>
> http://www.freeimagehosting.net/pkgy6

Well, that's just a tree drawning into the ocean, I guess it will float in
the end ;)

More seriously, so the problem here is that this tree is however placed
under the water, and that it shouldn't therefore appear through it.

A priori, this problem wouldn't be a bug, but instead a problem within the
definition of the objects of the scene.

The trees are placed using the mesh generator that will fade them in/out
when they appear. For this reason, the render priority of the tree factory
is set to 'alpha' since the object is transparent during the fading. This
makes them rendered after the normal, non-transparent, objects.

On the other side, the water mesh that you added doesn't set the render
priority and is therefore using by default the 'object' one. This means
that the water mesh will be rendered before the trees, and since the trees
are drawn after it, it will overwrite the rendering that was made for the
water, hence what you see.

The problem here is that this was not supposed to have any trees under the
water, that's therefore more a map design problem than a bug.

Note also that the previous water mesh in csisland was at the render
priority 'object2' instead of 'object', this was in order to allow to see
the objects underwater through the semi-transparent water surface.

And note finally that there will clearly be a problem when the camera will
switch up and under the water surface: the objects that should be drown
before or after the water surface should a priori be switched too when the
camera crosses the water. So this would mean having to manipulate
dynamically the render priority of the objects in the scene? Or adding a
new god-gifted solution allowing the automated management of transparent
objects? Or the render priorities would be managed by the mesh generator
too?

More info on render priorities here:
http://www.crystalspace3d.org/docs/online/manual/HOWTO-Render-Priorities.html




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.