Immersive Visualization / IQ-Station Wiki

This site hosts information on virtual reality systems that are geared toward scientific visualization, and as such often toward VR on Linux-based systems. Thus, pages here cover various software (and sometimes hardware) technologies that enable virtual reality operation on Linux.

The original IQ-station effort was to create low-cost (for the time) VR systems making use of 3DTV displays to produce CAVE/Fishtank-style VR displays. That effort pre-dated the rise of the consumer HMD VR systems, however, the realm of midrange-cost large-fishtank systems is still important, and has transitioned from 3DTV-based systems to short-throw projectors.

ParaView Tips

From IQ-Station Wiki
Revision as of 19:03, 22 September 2021 by WSherman (talk | contribs) (New page to collect some ParaView examples)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page will have a handful of ParaView tricks that I find handy, and will probably want to make use of in the future.

StereoScopic Batch rendering

Here's my main example of creating a "pvbatch" to render a stereo pair of images.

#! /home/avl/VR/Apps/ParaView/ParaView-v4.0.1-source/Build/bin/pvbatch
from paraview.simple import *
servermanager.LoadState("V3A.pvsm")
SetActiveView(GetRenderView())
view = GetActiveView()
scene = GetAnimationScene()
PythonAnimationCue1 = PythonAnimationCue()
PythonAnimationCue1.Script= """
def start_cue(self):
   print 'Animation starting'
   print 'NumberOfFrames = ' + str(scene.NumberOfFrames)
   print 'FramesPerTimestep = ' + str(scene.FramesPerTimestep)
   print 'PlayMode = ' + str(scene.PlayMode)
   print 'StartTime = ' + str(scene.StartTime)
   print 'EndTime = ' + str(scene.EndTime)
   print 'Duration = ' + str(scene.Duration)

def tick(self):

   i = scene.TimeKeeper.Time
   print "time is " + str(i)

   view.ViewTime = i
   scene.AnimationTime = i
   Render()

def end_cue(self):
   print 'Animation ending'
"""
scene.Cues.append(PythonAnimationCue1)
# Make some tweaks to the visualization
#path=FindSource('TemporalParticlesToPathlines5')
#path.MaxTrackLength=55
path2=FindSource('TemporalParticlesToPathlines4')
path2.MaxTrackLength=2000
sphere=FindSource('Glyph4').GlyphType
sphere.PhiResolution=12
sphere.ThetaResolution=12
#tube=FindSource('Tube5')
tube2=FindSource('Tube4')
#tube.NumberofSides=12
#tube.Radius=0.020
tube2.NumberofSides=12
tube2.Radius=0.017
# Setup the rendering parameters
scene.NumberOfFrames=2408
view.ViewSize = [1920,1080]
view.StereoRender = 1
view.StereoType = "Left"
view.UseOffscreenRendering = 1
WriteAnimation("TCollision_02_L/tcollision_02_V3A_L.png")
view.StereoType = "Right"
view.UseOffscreenRendering = 1
WriteAnimation("TCollision_02_R/tcollision_02_V3A_R.png")