RobynsVeil opened this issue on Jan 24, 2009 · 490 posts
RobynsVeil posted Sun, 01 March 2009 at 12:22 AM
What follows is a rough attempt to follow your instructions, Bill. Still need to do the maths thoroughly... kinda did them, but wasn't sure if I was doing them correctly:
**def makeSurface():
# Gamma-correction node
gamma = Add(2.2).labelled("GammaCorrection")
# Placeholder for colorMap
colorMap = ImageMap().labelled("Color Map")
# Colours to fiddle with
ltBeige = Color(.98,.94,.88)
ltBlue = Color(.91,.95,.95)
# Underlying skin tone
baseTone = SimpleColor(ltBlue * colorMap).labelled("BaseTone")
# Complexion
setSkin = Spots(
Base_Color = baseTone,
Spot_Color = ltBeige * baseTone,
Spot_Size = .1,
Softness = .35,
Threshold = .7,
Noise_Type = 2).labelled("Complexion")
# Anti-gamma process: felt I had to take the baseTone value out once because it was added
# into the setSkin twice
linearColormap = ((colorMap + setSkin) - baseTone) ** gamma
# Set up specular node
setSpec = Blinn(1,.4,.4,.4)
# Set up the Diffuse node, keep it from exceeding conservation of energy with Specular
setDiff = Diffuse(linearColormap, .7 * (1 - setSpec))
# Setting up PoserSurfacce
s = Surface(1,0,0,0)
s.Diffuse_Color = colorMap
s.Specular_Color = WHITE
# keeps diffuse_color from doing anything but just displaying in the pose room
s.Diffuse_Value = Add(0,0)
s.Highlight_Size = .02
s.Bump = Sub(ImageMap(Background = Turbulence(.05,.05,.05,8,0,.5,.15)).labelled("Bump Map"),.5) * .03
s.Alternate_Diffuse = (setDiff + setSpec) ** (1/gamma)
return s
makeSurface()
**
Render reveals I'm using a really poor colorMap - seams everywhere!
two lights:
Infinite 1,256,1,1,1,65%, depthmap shadows... :-P, no ambient occlusion
IBL 1,256,1,1,1,22%, no shadows, nothing else...
and I'll need to do a mask for the freckles and sheesh, all kinds of other stuff too. This is all very rough and I'll be playing much more with it, but I'm so excited about the fact that I've gained some confidence and understanding... mind you, still a huge way to go.
Is this shader valid? Probably not yet...
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]