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]
Can anyone suggest a formula to smear and blur cubes on a bitmap?
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:
http://www.jhlabs.com/ip/blurring.html
Wow:
http://www.jhlabs.com/ip/filters/index.html
Oh, this looks like a good reference:
http://www.jhlabs.com/ip/blurring.html
Wow:
http://www.jhlabs.com/ip/filters/index.html
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:
http://www.jhlabs.com/ip/blurring.html
Wow:
http://www.jhlabs.co...ters/index.html
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:
http://www.jhlabs.com/ip/blurring.html
Wow:
http://www.jhlabs.co...ters/index.html
Ok I got it:
The trigonometric functions I tile the squares with
+
Smear
+
Blur
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement