Hi Jorn, I haven't tryied for myself, but I would suggest to split the scene into 2 objects:
a) the main scene, which will include everything that's in the close distance, and with which you won't have any problems with the Z-Buffer b) a background *geometry*, not a texture, but one or more point arrays. Here you will put all the visible distant stars. It will not be very complicated and it will be fast enough to update the positions of the stars in the background whenever your view camera position changes significantly, i.e. when you jump from one star to another. I can't see any problems with that approach, which is simple and fast enough. I think you will be even able to simulate a faster-than-light travel between stars with dynamic update of star positions every frame. Cheers, Florin -----Original Message----- From: Discussion list for Java 3D API [mailto:[EMAIL PROTECTED] Behalf Of Jørn Cornelius Olsen Sent: Montag, 10. November 2003 13:42 To: [EMAIL PROTECTED] Subject: Re: [JAVA3D] Clipping work-around question Hi again, /* While typing this message, I got the one from Jeremy Booth, who seems to suggest a similar approach. Thanks Jeremy. Can you also help me with the additional questions (latter part of posting)? */ Even though the below suggestions would seem to denote a possible solution, I'm afraid they don't. You see in fact it has nothing to do with the size of things. What is important is the _ratio_ between far and near. It's really a hardware thing: When the virtices have been streamed to the hardware, it uses a so-called Z-buffer to hold the distances from each *as an integer* - and this is the real problem. Depending on the size of this buffer the variation between distances is limited. Sun recommends a ratio no larger than 3000 - but then again, it's hardware dependent. Distances are scaled to fit into this buffer. On my hardware I can use a ratio up to about 10M:1 which seem to imply a 24 bit Z-buffer - 0.00001LY becomes (int)1 and 100LY becomes 2^24=(int)16777216. If I were to scale everything from light years to meters would really make no difference since 100LY/1LY=100m/1m. One way of circumvent this, that I can identify, would be to render several views with different clipping regions to the same canvas. Using a minimum ratio of 10000: Far objects would be clipped from 100LY to 0.1LY Intermediate objects would be clipped from 0.1 to 946 million kilometers. Near objects would be clipped from 946 Gm to 946 Mm. ...or something like that... * Would that be possible and how could one do it? * Obviously the different renderings would have to applied in a certain order. Can that be controlled? * When every view is rendered except for the first, it would have to be applied to the previous image with the background colour (black) as transparent. Could one use an offline canvas for this? * Is Java3D smart enough to recognise that each view has the same transform and only the clipping changes and avoid a 1:N increase in rendering time (N being number of layers or clipping regions used). * By Jeremy's suggestion I could delay rendering of distant objects and use the previous rendering as a background, but to do that I would have to somehow project the whole world (the infinity sphere) onto something that could be used as a background. Is that really possible and how? Regards /Jørn From: Joachim Bratteli <[EMAIL PROTECTED]> Hva med å skalere modellen ned slik at den passer innenfor back clipping-plane? 1 enhet behøver jo ikke alltiv være lik 1 meter. From: Michael Pfeiffer <[EMAIL PROTECTED]> Thesolution for your problem is simple: scale the complete scene. E.g. you could use mm instead of km. You can't see any difference in the scene if you do that. =========================================================================== 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".