View Single Post
  #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