WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-21-2011, 01:05 AM
4711 4711 is offline
Member
 
Join Date: Jan 2010
Posts: 15
Using the "splitFaces" parameter from <vizshape>.addBox allows you to create a box with six subnodes, one for each side of the box, each of which can be handled independently. That way you can easily apply a different texture to each side of the box.

See the example code for <vizshape>.addBox from the Vizard 3.0 documentation:
Code:
import viz
import vizshape
viz.go()

#Create box with each face split into separate sub-node
box = vizshape.addBox(splitFaces=True)
box.setPosition(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')
Reply With Quote
 


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 render a texture of the transparent object and then blur it whj Vizard 1 09-25-2012 03:15 PM
Applying textures to objects made in Blender andrewjworz Vizard 0 04-21-2011 06:15 AM
How to apply shader and render texture to an object whj Vizard 0 04-23-2010 12:23 PM
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM


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


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