Forum: Poser - OFFICIAL


Subject: attn bagginsbill - procedural bruising?

PapaBlueMarlin opened this issue on Aug 18, 2006 ยท 87 posts


bagginsbill posted Sat, 19 August 2006 at 2:13 PM

# Look for triple sharp ### comments - this is what I changed since the last step.

STEP 4

It's too strong - need to weaken the effect. Also, still a tad low.

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)

Bruise color

bruiseclr = Color(.5, .3, .6)

Move cy up a bit

cx = .4
cy = .55

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 = .06

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.

Reduce max value of blender by just multiplying something less than 1.

maxblend = .7
bruiseblender = maxblend * Scale(r, br, br / 2)

#Finally I simpley blend the original Diffuse_Color (from above) with the bruise color
#using the bruiseblender I just calculated.

s.Diffuse_Color = Blend(s.Diffuse_Color, bruiseclr, bruiseblender)


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)