[vtkusers] view 3D data in 3D Televisions...

Martin2, Robert S CTR USAF AFMC AFRL/RQRS Robert.Martin2.ctr at edwards.af.mil
Fri Mar 8 16:40:58 EST 2013


Aashish-

I recently got a 3D monitor capable of stereo SBS 3D over HDMI along
with 3D Vision. I quickly hacked VisIt's version of VTK to enable
side-by-side stereo. (I actually put the code in place of interlaced so
I only had to modify vtkRenderWindow.cxx rather than gui elements...) I
was going to put in a request for that capability but thought I should
check the email list archives to make sure it hadn't been addressed
already when I found the thread about adding it under testing from last
September.  I was wondering what the status of the implementation is.
Has it been merged into the main VTK branch, and if so, what version of
VTK?  I want to email the VisIt developers group and request that they
add support for VTK_STEREO_SPLITVIEWPORT_HORIZONTAL (a button), but need
to know what version of vtk to tell them includes it.

Also, I'm not 100% sure the logic on my version is bulletproof, but I
think it may be a little simpler than the version linked on the
review.source.kitware.com site.

Starting from the Dresden case for p1,p2 ->p3 buffers, I just replaced
the copy loops as follows:

for (y=0; y<size[1];y++){
  for(x=0;x<(size[0]/2);x+=1){
    *p3++ = *p1++;
    *p3++ = *p1++;
    *p3++ = *p1++;
    p1+=3;
  }
  p1+=(size[0]&1)*3; //If Odd /2 rounds down, adjust for first pixel in
next row of p1
  for(x=(size[0]/2);x<size[0];x+=1){
    p2+=3; // add 1-pixel first for odd pixels other eye. 
    *p3++ = *p2++;
    *p3++ = *p2++;
    *p3++ = *p2++;
  }
  p2-=(size[0]&1)*3; //If Odd, backup for first pixel on next row of p2
}

I'm not 100% sure it's right, though the views look good on my monitor
while I adjust the width of the window and would flicker and look
trapezoidal until I got the edge corrections right. It's a little less
math than the version I saw online and it accesses the result buffer
once through in order rather than filling half frames and skipping the
other half twice but otherwise about the same. 

Since VisIt isn't fullscreen, it does play havoc with the gui elements,
but I guess that's a whole other issue for Paraview/VisIt developers.  I
noticed that it helps if I close one eye or the other to operate buttons
on the 3D screen.

For anyone that's been testing it and has read this far, I was wondering
if anyone has had luck trying to force the display into a 3840x1080
mode?  I was thinking that 3840x1080 at 30Hz is the same amount of data as
1920x1080 at 60fps so it should fit over hdmi bandwidth-wise to allow
full-HD 3D to 3D projectors/tvs rather than half-HD.  30Hz is slow, but
the shutters should multiply it up faster anyway and I'd be pretty
surprised if VisIt can render my simulation at 30fps anyway.  It should
be like the format that 3D-SBS blueray sends, and so the displays should
really be able to handle it.  Unfortunately, when I try to force the
modeline with xrandr, it just spits back an error and fails.  The screen
is an Asus VG278H connected over HDMI (with DVI it doesn't let me
manually select 3D modes).

Anyway, thanks for your help and I look forward to hearing back on the
status of the change.

-Robert

Robert Martin, ERC Inc.
EP Modeling and Simulation Group
In-Space Propulsion Branch
Air Force Research Laboratory



More information about the vtkusers mailing list