I think you started in the wrong direction. You want to say that you have 1
Shape3D for every *face* in the .obj file ? That's a terrible overhead !
Does it also happen that every Shape3D is below it's own Transform3D in your
data structure ? Nevertheless, there is something wrong with your estimates.
I just tryied to import the galleon model in my app and from 21.5 mb
residual mem usage, it grow only to 32 mb. That's roughly 10 mb, close to
your estimates. But I only have 1 shape + 1 geometry per .obj group, that's
17 shapes.

Cheers,

Florin

-----Urspr�ngliche Nachricht-----
Von: Smith, David [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 19. M�rz 2003 16:06
An: [EMAIL PROTECTED]
Betreff: [JAVA3D] Large graphic databases in J3D


I currently have a set of data structures to 
manage the models in memory.  I generate the
necessary graphics data and setup J3D to display
them.  I can interactively manipulate the 
models in memory, and then update the graphics
accordingly.  This is all well and good but....

I started converting .OBJ files into my data
structure for displaying/editing and found that,
for example the galleon model, I could only import 
3-4 ships before I ate up all of my memory.

Each ship is composed of:
# of faces: 2384
# of edges: 4732
# of verts: 2372

~8000 entities and using guesstimates of the
sizes of my data structures, I get about 1.5MB
per model for my data structures.  

Now I generate for each face a TriangleArray for
shaded images and a LineArray for each edge for 
wireframe images, each stored on a shape node.  
Even if I double the size of my structures for 
each of these that would be:
   
    3MB + 3MB + 1.5MB ~= 8MB per model.

For 4 models this would be around 32MB.  However
I doubt that simple geometry arrays are eating that
much memory.  Nevertheless, I am out of memory.

So what can I do about it?

My application starts off with java.exe showing 
~20MB being used up.  When I load 1 galleon, it
jumps to ~60MB.  I load the next it jumps to ~85.

I am going to run OptimizeIt to see where my problems
really are.  But I know even if I reduced my memory
problems this way, I'm still going to have to face
up to using some sort of graphics database as a
back-end and then do LRU loading/cacheing/etc. But
I have no idea on how to design such a system.  
Any pointers to any references on this topic would 
be greatly appreciated.

Thanks for your time,
-DaveS

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