• Advertisement
Sign in to follow this  

Can anyone suggest a formula to smear and blur cubes on a bitmap?

This topic is 2059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am trying to create a blendmap on the CPU once at program start and then used it in the shader.So far I've done the first(left) picture,however I need to smear and blur it like the second(right) picture.The program basically makes a 2d array of random square types(red,green,blue) and paints the 1st picture.Now I have to make it smear and blur,so when used as a blendmap in the game,it would look more smooth and realistic,since squares look ugly.
[attachment=9146:example.jpg]

Share this post


Link to post
Share on other sites
Advertisement
Are you familiar with convolution? Perlin noise? If you'd like an effect kinda (sorta, maybe) like what you've got going in that sample image, I guess you could make a separate, temporary grayscale channel out of Perlin noise and then use the grayscale value at each pixel in that channel as the number of times you'd run a blur filter at that same pixel in the main channels (the RGB channels with the boxes). Just an idea.

Oh, this looks like a good reference:
[url="http://www.jhlabs.com/ip/blurring.html"]http://www.jhlabs.com/ip/blurring.html[/url]

Wow:
http://www.jhlabs.com/ip/filters/index.html Edited by taby

Share this post


Link to post
Share on other sites
[quote name='taby' timestamp='1338390050' post='4944690']
Are you familiar with convolution? Perlin noise? If you'd like an effect kinda (sorta, maybe) like what you've got going in that sample image, I guess you could make a separate, temporary grayscale channel out of Perlin noise and then use the grayscale value at each pixel in that channel as the number of times you'd run a blur filter at that same pixel in the main channels (the RGB channels with the boxes). Just an idea.

Oh, this looks like a good reference:
[url="http://www.jhlabs.com/ip/blurring.html"]http://www.jhlabs.com/ip/blurring.html[/url]

Wow:
[url="http://www.jhlabs.com/ip/filters/index.html"]http://www.jhlabs.co...ters/index.html[/url]
[/quote][quote name='taby' timestamp='1338390050' post='4944690']
Are you familiar with convolution? Perlin noise? If you'd like an effect kinda (sorta, maybe) like what you've got going in that sample image, I guess you could make a separate, temporary grayscale channel out of Perlin noise and then use the grayscale value at each pixel in that channel as the number of times you'd run a blur filter at that same pixel in the main channels (the RGB channels with the boxes). Just an idea.

Oh, this looks like a good reference:
[url="http://www.jhlabs.com/ip/blurring.html"]http://www.jhlabs.com/ip/blurring.html[/url]

Wow:
[url="http://www.jhlabs.com/ip/filters/index.html"]http://www.jhlabs.co...ters/index.html[/url]
[/quote]

Ok I got it:

The trigonometric functions I tile the squares with
+
Smear
+
Blur

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement