Wednesday 15 January 2014

The approach for the Project



The approach for creating our Window Frost shader is to generate a procedural pattern that will derive the look of the overall shader and aswell affect the displacement shader. These two are the primary focus of our project and will then add more characteristics to our shader e.g. light and animting the shader.


The two main books that will help me through the process are these:

Renderman Shading Language Guide , Rudy Cortes
Essential Renderman Fast , Ian Stephenson

And other reference book such as :
Advanced renderman: Creating CGI for Motion Pictures , Morgan kaufman ,
The Renderman Companion: Programmer's Guide to Realistic Computer Graphics by Steve Upstill
Texturing and Modeling: A Procedural Approach (The Morgan Kaufmann Series in Computer Graphics)
The surface shader is the perfect type of shder that will derive the look of our Window frost. Surface shader has the capability to render value of the surface position (very handy to randomize pattern position) and normalizing. Here is an example from the book , Renderman Shading Language Guide , Rudy Cortes.

This is only an example!!
s_RP_showst.sl.
surface s_RP_showVars(
string showVar = "s";
)
{
/* Variables */
// Assign pure RED to sc, if the value provided by the user is not
// recognized the use red.
varying color sc = (1,0,0);
if (showVar == "s")
sc = color(s,0,0);
else if (showVar == "t")
sc = color(0,t,0);
else if (showVar == "st")
sc = color(s,t,0);
else if (showVar == "P")
sc = color(P);
else if (showVar == "N")
sc = color(normalize(N));
Ci = sc;
}








All of this will be derive by a RIB file that will display it into renderman. The real work is creating the procedural pattern that will derive the look of our shader. for this project i propose to use the the Dragon curve algorithm to create our 2D procedural texture.


http://en.wikipedia.org/wiki/Dragon_curve










we can approximatethe dragon curve by recursive methods such as Lindenmayer systems.


This is an example This is not my WOrk .

Example 6: Dragon curve[edit]

The dragon curve drawn using an L-system.variables : X Yconstants : F + −start : FXrules : (X → X+YF), (Y → FX-Y)angle : 90°

Here, F means "draw forward", - means "turn left 90°", and + means "turn right 90°". X and Y do not correspond to any drawing action and are only used to control the evolution of the curve.



No comments:

Post a Comment