Solid noise

This forum is currently in read-only mode.
  • Iv'e got the mesh part of my terrain program pretty much down, and Im experimenting with the image manipulator to try to be able to map maps all within one program. There are a couple things that Im kinda missing. One being a controllable blur, and for some procedural stuff... solid noise, or clouds.

    I can probably get around the blur thing with a loop, but setting up something to act like solid noise, using just the regular noise is getting pretty annoying. Just wondering how hard would it be to implement that?

  • solid noise? what do you mean?

    also, what do you mean clouds? as an effect/behavior? they can easily be done with what's there now

    On adjustable blur:

  • Yeah sorry Its generally called perlin noise.

    <img src="http://www.filterforge.com/filters/231.jpg">

    There are a few workarounds to get similar effects, I was hoping there was some existing code that could used, or modified for use in the image manipulator.

  • 			color = GetPixelColor(x,y);
    
    				n= (long)((rand()/(float)RAND_MAX - 0.5) * level);
    				color.rgbRed = (BYTE)max(0,min(255,(int)(color.rgbRed + n)));
    
    				n= (long)((rand()/(float)RAND_MAX - 0.5) * level);
    				color.rgbGreen = (BYTE)max(0,min(255,(int)(color.rgbGreen + n)));
    
    				n= (long)((rand()/(float)RAND_MAX - 0.5) * level);
    				color.rgbBlue = (BYTE)max(0,min(255,(int)(color.rgbBlue + n)));
    
    				SetPixelColor(x,y,color);
    [/code:331kxyxb]
    
    That's the code to add noise (note that I used an external library written by an image expert, I didn't do it myself).  If you have an algorithm for the above noise I could probably add it.
  • Thanks Rich, Im not sure where thats supposed to go tho...

    Any way about all I could find was a library for c++.

    http://libnoise.sourceforge.net/glossary/index.html

    I might add I've figured out a procedure for generating that kind of noise using sprites copied from a canvas, and then blurred. Its very slow though.

  • OK, that actually looks promising, but I'd think it'd be better implemented by a separate plugin, as it looks fairly configurable. If anyone is willing to have a shot, I can modify Image Manipulator to transfer back/forth from such a plugin, and we could even modify Sprite/Canvas to copy to/from it.

  • Well I think it might be worth it, there's quite a lot of stuff that library can do. The noise could be used for making fog, and clouds, and then there are some procedural textures as well, like wood, and granite.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • http://www.udec.cl/~jfuente_alba/noise.cap

    Example using single noise texture.

    Requires motion blur from http://www.scirra.com/phpBB3/viewtopic.php?f=7&t=3719&st=0&sk=t&sd=a#p29542.

    Also, being able to set offset and scale for tiledbackground for the editor would have negated the need for ANY EVENTS AT ALL. (is it that hard to add those properties?)

    Yeah, a shader would be probably better suited to the task, though I insist on using a noise texture instead of generating the noise inside the shader.

    I'll look into it.

  • Looks promising, altho using a 2.0 shader might be an issue later on.

  • Would it not become less of an issue, as even the worst new hardware supports PS 3/4?

  • 2.0 shader.. no, not really I guess. 2.0 shader that does blur... yeah it might.

  • all 2.0 shader cards can do blur

    I don't think I follow :s

  • Its just that blur can be quite a draw on performance.

  • Blurs can be very performance draining, so I can certainly see why post-processing and not realtime would be a better solution.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)