> A user writes:
>
> We are concerned over the limitation of back clip distance vs front clip
> distance.
>
> If we set front clip to 0.1 (so that we don't see through things we
> collide with) that gives us the ability to only see 100 meters in the
> distance.  Any human can easily see far further than 100 meters (without
> obstruction).
>
> This makes it seem nearly impossible to model any realistic type of
> world (city or landscape).


First off, realize that this near/far limitation is a property of the z-buffer
alogorithm, and is not specific to Java3D.

Further, this is an area where the graphics algorithm is already a "loose"
approximation of reality.  Try using a 35mm camera to take a picture which has
both 0.5m and 500m in focus.  You will need a very high f-stop to get that kind
of depth of field.  In the real world objects that are too close or too far away
are out of focus, so we really don't "see" over that great of a range.

That being said, there are still things we can do.  First off, depending on your
hardware and your scene, you may be able to get away with a ratio > 1000.  The
non-linearity of the z-buffer will be worse towards the back of the scene, so
look for errors in objects that are far away.  Next, consider using a Fog to
diminish the appearance of objects that are far away.  This mimics real life
were haze frequently reduces the detail of distant objects.  A handy technique
is to set up your fog so that the scene fades to grey at the far clipping
distance.  That way objects don't disappear, they just fade away.  Finally,
consider using other mechanisms for objects that are at the boundaries.  For
example, you can use an OrderedGroup to draw objects in front of the depth
buffered scene by drawing them without depth buffering after the main scene has
rendered.  This works well for stuff like a dashboard or control panel.
Similarly, you can draw the stuff that is really far away as a Background.  For
example, in a space scene, you can render the distant stars onto a unit sphere
and then use that as a Background.

In the future, this problem may be solved by hardware which stores the depth
values using floating point coordinates.  In the meantime, this is the best that
we can do, hope that it helps,

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