chromium-dmx-stereo
Daniel Cervantes <[email protected]>
| Newsgroups | gmane.comp.graphics.chromium.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I have a viz-wall cluster (3x1), I made this
config file for view active stero in a non-stereo
application with dmx support. When I start all, my
display looks well in only one crserver , but when I
resize it into the anothers crservers, the whole
display turns very slow, and the animations of the
atlantis demo stop.
Someone know what is happening ?
Regards.
Daniel.
# Copyright (c) 2001, Stanford University
# All rights reserved
#
# See the file LICENSE.txt for information on
redistributing this software.
# This configuration file is an example of what would
be used to run
# Chromium on a DMX systems.
import sys
sys.path.append( "../server" )
from mothership import *
import crmatrix
if len(sys.argv) > 1:
demo = sys.argv[1]
else:
demo = 'atlantis'
cr = CR()
cr.MTU( 10*1024*1024 )
# Fix these:
TILE_COLS = 3
TILE_ROWS = 1
HOSTS = ['tile-0-0', 'tile-1-0','tile-2-0']
# These values don't really matter!
TILE_WIDTH = 550
TILE_HEIGHT = 550
if demo == "stereocube":
# Parameters copied from sterecube.c demo
EyeSep = 0.3
Width = 12.0
Hither = 1.0
Yon = 25.0
FocalDist = 5.0
elif demo == "city":
EyeSep = 0.3
Width = 12.0
Hither = 1.0
Yon = 250.0
FocalDist = 5.0
elif demo == "atlantis":
# atlantis uses some really big numbers!
# not a great demo for stereo, either.
EyeSep = 530.3
Width = 100000.0
Hither = 30000.0
Yon = 400000.0
zTranslate = 80000.0 # put us in the middle of the
fish
FocalDist = Hither * 2.0
demo += " -s 100"
elif demo == "paraview":
# Note: seems to work with "blow.vtk" dataset
EyeSep = 2.0
Width = 40.0
Hither = 120.0
Yon = 180.0
FocalDist = 150
else:
# some default values that seem to work for some Mesa
demos
EyeSep = 0.3 # half of interocular distance
Width = 2.0 # frustum width at FocalDist
Hither = 1.0 # near clip plane distance from eye
Yon = 250.0 # far clip plane distance from eye
FocalDist = 4.0 # focal distance for stereo imaging
Aspect = float(TILE_WIDTH) / float(TILE_HEIGHT)
tilesortspu = SPU('tilesort')
tilesortspu.Conf('force_quad_buffering', 1)
tilesortspu.Conf('stereo_mode', 'CrystalEyes')
tilesortspu.Conf('use_dmx', 1)
tilesortspu.Conf('retile_on_resize', 1) # the default
tilesortspu.Conf('bucket_mode', 'Test All Tiles')
tilesortspu.Conf('draw_bbox', 0)
tilesortspu.Conf('scale_images', 0)
clientnode = CRApplicationNode( )
clientnode.StartDir( crbindir )
clientnode.SetApplication( demo )
clientnode.AddSPU( tilesortspu )
clientnode.Conf('track_window_size', 1)
clientnode.Conf('track_window_position', 1)
Width = 0.5 * Width # want half width below
s = Hither / FocalDist
top = s * Width
bottom = -top
for row in range(TILE_ROWS):
for col in range(TILE_COLS):
n = row * TILE_COLS + col
renderspu = SPU( 'render' )
renderspu.Conf('display_string', HOSTS[n] + ":0")
renderspu.Conf('render_to_app_window', 1)
renderspu.Conf( 'window_geometry',
[1.1*col*TILE_WIDTH, 1.1*row*TILE_HEIGHT, TILE_WIDTH,
TILE_HEIGHT] )
servernode = CRNetworkNode( HOSTS[n] )
servernode.AddTile( col*TILE_WIDTH,
(TILE_ROWS-row-1)*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT
)
servernode.AddSPU( renderspu )
# optimize_bucket is of no use w/ DMX.
servernode.Conf('optimize_bucket', 0)
servernode.Conf('use_dmx', 1)
for eye in range(2):
# View matrix
v = crmatrix.CRMatrix()
if eye == 0:
v.Translate(+EyeSep, 0, 0)
else:
v.Translate(-EyeSep, 0, 0)
#v.Translate(xTranslate, yTranslate,
zTranslate)
# Projection matrix
p = crmatrix.CRMatrix( if eye == 0:
left = s * ((Width * -Aspect) + EyeSep);
right = s * ((Width * Aspect) + EyeSep);
else:
left = s * (Width * -Aspect - EyeSep);
right = s * (Width * Aspect - EyeSep);
p.Frustum(left, right, bottom, top, Hither,
Yon)
if eye == 0:
servernode.Conf('view_matrix', v.ToList())
servernode.Conf('projection_matrix',
p.ToList())
else:
servernode.Conf('right_view_matrix',
v.ToList())
servernode.Conf('right_projection_matrix',
p.ToList())
cr.AddNode( servernode )
tilesortspu.AddServer( servernode, protocol='tcpip',
port=7000 + n )
cr.AddNode( clientnode )
cr.Go()
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/