RobynsVeil opened this issue on Jan 24, 2009 · 490 posts
bagginsbill posted Thu, 28 May 2009 at 6:58 PM
OK so how do I use all that.
Well, first I make a CSB for skin. This is not the real good skin you see in VSS, but just your basic cheap procedural skin, with no brains to it. Of course you should use a color map here, and a bump map, and whatever other goodies you might have for your figure. I'm just doing a demo on some spheres. So this is what I did.
skin = CSB(.5 * AGC(SKIN), .25, .01 * (Turbulence(.02, .02, .02) - .5))
I'm using Turbulence for bump, I'm not bothering with variable shine but just using .25, and I'm not bothering with skin color details - just a constant dark skin, anti-gamma corrected, of course. I'm using the matmatic pre-defined color for SKIN. Not bad, you'll see.
Next I want to demo some blue paint.
paint = CSB(AGC(Color(.2, .5, 1)), 1, 0)
And some lipstick.
lipstick = CSB(Color(.2, .05, .08), .7, .03 *(Turbulence(.1, .1, .1) - .5))
Again, I'm using a Turbulence node, but you would probably want to use your figure's bump map. Usually we like to put a bigger scale on that, so you see me using .03 here, versus the .01 I used on the skin. Do what's right for your situation.
Now for my demo, I wanted a couple masks, one for paint and one for lipstick. I'll use these masks to layer the paint and/or lipstick materials on top of my skin material. Remember, we're not doing the whole surface yet. We're just modulating the CSB parameters. My masks here are just some Spots nodes with a little scaling and clamping. You would want to use your makeup masks that you drew for various things.
Once I have my masks, I can make a mixed version of skin and paint, or skin and lipstick, just by asking the skin to mix with one of the others.
paintMask = Clamp(10 * (Spots(0, 1, .2, .3, .4) - .5))
skinAndPaint = skin.mix(paint, paintMask)
lipMask = Clamp(10 * (Spots(0, 1, 1, .3, .4) - .5))
skinAndLipstick = skin.mix(lipstick, lipMask)
Now once I have one of these two-layer CSB objects, I can add the remaining material as a third layer, by asking the mixed material to mix with yet another material. I did both combinations.
skinAndPaintAndLipstick = skinAndPaint.mix(lipstick, lipMask)
skinAndLipstickAndPaint = skinAndLipstick.mix(paint, paintMask)
That's everything I wanted to demo. Now I just need to build my matmatic outputs list, generating a surface for each of these demo CSB objects.
outputs += [
"Skin", CSBSurface(skin),
"Paint", CSBSurface(paint),
"Lipstick", CSBSurface(lipstick),
"Skin+Paint", CSBSurface(skinAndPaint),
"Skin+Lipstick", CSBSurface(skinAndLipstick),
"Skin+Paint+Lipstick", CSBSurface(skinAndPaintAndLipstick),
"Skin+Lipstick+Paint", CSBSurface(skinAndLipstickAndPaint),
]
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)