WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-19-2015, 03:49 AM
andreionutz andreionutz is offline
Member
 
Join Date: Apr 2012
Posts: 15
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
Reply With Quote
  #2  
Old 08-19-2015, 03:56 AM
andreionutz andreionutz is offline
Member
 
Join Date: Apr 2012
Posts: 15
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()
Reply With Quote
  #3  
Old 08-19-2015, 12:37 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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')
Reply With Quote
  #4  
Old 08-20-2015, 02:53 AM
andreionutz andreionutz is offline
Member
 
Join Date: Apr 2012
Posts: 15
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.
Reply With Quote
  #5  
Old 08-21-2015, 10:10 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)?
Reply With Quote
  #6  
Old 08-24-2015, 07:53 AM
andreionutz andreionutz is offline
Member
 
Join Date: Apr 2012
Posts: 15
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
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -7. The time now is 03:11 AM.


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