View Single Post
  #2  
Old 01-29-2008, 07:36 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You need to apply the second projection texture to a different texture unit. Try the following code:
Code:
import viz
import projector

viz.go()

enviro = viz.add('tut_ground.wrl')
image1 = viz.add('eyeshadow.jpg')
image2 = viz.add('eyeshadow.jpg')

proj1 = projector.add(image1)
proj1.translate(1,0,10)
proj1.rotate(0,90,0)
proj1.affect(enviro) #Apply projection texture to default texture unit 1
proj1.ortho(2,2)

proj2 = projector.add(image2)
proj2.translate(-1,0,10)
proj2.rotate(0,90,0)
proj2.affect(enviro,2) #Apply projection texture to texture unit 2
proj2.ortho(2,2)
Reply With Quote