Florin,

We also did similar experiments, its a great benefit to club geometries
together into lesser no of shapes. I was just wondering if there is any way
to still pick different geometries individually and change the appearance of
the geometry. e.g. can I give user functionality to pick any of the 30
spheres in one shape by implementing some picking routine in j3d? the basic
problem is in j3d picking is done on shape3ds, so how can I do this? when
the ray actually intersects the nth sphere out of the 30 spheres, does the
picked shape give me that geometry first? Or is there any sense of sequence
when I query the geometries of the picked shape?

Any other idea about how to achieve this? It will be great if we can do
that, as in our application, just for picking we need to maintain lot of
shape3ds unnecessarily( if we say so !)

thanks
anirban


----- Original Message -----
From: "Florin Herinean" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 26, 2003 5:20 PM
Subject: [JAVA3D] AW: [JAVA3D] AW: [JAVA3D] Java 3D or GL4Java


As I told you, all depends on how you create the scene graph.

As you have already seen, using spheres with shared geometry is not a
solution for your problem. I have made my own experiments and created a cube
with 30 spheres on a side - 27000 total spheres - see the picture attached.
That used 143 MB of memory. Each sphere was using it's own shape3d and
transformgroup and were sharing the same geometry.

Now I have tryied another approach: instead of having 30 shapes per row, I
have created 1 shape per row, each shape having 30 geometries. So now the
model displays the same amount of spheres - 27000 - but it is organized as
900 shapes3d in 900 transformgroups, each shape having 30 geometries, one
geometry for each sphere. Surprise: now I need for the same scene only 25 MB
!!!

So it seems that there are lots of ways to reduce the memory usage, only
that *you* haven't explored them yet.

Cheers,

Florin

-----Urspr�ngliche Nachricht-----
Von: Nitin.Jain [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 26. Februar 2003 11:22
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] AW: [JAVA3D] Java 3D or GL4Java


Florin,

I'll give you an example which was posted few weeks back in this forum. This
gives the problem of memory in certain kind of scenegraph.
In this we are trying to create 'n' shape 3Ds with there individual TGs.
This is for a molecular viewer where the geometry(would be shared) will be
spheres or cylinders.

The scene graph looks like this:

BG->TG(n numbers)->Shape3D(n numbers)(No Geometry or Appearance added)

Note that each of the Shape3D was added to a TG and then the TG was added to
the BG.  So the BG has n TGs with a Shape3D in each. The following were the
results:

n       Memory Used (MB)
======================
1000            3.7
2000            8.1
3000            12.5
28000           115

The above memory requirement is only for the empty shape3D objects and the
geometry hasn't been attached yet, which makes the matter even worse. I
could not find ANY WAY TO REDUCE THIS MEMORY. In OpenGL I can do all this
matrix manupulation at the rendering time. Or make my own TG object which is
not as heavy as Java3D's TG.

regs,
nitin

I'm attaching the original post by Ranjan George on this

>>>>>>>>>>>>>>>>>>>>>>>>
Hi All,
Been struggling with this issue for quite a while now.
Requirement: To be able to display a molecule using spheres (for atoms) and
cylinders (for bonds between the atoms) on the Canvas3D.  The size of the
molecule can range from 1000s of atoms to 10000s of atoms.  Number of bonds
per atom can be averaged at 2 to 3 per atom.  Am giving you these figures so
that you have an idea as to how huge and complex the molecule can be.

I need to be able to make this molecule display on a machine with a basic
configuration of 128MB RAM.  Hence I performed the profiling for the
following graph:

BG->TG(n numbers)->Shape3D(n numbers)(No Geometry or Appearance added)

Note that each of the Shape3D was added to a TG and then the TG was added to
the BG.  So the BG has n TGs with a Shape3D in each. The following were the
results:

n       Memory Used (MB)
======================
1000            3.7
2000            8.1
3000            12.5
28000           115

The last one probably representing a molecule size of 7000 to 8000 atoms and
gives OutOfMemory exception unless I give the -Xmx option to the JVM.
NOTE THAT EVEN THE GEOMETRIES OR APPEARANCE HASNT BEEN ADDED AND I CANNOT
SHARE SHAPES AS EACH ATOM MAY HAVE A DIFFERENT APPEARANCE.
Even with the -Xmx option the system becomes pathetically slow as memory is
used from the hard disk.

How do I solve this problem and minimize my memory utilization??  Any
thoughts on the above will be most welcome as I have tried all sorts of
things.

The root of the whole problem seems to be becos Java3D does not give an
option of working on persistant data and neither provides any interfaces
which allow you to enable it to do so.

I know this is a long mail.  Hope you have the patience to go through it.

Thanks in advance.

Ranjan

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

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