WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Tutorial Example - inverted video (https://forum.worldviz.com/showthread.php?t=2807)

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

Tutorial Example - inverted video
 
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:
Code:

#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

Inverted video
 
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

Inverted video
 
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


All times are GMT -7. The time now is 05:19 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC