PDA

View Full Version : avatar in one eye


TunTun
06-02-2007, 12:07 PM
Hi,

The system works fine for other programs, and only got problem in my code. The problem is after I put on HMD, all background look normal, I mean they are stereo. But all objects, e.g. the avatar and duck, can be seen only by one eye. Does anybody have any clue for it?

My code is:

import viz
viz.go(viz.PROMPT)

viz.clearcolor(0.5,0.5,1)
ground = viz.add('tut_ground.wrl')

### Add observer model.
observer = viz.add('Male.cfg')

### Add reference Model
object = viz.add('Male.cfg')
object.rotate(180,0,0)
object.translate(0,0,7)

### Add duck Model
leftHand = viz.add('duck.cfg')
leftHand.scale(0.1,0.1,0.1)


### Change viewpoint to look at your feet
view = viz.get(viz.MAIN_VIEWPOINT)


### Get handles to all lights
ori = viz.add('intersense.dls')
light1 = viz.add('vizppt.dls') # Head
light2 = viz.add('vizppt.dls') # Left hand

### Manually Update The Avatar's position
def mytimer(num):
headOri = ori.get()
data1 = light1.get()
data2 = light2.get()

if data1[1] > data2[1]:
headPos = data1
leftPos = data2
else:
headPos = data2
leftPos = data1

yaw = headOri[3]
pitch = headOri[4]
roll = headOri[5]
viz.reset(viz.HEAD_ORI)
viz.rotate(viz.HEAD_ORI, yaw, pitch, roll)

x = headPos[0]
y = headPos[1]-1.82
z = headPos[2]
viz.reset(viz.HEAD_POS)
viz.translate(viz.HEAD_POS, x,y,z)

observer.translate(headPos[0], headPos[1]-1.82, headPos[2]-0.2)
leftHand.translate(leftPos[0], leftPos[1], leftPos[2])

viz.callback(viz.TIMER_EVENT,mytimer)
viz.starttimer(0,0.01,viz.FOREVER)

ori.reset()
light1.reset()
light2.reset()



Thanks.

mspusch
06-05-2007, 05:17 PM
if this is the case, you are running your nVidia card in DualView mode instead of the nVidia based horizontal span mode.

see
http://www.worldviz.com/support/hardware_faqs.html

switch it to 'horizontal span' and your problems will be fixed. AND you will have a much improved rendering performance.

TunTun
06-05-2007, 09:58 PM
Thanks for the advice. I'll check it.

TunTun
06-11-2007, 02:15 PM
This response is late, but just want to let you know.

Yes. It was the case that my nVidia card running in DualView mode instead of the nVidia based horizontal span mode. So it works now. Thank you so much.

BTW, before I changed the mode, I found other programs works fine because their objects are wrl files, while my objects can be seen only by one eye becuase they are cfg files. I don't really understand the difference between wrl and cfg files. Can someone give an explaination?

Thanks a lot.

farshizzo
06-11-2007, 03:54 PM
cfg objects are used for avatar rendering. However, there shouldn't be any difference in stereo rendering between cfg and wrl objects. Can you post an example script that reproduces the problem?

TunTun
06-12-2007, 01:46 PM
Hi,

Please see the sample in the first post in this thread. But as I said, the difference only existed before I changed the running mode of nVidia. After I use horizontal span mode, nothing different.

Thanks,