WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-15-2009, 01:13 PM
Brett Lindberg Brett Lindberg is offline
Member
 
Join Date: Jul 2008
Posts: 18
Haven't gotten it to work yet: trying to make a bunch of very narrow views stuck close together, but this isn't that great a solution, because I want to be able to get coordinates.
Reply With Quote
  #2  
Old 07-15-2009, 05:31 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You need to render multiple views to a texture and then render the textures to the screen using either an undistortion mesh or shader. There should be examples on the forum for rendering views to a texture.
Reply With Quote
  #3  
Old 08-20-2009, 09:05 PM
Brett Lindberg Brett Lindberg is offline
Member
 
Join Date: Jul 2008
Posts: 18
I hacked my way around and came up with this: draws 40 windows across the top of the window. I could render to texture, and make one window, but would that be a lot better?

Code:
import viz
import math

class PanoWindowGroup:
	def __init__(self, SubWins=40, windowHeight=0.3, vertFOV=90):

		
		self.numSubWins = SubWins
		
		self.winHeight = windowHeight
	
		self.winFOV = 360.0/self.numSubWins
		
		self.vFOV=vertFOV
		self.sizeRat = 1.0/self.numSubWins
		
		self.size = (self.sizeRat, self.winHeight)
		
		self.subWinArr = []

#experimentally derived sub-window FOV ratio:		
#		self.subWinFOVrat =  4.3015/(pow(self.numSubWins,1.113))
		
		for i in range(self.numSubWins):
			scrPos = ((i*self.sizeRat),1.0)
			direction = i*self.winFOV-60.0
			print "Direction= ", direction
			subWin = PanoSubWindow(scrPos, self.size, direction, self.winFOV, self.vFOV, self.subWinFOVrat )
			self.subWinArr.append(subWin)


class PanoSubWindow:
	

	def __init__(self, scrPos, sizer, direction, winFOV, vFOV, sWFR, viewPos=[0,0,0]):	
		print "Inputs: ", "scrPos= ", scrPos, " sizer= ", sizer, "direction= ",direction, "winFOV= ", winFOV, "vFOV= ", vFOV
		self.vFOV = vFOV
		self.size = sizer
		self.subwindow = viz.addWindow(pos=scrPos, size=sizer)
		self.subwindow.visible(0, viz.SCREEN)
		self.subWinFOVrat = sWFR

		self.subview = viz.addView()
		self.subview.setPosition(viewPos)

		self.subview.setEuler([direction,0,0])
		self.subwindow.setView(self.subview)

#		self.subwindow.fov(self.vFOV, self.subWinFOVrat)
		self.subwindow.fov(self.vFOV, 0.075)
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
View nlfrnassimi Vizard 0 03-17-2009 02:01 AM
View nlfrnassimi Vizard 4 03-12-2009 05:25 AM
problem with stereo mode shivanangel Vizard 3 10-17-2006 09:58 AM
keeping a 3d object in front of the view tavaksai Vizard 1 07-07-2004 09:33 AM
SEOS HMD 120/67 compatability John Vizard 18 05-28-2004 11:13 AM


All times are GMT -7. The time now is 05:32 PM.


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