Hi Kyle, Actually, starting with this week I'm for the first time happy with my code. I'm able to correctly display any ldraw model using only the original dat files (certified or not, it doesn't matter), and the displayed image looks better than the one provided by ldview, while the memory usage is half of it and fps is double. In pure immediate mode I can use even less memory, without any real performance penalty. If you're interested to have a first glance of the product I can mail it to you - it's much more than you have seen on my web site.
And yes, the Flip Normals works perfect for me, tested on GeForce2 MX (32 MB), GeForce4 Ti (128 MB) and a quite old S3 Savage IX (8 MB, laptop), all OpenGL, using Win2K and WinXP. Regarding rewinding of polygons, it looks for me quite tricky, since inner surfaces must be CW to be displayed properly, only the outer ones have to be CCW. Do you also have an algorithm to detect which ones are inner and which outer ? Yes, you can know that if the files are certified, but if not, as are at the moment the majority of them, how do you know ? Cheers, Florin -----Ursprüngliche Nachricht----- Von: Kyle McDonald [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 26. März 2003 22:46 An: [EMAIL PROTECTED] Betreff: Re: [JAVA3D] AW: [JAVA3D] AW: [JAVA3D] Problem with Specular Color Florin Herinean wrote: > I can confirm that DirectX version is behaving correctly regarding the > specular lighting effect, as in the attached image. However, you can clearly > see from the image that DirectX version has it's own bigger problems which > makes it unusable for me: it is not honouring the Back-face normal flip > option in the PolygonAttributes constructor (see the very dark front facing > faces). Is this a bug in j3d or simply directx layer doesn't know about > back-face normal flip ? > Hi Florin, We've email'd in the past about LEGO and J3D. It looks like your code is coming along nicely. For the longest time I was also stuck on a problem that is similiar to what you are seeing I think. Does this work corectly for you in OGL? The Flip Normals flag didn't seem to ever (OGL or D3D) do what I wanted it to do. My code currently rewind all non CCW polygons to be CCW, and uses those points to calculate Normals. I then used CULL_BACK to elininate the back faces. Also if a sub file was referenced with 0 BFC INVERTNEXT, I switched to CULL_FRONT, so that it was rendered facing the other way. Similiar to what you are seeing, these polygons that are done with CULL front, still have the normals facing into the object, so that even though the culling worked correctly the lighting was shaded wrong. I originally thought that the backface normal flipping would flip these normals for me automatically, but someone in the J3D group here at sun explained to me why it wouldn't work (not even in OGL) - I don't remember the explaination right now. I ended up solving this by computing 2 sets of normals for each polygon, and then in addition to switching from CULL_BACK to CULL_FRONT when I see a 0 BFC INVERTNEXT, I also switch which normals I attach to the geometry array. It's not as elegant a solution as I might have liked, but it does work for me. -Kyle -- _ -------------------------------ooO( )Ooo------------------------------- Kyle J. McDonald (o o) Systems Support Engineer Sun Microsystems Inc. ||||| Enterprise Server Products [EMAIL PROTECTED] 1 Network Drive BUR03-4630 \\\// voice: (781) 442-2184 Burlington, MA 01803 (o o) fax: (781) 442-1542 -------------------------------ooO(_)Ooo------------------------------- =========================================================================== 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".