Sign in to follow this  
??????? ?????

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

Recommended Posts

??????? ?????    143
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
taby    1265
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
??????? ?????    143
[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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this