> Date: Thu, 6 Mar 2003 10:50:39 +0100 > From: Karsten Fries <[EMAIL PROTECTED]> > > i finally worked out how to set different transforms for each eye to produce > stereo images. but i have to use compatibiliy mode...
I saw your first post but didn't have time to respond. Why do feel you have to use compatibility mode to get stereo views? All you should need to do is create a stereo Canvas3D by setting setStereo(REQUIRED) on GraphicsConfigTemplate3D and then enable stereo with setStereoEnable(true) on the Canvas3D. Some people have had trouble obtaining a stereo canvas with various PC cards, but if you haven't encountered that then stereo should be pretty easy to set up. Most of the example programs shipped with Java 3D can be viewed in stereo by setting the Java command line parameter j3d.stereo to true. > Date: Wed, 5 Mar 2003 08:41:26 +0100 > From: Karsten Fries <[EMAIL PROTECTED]> > > does anyone have a nice stereo implementation for the open gl version of > java3d. i implemented a little stereo setting [...] > > Point3d leftEye = new Point3d(); > getView().getPhysicalBody().getLeftEyePosition( leftEye ); > leftEye.x = -0.003f; > > Point3d rightEye = new Point3d(); > getView().getPhysicalBody().setLeftEyePosition( rightEye ); > rightEye.x = 0.003f; > getView().getPhysicalBody().setRightEyePosition( rightEye ); Not sure what you're trying to do here. It looks like you set leftEye to [0, 0, 0] and rightEye to [0.003f, 0, 0]. The default PhysicalBody settings for left and right eyes have a separation of 0.066 meters, which is about right for most people. > but the eyes look parallel into the scene. how can i focus them on a > specified point? It sounds like you might be confused about the eye basis vectors and stereo convergence. The eye coordinate systems are defined to align with the canvas/imageplate/screen, so +Z in eye coordinates is always aligned with +Z in screen coordinates. With the default window eyepoint policy, the eyes will be centered in the canvas in Y, with the X offsets equal to the interpupilary distances in the PhysicalBody (Z displacement is determined by the field of view). With a perspective view, each eye is at the apex of a skewed, truncated viewing frustum that defines the projection. The rays extending from each eye to the canvas corners define the sides of the frustum and the near and far clip planes are the truncated planes of the frustum. The center axes of these frustums converge to the center of the canvas and you could think of them as the nominal view vectors for each eye. So the orientations of the eyes don't matter, just their positions relative to the canvas. Your real eyes will converge and diverge depending upon the depth in the rendered image to which you wish to focus (although some people have trouble doing this since it requires decoupling the focal length of the lens of each eye from the stereo disparity between them; keeping objects near the plane of the screen helps). You might encounter problems with the stereo convergence being too wide or narrow. This means that the model in the virtual world is scaled too large or small, or that it is too close or far away from the eyes. It's preferable to adjust the scale of the virtual world through a transform or through an explicit screen scale factor and move the view platform appropriately, so that the eye separation in the PhysicalBody can be meaningfully calibrated for individual users, but some programmers just adjust the eye separation in the PhysicalBody directly to solve the problem. > related to this i found the problem that picking doesn't work correctly in > compatibility mode. am i missing a setting or is there definitly no (known) > solution/workaround? Picking is one of the things that requires the normal Java 3D view model to work correctly. No workaround is available. Hope that helps -- 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".
