WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 07-29-2016, 06:15 AM
DoeVenture DoeVenture is offline
Join Date: Jul 2016
Posts: 3
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!
Reply With Quote
Old 07-30-2016, 04:30 AM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
It's not possible to render sub-windows on the Oculus with recent versions of Vizard. The following is from the Vizard docs:

The Oculus SDK is provided the rendered image of the world and automatically performs the distortion correction before displaying the image in the HMD. All other rendering performed after the world (i.e. screen objects and sub windows) will not appear in the HMD. You can use GUI canvas nodes to display UI to the user with proper distortion correction applied. See the Oculus example script for sample code.
You could try using a render node to display a different view on a quad rendered in the world. The example script (File > Quick Open: type 'renderNodeSimple') shows how to use a render node. The node.setReferenceFrame method with the viz.RF_VIEW flag can be used to fix the quad to the screen.
Reply With Quote
Old 08-01-2016, 01:11 AM
DoeVenture DoeVenture is offline
Join Date: Jul 2016
Posts: 3
Hi Jeff, thanks! I will give it a go.
Reply With Quote
Old 08-01-2016, 09:44 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,471
Take a look at the following example. This is a modified version of with a render node texture on a quad fixed to the screen:

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


import vizinfo

# Use keyboard/mouse camera
cam = vizcam.WalkNavigate()

# 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

# Set FOV for video camera

# Render to video feed texture

# Only render once per frame, in case stereo is enabled

quad = viz.addTexQuad(pos=[1,0.6,2])

# Don't render to texture if screen isn't visible (optimization)

# Add avatar walking around in circles
avatar = viz.addAvatar('vcc_male2.cfg')
WalkSequence = vizact.sequence(

# 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])
PanAction = vizact.sequence(

# Create attachment point for following avatar
avatar_camera =,viz.NullLinkable)

# Toggle between attachment points with spacebar
camera_link =,cam)
vizact.onkeydown(' ',camera_link.setSrc,vizact.choice([avatar_camera,pan_camera]))
Reply With Quote
Old 08-02-2016, 05:57 AM
DoeVenture DoeVenture is offline
Join Date: Jul 2016
Posts: 3
Thanks! That solved all my problems!
Reply With Quote

oculus, subwindow, viewpoint

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oculus Rift and 360 Panorama with Vizard Lite Edition mshukun Vizard 4 11-10-2015 11:17 AM
Multiple post-process effects with oculus rift lklab Vizard 2 03-13-2015 01:48 PM
Oculus Rift connection problem mshukun Vizard 1 10-01-2014 12:15 PM
Displaying screen text in 3D (Oculus Rift) pjayaram Vizard 2 05-27-2014 08:06 PM
Oculus Rift Fullscreen teklab Vizard 6 05-21-2014 06:11 AM

All times are GMT -7. The time now is 08:23 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC