M. Mark Wood,  as I started to discover both 3D and java3D 6 month ago I was surprise to
be able to understand most of wath I asked for.
 But concerning the documentation issue,I do agree with you I have had some problem
to understand the view model (view frustrum,....).
Thanks then.
 
I am glad to see people like you are working hard to improve the "public accessibility" for
beginers and people discovering java3D.  Maybe  sites/docs/communication should be eased for those
beginers (those who prohramm in java but not yet in 3D). More visual for sure.
 
The java3D technical sucess is already quite a success (for me at least) whereas the communication is not so good I think.
Some might argue that java3D is for tecky people but it is not with those kind of argument you build a sharp success.
Most of my java developper colleagues don't even know about the "java3D" name....
 
Since java3D is a pure "visual" API could it be not possible for sun to build a nice very cool and enjoyable internet site ?
with screens shots of cool java3D softwares... and documentation with a lot of drawings and screen shots.
 
Hope java3D will be a nice success. It deserves it
Thierry, Paris 
 
-------Original Message-------
 
Date: Saturday, June 12, 2004 02:54:54
Subject: Re: [JAVA3D] Java View model ...
 
> I´m writing an application where a user will be standing beside a screen that
> is facing upwards. He will be looking down on a virtual world with a
> landscape/map and some moving objects.
>
> This requires a skewed view frustrum.
 
Yep.
 
> The Java view model is not really fully documented ...
 
It's terrible. I think it's really only fully documented by the source code,
and even then I would not have come to a full understanding without access to
the people who implemented it. I tried to address this problem with the
utility class com.sun.j3d.utils.universe.ViewInfo -- there is extensive
javadoc there, and the source code is available. The class is essentially a
reimplementation of the Java 3D view model designed for public access.
 
The essential things to keep in mind with the Java 3D view model:
 
1) View frustums are established by specifying the physical position of the
viewer's eyes (either through a nominal viewing position or by actually
tracking the user's head position with hardware) relative to the physical
viewing surfaces (usually a window on a flat display surface). That is, the
projection frustum is literally determined by the position of an eye at the
apex of the frustum with respect to the corners of the Canvas3D.
 
2) The positions of all eyes and viewing surfaces are positioned relative to
each other through what is known as the coexistence coordinate system. The
orientation of coexistence coordinates with respect to image plate coordinates
can be completely arbitrary, but in most cases it is aligned with image plate
coordinates and centered in the middle of the Canvas3D or screen. Both image
plate coordinates and coexistence coordiantes are physical coordinate systems
measured in meters, with no scaling between them.
 
3) Physical cooexistence coordinates are positioned with respect to the virtual
universe coordinate system (where your geometric model lives) through the
ViewPlatform. The ViewPlatform is always aligned with coexistence coordinates,
but may have different scaling and a different origin/offset. The ViewPlatform
is an ordinary Node, and so by scaling, positioning, and orienting the
ViewPlatform, Java 3D is able to compute the correct projection of the virtual
universe onto the physical display surfaces.
 
> The example ManualEyeDemo is good and points out that you have to use
> RELATIVE_TO_SCREEN eyepoint policy in order to be able to set the eye's x, y
> and z position using setLeftManualEyeInImagePlate() and
> setRightManualEyeInImagePlate().
 
That would work, but if I were to write that demo over again, I'd set the eye
positions relative to coexistence -- the coexistence coordinate system is
aligned with the screen and follows the window center by default.
 
To get to your specific question... assuming your window takes up the full
screen, and you are using only one screen with no head tracking:
 
Keep coexistence centering to the default value of "enabled" -- this aligns the
coexistence coordinate system with image plane coordinates. The origin of the
coexistence coordinate system in that case is then determined by the window
movement policy: with the default of PHYSICAL_WORLD, the origin is set to the
center of the Canvas3D, and when set to VIRTUAL_WORLD, the origin is set to the
center of the screen. You should set the window movement policy to
VIRTUAL_WORLD for the setup you describe.
 
With a single screen and no head tracking, you shouldn't need to set
coexistenceToTrackerBase and trackerBaseToImagePlate (in fact, with coexistence
centering enabled, those transforms are ignored). Those transforms are used to
orient multiple screens with respect to coexistence coordinates.
 
The coexistence and image plate coordinate systems are physical coordinate
system measured in meters. Since you will be constructing a skewed view
frustum that corresponds to the nominal physical position of the viewer's eyes,
you will need to make sure that your screen metrics are correct. Unless you
specify the screen dimensions explictly, Java 3D assumes a resolution of 90
pixels per inch. In your case, it is essential that you get out a ruler and
measure the exact dimensions of the image area on the screen, and set them using the methods in Screen3D.
 
Now you can specify the positions of the user's eyes in coexistence coordinates
to get the exact viewing frustum you require. Call
View.setWindowEyePointPolicy(View.RELATIVE_TO_COEXISTENCE) and then call
View.set{Left,Right}ManualEyeInCoexistence() with the eye positions.
 
For more details read the source code to com.sun.j3d.utils.ViewInfo. In
particular, see ViewInfo.getViewPlatformToCoexistence() to understand how the
scale and offset of the ViewPlatform is computed with respect to coexistence
coordinates. You may also find the documentation for the Java 3D configuration file useful -- you can get there through the class overview of
com.sun.j3d.utils.universe.ConfiguredUniverse.
 
-- 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".
 
.
____________________________________________________
  IncrediMail - Email has finally evolved - Click Here
=========================================================================== 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".

Reply via email to