SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 17/04/2016, 02:40 PM   #21
kristo
Banned
 
Join Date: Jun 2012
Location: Estonia
Posts: 352
Reputation: 179
Default Re: Simplex Noise Generator

Quote:
Originally Posted by Crayder View Post
Made these with it:
you made nothing
kristo is offline   Reply With Quote
Old 17/04/2016, 02:40 PM   #22
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,893
Reputation: 1321
Default Re: Simplex Noise Generator

That is cool, it takes skill to transcribe code from one platform to another
Pottus is offline   Reply With Quote
Old 18/04/2016, 12:16 PM   #23
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,329
Reputation: 652
Default Re: Simplex Noise Generator

Here are some of the 3D function representations. Each layer is a frame, so it's technically 256x256x256.

These are best viewed on imgur since apparently they make simplified versions for the direct links. So here is the album: http://imgur.com/a/H0Ko8




I'll upload the 2D and 1D later.
Crayder is offline   Reply With Quote
Old 18/04/2016, 10:17 PM   #24
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,329
Reputation: 652
Default Re: Simplex Noise Generator

Ok, so here is the 1st dimension functions:


And here are the second dimension functions:


The gifs above are the third dimension. However, I also made a 3D cube using the 3D functions: (editing soon)

I don't know how I would represent the 4th dimension.
Crayder is offline   Reply With Quote
Old 24/08/2016, 03:15 PM   #25
Crayder
Banned
 
Join Date: Sep 2013
Location: Flames of Hell
Posts: 3,329
Reputation: 652
Default Re: Simplex Noise Generator



Just generated this with the dFlowNoise2D functions.

Code:
pawn Code:
#include <a_samp>
#include <YSI\y_bitmap>
#include <simplex>

new myIMG[10][10] = {
    {0, 1, 0, 0, 0, 0, 0, 0, 1, 0}, //   |   #             #   |
    {0, 1, 1, 1, 0, 0, 1, 1, 1, 0}, //   |   # # #     # # #   |
    {0, 0, 0, 1, 0, 0, 1, 0, 0, 0}, //   |       #     #       |
    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, //   |                     |
    {0, 0, 0, 0, 1, 1, 0, 0, 0, 0}, //   |         # #         |
    {0, 1, 1, 1, 0, 0, 1, 1, 1, 0}, //   |   # # #     # # #   |
    {0, 1, 1, 1, 1, 1, 1, 1, 1, 0}, //   |   # # # # # # # #   |
    {0, 1, 1, 1, 0, 0, 1, 1, 1, 0}, //   |   # # #     # # #   |
    {0, 0, 1, 1, 1, 1, 1, 1, 0, 0}, //   |     # # # # # #     |
    {0, 0, 0, 1, 0, 0, 1, 0, 0, 0}  //   |       #     #       |
};

const MAX_X = 2000, MAX_Y = 2000;
new Bitmap:bmpf;

public OnGameModeInit()
{
    bmpf = Bitmap_Create(MAX_X, MAX_Y);
   
    for(new x; x < MAX_X; x++) {
        for(new y; y < MAX_Y; y++) {
            Bitmap_WritePixel(bmpf, x, y, GetAvatarPoint(x, y));
        }
    }
   
    Bitmap_Write(bmpf, "thing.bmp");
    Bitmap_Destroy(bmpf);
    return 1;
}

stock GetAvatarPoint(x, y)
{
    new pX = floatround((x / float(MAX_X) * 10.0), floatround_floor),
        pY = floatround((y / float(MAX_Y) * 10.0), floatround_floor);
   
    new Float:nX, Float:nY, Float:nZ;
    if(myIMG[pY][pX]) {
        dFlowNoise2D(x * 0.006, y * 0.006, 0.0, nX, nY, nZ);
       
        nY /= 4.1;
        nZ /= 3.75;
       
        return (
            (floatround(((nX + 1.0) / 2.0 * 255.0), floatround_floor) / 8 << 24) |
            (floatround(((nY + 1.0) / 2.0 * 255.0), floatround_floor) << 16) |
            (floatround(((nZ + 1.0) / 2.0 * 255.0), floatround_floor) / 8 <<  8) |
            0xFF
        );
    }
    else {
        dFlowNoise2D(x * 0.006, y * 0.006, 30.0, nX, nY, nZ);
       
        nY /= 4.1;
        nZ /= 3.75;
       
        return (
            (floatround(((nX + 1.0) / 2.0 * 255.0), floatround_floor) / 8 << 24) |
            (floatround(((nY + 1.0) / 2.0 * 255.0), floatround_floor) / 8 << 16) |
            (floatround(((nZ + 1.0) / 2.0 * 255.0), floatround_floor) / 8 <<  8) |
            0xFF
        );
    }
}
Crayder is offline   Reply With Quote
Old 24/08/2016, 04:17 PM   #26
izeatfishz
Huge Clucker
 
izeatfishz's Avatar
 
Join Date: Jun 2012
Posts: 231
Reputation: 43
Default Re: Simplex Noise Generator

;o

i love it
izeatfishz is offline   Reply With Quote
Old 05/01/2017, 03:08 PM   #27
corne
Huge Clucker
 
corne's Avatar
 
Join Date: Jul 2010
Location: The Netherlands
Posts: 293
Reputation: 205
Default Re: Simplex Noise Generator

I just wanted to share this here, as some people wanted to see an example of this in action and I currently have a testing server up and running. I just implemented the first biome that's generated using 3D simplex ridged noise, here is a map to view the different biomes on the map, and the light green biome (which is plains) is generated using noise.



If you'd like to see this in action, here are the details for the testing server. It's just the beginning, I can't wait to see things improve and change over the time I'll be working on this.
__________________
corne is offline   Reply With Quote
Old 06/01/2017, 10:59 AM   #28
Wolfe
Big Clucker
 
Join Date: Feb 2015
Posts: 131
Reputation: 60
Default Re: Simplex Noise Generator

Here's an in game screen shot for the curious;


Credits to Corne for supplying the test server.

It's a really nice addition considering things don't look misplaced, and it's also really unique. Good work.
Wolfe is offline   Reply With Quote
Old 06/01/2017, 01:56 PM   #29
IllidanS4
Big Clucker
 
IllidanS4's Avatar
 
Join Date: Feb 2013
Posts: 199
Reputation: 275
Default Re: Simplex Noise Generator

Interesting, if we had a material map similar to MapAndreas but returning the type of material on the ground there (sand, grass, seafloor etc.), we could reimplement the (for some reason) removed singeplayer bushes, grass and rocks.
__________________
You have stolen my dreams and my childhood, and you have stolen my sleep hours.
IllidanS4 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mic background noise Dusan01 Everything and Nothing 5 01/11/2014 11:33 PM
Holding LALT (walk) in windowed mode makes some Windows alert noise dstryr Client Support 10 01/09/2011 03:06 PM
HELP Truck reversing horn noise UTvern Help Archive 0 07/06/2011 05:12 AM
Computer makes high noise? AiVAMAN Everything and Nothing 9 27/09/2009 12:23 PM


All times are GMT. The time now is 02:50 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.