> Date: Fri, 6 Jun 2003 19:34:01 -0500 > From: "ZACZEK, MARIUSZ P. (MARIO) (JSC-DM) (NASA)" <[EMAIL PROTECTED]> > if you use the "VIRTUAL_EYE" policy then it looks like > the front clip distance and actual distance to object > are the same: > > setFrontClipPolicy(View.VIRTUAL_EYE);
The clip policies do have the unfortunate default of PHYSICAL_EYE. The default values are 0.1 and 10.0 meters for front and back. With the default view parameters the center physical eye is in the middle of the Canvas3D in X and Y, with Z located at the offset needed to produce a horizontal field of view of 45 degrees. The default scaling from physical meters to virtual units depends upon the physical size of the screen, and if you don't actually set that attribute in Screen3D then it is computed based on a resolution of 90 pixels/inch. PHYSICAL_EYE is more appropriate for VR cave and HMD installations. My guess is that the default is an unintended holdover from an earlier VR view model that influenced the Java 3D model. The default really ought to be VIRTUAL_EYE to be consistent with the other view model defaults. > Still...Does anyone have an answer on the clip-distance=3000 question? There's no easy way to get around the resolution of the hardware Z buffer. For most consumer gaming cards this is 16 bits. Graphics cards intended for CAD and high-end visualization or graphics design usually have 32 bits of resolution, and I think there are some cards now with high precision floating-point Z buffers, but they're a lot more expensive. Do a search for "workstation" or "professional" class graphics cards and you should get some hits. Otherwise, you'll have to do what the game programmers do: fake it. Don't try to model real world units on the scale of the earth or larger. For objects that are too far away, render into a texture and paint it as a background. For objects that are too close, render into an overlay. When those techniques are unsuitable, adjust the scale and distances to your objects so that they fit within the Z resolution, but still have the correct apparent visual scale relationships. -- Mark Hood =========================================================================== 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".
