Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Veil   Members   -  Reputation: 143

Like
0Likes
Like

Posted 30 May 2012 - 08:36 AM

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.
example.jpg

Sponsor:

#2 taby   Members   -  Reputation: 336

Like
0Likes
Like

Posted 30 May 2012 - 09:00 AM

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

Edited by taby, 30 May 2012 - 09:05 AM.


#3 Veil   Members   -  Reputation: 143

Like
0Likes
Like

Posted 30 May 2012 - 09:51 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS