PDA

View Full Version : Tutorial Example - inverted video


Mike@vrs
06-28-2010, 01:33 PM
Hi

I am following through the example "Getting Your Feet Wet"
and notice that on the screen the video I have selected
is inverted and appears to be a mirror image of what it should be.


#Play a movie on the screen
def playMovie():

mymovie = viz.add('rockpool2.wmv')
mymovie.loop(viz.ON)
mymovie.play()

screen.texture(mymovie)

vizact.onkeydown('m', playMovie)

[question] Can this be adjusted to play correctly.

Thanks

farshizzo
06-29-2010, 02:42 PM
It looks like the texture coordinates on the model are inverted. You can reverse them by using the node.texmat command and setting the wrap mode of the texture to REPEAT:#Play a movie on the screen
def playMovie():

mymovie = viz.add('rockpool2.wmv',wrap=viz.REPEAT)
mymovie.loop(viz.ON)
mymovie.play()

screen.texture(mymovie)
screen.texmat(viz.Matrix.scale(-1,1,1))

vizact.onkeydown('m', playMovie)

Mike@vrs
06-30-2010, 09:49 AM
This solution appears to play the video, however the sound only is heard, the picture is a black screen?:confused:

Mike@vrs
06-30-2010, 10:26 AM
Hi

I was able to invert the video in windows movie maker (using effects) and the video was then inverted in vizard thus playing correctly. However getting a scripting solution would be good so any advice would be great.

Mike