![]() |
|
#1
|
|||
|
|||
video texture mapping
Hi,
I'm trying to map a video texture on a surface using texmat. it's a basic mapping that works when the texture is an image, but doesn't when it's a video. why? is this a limitation on purpose, or is it a bug? and is there a way to circumvent it? Thanks, Andrei |
#2
|
|||
|
|||
here's a tiny test code based on some example. just replace the brick texture with a video one and you'll notce the difference.
Code:
import viz # Make background wall WALL_SCALE = [-1, -1, -1] texture_scale = [1, 4, 1] wall = viz.addTexQuad() wall.setPosition( [0, 2, 3] ) wall.zoffset(1) #avoid zfighing, make wall appear behind pictures wall.setScale( WALL_SCALE ) wall.setEuler(0, 0, 180) # Apply nice repeating brick texture matrix = vizmat.Transform() matrix.setScale( texture_scale ) wall.texmat( matrix ) bricks = viz.addTexture('tile.png') #bricks = viz.add('smallVideo.avi', viz.TEX_RECT) bricks.wrap(viz.WRAP_T, viz.CLAMP_TO_BORDER) bricks.wrap(viz.WRAP_S, viz.CLAMP_TO_BORDER) #viz.MIRROR) wall.texture(bricks) viz.go() |
#3
|
|||
|
|||
Do you get an error or does it look incorrect? Using an image or video included with Vizard its mapped the same:
Code:
#bricks = viz.addTexture('lake3.jpg') bricks = viz.addVideo('mona.mpg') |
#4
|
|||
|
|||
it works but looks incorrectly. the problem is appears when texmat is used. the moment i set this, the video is not displayed anymore. i mean something is displayed, but not the video as expected. even applying [1, 1, 1] breaks the display.
|
#5
|
|||
|
|||
I'm not sure what the issue you're seeing is. Can you reproduce this and show the issue with two quads side by side using vizard's included resources (lake3.jpg and mona.mpg)?
|
#6
|
|||
|
|||
Hi Jeff,
the behavior is as expected when using mona.mpg and then it worked with other videos too. But with the video that I was using when I detected the problem, the strange behavior is still there: the video plays, but it's not mapped according to the ST coordinates. I don't know what's wrong with that video(loads and plays without errors), but I can use other videos instead. Until further issues I would consider the issue solved/closed. Thank you, Andrei |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to start video texture on world load in cave mode | raj | Vizard | 3 | 02-27-2014 04:55 PM |
Display Video Stream on Texture | hwt | Vizard | 1 | 05-16-2011 04:18 PM |
3D Texture Mapping - gluBuild3DMipmaps not supported | stefs | Vizard | 1 | 04-23-2008 11:00 AM |
3D Texture Mapping in Vizard? | stefs | Vizard | 2 | 03-25-2008 03:34 AM |
Video Texture Not Working on Some Objects | paulgoldberg | Vizard | 1 | 04-17-2006 12:41 PM |