Hi,

At 10:49 AM 2/15/99 -0500, you wrote:
>
>       Sorry to interpose but what you'll do if the squashed object exceed the
>bounds of the other object, which will certainly often occurs?  You must
>remove parts from the copy to make sure we don't have floating shadows.
>Second thing, why do you say scaling on y, shouldn't this depends on the
>light position and then, you must flatten your object from this point of
>view?  I think itsn't too simple to have shadows in j3d (except maybe in a
>particular scene which isn't too useful) but if someone has do it, I'm
>really interested!

the squashed object creates a complex polygon (for the shadow) that must be
projected against other surfaces in the direction of the light vector.
consider where it e.g. wraps around a corner of a building -- where the
shadow is applied to the building polygon the edge detection must be
performed and the places where the shadow intersects the edge to clip the
shadow.

yes I agree with you that it is not a question of scaling in Y.  it is that
it must be scaled along the light direction vector.  however, this is only
if you are using this scaling approach in the first place ---

another approach is to project from the light vector across the object,
computing the projection of all the edge points of the object's polygons
from the cross section of the light vector.  this can then be used in two
ways:  

the first is with each polygon of the object, projected into several flat
overlapping shadows.  obviously this is quick to compute, but results in
many more polygons and some cost in rendering.

the other method is to combine all the polygons into one big shadow
polygon.  each point that is projected can be checked for whether it is
inside or outside the constructed polygon.  if it is inside, it is
irrelevant; if it is outside, it extends the bounds of the polygon.

cheers,
jeff




--------------------------------------------------------------------------
J. Jeffrey Close                         
ThinkOne Inc.                            Aux grands maux, 
formerly France Telecom R&D              les grands rem�des.
e: [EMAIL PROTECTED]         
v: +1 650-875-1518 / +1 206-545-9360
�����������������������
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to