#1
|
|||
|
|||
Vizard-PPT conversion
Hi, three questions which are basically the same:
a. is there a way to adjust the movement speed inside the vizard simulation, when the input is from a ppt-tracker? if so, how? b. same for adjusting eye-height. c. Is there a way to convert from the point-system in the ppt to the scene in the vizard, and vice-versa? Basically, I'm replacing the former VR lab programmer which more or less disappeared, and there's a problem with the simulation he left, that the movement speed is very slow. I tried scaling the scene down, but this seemed to have just scaled the POV and movement speed of the PPT with it, as far as I can see - movement is very slow. |
#2
|
|||
|
|||
a. You can scale movement using the <link>.postScale command:
Code:
tracker = vrpn.addTracker('PPT0@hostname',0) link = viz.link(tracker,viz.MainView) #Scale X and Z movement by a factor of 2 link.postScale([2,1,2]) Code:
link.postTrans([0,2,0]) |
#3
|
|||
|
|||
Thanks!
I used this method, which solves the problems (although it needs extreme measures - I had to scale by [90,30,90]), but now I have odd jumps - on some fixed points, when I turn my head the view just jumps about 30-40 degrees to the left. about c: I meant that I could work with the PPT's coordinate system directly in the vizard. would make setting up scenes a whole lot simpler. |
#4
|
|||
|
|||
It sounds like your model is still too large if you have to scale the movement by that amount.
The coordinate systems in Vizard and PPT are the same. If you're not scaling the movement in Vizard and you move one meter in PPT that will move the viewpoint one meter in Vizard. |
#5
|
|||
|
|||
Could it be that the PPT is scaling the movement? I tried using the "tune" function, but it didn't seem to change much.
My model is scaled to factory defaults, 1:1 - but even simple added white picket fences appear as too high without scaling. |
#6
|
|||
|
|||
No, PPT would not scale the movement. If you're using Vizard 4, try loading your model in Inspector to view it's dimensions and make sure the size is correct. If the model was not exported with meters as the unit of measurement it will not be scaled correctly once it's loaded in Vizard.
|
#7
|
|||
|
|||
Hi, nihohit,
Could you try to recalibrate your PPT system with the cal-rig again? Also, I want to verify the size of your calibration rig. The corner LEDs should be close to 57cm apart (not in diagonal direction). You can verify it one more time after the re-calibration process by checking the coordinate system of the light showing in PPT Studio. |
#8
|
|||
|
|||
Hey,
I'm using Vizard 3, and when using the 3d screem to check the stage, or when using the program in debug mode, where the input isn't from the PPT, everything is ok - the eye height is correct and so's the movement speed. I've now recalibrated the PPT, and set evey value under "tune" to 1, but the problem of movement speed & wrong eye height persist when not scaled, and when scaled by the quoted factors, there's still view-point skipping. Also, I recreated an empty set, with just the stage and no programming code whatsoever, and the same problems persisted. |
#9
|
|||
|
|||
I don't know if this is also related, but I just noticed that while I calibrated on the floor, and made sure (by the floor tiles) that the set will be perpendicular to the walls, models appear at some angle to what I would've expected.
|
#10
|
|||
|
|||
Checked with another stage, now - the eye-height problem didn't appear, so that must be something that is due to the stage.
|
#11
|
|||
|
|||
I think the code you are using is changing the PPT data before it is applied to the viewpoint. PPT always outputs in meters and is oriented in the positive z direction of the calibration square. Try running only this code only:
Code:
import viz import vizact viz.go() viz.add('court.ive') vrpn = viz.add('vrpn7.dle') tracker = vrpn.addTracker('PPT0@hostname',0) def updateView(): pptPos = tracker.getPosition() viz.MainView.setPosition(pptPos) vizact.onupdate(viz.PRIORITY_DEFAULT, updateView)
__________________
Paul Elliott WorldViz LLC |
#12
|
|||
|
|||
That certainly seems to help - movement still needs a bit of scaling up, but a lot less then before.
BUT with this code the program doesn't receive the helmet's tilt controls. When I add: track = viztracker.add() then there's tilt controls, but now the room and movement directions in the simulation are again at some degree from the room originally - forward movement is slightly skewed (and so's sidestepping), and the corners of the court are around the center of the lab's walls. |
#13
|
|||
|
|||
BTW, it seems that what has caused the slowdown in movement was using viz.link(track,viz.MainView) as the tutorials suggest. Any reason for it?
|
#14
|
|||
|
|||
Also, I now checked the helmet, it seems its sensor is set to 30 degrees off - I used print track.getEuler() and when looking forward the average num was [60,0,0] - how do I recalibrate/reset it?
|
#15
|
|||
|
|||
With the viztracker module, people often code in a "reset" to aligne the orientation sensors coordinate system with PPT cooreinate system. It works by facing the orientation sensor in the postive Z direction of PPT, then pressing some key on the keyboard. Usualy this key is 'r' or alt-r.
Its easy to code a reset yourself if you want to do that. On a key press, grab the current raw yaw value of orientation sensor and subtract all subsequent yaw readings from this saved value before applying orientation to view.
__________________
Paul Elliott WorldViz LLC |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Realistic Light and Shadows Using Vizard and 3DS Max | jde | Vizard | 4 | 07-13-2012 10:58 AM |
Vizard 4 Beta Testing | farshizzo | Announcements | 0 | 02-01-2011 10:46 AM |
Vizard 4 Beta Testing | farshizzo | Vizard | 0 | 02-01-2011 10:46 AM |
.3DS importing in Vizard and 3D Studio | jde | Vizard | 1 | 08-28-2009 03:14 PM |
Vizard tech tip: Using the Python Imaging Library (PIL) | Jeff | Vizard | 0 | 03-23-2009 11:13 AM |