POV-Ray : Newsgroups : povray.newusers : Reflection bluring : Re: Reflection bluring Server Time
5 Nov 2024 01:22:01 EST (-0500)
  Re: Reflection bluring  
From: Christopher James Huff
Date: 18 Aug 2002 12:02:37
Message: <chrishuff-76F5DF.10493118082002@netplex.aussie.org>
In article <3d5f6ae2@news.povray.org>, "Tim Nikias" <tim### [at] gmxde> 
wrote:

> This should work fine. What it does it average the
> textures, and since pigment and finish are always the same,
> those aren't changed, but for every sample POV-Ray
> calculates a new reflection based on the normal-map,
> since that one changes for every sample, you get
> a lot of different reflections, which are averaged.

That will not work. Your code calculates one random vector and uses it 
for every texture sample. All the textures your code averages will be 
identical, it will just make it render slower.

#macro BlurryTexture(Pig, Fin, Norm, BlurSamps, Amt)
    texture {average
        texture_map {
            #local J = 0;
            #while(J < BlurSamps)
                [1 pigment {Pig}
                    finish {Fin}
                    normal {Norm
                        translate <rand(R), rand(R), rand(R)>*Amt
                    }
                ]
                #local J = J + 1;
            #end
        }
    }
#end

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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