View Full Version : misss per face
04-08-2006, 10:22 AM
I have a question about misss_fast_skin shader with lightmap to be assigned per face not whole surface.
WHY BECAUSE :
I am plannig to assign some different misss_fast_skin shader to left hand, right hand, head and so forth independently. What I want to do by this is part-by-part assignment of shaders even with using vast UV area from (0,0) to (10, 1). This seems necessary for me to do very complicated Animating Layered Bump Maps for a part like the left hand in one-skin object (female figure). I had tested several cases with "mix8layer" or "bumpCombiner", but failed with those uses for my cases. It is obvious that "lightmap calculation process" had failed for those cases.
Is there any answer to solve this problem?
Thanks in advance.
04-08-2006, 03:54 PM
There's several approaches to that. My favorite is using one shader for the whole surface, but layering the textures over each other by using different uv spaces (either by using uv sets or by offsetting the uvs from 0-1 to 1-2, 2-1, 2-2 space etc.). Once you have the proper uv layout, set the default color of your textures to black, turn off Wrap UV in the placement node, offset the uv space as necessary and add-layer the textures over each other - you dont even need any special shader, the simple plus-minus-average node does the job as well.
Once you got this up and running, treat the layer node (plus-minus-average) like you would treat any other filetexture, simply plug it into the slot where you need it. For instance if you need it for bump, pipe it through a luminance node and plug the luminance's scalar output into the bump value of a bump2d.
The other way is to physically use different shaders with different textures on your surface, sharing one lightmap and lightmap shader (though that's not obligatory, you might use several lightmaps) - one important thing to bear in mind is setting the lightlink mode both of the misss and the lightmap shader to 2 in this case, though it might become tricky if you're using the same lightmap shader mixed on single- and shared-shader surfaces.
04-09-2006, 04:38 AM
Thank you for your advice.
I succeeded the test case with the use of layered textures.
I'll try it later once more with fixed UV layout (it will be soon after).
The previous comment is wrong.
I succeeded with the use of different UV Sets for plus-minus-average.
I agree with floze's favourite method. It works well.
I thought I would point out a possible reason for NOT using face-level shader assignments. If you do, you may have problems with render-layers. The problems seems arise when you have face-level shader assignments for some layers, and surface-level shader assigments for another layer (occlusion preset for example). As you make changes to the layers, maya seems to get confused and eventually some surfaces/faces will not have the correct shaders.
04-09-2006, 06:00 PM
can you explain a little how you should connect things through the layered texture and plus/minus/average nodes? i'm trying to do this myself, and can't figure out what needs to connect to what.
04-09-2006, 11:27 PM
Set up the the placement and texture nodes as Floze dscribed then just MM drag yoru texture files over the plus/minus node in the Hypershade and select the input. You can do this for as many textures as you want to. Be sure that the mode is set to SUM. Then connect the outoup of the +/- node to whichever attribute of yoru shader you want. Just play with it a bit and it will make sense.
04-10-2006, 06:37 AM
Hi. Thanks to all.
It might be a common trouble.
I have tested an object with 2 materials for the case above, but the resulting image contains terible error. Plus-minus-average or mix8layer are better node to solve this kind of situation.
05-09-2006, 05:55 PM
... Once you have the proper uv layout, set the default color of your textures to black, turn off Wrap UV in the placement node, offset the uv space as necessary and add-layer the textures over each other - you dont even need any special shader, the simple plus-minus-average node does the job as wellBasically, I use this method a lot but never with the plus-minus-average node. I simply drop the next texture into the previous texture's default color and so on. Iím just wondering what the benefit of the plus-minus-average node is compared to my method.
05-09-2006, 08:09 PM
Emil - I think the benefit is that you can now use the same shader (Lambert/Blinn...) for all the elements of your character by pumping in as many maps/textures as you like. It is essentially doing what a layered texture would do but I find it easier to work with. This way you only need to assign a single shader to the mesh and use the texture coordinates to place your maps. This is somewhat easier than selecting out all the individual faces and applying individual shaders to them.
05-09-2006, 09:07 PM
Basically, I use this method a lot but never with the plus-minus-average node. I simply drop the next texture into the previous texture's default color and so on. Iím just wondering what the benefit of the plus-minus-average node is compared to my method.
There's surely a bunch of ways to get there. You could use the color offset attribute as well for example. Imho the plus-minus-average makes it most clear what's actually happening, specially with more or less complex shader graphs. One could argue whether or not it's another useless node in the graph, but that's definitely a question of taste and habit.
05-09-2006, 10:35 PM
Thanks for replying guys.
Flose - The hub-like connection (one to all) instead of a chain definitely makes the network more recognizable. I was just wondering if thereís more to it and now I wonder if there would be any performance difference between the different ways.
Cgtriguy Ė it is just two very similar ways that end up with the same result but one uses the + - = node.
06-09-2006, 06:26 PM
I just wanted to point out for anyone trying these methods
if you layoutthe UV s on 0-1 , 1-2 and so
now in the placment node lets say the firs is set to 0>0
the second would be -1>0 NOT 1-0
however the best result is by using translate frame......
06-19-2006, 12:50 PM
Excuse me for re-question about this issue.
I found that "using separate UV sets" is not enough to solve my situation. I want to do the things as according to the recipe of yours, but I failed with my several tests. My workflow can be seen the image below. Please tell me once more the answer.
06-19-2006, 03:08 PM
For file 2 change the translate Frame to 1.0 and 0.0 (that mean it will move 1 unit on the U direction and remain at the 0 for V)
06-19-2006, 03:17 PM
Thanks a lot.
I come to understand what it is! :)
06-19-2006, 03:17 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.