POV-Ray : Newsgroups : povray.unofficial.patches : Animation system?? : Re: Animation system?? Server Time
2 Sep 2024 00:13:59 EDT (-0400)
  Re: Animation system??  
From: Vahur Krouverk
Date: 28 Jul 2000 06:28:45
Message: <39816077.EF84471E@aetec.ee>
Pabs wrote:
> 
> Fabien Mosen wrote:
> 
> > Pabs wrote:
> > Shaders are compiled code, ???????????????? dynamically linked (like dll's)
> > to
> > the rendering engine.  So, implementing shaders in POV-Ray wouldn't
> > be THAT hard (though not easy-easy), but using them would require
> > the ability to write C code.
> 
> Does that mean you need a compiler that will generate the actual CPU/machine
> code (platform dependant) for the shader or do you have compilation built into
> the renderer & it compiles the shader as an initial stage in rendering.
> 
> I thought that shaders were interpreted (seems unlikely now that I think about
> it - way too slow)
> 
> How do shaders work anyhow.?
> 

I happen to write shader patch for POV-Ray. This patch will have
Renderman shading language compiler for surface shaders, which compiles
it into bytecode and POV-Ray will have stack-based interpreter. I've
almost completed first version, which implements some stuff from RM 3.8
SL (left out is derivative part and support for texture maps, matrixes
(these are left for next version), shadow maps (probably not needed for
RT??)). It has other limitations as well, but quite a number of RM
surface shaders could be used with this patch (e.g. from BMRT distro). I
hope, that within month it will be released (no, this is not promise, it
is hope only ;-)

Compiling shader into machine code and then dynamically linking has
problems, as POV-Ray is supported in multiple platforms and it is hard
to do such thing in portable manner (remember, what happened with
iso-functions in dll-s?), whereas bytecode is hold in ASCII text file
and is compeletely portable. And bytecode is not so very slow either:
for example BMRT got this support lately and by it's documentation it
gave speedup 10-50%, so for non-professionals, who do not have deadline
problems, it should suffice.

> Does anyone have the zip/tgz/? of that patch that I mentioned.
If you are really interested, then this POVMan code for POV-Ray 2.2 is
somewhere in ftp.cdrom.com, under POV-Ray. I got it from there and based
my patch on it. R. Mercier gave me gently permission to use his code.


Post a reply to this message

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