WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   change the color of a specific part of an avatar? (https://forum.worldviz.com/showthread.php?t=2553)

Green 03-03-2010 09:43 AM

change the color of a specific part of an avatar?
 
Hi, I'm working on avatars. I want to change the color of a specific part of an avatar, like the trunk or the whole body except the head. Can anybody tell me how to achieve this? Thanks!

Xiaoli

Jeff 03-04-2010 08:28 AM

You can change the color of an avatar mesh. The avatars included have a body mesh and head mesh. The following shows to change the color of those.
Code:

import viz
viz.go()

male = viz.add('vcc_male.cfg', pos = [0,0,5], euler = [180,0,0])
male.state(1)

meshes = male.getMeshList()

vizact.onkeydown('1', male.color, viz.BLUE, meshes[0])
vizact.onkeydown('2', male.color, viz.BLUE, meshes[1])



All times are GMT -7. The time now is 05:40 PM.

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