POV-Ray : Newsgroups : povray.programming : Procedural Textures : Procedural Textures Server Time
29 Jul 2024 08:10:15 EDT (-0400)
  Procedural Textures  
From: Mathias Broxvall
Date: 10 Apr 1998 15:03:58
Message: <1d7afai.oo30yh2h9x2yN@dialup150-1-6.swipnet.se>
Hi!

Just a little idea I've been playing with for a while,
how about having user defined functional textures. (Yeah,
I know the correct term is procedural textures). The syntax
and code for povray could be greatly simplified and the
functionality could be enchanced a lot with include files.
What I mean is:

texture {
  function <x,y,z> <direction> {
    reflectivity = noise3d(x,y,z);
    color = map dot-product(<x,y,z>,<direction>) {
      [0.0 rgb <1,1,0>]
      [1.0 rgb <0,1,1>]
    }    
    .....
  }
}  

My example have a messy syntax, but perhaps you get the
idea... this way you would get much more controll over the
textures and you could make some quite nice include files.
The function engine could either be borrowed from the 
isosurface patch, or a new functional language could be
written with a little more imperative touch...
What do you think? Is it worth the effort?
I have made a small raytracer in LISP to test the idea of
user defined textures (it's not *that* slow actually) and
think it could be quite usefull. 

/ Mathias Broxvall


Post a reply to this message

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