Hi guys,

The whole story with the back clip to front clip ratio of no use. You can
easily check it. By setting for example the front clip to 0.1 and back clip
to 240000, the ratio is 2400000 but everything is ok. If you set the front
clip to 0.0001 and back clip to 2.4, the ratio is 10 times smaller, but it's
not working. From my experiments, it looks like there is a division by the
front clip distance which results in too big nimbers and the system seems to
be unable to distinguish which objects are in front of which. I was able to
create cases where the spere is always behind the cylinder, where the sphere
is always in front of the cylinder and even strange cases where the sphere
is partialy in front and partialy in the back of the cylinder.

I think I've learn a lot from those experiments:
1. don't make your front clip too small, 0.001 is small enough for most
cases. If you really need to go closer, you should also change the viewing
transform. The nominal viewing transform doesn't work with front clip
distances closer than 0.001 .
2. stay away from the back clip plane. If z is the distance between the
viewing point and the center of your graph scene, the best result are when z
- fc / bc - fc ~= 0.5 . If that ratio closes to 1 you may experiment the
same problems of the system unable to z-sort the objects.

I don't think that is a bug in java3D. More probably it's a result of the
algorithms applied in opengl/graphic card which should be avoidable by
carefully constructing your scene. In the example used, you were watching a
0.36m radius scene from a distance of 2.4m where the front clip distance was
set to 10 micrometers.

Cheers,

Florin



-----Urspr�ngliche Nachricht-----
Von: John Wright [mailto:Wright@;MNSTARFIRE.COM]
Gesendet: Dienstag, 29. Oktober 2002 18:41
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] AW: [JAVA3D] Again on "Geometry looks transparent"


Sun recommended a ratio of 3000:1 for the back clip to front clip ratio
for a 16 bit Z-buffer.  If you'd like to read some technical details
about this we have it documented on our website at:

http://www.starfireresearch.com/services/java3d/supplementalDocumentation.ht
ml

>From what is being described it sounds like your object is closer than
the front clip distance.

- John Wright
Starfire Research

Mingtian Ni wrote:
>
> I just tested the program in my system (jdk1.4.1/java3d1.3/OpenGL/NVidia
> Riva TNT2). It behaved same as it did in yours.
> This discussion is so informative. Thank you all for reponding to
> this question.
>
> Mingtian Ni
>
> On Tue, 29 Oct 2002, Florin Herinean wrote:
>
> > Hi, it's clear a problem with the front clip distance. Not sure if it's
> > related to Z Buffering. I tryied with both 16 and 32 bit buffers and it
> > behaves exactly the same, no difference.
> >
> > However, the ball displays correctly if the front clip dist. is 1e-3 but
it
> > is drawn after the cylinder if the FCD is 1e-4! I'm not sure if it is a
bug
> > in Java3D or a limitation of opengl.
> >
> > Cheers,
> >
> > Florin
> >
> > -----Urspr�ngliche Nachricht-----
> > Von: Jason Taylor [mailto:Jason.Taylor@;WARWICK.AC.UK]
> > Gesendet: Dienstag, 29. Oktober 2002 13:37
> > An: [EMAIL PROTECTED]
> > Betreff: Re: [JAVA3D] Again on "Geometry looks transparent"
> >
> >
> > Hmmm... looks like a Z-Buffering problem, if I zoom out a lot and then
> > rotate I can see odd effects but at the default zoom it looks fine. From
> > what Alessandro says about the commenting the clip set out it appears
> > you are setting the front/back clip ranges too far away for your cards
> > Z-Buffer.
> >
> > su.getViewer().getView().setFrontClipPolicy(View.VIRTUAL_EYE);
> > su.getViewer().getView().setBackClipPolicy(View.VIRTUAL_EYE);
> > su.getViewer().getView().setBackClipDistance(400);
> > su.getViewer().getView().setFrontClipDistance(400.0/600.0);
> >
> > This is what I do in my little project, the front clip should always be
> > within a certain ratio to the back clip,
> >
> > ie
> >
> > backclip = x
> > frontclip = x/600.0
> >
> > I'm not sure where the 600 comes from but I remember it being used as a
> > good example (I think it's in relation to using the default 16bit Z
> > Buffer).
> >
> > Alternatively you should be able to get better range if your card
> > supports a 24/32bit Z Buffer, check the driver settings.
> >
> > Have fun,
> >               Jason.
> >
> >
===========================================================================
> > 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".
> >
> > �������������������������
> > 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".
> >
>
>
===========================================================================
> 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".

===========================================================================
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".

==========================================================================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