WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-01-2010, 10:47 AM
Enlil Enlil is offline
Member
 
Join Date: May 2008
Posts: 61
Blending and getting an individual texture from a face

Hello,

I am blending textures on a .vzf face added using body.addFace. This worked pretty well until the artist started using facegen, which wants to generate multiple texture files for the face. Using the blend example, I am blending using code like:
Code:
        self.blend = viz.add('multitexblend.fp')
        self.VizFaceObject.apply(self.blend)
        self.NeutralTextureFileName = file1
        self.Texture1 = viz.add(textureFile1)
        self.Texture2 = viz.add(textureFile2)
        self.VizFaceObject.texture(self.Texture1)
        self.VizFaceObject.texture(self.Texture2, '', 1) 

        self.blend.param(0,0)
However, this replaces all the textures in the face (so in my particular case, the eyeball texture is replaced with the texture I am setting on the face . . .)

So, is there a way to blend only the skin texture? And if so, how do I access it?

Thanks,

Christian
Reply With Quote
  #2  
Old 04-01-2010, 12:39 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
When applying the texture and fragment program, specify the sub-node that the skin texture is applied to. For example:
Code:
face.apply(blend,'skin_geom')
face.texture(tex1,'skin_geom')
face.texture(tex2,'skin_geom',1)
You will need to replace 'skin_geom' with the actual name of you skin sub-node.
Reply With Quote
  #3  
Old 04-09-2010, 11:12 AM
Enlil Enlil is offline
Member
 
Join Date: May 2008
Posts: 61
Thanks, that works.

Christian
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


All times are GMT -7. The time now is 05:31 AM.


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