|
|
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'
|
|