Forum: Poser - OFFICIAL


Subject: Bagginsbill or other guru - shader question

JoEtzold opened this issue on Dec 08, 2008 · 35 posts


bagginsbill posted Thu, 18 December 2008 at 8:24 AM

Jo,

I copied the seam guide and drew my own curved line, trying to track the edge of the leg.

I then wrote a program in Python (real Python not Poser Python) using the Python Imaging Library (PIL). In this program, I found the position of this curve and converted the x offset of the curve into a gray-scale image. 

The first time I did this, the resulting data was too coarse, resulting in stair-step jumps of the stripe on the render.

So I changed the range. I observed that for the curve I wanted it, the x offset was between .23 and .29. Using this information, I shifted the output of my grayscale image to mean a number between .23 and .29. In the shader I then used .23 + .06 * grayscaleCurveImage. This produced much better results.

Because the seam guide you gave me was so low in resolution and detail, and my lack of drawing skills, the resulting data was uneven. There were some incorrect data points. I changed the python script to smooth them out using low-pass filtering, but the random occasional incorrect offsets are still there.

If you could draw the curve more precisely, it would work fine.


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)