Hello Mauro,

Mauro Mithrandir wrote:
>> Can you upload a screenshot and post a link to it? It is often much 
>> easier to understand transparency problem when one can see what is going
>> wrong ;)
> 
> I've removed from my code the RenderOptions stuff and I've made two 
> screenshots.

thanks!

> (i) PNG RGBA texture
> http://mauroport.netsons.org/magazzino/temp/alpha_texture.png

this one shows the limitation of sorting only objects not triangles. The 
bottom face of the cube is rendered after the front and left faces and 
with setTransZWrite(false) (the default) the bottom overdraws the front 
and left faces. For cases like this you probably want to enable depth 
writes and/or experiment with alpha testing (see 
BlendChunk::setAlphaFunc and BlendChunk::setAlphaValue). You could split 
the cube into more than one geometry, but for any scene of interesting 
size this is not really feasible for performance reasons.
The real solution to rendering transparent objects correctly is to apply 
some for or another of depth peeling.

> (ii) Diffuse color with alpha=1.0
> http://mauroport.netsons.org/magazzino/temp/color.png

hm, here I'm not so sure what the problem is. It looks as if the cube is 
missing the face that is oriented towards the bottom left. Is this done 
with lighting enabled? Are the normals on the cube correct? I'm not sure 
why the face oriented towards the bottom right is black - I'd suspect it 
is a back face that is not lit?

        Cheers,
                Carsten

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to