#1
|
|||
|
|||
moving viewpoint vs. translating Head_pos
Hello, what exactly is the difference between moving the Head_position using the viewpoint command:
view.move and moving it by the translate command viz.translate(viz.HEAD_POS)? Do they do the exact same thing? Thanks, Jeremy |
#2
|
|||
|
|||
Hi Jeremy,
viz.translate(viz.HEAD_POS) is mostly there for backwards compatibility. It will translate the head position relatively to the current position. viewpoint.translate will translate the head position either absolutely or relatively, depending on the optional fourth parameter. (The default is absolute) viewpoint.move will translate the head position relative to the current orientation. So the following will move the viewpoint forward by 1 meter, no matter what the orientation is: Code:
viewpoint.move(0,0,1) |
#3
|
|||
|
|||
moving viewpoint vs. moving environment
Which method of creating a motion simulation through an environment is more difficult to render? For instance, to create the illusion of moving down a hallway, I could:
1) Translate the hallway object (using object.translate or vizact.move) past a stationary viewpoint, or 2) Translate the viewpoint through a stationary hallway object. Which is more efficient for real-time motion simulations? I have created motion simulations involving forward translation through a hallway with oscillatory roll rotations super-imposed. I translated the viewpoing using "viz.translate(viz.HEAD_POS)"... does this impose a great workload on the computer? Is rendering performance better when translating the object as opposed to the HEAD_POS? -Jason |
#4
|
|||
|
|||
Hi,
There is no difference between translating an object versus the viewpoint as far as the graphics card is concerned. The end result is the same. In general it is more intuitive to translate the viewpoint, even more so when rotations are involved. |
#5
|
|||
|
|||
Thanks...
What about using one method versus another? E.g., viz.translate(viz.HEAD_POS) or view.move() |
#6
|
|||
|
|||
Hi,
viz.translate(viz.HEAD_POS) is different from view.move(). The first will translate the viewpoint relative to the global reference frame. The latter will translate the viewpoint relative to the local reference frame. view.move() requires more calculations, however the difference should be negligible. |
|
|