POV-Ray : Newsgroups : povray.binaries.images : Church finally finished : Re: Church finally finished Server Time
13 Aug 2024 13:18:28 EDT (-0400)
  Re: Church finally finished  
From: John VanSickle
Date: 21 Apr 2003 13:38:16
Message: <3EA42C99.D371BE51@hotmail.com>
Florian Brucker wrote:
> 
> Hey John
> 
> > I've had this problem with both bricks and lettering at a distance.
> > I've solved both problems by blurring the texture, using a macro that
> > blurs it according to the render resolution, camera angle, and distance.
> 
> Would you mind sharing the code? This macro is really useful!

Something like this:

pigment { average
  pigment_map {
#local iI=0;#while(iI<Divisions)
  #local iJ=0;#while(iJ<Divisions)
    [1 myPigment
      translate vU*(iI-Divisions/2+1)/Divisions
      translate vV*(iJ-Divisions/2+1)/Divisions
    ]
  #local iJ=iJ+1;#end
#local iI=iI+1;#end
}

For this code, myPigment is already defined as your basic pigment.
vU and vV are chosen to lie within the plane of the surface to which
the pigment is to be applied.  The magnitude of the vectors should
be equal to the distance from the camera location to the surface,
divided by the image_height and the length of the camera's direction
vector.

Regards,
John


Post a reply to this message

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