Stereo

From Croquet Consortium

Jump to: navigation, search

Daniel Faken's ChemStereo Croquet code

I (Daniel Faken) made some modifications to the Jasmine version (0.2 I think) of Croquet, to support use in a CAVE (at Brown University). I also had support for various stereo modes (quad-buffered, frame-sequential, anaglyph, Sharp RD3D..). This was running on a distributed Linux cluster. I believe I had tracking working using VRPN libraries directly via the Squeak FFI (libffi?). Alas for the code, I left this job about a year ago..

It was designed to use Croquet's networking capabilities, which unfortunately didn't appear in any stable fashion until more recently (Hedgehog). As a result, none of this was really "stable", and so it wasn't neatly packaged for release.

At Ed Boyce's request, I've recently rereleased some of this under the Croquet license. I don't think this includes the VRPN code, but I might be able to find it if you really need it.

That code is contained in a modified version of a Jasmine, which also contains an image and code with change of scale perspective capabilities.

Download it here: ChemStereoMultiScalePerspectiveCroquet0.3.tar.gz

Basically it defines the CAVE configuration in Croquet 3D space: you position the screens, the head, the eyes on the head with the desired interocular distance, etc. and the projections are automatically calculated. To change the projections in accordance with a tracked head, you just move the head object relative to the screens (you can actually do this interactively). And each croquet node, of course, is mapped to a particular screen object (rectangle).

As I recall, the difficult parts of this are determining the correct projections given the head/eye/screen positions, and dealing with using Croquet's 2D input system (the mouse). The latter can be problematic because Croquet assumes a single projection is correct, but of course for stereo you have two, and for multiple screens...

I did have to do some simple low-level modifications to Croquet's OpenGL interface, to support using Stereo visuals. (maybe this has been addressed in hedgehog, though) And for anaglyph stereo (which you may not be interested in) it was important to go through Croquet for changes to the relevant rendering parameters, since they were being modified somewhat haphazardly (not using glPush/PopAttrib(), possibly out of efficiency concerns).

For tracking, I found it much easier to use a simpler direct interface to the trackers (VRPN) and coordinate separate nodes within Croquet. In fact, as commonly suggested by Smalltalk proponents, I found it best to move as much as possible (but no more) into Croquet, since it was then much easier to work with with regard to modification, debugging and networking/synchronization.

None of these things depend on using Linux, so MSWindows should be fine.

I don't have time to port these things to Hedgehog, but I'm definitely glad to answer questions etc.

cheers, Daniel Faken dbfaken@comcast.net

Views
Personal tools