WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-01-2014, 10:41 AM
chris2307 chris2307 is offline
Member
 
Join Date: Nov 2013
Posts: 36
Defining Asymmetric Viewing Frustum

Second post today... sorry about that!

I'm trying to use viz.window.frustum() to define an asymmetric viewing frustum. Here is what I am trying to achieve:

I have a screen which is 88.5cm in width and 50cm in height. User's of the application will be sitting so their eyes are approximately 80cm from the screen. Their eyes will be positioned 2/3s of the way up the screen.

I've calculated the total vertical field of view to be 34.31 degrees and therefore the horizontal field of view being 60.72. With a symmetric viewing frustum I would simply set this up as:

Code:
fieldOfView = 34.7
aspectRatio = 1.77
viz.fov(fieldOfView, aspectRatio)
However, this assumes that the user's eyes are perfectly centered in the screen (vertically) which I do not want. So with the eyes 2/3s of the way up the screen, I would like an asymmetric viewing frustum to better represent this. In other words, with the eyes positioned vertically 2/3s of the way up of the screen, the angle between the eyes and top of the screen is 11.72 degrees and the angle between the eyes and the bottom of the screen being 22.59 degrees. This still gives me the overall vertical FOV of 34.7 but in an asymmetric shape.

I am looking at the viz.window.frustum() function but it's not behaving in the way I want it to. Considering that the viz.window.frustum() function is mentioned to be the same as glFrustum(), I was expecting this function to multiply the current frustum by the values passed in to it (this is where my understanding may well be incorrect).

I've therefore been trying this to start with:

Code:
fieldOfView = 34.7
aspectRatio = 1.77
viz.fov(fieldOfView, aspectRatio)
viz.MainWindow.frustum(-1, 1, -1, 1, 1, 10000)
What I thought this would do is, well... nothing. I thought this would multiple the current frustum by the 1 and remain the same. I've tried different values and it always looks distorted. I've been able to get close to something that looks OK but, of course, I need the FOV to be exactly right.

I really hope someone can help me out here.
Reply With Quote
  #2  
Old 10-01-2014, 12:37 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,462
You can use the vizcave module for this type of setup. You could base your configuration script on the powerwall example. For the head_tracker object you could create a group node with a static position since the user is stationary.
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
clip with frustum problem Joran Vizard 1 10-20-2006 11:16 AM


All times are GMT -7. The time now is 09:21 AM.


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