Yes, memory usage is huge, performance is poor compared to what I am using
(Geometry By-Reference) now. I only turned the visibility on or off to
avoid detaching the BranchGroup( another performance drop). But has never
had geometry being altered or mix up. I don't use beta version either.


At 01:54 PM 7/5/2002 -0500, you wrote:

>Increased memory usage, poorer than expected performance, renderbin
>crashes (stopped when sharedgroups/links were removed), and geometry
>seemingly getting altered and mixed up (a leg on one of my characters
>suddenly replaced by a tree).  That sort of thing.  That was with 1.2
>though... haven't tried with the most recent beta.
>
>-----Original Message-----
>From: Discussion list for Java 3D API
>[<mailto:[EMAIL PROTECTED]>mailto:[EMAIL PROTECTED]]O
>n Behalf Of Lan Wu-Cavener
>Sent: Friday, July 05, 2002 1:52 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [JAVA3D] Trouble with Link/SharedGroup - is it a Java3D
>bug??
>
>I don't know what kind of inconsistency you had. In my application the
>usage of Link and SharedGroup does work, but the frame rate is really bad
>while navigating the scene. I also use the combination to distribute trees
>over terrain.
>
>
>At 08:13 AM 7/5/2002 -0500, you wrote:
> >I had some inconsistencies with Links and shared groups as well, and even
> >stopped using them when I couldn't figure out what I was doing wrong
> (memory
> >use extreme, visual glitches, no perceived benefit to using them...)  Will
> >try to find my notes.
> >
> >Scott
> >----- Original Message -----
> >From: "Joerg 'Herkules' Plewe" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Friday, July 05, 2002 6:48 AM
> >Subject: Re: [JAVA3D] Trouble with Link/SharedGroup - is it a Java3D bug??
> >
> >
> > > Subject: Re: [JAVA3D] Trouble with Link/SharedGroup - is it a Java3D
> bug??
> > >
> > >
> > > > We also use shared groups to put in trees, boulders, etc, but we
> haven't
> > > > put all that many into a scene yet.  I've not noticed any specific
> > > > memory issues (Java 3D is a memory hog but we all know that).
> > >
> > > Sigh, ok, nobody seems to believe me....
> > >
> > > Here is a small code snippet that demonstrates the effect (e.g. in a
> > > HelloUniverse environment).
> > > I turns out that the memory consumption depends on the
> complexity/depth of
> > > the subtree that
> > > is used below the SharedGroup. I create an arbitrary tree with some
> > > ColorCubes and TGs and
> > > either Link/SharedGroup or cloneTree() it. The bigger the subtree, the
> > > better the Link-solution
> > > should be. In cases where the subtree in question only consists of
> one or
> > > two groups, it should
> > > not make any difference at all anyway.
> > >
> > > The samples creates only 10 clones/links. While cloning keeps the memory
> > > consumption well
> > > below 40megs, Link gives an OutOfMemoryException even with -Xmx256mb.
> > >
> > > A smaller test (createDeepSubGraph(6)) works marginally with 256MB and
> > > produces
> > > 2.021.371 instances of javax.media.j3d.BranchGroupRetained.
> > >
> > > I'd really appreciate if someone could confirm my observation.
> > >
> > >
> > > ================================================================
> > >
> > >  /**
> > >   * Create a subgraph with 10 objects by either Linking or cloning an
> > > object.
> > >   */
> > >  Node create10Objects( boolean clone )
> > >  {
> > >   Group grp = new Group();
> > >
> > >   // Create a non-trivial subgraph
> > >   Node object = createDeepSubGraph( 7 );
> > >   System.out.println( numNodesCreated );
> > >
> > >   // Setup sharedgroup
> > >   SharedGroup shared = null;
> > >   if ( ! clone )
> > >   {
> > >    shared = new SharedGroup();
> > >    shared.addChild( object );
> > >   }
> > >
> > >   // Add the objects
> > >   for ( int i = 0; i < 10; i++ )
> > >   {
> > >    TransformGroup tg = new TransformGroup();
> > >    Transform3D t3d = new Transform3D();
> > >    t3d.setTranslation( new Vector3f( i * 2.0f, 0.0f, i * 2.0f ) );
> > >    tg.setTransform( t3d );
> > >
> > >    // either link or clone the object
> > >    if ( clone )
> > >     tg.addChild( object.cloneTree() );
> > >    else
> > >     tg.addChild( new Link( shared ) );
> > >
> > >    grp.addChild( tg );
> > >   }
> > >   return grp;
> > >  }
> > >
> > >
> > >  /**
> > >   * Create subgraph of a certain depth.
> > >   */
> > >  static int numNodesCreated = 0;
> > >  Node createDeepSubGraph( int depth )
> > >  {
> > >   BranchGroup g = new BranchGroup();
> > >
> > >   // One new cube...
> > >   g.addChild( new ColorCube( 0.1 ) );
> > >   numNodesCreated++;
> > >
> > >   // ...and maybe two subgraphs
> > >   if ( depth > 0 )
> > >   {
> > >    Transform3D t3d = new Transform3D();
> > >    Transform3D t3d2 = new Transform3D();
> > >    TransformGroup tg;
> > >
> > >    t3d.setScale( 0.2 * (double)depth );
> > >    t3d2.setTranslation( new Vector3f( 0.2f, -0.2f, 0.0f ) );
> > >    t3d.mul( t3d2 );
> > >    tg = new TransformGroup();
> > >    tg.setTransform( t3d );
> > >    tg.addChild( createDeepSubGraph( depth - 1 ) );
> > >    g.addChild( tg );
> > >
> > >    t3d.setScale( 0.2 * (double)depth );
> > >    t3d2.setTranslation( new Vector3f( -0.2f, -0.2f, 0.0f ) );
> > >    t3d.mul( t3d2 );
> > >    tg = new TransformGroup();
> > >    tg.setTransform( t3d );
> > >    tg.addChild( createDeepSubGraph( depth - 1 ) );
> > >    g.addChild( tg );
> > >   }
> > >   return g;
> > >  }
> > >
> > >
> >===========================================================================
> > > 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".

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

Reply via email to