POV-Ray : Newsgroups : povray.binaries.scene-files : Isosurface Bricks???? : Re: Isosurface Bricks???? Server Time
1 Sep 2024 14:30:24 EDT (-0400)
  Re: Isosurface Bricks????  
From: Mike Williams
Date: 3 Jan 2006 12:41:10
Message: <2lXVVAAkaruDFwy+@econym.demon.co.uk>
Wasn't it Eric Freeman who wrote:
>Does anybody know how to make bricks using isosurfaces.  I have a scene with 
>wood and bricks in it, originally just made from boxes, and when I used the 
>iso-wood inc to change the wood, the bricks look cheezy.  And I don't have a 
>clue as to how to make isosurface bricks.

You can't just use f_brick, because it has infinite gradients where the
colours change. You have to generate something where the value changes
continuously instead of having sudden changes. One way to do it is by
blending two gradient pigments like this:

#declare Px= pigment {
    gradient x
    colour_map {[0 rgb 0][0.05 rgb 1][0.95 rgb 1][1 rgb 0]}
}

#declare Py= pigment {
    gradient y
    colour_map {[0 rgb 0][0.1 rgb 1][0.9 rgb 1][1 rgb 0]}
    scale 0.5
}

#declare F=function{pigment {
  average pigment_map {[1 Px][1 Py]}    
  warp {repeat y*0.5 offset <0.5,0,0>}
}}

isosurface {
  function { -z - F(x,y,z).red*0.05 }
        max_gradient 10
        contained_by{box{<-2,-2,-1><2,2,1>}}
        pigment { ... }
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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