U & V Effects 1: Stripes

U AND V NODES USED TO CREATE EFFECTS: CIRCLES

While there are easier ways to produce simple circles (using the cells node for instance), the steps needed to produce a circle from the U and V coordinates are interesting in their own right, and several of the intermediate stages are themselves useful.

Smooth Stripes

The key to our UV based circle is the sine maths node. The sine function in Poser (and Excel and many other packages) uses the Radian measurement instead of the more familiar degrees. While a circle contains 360 degrees, it only contains 2xPI radians (Pi is an awkward number that never comes to an end, but in Poser Pi equal to 3.141592654 is accurate enough). On this system, 90 degrees becomes 1.5707 radians and 180 degrees becomes 3.1415 radians. This means that in Poser, the sine wave starts at zero, reaches a value of one at 1.5707 and returns to zero at 3.1415. This means that to convert our U or V output (ranging from zero to one) into a smooth curve, we will need to multiply our U or V node by PI.


Fig 1: Sine Wave

This only needs two shader nodes:

  1. Create a maths node.
  2. Set the function to sin
  3. Set value_1 to PI (3.141592654).
  4. Create a U or V node.
  5. Plug the output from the U or V node into the value_1 input of maths node.
This will create a smooth output, starting and ending at zero, and reaching its full value (1) at U or V = 0.5 (see figure 2).


Fig 2: Smooth Stripe

This smooth stripe is useful in its own right. It can be modified by altering value_1. Higher values will get you more stripes - three times PI (roughly 9.45) will produce two stripes. On the same lines, five times PI (15.71) will get a third stripe.

A Smooth Circle

We can create a smooth edged circle by combining a smooth U stripe and a smooth V stripe.


Fig 3: Smooth Circle

A Sharp Circle

The smooth circle created above can be turned into a sharp edged circle by adding one extra node. This rounds up the results of our previous setup, with any value above 0.5 becoming 1 (white) and any value below 0.5 becoming 0 (black).


Fig 4: Sharp Circle


PoserWorld