Hi,
I have two meshes with different vertex colors and i would like to morph not only the vertex position, but also the vertex colors.
It seems that the original mesh keeps its own vertex colors, no matter wich morph is applied :(

I looked into the SDK and the morpher modificator source code, its pretty complicated, but i think it would be possible to modify the modificator source code to take into account vertex color morphing and then recompile it to get the desired effect.

Before diving into this, i would know your advice, maybe there is a simplier or better solution ?

What i want to do with that vertex color morphing is to create a facial expression and paint black or white vertex colors on it. the zone in white would for example would show a normal map texture that do the wrinkles on the face.
On another expression, those vertex would be in black and the wrinkles will not appear.

I hope this help to understand my problem,
Thanks,

Jeff

MatanH

01 January 2011, 03:01 PM

You can do this with no SDK / script at all..

Steps:
1. for every morph target, duplicate the object, vertex paint it and using "tools->channel info" copy the vertex color channel to the mesh channel.
2. select the object with the morpher modifier and copy it's mesh channel back to itself.
3. you should see a "uvw mapping paste" modifier at the top of the stack, move it under the morpher modifier.
4. now copy the vertex channel to the mesh channel and move the new "uvw mapping paste" from the top of the stack to under the old "uvw mapping paste" modifier.
5. add another morpher modifier between the 2 "uvw mapping paste" modifiers and pick the objects from step 1 as the morph targets.
6. add a "uvw mapping" modifier and place it above the new morpher modifier from step 5. set it's mapping type to "xyz to uvw".
7. now instance the controllers of the morph targets on the original morpher modifier to the matching targets at the new morpher modifier.

this should do the trick.
let me know if I wasn't clear enough.
cheers,
Matan.

Floating_Inkpot

01 January 2011, 05:54 PM

Hi,
Many thanks for your answer!

I have tested your method with a simple plane and some vertex color on it. I followed each step but i didnt get the expected result.
My Plane still does'nt take in account the vertex color. did i miss something ?

Here is a 3dsmax scene of what i did, can you please open it and check if something is wrong ?
MorphVertexColor.max (http://belokanweb.free.fr/MorphVertexColor.max) (3dsmax 2010)
I have connected the two morphers modifiers so if you change one it will update the value in the other one.
The morph target is invisible, because when i copy the vc channel into the mesh channel it becomes invisible. you can still select it in the Select From Scene Dialog ;)

Here is also an image of the channel Info dialog, is that the correct operation i make ?
http://belokanweb.free.fr/MapChannelInfo.jpg

Thanks!

MatanH

01 January 2011, 02:24 PM

I have tested your scene and the setup is exactly as I described.
The only problem is that the "uvw mapping" modifier that you set as "xyz to uvw" is using uv channel 1 and not the vertex color channel (0). so you can either change the displayed map channel to 1 from the object properties dialog or set the mapping channel to vertex color.

Hope this helps,
Matan.

Floating_Inkpot

01 January 2011, 02:45 PM

It works perfectly !
Now i have to understand how all that stuff work. very very interesting technique :)
Thank you

CGTalk Moderation

01 January 2011, 02:45 PM

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.

Follow Us On:

The CGSociety

The CGSociety is the most respected and accessible global organization for creative digital artists. The CGS supports artists at every level by offering a range of services to connect, inform, educate and promote digital artists worldwide. More about us on TheArtSociety.com