PDA

View Full Version : Texturing an avatar head


VAmanda
10-06-2006, 02:59 PM
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.

farshizzo
10-06-2006, 03:12 PM
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:face.color(viz.WHITE)

VAmanda
10-06-2006, 03:18 PM
The diffuse color in PeopleMaker is white.

Adding "face.color(viz.WHITE)" didn't make a difference.

farshizzo
10-06-2006, 03:28 PM
What happens if you apply the texture to an object other than a face. For example try this: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

VAmanda
10-06-2006, 03:33 PM
The ball shows up with the texture.

I'm using Vizard 2.53f. I'm not sure about the graphics card.

farshizzo
10-06-2006, 03:45 PM
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

farshizzo
10-06-2006, 04:12 PM
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:texture.wrap(viz.WRAP_S,viz.REPEAT)
texture.wrap(viz.WRAP_T,viz.REPEAT)

VAmanda
10-12-2006, 01:58 PM
Great! Thanks so much for your help.