WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-17-2019, 09:05 AM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
Fill the Vive's FOV with textures from a rendernode attached to mainview

Hi folks,

I'm using the Vive and can't seem to calculate the field of view used by vizard for the stereo rendering. I need this along the binocluar and vertical directions.

Ultimately, I would like to render textures passed from a rendernode attached to the mainview onto a screen/rectangle that fills the person's FOV.

Success would look very much like the original stereo projection, except that the viewer is really viewing a monocular display similar to a rear-projected screen that is stable within the head's frame of reference. Togglign the alpha of the screen would have no major effects except add/remove stereo disparity information.

Example code below (for use with a Vive) that is lacking in two important ways:

- I must set the camera's field of view to match the binoc field of view used when rending for the vive

- I must set the height/width of the screen so that it matches the binc. field of view, overlapping with the stereoscopic field of view inside the Vive.


Code:
# Create render node for camera
cam = viz.addRenderNode()
#cam.fov = 100.0
#cam.setFov(100,1.5,.1,50)
#cam.setSize(1280,720)
cam.setProjectionMatrix(vizconnect.getRawTracker('head_tracker').getMatrix())
cam.setRenderTexture(video)
cam.setMultiSample(viz.AUTO_COMPUTE)
cam.setRenderLimit(viz.RENDER_LIMIT_FRAME)

#cam.setProjectionMatrix(hmd.getMatrix())

# Get handle to screen object and apply video feed to it
screen = vizshape.addBox([1,1,0,])#,top=False,bottom=False,left=False,right=False,back=False)
#screen.setScale([1.845,1.155,1])
screen.texture(video)
cam.renderOnlyIfNodeVisible([screen])
screen.setReferenceFrame(viz.RF_VIEW)

#screen.setPosition([0,0,1])
screen.setPosition([0,-.12,1])
screen.renderToAllRenderNodesExcept([cam])
screen.alpha(0.7)
Reply With Quote
Reply


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
Mainview can't go back to original point jacky Vizard 1 06-04-2013 05:22 AM
Multiple Textures for Diffuse and Specularity Shader Issue shivanangel Vizard 1 05-11-2009 11:44 AM


All times are GMT -7. The time now is 05:26 AM.


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