WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-11-2011, 03:45 AM
sqwiggily sqwiggily is offline
Member
 
Join Date: Nov 2011
Posts: 1
how to apply two textures to one 3D object?

Hello,

How can I attach two different textures (that is, two different JPGs) to one 3D object, i.e. a box model (box.wrl), such that each texture can only be seen from one side?

Im trying to create walls in a maze (box objects which have been stretched), on one side of the box I want to apply a JPG texture so the wall looks as if it has a photo hanging on it. I would like to have the photo on one side of the wall and only a wall texture on the other side.

Thanks a lot!
Kelsey
Reply With Quote
  #2  
Old 11-16-2011, 05:30 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,465
Each side of the wall will have to be a separate object so they can be textured independently.
Reply With Quote
  #3  
Old 11-21-2011, 02: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
  #4  
Old 03-15-2012, 08:39 PM
Darkmax Darkmax is offline
Member
 
Join Date: Feb 2010
Posts: 108
i don't understand the question, very well but i think you can use baking texture or prepare one texture with the two faces that you want to show, like Jeff said it can't be done, you have to combine the two jpg in one.

4711 I didn't know that maybe that could be the right solution but you have to create the box in vizard, and maybe sqwiggily want to do it in a program like 3ds max or maya
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 render a texture of the transparent object and then blur it whj Vizard 1 09-25-2012 04:15 PM
Applying textures to objects made in Blender andrewjworz Vizard 0 04-21-2011 07:15 AM
How to apply shader and render texture to an object whj Vizard 0 04-23-2010 01:23 PM
retrieve Object names Geoffrey Vizard 11 12-11-2009 05:26 AM


All times are GMT -7. The time now is 02:38 PM.


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