PDA

View Full Version : Turn weightmap on & off


zombine
07-24-2011, 02:38 PM
Hey there forum. I've got a question regarding Weightmaps.
Is it possible to control weightmaps with -for example- bones.
Let's say that when a bone is rotated 90° the weightmap will turn off (Will have no influence anymore).


Hope it's clear what I mean! Anybody knows this is possible?

nickdigital
07-24-2011, 06:53 PM
No.

What are you trying to achieve?

zombine
07-25-2011, 11:01 AM
Well, I'm working on a character. In the rig I want to try to put different clothes. For example create a switch to change between jeans and a dress. When the jeans are on, I don't want the character its legs to stick trough the jeans, and thus I want to make the legs invisible when the jeans are on. I thought using a weight map would be a possibility (let it control the transparancy channel of the surface).
So maybe it is possible to control the transparancy channel using a bone's rotation?
Well it doesn't necessary needs to be a bones rotation, a slider would be better in this case.

nickdigital
07-25-2011, 12:58 PM
My suggestion would be to get your rigging polished enough to where you don't have these collision problems. If your leg geometry is colliding through the pants geometry then it sounds like your bone influence or weight maps are wrong. I would actually expect the pant and leg geometry to be using the same weight map.

dwburman
07-25-2011, 03:34 PM
You're probably better off doing what nickdigital said. That way you don't have to worry about setting slider controls, etc.

As for your initial question, yes it is possible to use a weight map and sliders/nulls/etc to control transparency.

One way would be to add a gradient to the transparency channel and set its Input Parameter type to Weight Map and select your weight map from the drop down menu that appears.

Add gradient keys at -100, 0, and 100 (position). -100 and 0 should be set to 0% and 100 should be 100%. This will cause anything that has a weight map value of 100 to be 100% transparent.

Next, we need to click on the [E] button on the Layer Opacity for the gradient layer. This should open the Graph Editor where you can add an expression or Channel Follower modifier to link the layer opacity to another object/slider/etc.

Here's a tutorial vid that might help you set up the weight map gradient. You'll use transparency instead of color.
http://youtu.be/you23LuWbCU

And another tutorial vid to help with linking channels.
http://youtu.be/7aHwXnDZI9E

One other thing. Putting this in the transparency channel, could add to render times, plus if you have any specularity or reflection on your object, you'll have to repeat the process for those layers (and set the transfer, or blending mode to PS Screen). You'll be better off doing this as a clip map in the object properties.

Edit: The way you asked the question made it sound like you wanted to control the strength of a bone's influence. I don't think that's possible. There's no Envelope button on bone strength or a weight map blending control.

zombine
07-26-2011, 06:02 AM
Guys, thanks, This is gonna help me a lot. I've worked with Lightwave for a pretty long time but only did a little bit of animation stuff in it. So I thought it would be about time to get into it some more.

NickDigital: Yeah I thought about that, but the pants are these leather kind of pants, so they are pretty tight. I always have had trouble getting stuff not to stick trough, even after tweaking weightmaps for a long time. So i thought simple make the legs invisible would be an easier way!?!?

dwburman: Thanks for the links! Messed around with the channel follower allready and it seems to work fine. I am actually a bit silly since I have used the channel follower before some time ago. So I could have known that option was there :P Never came into my mind using it to control a surface option.
I'll check out the clip map as well.
About your edit: No that was not what I ment :)

Well, I will post the results on this forum when it turns out allright. I perhaps should start with a more simple model, but since I've got the time to mess around and tweak a lot, I'll just give it a try :p

Thanks again, I'll probably post some more questions in the near future :P First have to finish the rig in order to start doing the things I asked in this topic.

nickdigital
07-26-2011, 11:42 AM
If you're not gonna see the legs there's no need to have leg geometry under the pants then. Having this extra geometry that serves no purpose will actually slow your rig down just a bit too.