Forum: Poser - OFFICIAL


Subject: attn bagginsbill - procedural bruising?

PapaBlueMarlin opened this issue on Aug 18, 2006 · 87 posts


Dead_Reckoning posted Sun, 20 August 2006 at 5:04 PM

Quote - So to make the nodes you showed me in your screen shot:

I'll do this step by step instead of one big statement

First the noise - since all the parms are default value, I need no arguments

myNoiseNode = Noise()
#The granite has the noise plugged into the first parameter and all the rest are default:
myGraniteNode = Granite(myNoiseNode)

#The granite was plugged into the blender second color (for the bruise):
s.Diffuse_Color = Blend(s.Diffuse_Color, bruiseclr * myGraniteNode, bruiseblend)

 

That's all I need to do to match what you modified in my shader.

So, this shoiuld be the script then? I ran it and had no errors. 13 Nodes.

=========================

##Bagginsbill's Bruise Script

load Jame's face image here

clr = ImageMap(":Runtime:Textures:Poser 6 Textures:James_Face_Color.jpg")

apply to diffuse color of surface, also set soft specular

s = Surface(clr, 1, 1, .2, .5)

Try out a bruise color

bruiseclr = Color(.5, .2, .7)

This is roughly where I want the bruised centered.

cx = .4
cy = .45

Going to use a simple circular pattern to blend in the bruise.

x = U - cx
y = V - cy

In r, I'm putting the distance from the cx cy position.

r = sqrt(x * x + y * y)

We'll put the range of the bruise in this variable, br.

br = .1

Now I'll create the blender input using the Scale function.

A certain distance (br) from the center, the bruise is completely gone - this distance

goes in the second argument so that Scale produces 0 when r = br.

We'll make the bruise come full on at half the br distance, so br/2 goes in the third

argument - this tells the Scale when to produce a 1.

bruiseblender = Scale(r, br, br / 2)

First the noise - since all the parms are default value, I need no arguments

myNoiseNode = Noise()
#The granite has the noise plugged into the first parameter and all the rest are default:
myGraniteNode = Granite(myNoiseNode)

#Finally I simpley blend the original Diffuse_Color (from above) with the bruise color
#using the bruiseblender I just calculated.
#The granite was plugged into the blender second color (for the bruise):
s.Diffuse_Color = Blend(s.Diffuse_Color, bruiseclr * myGraniteNode, bruiseblender)

====================================

Thanks Very much

DR

 

"That government is best which governs the least, because its people discipline themselves."
Thomas Jefferson