Hi , Dave Yazel
Thanks for your help.
I already resolve the trees rendering. I am using:
(1) Put all trees in a OrderedGroup, and use SharedGroup to save memory.
(2) Figure out all trees according 'Z' coordinate in viewplatform coordinate
SYS. We can use matrix (Tv1.Tv2....Tvm)-1 . (T1.T2....Tn) to transform the
object coordinate into viewplatform coordinate.
Swap the Transform3D of all trees (NOT swap the child themself, since all my
trees are completely same, so, swapping Transform3D is very fast!)
(3) Adjust Transform3D for all trees in order to perform 'Billboard'
behavior. (We can not use OrientedShape, there is a serious bug.)
Actually, the method 'p1.distance(p2) ' is not efficient for this case,
since we need the distance along 'Z' axis, but not between the object and
viewplatform.
Best Regards.
Hongkun Wang
----- Original Message -----
From: Yazel, David J. <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 08, 2000 11:40 AM
Subject: Re: [JAVA3D] Easy way to get 'Z' coordinate in 'ViewPlatform Coor
dinate Sys' ?
> You could just do a p1.distance(p2) where p1 is your location and p2 is
the
> location of the tree. But have you tried to use ordered groups for this
> yet? To my knowledge you cannot swap the children of an ordered group
> around, you have to detach them and rebuild the array. I have been
building
> triangle meshes to perfectly match the outlines of my trees to solve this
> problem, and using less polygons futher away to reduce the amount of
> triangles the engine has to process per frame. But I would rather use
> transparency, if only it worked.
>
> Dave Yazel
>
> > ----------
> > From: Hongkun Wang[SMTP:[EMAIL PROTECTED]]
> > Reply To: Hongkun Wang
> > Sent: Friday, September 08, 2000 10:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: [JAVA3D] Easy way to get 'Z' coordinate in 'ViewPlatform
> > Coordinate Sys' ?
> >
> > Hi!
> >
> > I am creating a terrain with many billboard trees on it. Due to the
> > problems of 'Multiple Transparent Objs', I decide to use OrderedGroup,
and
> > sort the trees according to their 'Z' coordinate at run time.
> >
> > So my question is:
> > Is there an easy and universal way to quickly get objects 'Z' coordinate
> > in ViewPlatform coordinate system? Otherwise we have to do a lot of
Matrix
> > calculation.
> >
> > Thanks for any help in advance.
> > Hongkun Wang
> >
>
>
===========================================================================
> 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".