POV-Ray : Newsgroups : povray.binaries.images : procedural patina (approx 19kbbu) : Re: procedural patina (approx 19kbbu) Server Time
18 Aug 2024 20:17:37 EDT (-0400)
  Re: procedural patina (approx 19kbbu)  
From: Ben Paschke
Date: 8 Mar 2001 18:33:33
Message: <3AA816FC.15061F31@rsp.com.au>
Marc-Hendrik Bremer wrote:

> That looks really good!

cheers!

>
> Unfortunately I don't get how it works. Does it work, because the
> proximity_pattern is not 100% accurate, or why? Perhaps you can offer some
> very simple pseudo_code to show where you used which texture and such - I
> really would like to know how it works!

..pseudo_code
#declare obj =
object{
//nice geometry ..
}

#declare dirty_texture{
//texture for the recessed regions
}

#declare shiny_texture{
//texture for raised regions
}

//..and then..

object{
obj //?-----include the object
   texture{
      proximity{//these are roughly the settings i used
               obj //?---------reference the same object!!
               .8
               samples 35
               //sample_weighting ?0,0,0>
               sample_bailout 10
               max_density 1
               type 0
               method 1
               sides 2    //needs to be 2 sided testing
             }
      texture_map{
      [0 dirty_texture]     //?------innermost _map location
      [1 shiny_texture]   //?------outermost _map location
      }
   }
}

Should i not have posted this code here?
Does this make it a bit clearer? The key really is just using the same object
to reference in the proximity_pattern.
Anyway, pretty simple and general. Give it a go!

Now ijust need to test it with other objects! It wouln't be very useful if it
just worked on spheres!

benp


Post a reply to this message

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