|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I'm trying to implement a simple shader in POV-Ray by modifying the existing
source code. The code is quite extensive, and knowing where to begin seems
a bit confusing. Does anyone have any ideas on where I would specify a
method call to a shader to determine the colour of a particular ray
intersecting an object? Does anyone know if a method has been created to
determine the incident angle of a ray on an object, and if so, under which
class is it?
Thanks,
MM
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 16 Apr 2003 04:34:46 EDT, "MM" <jro### [at] po-boxmcgillca> wrote:
> I'm trying to implement a simple shader in POV-Ray by modifying the existing
> source code.
Have you seen POV-Man - "Bridge between POV-Ray and RenderMan" ?
> The code is quite extensive, and knowing where to begin seems
> a bit confusing. Does anyone have any ideas on where I would specify a
> method call to a shader to determine the colour of a particular ray
> intersecting an object?
There is nothing different between POV engine and general raytracing engine
idea. First objects are checked for intersection then pigment is calculated. I'm
not sure what part you want replace but go to render.cpp and find trace_pixel()
and start reading what is order of calls. Names of functions usually well
describes what they do.
> Does anyone know if a method has been created to
> determine the incident angle of a ray on an object
You mean angle between ray and normal at intersection point? Look into
http://mathworld.wolfram.com/ or standard include files in POV distribution.
> and if so, under which
> class is it?
Class ? Have you looked into POV-Ray sources already ? ;-)
Out of curiosity: have you idea about implementing shader for general purposes
or just because you need some specific pattern you can't find ? Perhaps there is
much simpler workaround for you, though some would like shader implemented.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
ABX wrote:
>On Wed, 16 Apr 2003 04:34:46 EDT, "MM" <jro### [at] po-boxmcgillca> wrote:
>> I'm trying to implement a simple shader in POV-Ray by modifying the existing
>> source code.
>
>Have you seen POV-Man - "Bridge between POV-Ray and RenderMan" ?
>
I got hold of POV-Man and all my problems have been solved. Thanks a lot
:-)!
>Out of curiosity: have you idea about implementing shader for general purposes
>or just because you need some specific pattern you can't find ? Perhaps there is
>much simpler workaround for you, though some would like shader implemented.
>
>ABX
>
I needed to create and test a particular pattern (a soap bubble shader to be
exact), which I've now been able to do.
Again, thanks a lot,
MM
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|