POV-Ray : Newsgroups : povray.general : Wouldn't it be nice: patterns and finish items : Re: Wouldn't it be nice: patterns and finish items Server Time
1 Aug 2024 06:24:31 EDT (-0400)
  Re: Wouldn't it be nice: patterns and finish items  
From: Ross
Date: 28 Feb 2006 21:18:48
Message: <pan.2006.03.01.02.18.37.617936@speakeasy.net>
On Tue, 28 Feb 2006 10:31:11 -0500, Roman Reiner wrote:

> Hello altogether!
> 
> I was wondering if it could be possible in any future version to use
> functions and patterns in the finish block. If so there would be much more
> flexibility in creating stunning material appearances. Other than that
> already supported image- and bump maps one could then in particular make
> use of ambient-, specular- and diffuse maps that come along with many
> texture packs and add a lot to the quality of the appearance of an surface.
> 
> There is already the possibility to work around that by layering two
> textures with appropriate (e.g.) reflection values on top of each other
> where the upper one uses the appropriate map as an alpha channel. But this
> gets ugly when several maps are being used and slows down the render and
> parsing time.
> 
> What do you think?
> 
> Regards Roman


Not sure if this could be extended to your purpose, but maybe. It's based
on something Giles Tran posted to a message from Mael about Finish Maps.
I'll post the resulting image in povray.binary.images just for reference.
I'm also going to play with this more to see if it's actually useful in a
general sense.

-ross

// just some pigment to be used in a function
#declare p0 = pigment {
  granite
  scale 5
  color_map {
    [0.0 rgb 1]
    [0.45 rgb 1]
    [0.5 rgb .1]
    [0.8 rgb 0]
    [1.0 rgb 0]
  }
  #declare w1 = 5;
  #declare t1 = <0.3, 0.3, 1*clock>;
  #while (w1 > 0)
    warp {repeat x flip y}
    warp {turbulence t1}
    scale 0.99
    #declare w1 = w1 - 1;
  #end
}

#declare f0 = function {pigment {p0}};

sphere {
  0.0, 1
  texture {
    function {f0(x,y,z).x}
    texture_map {
      [0 pigment {rgb 1} finish {ambient 0 diffuse 0.4 specular 0 roughness 0.00
reflection 0}]
      [1 pigment {rgb 1} finish {ambient 0 diffuse 0.4 specular 1 roughness 0.03
reflection 1}]
    }
    scale 0.2
  }
}


Post a reply to this message

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