PapaBlueMarlin opened this issue on Aug 18, 2006 · 87 posts
Dead_Reckoning posted Fri, 18 August 2006 at 7:02 PM
Quote - Ok, so I'm not bagginsbill, but thought I'd offer an opinion here.
To my mind, bruising is something better left to a texture map, rather than procedural node-work. Why? Well, because (haveing recently injured myself in a bike accident and got the evidence to back it up) bruising tends to happen in specific places, at the points of contact. For example, I've had a bruise on my left knee for a week and a half now wwith an unharmed area in the centre, based on something (I don't know what, exactly) which protected that section. Bruising can also take the shape of the specific object which left the mark - the assailant's fist, for example. Thse specific shapes and locations for the damage would, I think, prove beyond the capabilities of a node-based solution.
Of course, I now look forward to bagginsbill to come along and tell me I'm wrong... : :)
jonthecelt
This is a section from Bagginsbill's wonderful Jessi Eye Makeup Parmatic file at rdna Forum.
I'm no expert, but it looks like you can map the location in the script. It was setup for the eye, but I'm guessing some of the wizards here could rework it for various other parts.
Cheers
DR
def JessiEyeMakeup(surface, opacity = .3, mclr1 = Color(.5, 0, 1), mclr2 = Color(.7, .5, 1)):
# I'm taking advantage of the perfect symmetry of the texture mapping
# so I can let x be the distance from the center of the image map.
x = Abs(U - .5)
# These two x values define the limits of the eye part of the map
# in the x (U) dimension.
x0 = .026
x1 = .095
# Now I'm scaling that range to be from 0 to 1. So x=0 is
# at the beginning of the lacrimal, and x=1 is at the outermost
# edge of the eyebrow.
x = Scale(x, x0, x1)
# For y (V), the limits of the region of interest are given by
# y0 and y1.
y = V
y0 = .485
y1 = .55
# Scaling y to those limits, y = 0 is at the lacrimal, and
# y = 1 is just under the peak of the eyebrow.
y = Scale(y, y0, y1)
# Now I compute two curves, y0 traces the upper eyelid
# and y1 traces the bottom of the eyebrow.
y0 = Interpolate(x, ['ibias', .6, 0, .37, .43, .45, .38, .2, .18])
y1 = Interpolate(x, ['ibias', .6, .2, .65, .8, .9, 1, .9, .5])
# Scaling between eyelid and eyebrow gives me a y factor that
# varies from 0 to 1. When yf=0, I'm at the eyelid, when yf=1,
# I'm at the eyebrow.
yf = Scale(y, y0, y1)
# This calculation of blendf gives me a varying strength of the
# eye makeup. I'm making it start strong near the eyelashes,
# then fading to 0 as we approach the eyebrow.
blendf = Interpolate(yf, [0,.9, 1, .8, .4, 0])
# Retrieve the base color - I'm assuming it's in the Alternate_Diffuse
# attribute, as used in demoSkin1 below.
baseclr = surface.Alternate_Diffuse
# Calculate the diffuse reflection from the makeup, blending the
# colors passed in to this function using the gradient from eyelid
# to eyebrow which is in yf.
blendclr = Diffuse(HSV(Blend(mclr1, mclr2, yf)).labelled('PM:EyeMakeup:*'))
# Now just combine the base with the makeup, using the
# specified opacity and the blendfactor computed above.
f = blendf * InRange(x, 0, 1)
f = (opacity * f)
surface.Alternate_Diffuse = Blend(baseclr, blendclr, f).labelled('PM:EyeMakeup:Blending')
# Return the now modified surface.
return surface
It can then be controlled with the Parnatic Dials.
"That government is
best which governs the least, because its people discipline
themselves."
Thomas Jefferson