Forum: Poser - OFFICIAL


Subject: Material Room - Draw a line on a Surface

RichardCoffey opened this issue on Oct 10, 2010 ยท 35 posts


bagginsbill posted Thu, 14 October 2010 at 12:57 PM

Now our plan is to use this information to produce a displacement as well as to control appearance.

What I'll do next is to produce a value, h, that defines a height map. This will be used to drive the displacement. The value of h is chosen so that it produces a bump that matches the line segment. The cross section of this bump is circular, at least mathematically it is at this point. How we use it later will result in an ellipse.

Calculate a value, h, for use in displacement.

The value of h is going to produce a circular cross section.

The radius of the cross section is defined by a distance, R.

We'll use a parameter node to define R.

R = PM(.1, "R")
rx = seg.pcx / R
ry = seg.pcy / R
h = Sqrt(Clamp(1 - (rx * rx) - (ry * ry)))

Then for testing purposes, I'll just draw h.

Draw it

s = View(h)

The script is attached.


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)