Rendering for stereoscopic and reassembly for headset
Eric Sandall <[email protected]>
| Newsgroups | gmane.comp.graphics.chromium.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Chromium users and developers, I am trying to use Chromium to display left-/right-eye stereoscopic outputs on four machines via projectors and a fifth master hooked to a headset. The headset takes a resolution of 1696x480 (848x480 for each 'eye') and the resolution of the stereoscopic projectors is 1400x1024 for each projector. Setup: vr-master: Visual Research V8 headset slave1: left side/left eye slave2: right side/left eye slave3: left side/right eye slave4: right side/right eye I am using a modified tiles.conf configuration file (attached) and our configuration file (vrcim.in, attached). I have the slaves displaying their left/right sides/eyes, but the render window on the master is a small, empty window. I cannot seem to get the master to readback (using the readback SPU) from the render nodes, as well as rendering at a different resolution. When I try the readback SPU, I get a small (not 1400x1024) window on the slaves that flickers with the background, and the empty window on the master. When I close the empty window on the master, the program (using the city demo) then seems to run, but exits: This is Chromium, Version 1.9 Autostart for node slave1: ['/usr/bin/ssh', 'slave1', 'source', '$HOME/.bashrc', '&&', 'crserver'] Autostart for node slave2: ['/usr/bin/ssh', 'slave2', 'source', '$HOME/.bashrc', '&&', 'crserver'] Autostart for node slave3: ['/usr/bin/ssh', 'slave3', 'source', '$HOME/.bashrc', '&&', 'crserver'] Autostart for node slave4: ['/usr/bin/ssh', 'slave4', 'source', '$HOME/.bashrc', '&&', 'crserver'] Autostart for node vr-master: ['/usr/bin/ssh', 'vr-master', '/bin/sh', '-c', "'s ource", '$HOME/.bashrc;', "/home/chromium/VADE/THIRD_PARTY/cr/bin/Linux/crappfak er'"] Autostart for node vr-master: ['/usr/bin/ssh', 'vr-master', 'source', '$HOME/.ba shrc', '&&', 'crserver'] CR Error(vr-master:7189): I have no clients! What's a poor server to do? CR Info(slave1:12791): Total output dimensions = (2800, 1024) CR Warning(slave1:12791): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave1:12791): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Info(slave2:12751): Total output dimensions = (2800, 1024) CR Warning(slave2:12751): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave2:12751): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Info(slave3:12562): Total output dimensions = (2800, 1024) CR Warning(slave3:12562): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave3:12562): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Info(slave4:13401): Total output dimensions = (2800, 1024) CR Warning(slave4:13401): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave4:13401): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave1:12791): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave1:12791): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave2:12751): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave2:12751): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave3:12562): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave3:12562): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave4:13401): No room for 1400x1024 tile in this server's window (25 6 x 256)! CR Warning(slave4:13401): No room for 1400x1024 tile in this server's window (25 6 x 256)! Thank you for using Chromium! Killing City keyboard controls: Up/Down/Left/Right Arrows - rotate scene v/V - translate eye forward/backward x/X/y/Y/z/Z - translate eye position 0 - reset view parameters a - toggle animation b/B - decrease/increase number of buildings t - toggle textures on/off SPACE - generate new, random buildings f - toggle fog on/off q/ESC - exit Generating new buildings... 196 frames in 5.004 seconds = 39.169 FPS CR Warning(vr-master:7198): crPackReleaseBuffer called with no current buffer crserver: no process killed crserver: no process killed crserver: no process killed crserver: no process killed crappfaker: no process killed /home/chromium/VADE/THIRD_PARTY/cr/bin/Linux/city: no process killed Is what happens after closing the empty window on master, when trying to use the readback SPU. Any help would be appreciated, Thank you, -sandalle -- Eric Sandall | Source Mage GNU/Linux Developer eric at sandall.us PGP: 0xA8EFDD61 | http://www.sourcemage.org/ http://eric.sandall.us/ | SysAdmin @ Inst. Shock Physics @ WSU http://counter.li.org/ #196285 | http://www.shock.wsu.edu/ ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Chromium-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/chromium-users
tiles.conf
(text/script, 7.8 KB)
#!/usr/bin/python
#
# Copied from http://www.cs.utk.edu/~seelab/powerwall/files/tiles.conf
#
# -----------------------------------------------------------------------------
# SETUP
# -----------------------------------------------------------------------------
import sys
import os
import string
# OpenGL Application might need head node to be DISPLAY :0
os.environ['DISPLAY'] = ':0.0'
# -----------------------------------------------------------------------------
# OPTIONS
# -----------------------------------------------------------------------------
crsite_file = sys.argv[1]
# -----------------------------------------------------------------------------
# CRSITE
# -----------------------------------------------------------------------------
if not os.access (crsite_file, os.F_OK):
print '%s cannot read file %s.' % (sys.argv[0], crsite_file)
sys.exit (1)
f = open (crsite_file, 'r')
exec (f.read())
f.close()
# fetch environment for Chromium based on environment
cr_path = crsite["chromium"]
os.environ['LD_LIBRARY_PATH'] = cr_path + '/lib/Linux'
sys.path.append (cr_path + "/mothership/server")
from mothership import *
# -----------------------------------------------------------------------------
# CHROMIUM STUFF
# -----------------------------------------------------------------------------
# create mothership
cr = CR()
cr.MTU (9048 * 1024)
TILE_COLS = 2 # don't change these unless you overhaul LayoutTiles()
TILE_ROWS = 1
TILE_WIDTH = 1400
TILE_HEIGHT = 1024
EYE_NAMES = [ "left", "right" ]
# 1696x480 for helmet
MAX_TILE_WIDTH = 2560
MAX_TILE_HEIGHT = 1024
REASSEMBLE = 1 # use readback SPUs and downstream render SPU
REASSEMBLE_HOST = "vr-master"
RENDER_BACK = 1 # render back into app window
RESIZABLE = 0 # track client window size changes
FULLSCREEN = 1
BORDERLESS = 1
DLIST_BBOX = 1
LAZY_DLIST = 1
# This is a callback which we register with spu.TileLayoutFunction()
def LayoutTiles(muralWidth, muralHeight):
"""Return list of tuples of new tiles for the given mural size.
Each tuple is of the form (serverIndex, x, y, width, height)."""
if muralWidth > MAX_TILE_WIDTH * TILE_COLS:
print "Warning: mural size is too wide!"
muralWidth = MAX_TILE_WIDTH * TILE_COLS
if muralHeight > MAX_TILE_HEIGHT * TILE_ROWS:
print "Warning: mural size is too tall!"
muralHeight = MAX_TILE_HEIGHT * TILE_ROWS
# four tiles
w = muralWidth / 4
h = muralHeight / 4
t0 = (0, 0, 0, w, h) # lower-left
t1 = (1, w, 0, muralWidth - w, h) # lower-right
t2 = (1, 0, h, w, muralHeight - h) # upper-left
t3 = (0, w, h, muralWidth - w, muralHeight - h) # upper-right
tiles = []
tiles.append(t0)
tiles.append(t1)
tiles.append(t2)
tiles.append(t3)
return tiles
# The application node (tilesort SPU)
tilesortspu = SPU( 'tilesort' )
tilesortspu.TileLayoutFunction( LayoutTiles )
#tilesortspu.Conf('broadcast', '1')
tilesortspu.Conf('bucket_mode', 'Frustum')
tilesortspu.Conf('auto_dlist_bbox',DLIST_BBOX)
tilesortspu.Conf('lazy_send_dlists',LAZY_DLIST)
tilesortspu.Conf('stereo_mode', "Passive")
# -----------------------------------------------------------------------------
# HANDLE LOCAL APPLICATIONS
# -----------------------------------------------------------------------------
render_nodes = crsite["render_nodes"]
for local in crsite["local_run"]:
machine = render_nodes[local[0] - 1][0]
os.system('/usr/bin/ssh ' + machine + ' "/bin/sh -c \'source $HOME/.bashrc; ' + local[1] + '\'" &')
os.system('sleep 1')
# -----------------------------------------------------------------------------
# HANDLE CLIENT NODE
# -----------------------------------------------------------------------------
for client in crsite["client_nodes"]:
# setup a tilesort SPU
tilesort_spu = SPU ('tilesort')
tilesort_spu.Conf('bucket_mode','Frustum')
# If one monitor, turn off sync for performance
if len(client[2]) == 1:
tilesort_spu.Conf('sync_on_swap', 0)
tilesort_spu.Conf('sync_on_finish', 0)
# setup a client/application node
client_node = CRApplicationNode (client[0])
client_node.Conf('track_window_visibility',1) # Useful for Performer to clean up temporary windows
# set starting directory and executable for client
client_node.StartDir(client[3])
client_node.SetApplication (client[4])
client_node.AutoStart ('/usr/bin/ssh ' + client[0] + ' /bin/sh -c \'source $HOME/.bashrc; ' + cr_path + '/bin/Linux/crappfaker\'')
client_node.AddSPU (tilesort_spu)
if client[5] != 0:
client_node.Conf ('match_window_count', client[5])
w = 0
h = client[1][1] - 1
# -----------------------------------------------------------------------------
# HANDLE RENDERING NODES
# -----------------------------------------------------------------------------
#for i in client[2]:
for row in range(TILE_ROWS):
for eye in range(2): # starts at 0
for col in range(TILE_COLS):
if eye == 1:
# Right eye
index = ( row * TILE_COLS + col ) + 2
else:
# Left eye
index = row * TILE_COLS + col
print index
machine = render_nodes[index]
# Set the render nodes to send their data back to the client
readbackspu = SPU( 'readback' )
readbackspu.Conf( 'extract_alpha', 0 )
readbackspu.Conf( 'extract_depth', 0)
readbackspu.Conf( 'title', 'readback SPU %d' %index )
# each tile will do some rendering
render_spu = SPU ('render')
render_spu.Conf ('display_string', ':0.0')
#render_spu.Conf ('window_geometry', machine[1])
render_spu.Conf ('ontop', 1)
render_spu.Conf ('fullscreen', FULLSCREEN)
# set up a rendering node
node = CRNetworkNode (machine[0])
node.AddTile( col*TILE_WIDTH, (TILE_ROWS-row-1)*TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT )
node.Conf('optimize_bucket',2)
node.Conf('overlap_blending','blend')
node.Conf('stereo_view', EYE_NAMES[eye])
#node.AddTile (machine[1][2]*w, machine[1][3]*h, machine[1][2], machine[1][3])
node.AddSPU( readbackspu )
#packspu = SPU( 'pack' )
#node.AddSPU( packspu )
#packspu.AddServer( client_node, protocol='tcpip' )
w = w + 1
if w == client[1][0]:
w = 0
h = h - 1
#if options.dist_texture:
# tex_spu = SPU ('dist_texture')
# node.AddSPU (tex_spu)
node.AddSPU (render_spu)
node.AutoStart ('/usr/bin/ssh ' + machine[0] + ' source $HOME/.bashrc && crserver')
# add rendering node to mothership
cr.AddNode (node)
tilesort_spu.AddServer (node, protocol='tcpip', port=7000 + index)
cr.AddNode (client_node)
#
# Create render node on client for reassembly
#
render_node = CRNetworkNode()
renderspu = SPU('render')
renderspu.Conf('render_to_app_window', 1)
renderspu.Conf('fullscreen',FULLSCREEN)
renderspu.Conf('borderless',BORDERLESS)
renderspu.Conf('resizable',RESIZABLE)
renderspu.Conf('ontop',1)
render_node.Conf('only_swap_once', 1)
render_node.AddSPU(renderspu)
cr.AddNode( render_node )
render_node.AutoStart('/usr/bin/ssh ' + client[0] + ' source $HOME/.bashrc && crserver')
cr.Go()
# -----------------------------------------------------------------------------
# CLEAN UP
# -----------------------------------------------------------------------------
#Remove crserver, crappfaker, or opengl program
print "Killing"
#Kill all crserver and crappfaker
for client in crsite["client_nodes"]:
#Connect to each server node and kill crserver
for i in client[2]:
os.system('/usr/bin/ssh ' + render_nodes[i-1][0] + ' killall -9 crserver')
os.system('/usr/bin/ssh ' + client[0] + ' killall -9 crappfaker')
program = string.split(client[4])
os.system('/usr/bin/ssh ' + client[0] + ' killall -9 -e ' + program[0])
#Kill all programs that running locally on cluster
for local in crsite["local_run"]:
machine = render_nodes[local[0] - 1][0]
program = string.split(local[1])
os.system('/usr/bin/ssh ' + machine + ' killall -9 -e ' + program[0])
vrcim.in
(application/octet-stream, 1.1 KB) - not displayed