![]() |
|
#1
|
|||
|
|||
|
one side texture
I want to put a target on one side of a box. It seems that textures would work the best. I tried
Code:
target=viz.add('box.wrl')
pic = viz.addTexture('tex.jpg')
target.texture(pic)
Thanks, Joe |
|
#2
|
|||
|
|||
|
You can use the undocumented vizshape module to create a box with each face split into a separate sub-node, allowing you to apply a different texture. Here is some sample code:
Code:
import viz
import vizshape
viz.go()
#Create box with each face split into separate sub-node
box = vizshape.addBox([1,1,1],splitFaces=True,pos=(0,1.8,4))
box.addAction(vizact.spin(0,1,0,45))
#Create textures
t1 = viz.add('image1.jpg')
t2 = viz.add('image2.jpg')
#Apply first texture to front/back face
box.texture(t1,node='front')
box.texture(t1,node='back')
#Apply second texture to left/right face
box.texture(t2,node='left')
box.texture(t2,node='right')
|
|
#3
|
|||
|
|||
|
Thank you. That worked perfect.
![]() Joe |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| displayHTML and side by side stereo | hosier | Vizard | 4 | 08-28-2009 03:21 PM |
| Translating a texture and its Alpha | shivanangel | Vizard | 5 | 12-02-2008 04:52 PM |
| Randomly and Continuously Change Avatar's Face Texture | Karla | Vizard | 4 | 08-22-2008 12:14 PM |
| 3D Texture Mapping in Vizard? | stefs | Vizard | 2 | 03-25-2008 03:34 AM |
| how I can get my texture to appear exactly as is defined | mspusch | Vizard | 1 | 04-23-2005 12:12 PM |