![]() |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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) |
|
#3
|
|||
|
|||
|
The diffuse color in PeopleMaker is white.
Adding "face.color(viz.WHITE)" didn't make a difference. |
|
#4
|
|||
|
|||
|
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)
Also can you provide the following info: 1) Vizard version 2) Graphics card |
|
#5
|
|||
|
|||
|
The ball shows up with the texture.
I'm using Vizard 2.53f. I'm not sure about the graphics card. |
|
#6
|
|||
|
|||
|
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
|
|
#7
|
|||
|
|||
|
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) |
|
#8
|
|||
|
|||
|
Great! Thanks so much for your help.
|
![]() |
|
|