View Single Post
  #4  
Old 09-08-2023, 07:32 AM
apenngrace apenngrace is offline
Member
 
Join Date: May 2015
Posts: 13
Surprise! I finally figured out how to solve my issue! Our issue was that every time that we tried to test something in our CAVE, only a few screens would display an image and our floors would just show the clear color only. We would have to get up and wave the 3D glasses around every time we wanted to restart our program and see results.

We use Dtrack for our tracking system and VRPN to serve the data. I observed that when the glasses are out of range, it outputs [0,0,0] for the head position. I suspected that perhaps if the frustum top and bottom are on top of each other, the volume is 0 and not rendered.

I tried many things, such as digging through the cave objects, window objects, trying to mess with cave.update(), trying to look at getMatrix().getFrustum(). Nothing worked, especially since I could not get data from vizconnect regarding the windows on the remote system connecting over network with cluster master. I could not even get data when using maskedcontext and asking the client nodes to save data to disk.

Solution:
The thing that finally worked was messing with the tracker. The solution is to create a fake tracker, replace the "wrapped" tracker's reference to "raw" tracker to the fake tracker.

Code:
myGroup = viz.addGroup()
myGroup.setPosition([0,1,0])
wrapped = vizconnect.getTracker("dtrack_head")
raw_vrpn = wrapped.getRaw() # holding onto this to test if it changes from 0,0,0
wrapped.setRaw(myGroup)
I later wrote a class that starts a timer that watches if the VRPN value ever changes from [0,0,0] to other values. When that finally happens, it swaps the fake tracker and the raw vrpn tracker back.


Side Note:
I still do not quite know what the difference in terminology between the wrapped object and the raw object. They both seem like wrapped objects to me, so I was confused by this.

So apparently, there is a more generic "wrapped" tracker object, and the "raw" object is an object with characteristics specific to the particular hardware. It is VRPN and Dtrack in our case.
Reply With Quote