WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-02-2016, 07:23 AM
dcnieho dcnieho is offline
Member
 
Join Date: Feb 2011
Posts: 59
purpose of distance parameter in setRenderWorldOverlay

I have been experimenting with the distance parameter in setRenderWorldOverlay, while viewing a scene through an Oculus DK2. As i understand it, changing the distance should change the stereo-defined depth at which objects on the overlay appear (in my case just a dot, vizshape.addSphere). The manual literally says that this is "the distance in front of the viewpoint to projection the canvas onto", but i do not understand what that means. The distance in front of the focal plane perhaps (so how much closer to the observer)?

In any case, changing this distance by means of repeated calls to setRenderWorldOverlay does not seem to work. I used the ChangeOverlayDistance function below to try this. I perceived no change in depth of my object on the overlay So, does the distance parameter do anything? And what does distance in front of the viewport mean?

Thanks!

Code:
overlayCanvas = None
def setupScreenOverlay():
	global overlayCanvas
	overlayCanvas = viz.addGUICanvas()
	overlayCanvas.alignment(viz.ALIGN_CENTER)
	overlayCanvas.setRenderWorldOverlay(params.resolution,params.FOVy,params.aspectr,1.) # params.resolution,params.FOVy,params.aspectr are same as an oculus eye, so [1920, 1080], 106.18877140224711, and 0.8076826795303448
	overlayCanvas.setPosition([0,0,0])

distances = [1.,0.,-1.,-3.,-5.] # negative is perhaps behind the focal plane?
didx = 0
def ChangeOverlayDistance():
	global overlayCanvas, didx
	didx += 1
	print float(distances[didx%len(distances)])
	overlayCanvas.setRenderWorldOverlay(params.resolution,params.FOVy,params.aspectr,float(distances[didx%len(distances)]))

vizact.onkeydown ('d', ChangeOverlayDistance)
Reply With Quote
  #2  
Old 09-07-2016, 10:28 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The effect of changing the distance will only be noticeable if you are viewing in stereo. If the canvas position has some depth value you'll also notice the effects of the distance parameter more.
Reply With Quote
  #3  
Old 09-10-2016, 06:27 AM
dcnieho dcnieho is offline
Member
 
Join Date: Feb 2011
Posts: 59
Hi Jeff,

Thanks for the reply. I am viewing the scene through the DK2, so its in stereo. My problem is that setting different depth values makes no change in perceived depth of objects on the overlay. They are always very close. That is both when setting depth with the code in the OP, or when hardcoding and comparing 1 to, e.g., 10.

What do you mean by "If the canvas position has some depth value you'll also notice the effects of the distance parameter more"?

Another problem in understanding this is that what the manual says, "the distance in front of the viewpoint to projection the canvas onto", is ungrammatical and is hard to interpret. I have no idea what distance in front of the viewport refers to, as the viewport is not a distance in the virtual world. Is this something about focal length?

All the best,
Dee
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
<node3d>.color() [and others] and the node parameter fordprefect Vizard 0 02-17-2015 08:30 AM
Inferring distance traveled wimartin Vizard 1 07-07-2014 03:31 PM
Player - avatar distance bzyqo Vizard 2 08-09-2013 11:16 AM
Draw distance mape2k Vizard 1 05-14-2013 08:56 AM
Camera distance problem CRI Vizard 0 07-28-2010 11:58 AM


All times are GMT -7. The time now is 07:44 AM.


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