I can't post a code snippet since there is about 10,000 lines of code
implementing what I described below.  But I will try to outline what we do.

1. We have GeoAreas which define an area in the world using a series of
bounding points and spline curves between them.
2. We use both hand placing and density settings to assign flora, rocks,
trees, weeds, etc to each GeoArea.
3. Our entire world is defined in two sets of overlapping cells.  One cell
set is used for texture and geometry and has a resolution of 100m x 100m for
the lowest resolution.  The second cell set is 200m x 200m and is used to
define what things "exist" within the  cell.
4. We compile our GeoAreas into these cells and store the information in a
large paging file.  This paging file has a list of each PositionedBuilder of
each object in each cell.
5. When we move through the world we calculate the list of cells which we
need to have information on at one time.  We then page in the cells which we
need to be referencing and create an in-memory object representing the cell
called LodNode.
6. The LodNode keeps track of all the PositionedBuilders in its cell.  Each
PositionedBuilder has a  location, rotation, scale and reference to a
Carpenter.  Each Carpenter knows how to build new geometry for near, medium
and far views if necessary, or how to build an imposter if necessary.
7. If the LodNode decides to switch to "far" mode, it replaces all the
objects in the cell with their "far version".
8. If the far version of a particular object is really an imposter then a
request is made to inject the imposter into the imposter management system.
This system compacts many imposters into a single geometry array by
combining imposter textures into one large texture, scaling as is necessry
to fit them into the texture, or sorting them into buckets and using
multiple geometries.
9. The imposters are handled like particle systems. On each frame the
imposters within view are rendered "into" the geometry array with proper
references to the portion of the sub-texture as is necessary.
10. When the LodNode decides to change the cell from far to medium view, it
sends a request to the imposter system to remove those imposters which it
has for the cell.

11. Our imposters are not perfect. They are built by placing the tree or
object into a view and using an offscreen canvas to take a picture.  We then
read back the depth componant to determine which pixels have actually been
written to in order to calculate an alpha mask for the imposter.  We then
use that image to represent the tree at a far distance.  We do proper
scaling of the imposter so it is the right size, but the orientation is not
perfect since we use the same imposter for all instances of the same tree
type.

Dave Yazel

-----Original Message-----
From: Lan Wu-Cavener [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 10:14 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Trouble with Link/SharedGroup - is it a Java3D
bug??


At 04:36 PM 7/2/2002 -0400, you wrote:
>We have 100's of thousands of trees without a memory issue.  We use shared
>groups and links for all trees, boulders and other objects throughout the
>world.  We have not seen an explosion of memory, but at the same time we
use
>a spatial grid for managing all the objects and are constantly reusing what
>we call PositionedNodes (TG -> BG -> Link -> SG) over and over again.

Could you please post a code snippet show how your spatial grid manage all
the objects?

>  We use an imposter
>system to show trees at a distance, but each tree imposter is just part of
>one huge geometry array that we update on every frame, not its own seperate
>instance.

I am curious how you did this. How did you set the part of the geometry
array to a tree?

Thank you in advance!

Lan

>Dave
>
>
>-----Original Message-----
>From: Joerg 'Herkules' Plewe [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 02, 2002 4:06 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] Trouble with Link/SharedGroup - is it a Java3D
>bug??
>
>
>Hm, nobody seems to be interested in this topic. Does someone here actually
>USE SharedGroups?
>
>If not, how do you distribute e.g. thousends of trees on a terrain?
Cloning?
>I think cloning might be good as long as the object in question consists of
>a single group. But in case it's more complex....
>
>Additionally, the behavior I observer looks slightly like a bug. I could
>provide an example program if somebody wants me to.
>
>Is there any additionaly information in Links/SharedGroups?
>
>
>----- Original Message -----
>From: "Joerg 'Herkules' Plewe" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Saturday, June 29, 2002 5:40 PM
>Subject: [JAVA3D] Trouble with Link/SharedGroup
>
>
> > Hi All!
> >
> > I have some difficulty understanding the behavior of a Link/SharedGroup
> > construct in the scenegraph.
> > I need to deploy lots of identical objects to a scene (e.g. tanks,
>soldiers)
> > and thought that placing the object into a SharedGroup and using it with
> > combinations of TransformGroup and Link nodes.
> > This should save a lot of memory. Now, trying it, memory consumption
> > EXPLODED!!!
> >
>
>===========================================================================
>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".

Lan Wu-Cavener
Dept. of Landscape Architecture

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