View Full Version : renderman - Eye ball capillaries

 chayanvinayak05 May 2007, 12:15 PMi am making a eye shader in renderman for first i am creating a shader to show capillary network of eye. till now i have created straight lines ,but i could not achieve network/ reticulate structure of capillaries.I have used following code for that. Kindly suggest the way to achieve the reticulate structures of lines : Thanks ---------------------------------------------------------------- color capillaries(float l1,r1,margin,no_of_lines,radius,loc_x,loc_y;color c1) { color result = 1; float i=1; //if(radius > sqrt((s-loc_x)*(s-loc_x) + (t-loc_y)*(t-loc_y))){ while(i<=no_of_lines){ //if(s>(l1+margin*i) && s<(r1+margin*i)) if(s>tan(t)) result = c1; i+=1; } //} return result; }
Mauritius
05 May 2007, 03:35 PM
i am making a eye shader in renderman for first i am creating a shader to show capillary network of eye.

till now i have created straight lines ,but i could not achieve network/ reticulate structure of capillaries.I have used following code for that.
}
I'd use a fractal noise with a Worely/Voroni basis function. To get a branching veines look, use the distance to the cellborder (not cellcenter) of an octave to adjust the width/fadeout of the next octave. Use 3-4 ocatves, distort the input point with perlin noise as neccessary to get rid of the straight lines in the basis.

Cheers,

Moritz

playmesumch00ns
05 May 2007, 11:56 AM
You might also want to check out Mach Kobayashi's "Constant Width Shaders" presentation from the RUG last year for a better-looking result. It's basically a way to draw lines of constant width through noise functions, which avioids that "procedurally" look.

http://www.renderman.org/RMR/Examples/srt2006/index.html#mach

CGTalk Moderation
05 May 2007, 11:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.

1