www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: ErDetEnAnd? on January 12, 2009, 08:32:39 pm

Title: Wrong polygon z-value
Post by: ErDetEnAnd? on January 12, 2009, 08:32:39 pm
Hello.

I've constructed one 3DS as depicted below. If made transparent (like in the picture) I get the wrong polygon on top. The model consists of 4 walls and a floor (no planes).

(http://img170.imageshack.us/img170/5598/transparentrendererrortz9.png)

Did I make something wrong in the 3DS, or is this a render issue?
Title: Re: Wrong polygon z-value
Post by: EgonOlsen on January 12, 2009, 10:26:28 pm
It's a sorting/rendering issue. Transparent polygons have to be z-sorted to be rendered in the correct order. That ordering is done by the so called painter's algorithm, which doesn't ensure a perfect ordering. There's not much you can do about this. Splitting the object, i.e. separating the bottom from the rest and playing around with Object3D.setSortOffset(); may be an option if the object usually isn't visible from all sides.
Title: Re: Wrong polygon z-value
Post by: ErDetEnAnd? on January 12, 2009, 10:34:44 pm
I see. What are valid values for the argument of Object3D.setSortOffset()?