POV-Ray : Newsgroups : povray.binaries.images : Baking dirt maps with the mesh camera : Re: Baking dirt maps with the mesh camera Server Time
17 May 2024 17:13:55 EDT (-0400)
  Re: Baking dirt maps with the mesh camera  
From: MichaelJF
Date: 8 Sep 2012 15:00:00
Message: <web.504b949f753134619500d5d00@news.povray.org>
"MichaelJF" <mi-### [at] t-onlinede> wrote:
> Yes indeed, that one of the wonderful things about raytracing, one learns every
day
> a litte bit more.
>
> >
> >    Yes, my repair_seams method was a quick hack... indeed what you
> > suggest could deliver a more accurate result, if I'm understanding
> > correctly.
>
> I tried the following with good results:
> #declare t_output_image=
> texture{t_base_image translate bake_padding*x}
> texture{t_base_image translate -bake_padding*x}
> texture{t_base_image translate bake_padding*y}
> texture{t_base_image translate -bake_padding*y}
> texture{t_base_image}
>
> #declare Pixel=1/image_width;
> #declare t_blur_image = texture {
>    average
>    texture_map {
>       [ 1 t_output_image translate <-Pixel,-Pixel,0>  ]
>       [ 2 t_output_image translate <0,-Pixel,0>  ]
>       [ 1 t_output_image translate <Pixel,-Pixel,0>  ]
>       [ 2 t_output_image translate <-Pixel,0,0>  ]
>       [ 4 t_output_image  ]
>       [ 2 t_output_image translate <Pixel,0,0>  ]
>       [ 1 t_output_image translate <-Pixel,Pixel,0>  ]
>       [ 2 t_output_image translate <0,Pixel,0>  ]
>       [ 1 t_output_image translate <Pixel,Pixel,0>  ]
>
>
>    }
> }

This simulates an 3x3 Gaussian filter. Sorry for this posting in two parts, but
I was rejected by the server now four times in a row.

Best regards,
Michael


Post a reply to this message

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