Doesn't this assume you are not interested in *any* kind of transparency or rendering order? I thought in order to get the correct depth in transparency rendering order you *had* to use a transform group to position the geometry. Otherwise, Java3D assumes all the geometry is at (0,0,0) and will not "correctly" render the objects, one in front of the other.
(This kind of detail is why I continue to look for something "better". Something that has *by default* all the setings to render a scene as if the objects are in the real world. To try to figure out what all the parameters are to get it to render the objects "correctly" is a big effort. And I still can't get some things to render correctly. Neither can SUN, apparently, as in at least one demo, I think it was a fly through demo, some of the objects were noticably rendered in front of other objects, when they should have been rendered behind an object. I just want to define the geometry and behavior and not have to figure out the technical details of rendering. All defaults should be set to render a scene as in the real world.....) Cheers, Bob Gray -----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] Behalf Of Florin Herinean Sent: Wednesday, February 26, 2003 11:17 AM To: [EMAIL PROTECTED] Subject: [JAVA3D] AW: [JAVA3D] AW: [JAVA3D] AW: [JAVA3D] Java 3D or GL4Java (also s olution to la rge number of geometry problem) Let's get some more numbers: SceneGraph displays 27000 spheres. Approach 1: 27000 TG + 27000 Shapes + 1 Appearance + 1 Geometry, uses aprox 140 MB. That means roughly 5k per TG+Shape combination, and a grand total of 54000 objects to be eventually garbage collected Approach 2: 900 TG + 900 Shapes + 1 Appearance + 30 geometries, uses aprox 15 MB, and makes a grand total of 1830 objects. In both cases, one Sphere uses aprox. 400 vertices and normals (no texture) - 9.6 kb We have made an economy of (26100 tg+shapes) * 5k = 130MB and only used for the extra 30 geometry 288 kb With a quick calculus, it's easy to observe that <b>for that specific problem, i.e. 27000 spheres</b>, the optimum memory usage is obtained with 250 TG+S and 108 geometries per shape, leading to a total memory usage of aprox 2.5 MB with only 610 objects !!! So, in a scenegraph containing only homogeneous spheres, the optimum is : TG = sqrt(2 * n-spheres), Geom-per-shape = n-spheres/TG Cheers, Florin -----Ursprüngliche Nachricht----- Von: N. Vaidya [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 26. Februar 2003 16:20 An: [EMAIL PROTECTED] Betreff: Re: [JAVA3D] AW: [JAVA3D] AW: [JAVA3D] Java 3D or GL4Java (also solution to la rge number of geometry problem) Hi Ian and Florin, This problem of when and when not to use TGs was examined by Chien and and to some extent by me sometime last year IIRC. I think it is a compromise and mostly app. specific. Chien gave the useful stat. that TG + Shape3D takes ~3.6K (off the top of my head). http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0204&L=java3d-interest&P=R76 84&D=1&O=D&m=29246 http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0204&L=java3d-interest&P=R15 076&D=1&H=0&O=D&T=1&m=29246 Rgds Raj Vaidya 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".