>
>According to the docs, Polygon offset works like this:
>
>Offset - the depth values of all pixels generated by polygon rasterization
>can be offset by a value that is computed for that polygon. Two values are
>used to specify the offset:
>
>Offset bias - the constant polygon offset that is added to the final device
>coordinate Z value of polygon primitives.
>
>Offset factor - the factor to be multiplied by the slope of the polygon and
>then added to the final, device coordinate Z value of the polygon
>primitives.
>
>These values can be either positive or negative. The default for both of
>these values is 0.0.
>
>Some questions:
>
>1-Could you use this instead of the broken decal to lay identical geometry
>on top of each other with some alpha bended textures?

Yes, it could work for this.

>2-Could someone explain the offset factor?

The bias value is a constant value that gets added to the Z value of
pixels no matter what the orientation of the polygon.  This works well
for polygons that have a mild slope in their Z values.  If a polygon
has a large slope in Z, the bias needed to accomplish the offset
varies widely.  The offset factor was introduced to help in this case.
It takes into account the Z slope before being added to the pixels Z
value.


>3-How much offset do you need so the zbuffer does not get confused, and is
>this in meters?

This varies based on the model and how close it is to the viewer.  The values
represent "depth units".  They have no measureable meaning in the real world.
In theory, a single bias unit is supposed to represent a singe step in depth
buffer space.

>4-Would this work for non planar surfaces?  If you had a sphere, could you
>render it twice, the second time with a small offset so it effectively wraps
>(decals) around the "inner" sphere?
>

Since it is in "depth space", this should work.

Doug Twilleager
Sun Microsystems.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to