PDA

View Full Version : Video on moving object


Jose
06-17-2013, 08:58 AM
Can a video be rendered on an object that is moving.

Or

Can a video be rendered to a part of the screen (e.g. top right corner) independent of the movement of the subject in the scene?

Thank you for your help.

Jeff
06-18-2013, 05:14 PM
Video can be applied as a texture to stationary or moving objects in the environment. Video can also be applied to the screen using a texture quad:
import viz
import vizact
viz.go()

dojo = viz.addChild('dojo.osgb')

video = viz.addVideo('vizard.mpg')
video.play()
video.loop()

quad = viz.addTexQuad(parent=viz.ORTHO, scale=[100,100,0])
quad.texture(video)
viz.link(viz.MainWindow.RightTop,quad,offset=(-50,-50,0))

movingQuad = viz.addTexQuad(pos=[0,1.8,2])
movingQuad.texture(video)
movingQuad.runAction(vizact.move(0,0,1,time=6))