Doug,

Thanks!

I get it now, the example was very useful.

FYI, my Windows machine required an offset of about 15...

Sincerely,

Daniel Selman

[EMAIL PROTECTED]
http://www.tornadolabs.com


-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Doug Gehringer
Sent: 13 December 1999 16:40
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] setPolygonOffset?




> From: Daniel Selman <[EMAIL PROTECTED]>

> Does anyone know what the effect of the:
>    PolygonAttributes.setPolygonOffset(float polygonOffset)
>
> method is?


This sets offset to be applied to polygons to allow primitives to be drawn
on
top of the polygons without z-buffer fighting.  For example, this is
commonly
used to allow drawing edges on polygons. See the documentation for
glPolygonOffset() if you have it.

The J3D 1.1 version of polygon offset uses a static offset, which means that
all polygons with the offset get moved away from the eye by the specified
offset. See the attached example.  The offset needed to prevent the edges of
the sphere from being lost depends on the graphics board being used, I've
seen
values from 30-1500 necessary to make it look right.

Java3D 1.2 will have an offset with static and dynamic factors.  The dynamic
factor offsets polygons by an amount which depends on thier slope wrt the
eye
vector. The greater the slope, the greater the offset.   This has two
advantages: 1) smaller offsets can be used, since the dynamic offsetting
gives
more offset to the polygons which need more; 2) the dynamic offset is more
constant across different graphics boards, so the same polygon offset values
should work for more boards.

Doug Gehringer
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