Thanks Florin. Let me try to describe the situation and may be you'll help me learn some Java in addition to Java3D. The image that I create (in a servlet) is this:
http://www.geocities.com/dolachin/CubeDraft.png and it speaks for itself in terms of simplicity. Now, after I create just a couple of these, my machine (Win2k, 256mb) starts swapping, slows down to a crawl and then I start getting OutOfMemoryError. I think I'm being pretty careful about releasing Java3D objects (in fact, everything is being created by using local variables in the body of a function - is that enough to know for the objects to be released?) In my recent Java career, I've been having serious problems with memory and would like to learn that aspect as well as I can. Hopefully this is a good start. Thank you very much in advance! Dola --- Florin Herinean <[EMAIL PROTECTED]> wrote: > See apidocs for javax.media.j3d.Canvas3D, > javax.media.j3d.GraphicsContext3D > and the example app "PureImmediate" in the demo > folder of your java3d > installation. > > Now, if the scenegraph is *simple* as you say, with > a "not so complicated" > geometry, there shouldn't be any high memory usage. > Maybe what you see is > the residual footprint of your app. Maybe you're > using highly compressed > textures which gets expanded into memory. Can you > give us some figures of > what do you consider "so much *heap* space" ? > > For example, in my app, a scenegraph 1 level deep, > containing 166 > branchgroups each with 1 transformgroup + 1 shape3d > + 1 geometry, covering a > total of 150,000 vertexes, uses 18 MB memory in > scenegraph mode. Considering > the residual memory footprint of my app of 26 MB, > that makes a grand total > memory usage of 44 MB, not using any textures. What > *is* your memory usage ? > > Cheers, > > Florin > > -----Urspr�ngliche Nachricht----- > Von: Dola Woolfe [mailto:[EMAIL PROTECTED] > Gesendet: Sonntag, 30. M�rz 2003 23:37 > An: [EMAIL PROTECTED] > Betreff: Re: [JAVA3D] AW: [JAVA3D] J3d memory issues > > > Hi, > > I'm ready to try this immediate mode rendering. I > couldn't find a description of how to do it in the > tutorial. Where can I look for examples of how to > use > immediate mode? > > (I actually have a very simple scene graph, and not > even a very complicated geometry.) > > Thanks! > > Dola > > --- Florin Herinean <[EMAIL PROTECTED]> wrote: > > -----Urspr�ngliche Nachricht----- > > Von: Dola Woolfe [mailto:[EMAIL PROTECTED] > > Gesendet: Montag, 10. M�rz 2003 15:25 > > An: [EMAIL PROTECTED] > > Betreff: [JAVA3D] J3d memory issues > > > > ... cut ... > > > How come adding a branchgroup to the scene takes > > so much stack space? > > ... cut ... > > > > That means only that you have quite a complex > > scenegraph. Since you do not > > need a real-time rendering, you might want to > > consider using immediate mode > > rendering, which can cut the memory usage by 90%. > > > > From my experience, if you have a relatively > simple > > geometry, but a complex > > scenegraph, 1000's of BranchGroups, > TransformGroups > > & co, that may kill your > > memory. I'm not very sure about that, but I think > > that j3d is attempting to > > "flatten" your scenegraph in order to obtain the > > maximum performance. During > > the flattening, j3d might create additional > > geometries, thus increasing the > > memory usage. That side effect you can avoid using > > immediate mode rendering, > > of course at the expense of the rendering time. > But > > since you are creating > > off-screen images, I suppose that shouldn't matter > > so much. > > > > Cheers, > > > > Florin > > > > > ==========================================================================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". > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, > live on your desktop! > http://platinum.yahoo.com > > =========================================================================== > 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". __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com =========================================================================== 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".
