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