POV-Ray : Newsgroups : povray.advanced-users : Creating blurred image via textures...? Server Time
25 Nov 2024 05:52:26 EST (-0500)
  Creating blurred image via textures...? (Message 1 to 10 of 18)  
Goto Latest 10 Messages Next 8 Messages >>>
From: Tim Nikias v2 0
Subject: Creating blurred image via textures...?
Date: 17 Jun 2003 11:30:03
Message: <3eef33fb$1@news.povray.org>
Lets say I have a picture. Via patterns, averaging
pigments, layered textures etc I'd like to blur the
image_map. How would I do that? I've first though
about translating the image_map off to the right,
and then rotate that translation, i.e. translating the
image to the right, then down, then left, then up.
The more samples I take, the more I average together.
This obviously doesn't truly blur the image and is
very visible as a circular effect... Any ideas?

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde


Post a reply to this message

From: Christopher James Huff
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 14:56:43
Message: <cjameshuff-513CC2.13472517062003@netplex.aussie.org>
In article <3eef33fb$1@news.povray.org>,
 "Tim Nikias v2.0" <tim### [at] gmxde> wrote:

> Lets say I have a picture. Via patterns, averaging
> pigments, layered textures etc I'd like to blur the
> image_map. How would I do that? I've first though
> about translating the image_map off to the right,
> and then rotate that translation, i.e. translating the
> image to the right, then down, then left, then up.
> The more samples I take, the more I average together.
> This obviously doesn't truly blur the image and is
> very visible as a circular effect... Any ideas?

It sounds like you are translating the individual pigments to points on 
the perimeter of a circle. Try translating them to random points inside 
the circle instead.

-- 
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

From: Tim Attwood
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 15:46:05
Message: <3eef6ffd$1@news.povray.org>
Tim Nikias v2.0 wrote:

>Lets say I have a picture. Via patterns, averaging
>pigments, layered textures etc I'd like to blur the
>image_map. How would I do that? I've first though
>about translating the image_map off to the right,
>and then rotate that translation, i.e. translating the
>image to the right, then down, then left, then up.
>The more samples I take, the more I average together.
>This obviously doesn't truly blur the image and is
>very visible as a circular effect... Any ideas?
>
>  
>
Not sure what circular effect you are seeing, you might
try something like the following, it seemed to look like
bluring to me.

#local Blur_Image  = pigment {
  image_map {
    png "testimg.png"
  }
};
#local Blur_Left = pigment { Blur_Image translate <0.01,0,0>};
#local Blur_Right = pigment { Blur_Image translate <0,0.01,0>};
#local Blur_Up = pigment { Blur_Image translate <-0.01,0,0>};
#local Blur_Down = pigment { Blur_Image translate <0,-0.01,0>};
box {
  <0,0,0>, <1,1,0.001>
  texture { 
    pigment {
      average
      pigment_map {
        [1, Blur_Image]
        [1, Blur_Left]
        [1, Blur_Right]
        [1, Blur_Up]
        [1, Blur_Down]
      }
    }
    finish { ambient 0.3 }
  }
  translate <-0.5,-0.5,0> // center on the origin
}


Post a reply to this message

From: Tek
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 16:42:58
Message: <3eef7d52$1@news.povray.org>
Random positions -inside- a circle should look good.
But it will render a *lot* quicker if you can find some way to blur the texture
before you apply it.

--
Tek
http://www.evilsuperbrain.com


"Tim Nikias v2.0" <tim### [at] gmxde> wrote in message
news:3eef33fb$1@news.povray.org...
> Lets say I have a picture. Via patterns, averaging
> pigments, layered textures etc I'd like to blur the
> image_map. How would I do that? I've first though
> about translating the image_map off to the right,
> and then rotate that translation, i.e. translating the
> image to the right, then down, then left, then up.
> The more samples I take, the more I average together.
> This obviously doesn't truly blur the image and is
> very visible as a circular effect... Any ideas?
>
> --
> Tim Nikias v2.0
> Homepage: http://www.digitaltwilight.de/no_lights
> Email: Tim### [at] gmxde
>
>


Post a reply to this message

From: Tek
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 16:59:53
Message: <3eef8149$1@news.povray.org>
Doh! I just read your reply to my other post on p.b.i. Now I understand why you
want to avoid processing the image beforehand :)

--
Tek
http://www.evilsuperbrain.com

"Tek" <tek### [at] evilsuperbraincom> wrote in message
news:3eef7d52$1@news.povray.org...
> Random positions -inside- a circle should look good.
> But it will render a *lot* quicker if you can find some way to blur the
texture
> before you apply it.
>
> --
> Tek
> http://www.evilsuperbrain.com
>
>
> "Tim Nikias v2.0" <tim### [at] gmxde> wrote in message
> news:3eef33fb$1@news.povray.org...
> > Lets say I have a picture. Via patterns, averaging
> > pigments, layered textures etc I'd like to blur the
> > image_map. How would I do that? I've first though
> > about translating the image_map off to the right,
> > and then rotate that translation, i.e. translating the
> > image to the right, then down, then left, then up.
> > The more samples I take, the more I average together.
> > This obviously doesn't truly blur the image and is
> > very visible as a circular effect... Any ideas?
> >
> > --
> > Tim Nikias v2.0
> > Homepage: http://www.digitaltwilight.de/no_lights
> > Email: Tim### [at] gmxde
> >
> >
>
>


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 17:27:44
Message: <3eef87d0$1@news.povray.org>
:-)

I've found a way. I find it pretty neat, cause I
just LOVE when I can do all kinds of stuff with
POV alone...

What I do:
Render image with only specular highlights, rest
black.
Load that via image_map. Fiddle with patterns so
that I have the image_map only from <0,0,0> to
<1,1,0>, with an outer border in pure black.
This pigment is then translated around a circle
with quasi-even distribution (achieved using a
neat fibonacci-distribution method which requires
no heavy processing, but just a single float value
to generate position).
Voila! The image is blurred!
Now, since this blurs the main specular highlights away,
I just add another layer with the unblurred specular
highlights.
Done! I'll post a nice example shortly.


-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> Doh! I just read your reply to my other post on p.b.i. Now I understand
why you
> want to avoid processing the image beforehand :)
>
> --
> Tek
> http://www.evilsuperbrain.com
>


Post a reply to this message

From: Christopher James Huff
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 17:39:16
Message: <cjameshuff-B27A79.16295917062003@netplex.aussie.org>
In article <3eef7d52$1@news.povray.org>, "Tek" <tek### [at] evilsuperbraincom> 
wrote:

> But it will render a *lot* quicker if you can find some way to blur the 
> texture before you apply it.

Use an image_map of a function image of a pigment function with the 
blurred pigment.

image_map {
    function xRes, yRes {
        pigment {average...}
    }
}

-- 
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

From: Lutz-Peter Hooge
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 17:57:14
Message: <3eef8eba$1@news.povray.org>
Tim Nikias v2.0 <tim### [at] gmxde> wrote:
> Lets say I have a picture. Via patterns, averaging
> pigments, layered textures etc I'd like to blur the
> image_map. 

It should be possible with functions, but will that will 
be slow and limited to grayscale.

You can also mildly blur an image_map with my bicubic
interpolation patch, but thats's limited to 16 samples, so
no huge blur radius.

Lutz-Peter


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 18:04:03
Message: <3eef9053@news.povray.org>
Did it with pigment-patterns alone, but had to
go through a function once to apply my own
color-map for transparencies. Thanks for
the suggestion anyways!


-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

>
> > But it will render a *lot* quicker if you can find some way to blur the
> > texture before you apply it.
>
> Use an image_map of a function image of a pigment function with the
> blurred pigment.
>
> image_map {
>     function xRes, yRes {
>         pigment {average...}
>     }
> }
>
> -- 
> 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

From: Tim Nikias v2 0
Subject: Re: Creating blurred image via textures...?
Date: 17 Jun 2003 18:05:21
Message: <3eef90a1$1@news.povray.org>
I've done it averaging quasi-even distributed samples
in a pigment and pass that through a function to
apply my own color-map for transparency-handling.
Want to experiment a little with how many samples
may be used for that...

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> > Lets say I have a picture. Via patterns, averaging
> > pigments, layered textures etc I'd like to blur the
> > image_map.
>
> It should be possible with functions, but will that will
> be slow and limited to grayscale.
>
> You can also mildly blur an image_map with my bicubic
> interpolation patch, but thats's limited to 16 samples, so
> no huge blur radius.
>
> Lutz-Peter


Post a reply to this message

Goto Latest 10 Messages Next 8 Messages >>>

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