misss per face

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2006   #1
misss per face

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.
__________________
____ Hermit in The BEHIND-UNIVERSE ____
______ SATO, Koji aka TAISO, Renpoo _____
 
Old 04 April 2006   #2
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.
__________________

Astro Man
!!!!!!!

Six Tuts On Light And Shade
 
Old 04 April 2006   #3
> floze

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).
Thanks!


EDIT :
The previous comment is wrong.
I succeeded with the use of different UV Sets for plus-minus-average.
Thanks.
__________________
____ Hermit in The BEHIND-UNIVERSE ____
______ SATO, Koji aka TAISO, Renpoo _____

Last edited by renpoo : 04 April 2006 at 09:11 AM.
 
Old 04 April 2006   #4
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.
 
Old 04 April 2006   #5
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.
 
Old 04 April 2006   #6
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.
__________________
GWB
 
Old 04 April 2006   #7
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.
__________________
____ Hermit in The BEHIND-UNIVERSE ____
______ SATO, Koji aka TAISO, Renpoo _____
 
Old 05 May 2006   #8
Originally Posted by floze: ... 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
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.

Last edited by Emil3d : 05 May 2006 at 06:03 PM.
 
Old 05 May 2006   #9
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.
__________________
GWB
 
Old 05 May 2006   #10
Originally Posted by Emil3d: 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.
__________________

Astro Man
!!!!!!!

Six Tuts On Light And Shade
 
Old 05 May 2006   #11
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.
 
Old 06 June 2006   #12
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......
__________________
Ash-Man
www.PixelCG.com
www.PixelCG.com/blog

Last edited by Ash-Man : 06 June 2006 at 12:44 PM.
 
Old 06 June 2006   #13
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.

__________________
____ Hermit in The BEHIND-UNIVERSE ____
______ SATO, Koji aka TAISO, Renpoo _____
 
Old 06 June 2006   #14


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)

__________________
Ash-Man
www.PixelCG.com
www.PixelCG.com/blog
 
Old 06 June 2006   #15
Thanks a lot.
I come to understand what it is!
__________________
____ Hermit in The BEHIND-UNIVERSE ____
______ SATO, Koji aka TAISO, Renpoo _____
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:44 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.