|
|
Here is my custom patch output. This patch adds RM shaders support
for POV-Ray. (NB! This picture has no artistical intention!) For
discussion please go to the "unofficial patches" group under same
subject.
Upper left sphere demonstrates normal pertuberation and modification of
color and opacity on base of normal direction.
Upper right sphere is my attempt to create "HSV sphere", but seems like
I failed . Its implementation is cumbersome, for I haven't implemented
yet RGB<=>HSV conversion and UV mapping support, if this will be done,
then creation
of such sphere should be easier.
Lower spheres demonstrate wood shader from BMRT distribution. Upper ones
represent "spheres in texture space", lower ones "texture in sphere
space".
Background reflective plane has "lattice" shader.
Use of shader:
===========8<==========================
sphere{
<-2,3,0>,1
texture{
pigment{
shader{
shader_file "test4.slo"
}
}
finish{
ambient 1
diffuse 0
}
}
}
===========8<==========================
Sample shader for upper left sphere:
===========8<==========================
surface test1( float value=1; color samplecol = color(1,1,1))
{
point w,x;
point g,h;
x=point noise(transform( P)*25);
w=normalize(N)+x/2;
if(I.w<=0){
N=normalize(w);
}
g= point(0,-1,0);
h=point( 0, 0, -1);
Ci=value*samplecol;
if(N.g >0)
Ci=value*color(1,1,1)*N.g;
if((N.h/(length(N)*length(h))>0.8))
Oi=0;
}
===========8<==========================
Post a reply to this message
Attachments:
Download 'demo.jpg' (86 KB)
Preview of image 'demo.jpg'
|
|
|
|
In article <38edf6b7@news.povray.org>, "TonyB"
<ben### [at] panamac-comnet> wrote:
> For those of us who are ignorant about Renderman (except for Pixar), how
> will this patch change our lives?
It lets you tell the renderer exactly how to calculate the color of a
surface at each point using a kind of interpreted programming language.
Basically, a shader is to textures as an isosurface is to a shape
primitive. It gives advanced users a great deal of flexibility at the
cost of ease of use and sometimes speed. It lets you do things that
would ordinarily only be possible by modifying the source code.
Using isosurface functions as patterns could probably be considered a
crude form of a shader, but a specialized patch could do *much*
more(reflection, refraction, media densities, etc.).
--
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|