Announcement

Collapse
No announcement yet.

How to use this Voxel terrain generator with Simplex Noise plugin to achieve CubeWorld like terrain?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to use this Voxel terrain generator with Simplex Noise plugin to achieve CubeWorld like terrain?

    I have downloaded and am using the blueprint from this video, https://www.youtube.com/watch?v=scY133HVkfc , I have also downloaded and loaded this plugin https://forums.unrealengine.com/show...-Noise-Version .

    I've got it working, however the current terrain it generates isnt all that great; It tiles quite often and doesn't look very natural. I am looking to try achieve the terrain similar to Cube World. Here is what cube world looks like.

    Click image for larger version

Name:	cube-world2.png
Views:	1
Size:	314.0 KB
ID:	1221543Click image for larger version

Name:	Cube-World.jpg
Views:	1
Size:	64.8 KB
ID:	1221544



    I believe it uses a mixture of simplex and perlin noise. It has a lot of lower flat land with wide steps rather than lots of changing waves and circular shaped waves in the terrain, but it also has large and very shaped mountains.

    I have a simple generator with sin waves /cirlces of voxels, and I have the simplex noise plugin working, I just dont know how I could use the noise plugin to generate a natural looking terrain.
    Here is a picture of the current blueprint setup, and the results (tiling circles etc).
    ( OPEN IMAGE IN NEW TAB TO SEE FULL )
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	669.7 KB
ID:	1221546 Click image for larger version

Name:	Capture11.PNG
Views:	1
Size:	627.0 KB
ID:	1221547

    Doe's anyone know how I might be able to achieve this?
    Thanks

    #2
    It is actually not very hard to create relatively realistic voxel terrains, since you can combine several octaves to achieve nice effects.
    You should separate your terrains to different chunks that are actually responsible for generating visualised blocks, and you can check out this piece of peudo-code and translate it to blueprint:

    //Chunk.cpp
    AVoxelActor::BeginPlay(){
    Super::BeginPlay();
    GenerateChunk();
    }

    AVoxelActor::GenerateChunk(){
    ABlockActor* BlockActor = nullptr;
    for(int ChunkWidth = 0; ChunkWidth <= 15; ChunkWidth++){
    for(int ChunkHeight = 0; ChunkHeight <= 15; ChunkHeight++){
    BlockActor = SpawnActorAtLocation(BlockActor, GetActorLocation(this).x, GetActorLocation(this).y, 0.0);
    float elevation = USimplexNoise::SimplexNoise2D(BlockActor->GetWorldLocation().x * 0.0004, BlockActor->GetWorldLocation().y * 0.0004);
    BlockActor->SetWorldLocation(BlockActor->GetWorldLocation().x, BlockActor->GetWorldLocation().y, elevation);
    }
    }
    }
    Next, read this article before you start to devise your infinite terrain generation algorithm: http://minecraft.gamepedia.com/Chunk
    Edit: feel free to ask if you have any questions. Creating a voxel game is not a simple task, and I understand that.
    Last edited by davidg0; 06-08-2017, 04:43 AM.

    Comment


      #3
      Originally posted by davidg0 View Post
      It is actually not very hard to create relatively realistic voxel terrains, since you can combine several octaves to achieve nice effects.
      You should separate your terrains to different chunks that are actually responsible for generating visualised blocks, and you can check out this piece of peudo-code and translate it to blueprint:

      //Chunk.cpp
      AVoxelActor::BeginPlay(){
      Super::BeginPlay();
      GenerateChunk();
      }

      AVoxelActor::GenerateChunk(){
      ABlockActor* BlockActor = nullptr;
      for(int ChunkWidth = 0; ChunkWidth <= 15; ChunkWidth++){
      for(int ChunkHeight = 0; ChunkHeight <= 15; ChunkHeight++){
      BlockActor = SpawnActorAtLocation(BlockActor, GetActorLocation(this).x, GetActorLocation(this).y, 0.0);
      float elevation = USimplexNoise::SimplexNoise2D(BlockActor->GetWorldLocation().x * 0.0004, BlockActor->GetWorldLocation().y * 0.0004);
      BlockActor->SetWorldLocation(BlockActor->GetWorldLocation().x, BlockActor->GetWorldLocation().y, elevation);
      }
      }
      }
      Next, read this article before you start to devise your infinite terrain generation algorithm: http://minecraft.gamepedia.com/Chunk
      Edit: feel free to ask if you have any questions. Creating a voxel game is not a simple task, and I understand that.
      Thanks for replying, I will definitely take a look at that article.

      With some help, I have managed to get the noise plugin working with the blueprint actor and It looks ok.
      Click image for larger version

Name:	V50HKRI.png
Views:	1
Size:	576.6 KB
ID:	1129245
      Click image for larger version

Name:	pFNsmuE.jpg
Views:	1
Size:	125.2 KB
ID:	1129246

      (I have a setup for splitting the terrain into chunk blueprints but for the moment I am just going to leave the procedural and infinite parts)

      The only thing now is that I think to achieve mountains or very shaped terrain rather than lower flat land, I think I need to use multiple noise's and combine them together to determine the voxels height.
      Picture for example - Click image for larger version

Name:	KWpjC.png
Views:	1
Size:	169.5 KB
ID:	1129247

      I am not sure if I can achieve that with just combining 2d simplex noise, or whether I will need perlin or something else.

      Thanks.

      Comment


        #4
        Do you mean that you want to achieve the terrain in the second screenshot?
        If you want to generate mountains, hills and rivers, you should combine multiple noise octaves( which are different noise values with different amplitudes and frequencies ).
        For instance, To create realistic terrain, combine a noise octave that has really big frequency with another octave with relatively small frequency.
        The terrain in the second screenshot is generated from simplex noise 3d
        And I wouldn't use this style of terrain even though it's really cool, since it causes tremendous lag
        And this is what i've done so far:
        https://cdn.discordapp.com/attachmen...6.43.56_PM.png
        Last edited by davidg0; 06-08-2017, 09:03 AM.

        Comment

        Working...
        X