POV-Ray : Newsgroups : povray.unofficial.patches : Feature idea: unlimited functions in textures : Re: Feature idea: unlimited functions in textures Server Time
8 Jul 2024 16:41:03 EDT (-0400)
  Re: Feature idea: unlimited functions in textures  
From: Christoph Hormann
Date: 20 Nov 2001 11:34:38
Message: <3BFA861E.CABA3689@gmx.de>
Rune wrote:
> 
> Disclaimer: This is not a feature request but a feature idea. What I hope to
> accomplish is to spawn thoughs in other people's heads and start discussion
> on the subject.
> 
> Something I've been thinking of for some time is how extremely powerful it
> would be if functions could be used for any float value found inside a
> texture statement. I have no idea if this would be possible, so anyone who
> might have an idea, please let me know if the idea is completely impossible,
> or if it's just your regular very-difficult-thing-requiring-total-rewrite.
> 
> Say for example that you have a function called F(x,y,z) and another called
> G(x,y,z). All the following examples would then be valid:
> 
> [...]
> 
> I think you get the idea - so what do you think?

I think it's definitely an interesting idea, but it would be quite a large
change, strongly influencing the style of the SDL in total.

> 
> Another part of the suggestion is expanding the number of variables that
> textures make available to functions. Currently the intersection point is
> avaiable as x,y,z.
> 
> I suggest the following:
> Intersection point as x,y,z or perhaps something like px,py,pz
> Normal at intersection point as nx,ny,nz
> Vector of incoming ray as vx,vy,vz
> 
> And possible other information. I'm not so sure about this part, and
> especially not the details, but as I said I just wanted to share the
> thoughts. Other suggestions of how to accomplish extreme user-control of
> textures would have my interest. I've already heard of shaders using
> POV-Man, but I think that an approach more natural to the POV-Ray scripting
> language, and which wouldn't require compiling would be better.
> 

Yes, that's essentially the purpose of shaders.  

Concerning your last sentence also note that compiled shaders are faster,
Povray 3.5 does some kind of 'compilation' with functions too (like Ron
mentioned), but it's done every time during parsing and the syntax of
functions is much more limited.  Extending PovMan for compilation 'on the
fly' during parsing would be a good idea, one could even have the shader
code 'inline' in the POV script.  Alternatively a more SDL-like shading
language would be another possibility.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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