WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-06-2006, 02:59 PM
VAmanda VAmanda is offline
Member
 
Join Date: Sep 2005
Posts: 12
Texturing an avatar head

Hi,

I'm trying to change the texture on an avatar's head, and when I do so it's just showing up black, even when I use the original texture. My code is basically as follows:

face = male.face('myface.vzf')
texture = viz.add('mytexture.jpg')
face.texture(texture)

Event when mytexture is the original texture on myface, it still shows up as black after this code. Do I need to change something about the texture or the head? Thanks.
Reply With Quote
  #2  
Old 10-06-2006, 03:12 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
What is the diffuse color of the face in PeopleMaker? It should be white. Try changing the color of the face to white in your script to test this out:
Code:
face.color(viz.WHITE)
Reply With Quote
  #3  
Old 10-06-2006, 03:18 PM
VAmanda VAmanda is offline
Member
 
Join Date: Sep 2005
Posts: 12
The diffuse color in PeopleMaker is white.

Adding "face.color(viz.WHITE)" didn't make a difference.
Reply With Quote
  #4  
Old 10-06-2006, 03:28 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
What happens if you apply the texture to an object other than a face. For example try this:
Code:
ball = viz.add('ball.wrl')
ball.texture(texture)
Is the ball black as well?

Also can you provide the following info:
1) Vizard version
2) Graphics card
Reply With Quote
  #5  
Old 10-06-2006, 03:33 PM
VAmanda VAmanda is offline
Member
 
Join Date: Sep 2005
Posts: 12
The ball shows up with the texture.

I'm using Vizard 2.53f. I'm not sure about the graphics card.
Reply With Quote
  #6  
Old 10-06-2006, 03:45 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I can't replicate the issue here. Would you mind sending me a simple script and vzf file that replicates this issue. My email is lashkari@worldviz.com
Reply With Quote
  #7  
Old 10-06-2006, 04:12 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Thanks for the files. The problem is that the texture is not set to repeating mode. Just add the following lines after adding your texture:
Code:
texture.wrap(viz.WRAP_S,viz.REPEAT)
texture.wrap(viz.WRAP_T,viz.REPEAT)
Reply With Quote
  #8  
Old 10-12-2006, 01:58 PM
VAmanda VAmanda is offline
Member
 
Join Date: Sep 2005
Posts: 12
Great! Thanks so much for your help.
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 08:36 PM.


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