|
#1
|
|||
|
|||
Displaying a Subwindow in Oculus Rift
Hi everybody,
I'm trying to display a subwindow in the Oculus Rift DK2, and at my old setup it worked ok (I updated vizard and the oculus runtime) but now I can't display it any longer and I'm not sure how to fix it. Since I want to display a different viewPoint, which will also be updated during the experiment using a gui and displaying a screenshot is not really a solution for me. Any suggestions? Thanks a lot! |
#2
|
|||
|
|||
It's not possible to render sub-windows on the Oculus with recent versions of Vizard. The following is from the Vizard docs:
Quote:
|
#3
|
|||
|
|||
Hi Jeff, thanks! I will give it a go.
Cheers |
#4
|
|||
|
|||
Take a look at the following example. This is a modified version of renderNodeSimple.py with a render node texture on a quad fixed to the screen:
Code:
""" This script demonstrates how to use render nodes to create a virtual video camera. Press spacebar to toggle the camera between panning and following the avatar. Use the mouse and WASD keys to navigate around the room. """ import viz import vizact import vizcam viz.fov(60) viz.go() import vizinfo vizinfo.InfoPanel(align=viz.ALIGN_LEFT_BOTTOM) # Use keyboard/mouse camera cam = vizcam.WalkNavigate() viz.cam.setHandler(cam) # Add environment model = viz.add('pit.osgb') # Create render texture for camera video feed video = viz.addRenderTexture() # Create render node for camera cam = viz.addRenderNode(size=(1280,720)) # Do not inherit view/projection settings from main window cam.setInheritView(False) # Set FOV for video camera cam.setFov(60.0,1280/720.0,0.1,1000.0) # Render to video feed texture cam.setRenderTexture(video) # Only render once per frame, in case stereo is enabled cam.setRenderLimit(viz.RENDER_LIMIT_FRAME) quad = viz.addTexQuad(pos=[1,0.6,2]) quad.setReferenceFrame(viz.RF_VIEW) quad.texture(video) quad.drawOrder(100) quad.disable(viz.DEPTH_TEST) quad.renderToAllRenderNodesExcept([cam]) # Don't render to texture if screen isn't visible (optimization) cam.renderOnlyIfNodeVisible([quad]) # Add avatar walking around in circles avatar = viz.addAvatar('vcc_male2.cfg') WalkSequence = vizact.sequence( vizact.walkTo((0,0,5)) ,vizact.walkTo((5,0,0)) ,vizact.walkTo((0,0,-5)) ,vizact.walkTo((-5,0,0)) ,viz.FOREVER ) avatar.runAction(WalkSequence) # Create attachment point for panning camera pan_camera = viz.addGroup() PanEulers = (100,45,0), (170,45,0) pan_camera.setPosition([-10.94835, 11.09378, 13.61334]) pan_camera.setEuler(PanEulers[0]) PanAction = vizact.sequence( vizact.spinTo(euler=PanEulers[1],speed=5) ,vizact.spinTo(euler=PanEulers[0],speed=5) ,viz.FOREVER ) pan_camera.runAction(PanAction) # Create attachment point for following avatar avatar_camera = viz.link(avatar,viz.NullLinkable) avatar_camera.preTrans([0,2,-2]) avatar_camera.preEuler([0,10,0]) # Toggle between attachment points with spacebar camera_link = viz.link(pan_camera,cam) vizact.onkeydown(' ',camera_link.setSrc,vizact.choice([avatar_camera,pan_camera])) |
#5
|
|||
|
|||
Thanks! That solved all my problems!
cheers! |
Tags |
oculus, subwindow, viewpoint |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Oculus Rift and 360 Panorama with Vizard Lite Edition | mshukun | Vizard | 4 | 11-10-2015 12:17 PM |
Multiple post-process effects with oculus rift | lklab | Vizard | 2 | 03-13-2015 02:48 PM |
Oculus Rift connection problem | mshukun | Vizard | 1 | 10-01-2014 01:15 PM |
Displaying screen text in 3D (Oculus Rift) | pjayaram | Vizard | 2 | 05-27-2014 09:06 PM |
Oculus Rift Fullscreen | teklab | Vizard | 6 | 05-21-2014 07:11 AM |