sheffdog
I am using the tension map to drive vert colors on my model. I can drive bump maps with this setup but not displacement.

I am using the mental ray node mentalRayVertexColors to get the vertex color info from my shape node. This is multiplied by my displacement map and fed into the displacement shader.

The problem is the displacement map affects the WHOLE mesh and is not masked out by the vert color.

If I use an image for a mask and multiply it by my displacement it works fine but using vert color fails Any Ideas?
vtc_network.jpg vtc_use_maps.jpg vtc_use_vtc.jpg
Reply 0 0
pshipkov
Try this:

insert a ramp node between the multiplyDivide one and the displacement node. Then plug the output of multDiv to the first key of the ramp node (by dragging and dropping it in the AE) then remove the rest of the keys on the ramp node and connect it to the displacement one.

Reply 0 0
sheffdog
I modified my scene by passing the vertex color through a ramp node, but it still fails for some reason when using a displacement node.

Here is the scene:

If you delete the displacement shader you can clearly see the input map is correct, but the displacement is ignoring all contribution from the vert color.

I am pulling my hair out, perhaps I need to learn to write a custom MR shader?

Thanks for your help Peter, and for an awesome plugin!!!
bad_disp.jpg
Reply 0 0
pshipkov
Yeah, i see the problem.
Rendering in Maya with MR is so ... ok, you get it.
I will report the bug.
Thanks.

Reply 0 0
pshipkov
It was confirmed to me that vertexColors-to-displacement is not supported combination. Too bad. You will have to go through the clumsy cpv-to-texture baking.
There is a tool "vertexColorsToTexture" in SOuP that will make it little easier for you.

Reply 0 0
sheffdog
Thanks you so much Peter for your assistance! Also thanks for creating Soup!
Reply 0 0
pshipkov
you are welcome.
Reply 0 0
light3dsaber
First of all thanks a lot for the awesome plugin!!!

Now I want to try make use of the tension map to control some layers of displacement map for a face setup:

Layer 1: Normal (rest state, Green colour)
Layer 2: Compress (face muscle compress, Red colour)
Layer 3: Stretch (face muscle stretch, Blue colour)

I think this could be done by using the RGB output from the tension map, am I correct?

Could any of you guide me how to set this up, please?

Thanks a lot!


Reply 0 0
pshipkov
This should be pretty straightforward.
Check the tension map example scene and do exactly the same for your need.
If you use MR in Maya then you have to bake the tension map data to texture maps.
There is a tool included for that under the "wrench" button on the SOuP shelf - it is called vertexColorsToTextureMap.
Once you have the texture files you simply multiply the displacement map with them using multiplyDivide node or whatever other way you can come up with.

If you use some of the more robust renderers inside maya you can directly read the vertex color data from within your shader and control the displacement based on that.

Reply 0 0
alon

hi

I am very new at that, so I dont have a lot of experience of piping nodes together.

however I still would like to use a tension map for the face of a character.
there are no bones that deform the face, it is all done by blend shapes.

and I want the tension, that resaults bfrom blendshaping to use to drive a displacement map.

How can I do that?

Or is there already a file that I can open and reuse?
Any help would be great.

alon

Reply 0 0
pshipkov
Take a look at the provided tensionMap example scenes and do exactly the same.

-connect the last deformer in the stack of nodes that influences your geometry to tensionMap.inMesh
-connect the intermediate shape to tensionMap.inRestMesh
-connect tensionMap.outMesh to yourMeshShape.inMesh

turn on "display colors" in the AE of yourMeshShape node to see the results.

Now if you want to drive displacement with the tension data set the tension node to pipe grayscale colors (pick the corresponding option in its AE).
Then you have two options - if your renderer of choice can see and use vertex colors directly pipe them to the shading network.
Otherwise bake them to per-frame sequence of texture files (use the vertexColorsToTextures tool under the "wrench" shelf button on the soup shelf) and then use that to drive displacements.

You will notice that the grayscale colors are not black-centered but gray centered. Which means that the no-displacement occurs when colors are 0.5 0.5 0.5 (RGB). You will need to offset this in your shading network by using Maya standard node like remapColor (use the input-output ranges), or similar thing if you are using other shading engine. Also once you offset the "0" to be the black color then your space will be -0.5 to 0.5. Ideally you want to extend this to -1 to 1. Set the outputMin to -1 and outputMax to 1. etc.
Reply 0 0
Reply