POV-Ray : Newsgroups : povray.general : reset children ? (3.5Beta) : Re: reset children ? (3.5Beta) Server Time
6 Aug 2024 21:37:03 EDT (-0400)
  Re: reset children ? (3.5Beta)  
From: Christopher James Huff
Date: 20 Jan 2002 10:14:23
Message: <chrishuff-365C2E.10151720012002@netplex.aussie.org>
The reset_children feature was not added to 3.5, but the same effect is 
possible. Since you are using plain transformations, you can do this:


#declare TexTrans = transform {
    scale 2
    translate vnormalize(LPos-SphPos)
}

#declare Tex = texture {
    gradient vnormalize(SphPos-LPos)
    transform {TexTrans}
    texture_map {
        [0.0 Tex1 transform {TexTrans inverse}]
        [1.0 Tex2 transform {TexTrans inverse}]
    }
}

More complex textures using warps are a different matter, you would have 
to do something like:

#declare Tex = texture {
    function {
        pattern {
            gradient vnormalize(SphPos-LPos)
            scale 2
            translate vnormalize(LPos-SphPos)
            turbulence 0.5
        }
    }
    texture_map {
        [0.0 Tex1]
        [1.0 Tex2]
    }
}

-- 
 -- 
Christopher James Huff <chr### [at] maccom>


Post a reply to this message

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