WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-26-2014, 07:46 AM
Notch Notch is offline
Member
 
Join Date: Jan 2014
Posts: 15
Create object with position relative to user head, but cannot be obstructed by others

I'm trying to simulate what it's like to have a form visual impairment. The condition causes 'holes' in the vision. For a basic form of this, I'd like to create an occluding quad that 'floats' in front of the user's viewpoint and covers anything seen.

My current solution is to create a quad with viz.HEAD as the parent. However, if I create this quad at exactly [0,0,0] from viz.HEAD, it is not seen. I need to shift the quad a few mm forward in order for it to be seen. Presumably, WorldViz models the 'eyes' of the user slightly in front of [0,0,0] of viz.HEAD.

So, I created a quad that 'floats' 25cm in front of the user's head, partially obscuring the view. This works nicely, and moves whenever I move the head. The trouble is, if I walk up to an object or wall, the wall 'pops through' the floating quad, so that it can be seen. I need the obscuring veil to cover everything in view, regardless of how close objects come.

I know that I could make the quad's parent viz.SCREEN. The problem with that is that the condition I'm trying to simulate is a dynamic one; the visual occlusion actually shifts depending on the position of the body, so I need to have active control over the position of the veil relative to the user's head.

I thought one solution might be to create a vizshape.Box and have this hang relative to the user's head. As a three-dimensional shape, I could have it cover all the area from [0,0,0] out to a few centimetres in front, which would circumvent the weird issue that causes a quad to be invisible unless it is a certain distance in front of the user. The difficulty with this approach is that I don't know how to lock the position of a 3D shape to viz.HEAD.

Is there any way of locking a vizshape to the parent 'viz.HEAD', or can anyone offer any creative solutions?

Any advice would be appreciated.
Reply With Quote
  #2  
Old 02-26-2014, 06:10 PM
masaki masaki is offline
Member
 
Join Date: Jan 2008
Posts: 63
You can link the box to the main view, then pre multiply the link with a translation to keep the box in your view. To keep it from being occluded, you can disable depth test and give it a high draw order.

Code:
box = vizshape.addBox()
link = viz.link( viz.MainView, box )
link.preTrans([0,0,3])
box.disable( viz.DEPTH_TEST )
box.drawOrder(100)
Masaki
Reply With Quote
  #3  
Old 03-03-2014, 08:16 AM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
Vision scientist here. Awesome idea, Notch! Best of luck with that.
Reply With Quote
Reply

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
Create image directly in front of head Notch Vizard 2 01-14-2014 08:17 AM
Eye position relative to center of head? performlabrit Vizard 1 01-07-2014 09:30 AM
getting position relative to an object fivel_lab Vizard 4 11-02-2011 08:24 PM
Get a user's current position from an object? cgibb Vizard 2 06-03-2009 06:47 PM
Can you link the position of a tracker to the orientation of an object? michaelrepucci Vizard 1 09-19-2008 11:23 AM


All times are GMT -7. The time now is 11:32 AM.


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