PDA

View Full Version : need help with basics not opening in HTC Vive


rich0550
08-22-2016, 04:46 PM
I tried a basic scene..

import viz
viz.go()

test = viz.addChild('test.osgb')

the file is easily scene in inspector. I have the OSGB file in the same directory as the py file? Anyways nothing good happens when I run the scrip. The image is scrambled.

Also it is not opening at all in sterio. and not showing up on the HTC even though the tutorials are.

I tried modifying a tutorial but the CRC check replaced and reset it so thats out..

Any help appreciated.

Also how do I open the script with the demolauche64 or do I either way nothing is working at all.

Thanks in advance.

Rich

Jeff
08-23-2016, 04:50 AM
First make sure you follow the set up instructions on the SteamVR (http://docs.worldviz.com/vizard/#steamvr.htm) page and can run the example script mentioned there.

Then open vizconnect and select the HTC Vive preset configuration from the presets menu. You can save this file and import it into your own scripts to connect to the Vive hardware.

rich0550
08-23-2016, 08:53 AM
Thanks I am on it now and will try it

quick question before hand,

Why doesnt the demo scenes need these lines? I did not see this in the demo scenes when i tried to modify them. Or is the demo launcher a seperate thing?

import steamvr
hmd = steamvr.HMD()
viz.link(hmd.getSensor(), viz.MainView)

rich0550
08-23-2016, 09:45 AM
where is vizconnect? I do not see and exe for it. thanks

rich0550
08-23-2016, 06:06 PM
Thanks Jeff,

I got that much going. The scene I am working on is here. The scene is a house with a pool that has a mechanical top that goes up and down.

https://vimeo.com/130244140


We want to use WorldViz to show interactively how it works. Push a button see it cycle through the up and down positions. Also would be great to be able to walk on it, and be lowered by it. And be able to turn off the scene and watch the inner workings of the pistons and such.

I imported the OSGB of the pool (animated) and an OSGB of the house. The VR camera position looks wrong. The scale is wrong. Also I need to add the lighting back and most textures are not there. Can you advise me on getting some of the basics of this script going. Like having the scale correct and the VR cam able to move around starting in the correct point.

The max scene is in centimeters do i need to export osgb to centimeters or just set conversion to none?

how about getting the VR in the correct position in the scene or able to move about the scene. going down in the pool area and walking on the deck?

The lighting and textures I think I can follow the tutorial for that.

how about stopping the animated OSGB of the pool. or starting it how is that done? Sorry allot of questions this is about what I need to get this going.

I was able to get a good visconnect script (using vizconnect) to drop it in the file that was configured for the vive including hands. thanks. I backed off for now on that , and put back in this basic connections to the headset for starters.

Script below.

import viz
import vizfx
import vizconnect

import steamvr
hmd = steamvr.HMD()
viz.link(hmd.getSensor(), viz.MainView)

viz.setMultiSample(4)
viz.fov(60)
viz.go()

#Add environment model
day = viz.addChild('sky_day.osgb')

#Add Pool
pool = viz.addChild('Pool-none.OSGB')
pool.setScale([0,0,0])
pool.setPosition([0,0,0])

#Add house
house = viz.addChild('house.osgb')
house.setScale([0,0,0])
house.setPosition([0,0,0])

Jeff
08-28-2016, 03:11 AM
The max scene is in centimeters do i need to export osgb to centimeters or just set conversion to none?

Vizard uses meters. There is an option in the OSG exporter to convert to meters. See the OSG export (http://docs.worldviz.com/vizard/#exporting.htm) docs for more information.

how about getting the VR in the correct position in the scene or able to move about the scene. going down in the pool area and walking on the deck?

If vizconnect, a transport allows the user to move virtually with signals from an input device. The vive preset configuration in vizconnect has a transport configured to work with the controllers. You can also set the viewpoint (http://forum.worldviz.com/showthread.php?t=5331) to a specific location.

how about stopping the animated OSGB of the pool. or starting it how is that done? Sorry allot of questions this is about what I need to get this going.

Use the model.setAnimationState(state) command with one of the following state values: viz.PLAY, viz.PAUSE, viz.STOP, viz.TOGGLE

This thread (http://forum.worldviz.com/showthread.php?t=4419) shows how to use some of the commands to control an OSG animation.