View Single Post
  #3  
Old 03-13-2015, 01:48 PM
lklab lklab is offline
Member
 
Join Date: Mar 2015
Posts: 20
The problem with using multiple post process effects is solved somewhat. It's possible to use the blend effect to use two post-process effects at once with the oculus and to turn off and turn on effects simultaneously to make it appear as if an additional effect is turning on.

The problem I have now is that the blendmask effect does not cause the mask to appear in the same place in each eye for the oculus. Is there a way of doing this that does not involve using the HorizontalSplit effect and doing trial and error with slightly shifted masks until they lineup?


Code:
from viz import *
import viz
import oculus
import vizfx.postprocess 
from vizfx.postprocess.color import BrightnessEffect
from vizfx.postprocess.composite import BlendMaskEffect

ground = viz.addChild('piazza.osgb')
#set up oculus rift
hmd = oculus.Rift()
sensor = hmd.getSensor()
viz.link(hmd.getSensor(), viz.MainView) 
viz.setMultiSample(8)
viz.go(viz.FULLSCREEN)

flash = BrightnessEffect(brightness = .8)
dlmask = viz.addTexture('dlblendmask.jpg')
dlstimeffect = BlendMaskEffect(dlmask,black=flash)
vizfx.postprocess.addEffect(dlstimeffect)
Reply With Quote