POV-Ray : Newsgroups : povray.binaries.images : Shaders? Server Time
2 Oct 2024 16:29:47 EDT (-0400)
  Shaders? (Message 1 to 4 of 4)  
From: Vahur Krouverk
Subject: Shaders?
Date: 7 Apr 2000 08:14:07
Message: <38EDD151.DC403EA4@aetec.ee>
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'
demo.jpg


 

From: TonyB
Subject: Re: Shaders?
Date: 7 Apr 2000 10:54:47
Message: <38edf6b7@news.povray.org>
For those of us who are ignorant about Renderman (except for Pixar), how
will this patch change our lives?


Post a reply to this message

From: Chris Huff
Subject: Re: Shaders?
Date: 7 Apr 2000 11:12:26
Message: <chrishuff_99-0D7266.10145707042000@news.povray.org>
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

From: TonyB
Subject: Re: Shaders?
Date: 7 Apr 2000 20:36:33
Message: <38ee7f11@news.povray.org>
As the little green alien in Toy Story would say: "Ooooh!" :)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.