Forum: Poser - OFFICIAL


Subject: Matmatic - Displacement Problem

ropeypopey opened this issue on Aug 31, 2006 · 36 posts


ropeypopey posted Thu, 31 August 2006 at 5:54 PM

First, many many thanks to bagginsbill for taking the drudge out of procedural material. Now it is possible to concentrate on the algorithm without  getting tied up in knots trying to wire it all together.

Using the "column" example I made something a bit more complex - something like a coil, rope or cabling.
Here is the "code"

s = Surface(GRAY7,1,GRAY9, 0.3, 0.01)

BASIC COIL

    Dia_1 = 0.05
    Rad_1 = Dia_1 / 2
    Saw_1 = (V + 0.2 * U) % Dia_1 - Rad_1
    Disp  = Sqrt ( Rad_1 * Rad_1 - Saw_1 * Saw_1)

COIL on COIL

    Veins = 4
    Dia_2 = Dia_1 / Veins
    Rad_2 = Dia_2 / 2
    Saw_2 = (V - 0.1 * U) % Dia_2 - Rad_2
    Disp += Sqrt ( Rad_2 * Rad_2 - Saw_2 * Saw_2)

COIL on COIL again

    SubVeins = 2
    Dia_3 = Dia_2 / SubVeins
    Rad_3 = Dia_3 / 2
    Saw_3 = (V + U)  % Dia_3 - Rad_3
    Disp += Sqrt ( Rad_3 * Rad_3 - Saw_3 * Saw_3)

Magn = 70
Disp = Magn * (Disp - (Rad_1 / 2))
s.Displacement = Disp

All very nice but the render shows some strange interference. I've tried messing around with Poser's settings but nothing solved it.

Can anyone identify what's happening?
Is this some limit to what can be done with displacement mapping?

Thanks!

My favourite question is "Why?", my second favourite is "Why not?"