Skip to content

Conversation

CuddlyBunion341
Copy link
Owner

@CuddlyBunion341 CuddlyBunion341 commented Feb 1, 2025

Updated Terrain Generator

The current terrain generation was unplayable as the world consisted of isolated islands within a void. The terrain was lackluster as the surface was only composed of dirt and grass. There was no incentive for the player to explore the world or mine into the depths below. This PR addresses this issue by completely overhauling the generator and by adding various development tools along the way.

#47

Screenshot From 2025-03-01 22-38-46

Goals

  • Terrain is less shitty then it was before
  • Density based terrain with overhangs, cliffs and valleys
  • Ridged height map
  • Spaghetti caves
  • EGUI interface to control various generator parameters with quick feedback cycle
  • Feature flags for all added dev tools

Optional Goals

  • Basic Iron ore distribution
  • Sediment distribution (andesite / gravel / dirt)

Unrelated changes

  • Chat feature flag
  • Player controller feature flag

Developer Tools

  • EGUI interface for the server to adjust splines, noise function parameters, update terrain
  • Orthographic camera
  • Flag that prevents generator from setting padding blocks

WIP terrain generator params EGUI workflow:

sequenceDiagram
  participant f as Noise Function UI
  participant h as HeightMapTexture
  participant g as Generator
  participant sc as Server ChunkManager
 participant cc as Client ChunkMangaer
  participant rs as RenetServer
  participant rc as RenetClient
  participant m as TerrainMesher

  f->>h: Update
  h->>g: Sample2d
  
  f->>sc: Regenerate Terrain
  sc->>g: Regenerate Chunk
  f->>rc: Request Chunk Batch Request
  rc->>cc: Get positions
  cc->>rs: Request Chunk Batch
  rs->>cc: Update Chunk
  rs->>m: Remesh Chunks
Loading

Pipeline Overview

Blender Nodes Overview

CleanShot 2025-02-02 at 21 59 19@2x

Progress report

Potential ore distribution

CleanShot 2025-02-02 at 23 05 31@2x

Height map combining 2 perlin noise textures

CleanShot 2025-02-02 at 23 00 40@2x

Cave generation (vertical slice of 3d noise)

image

Sources

Function value redistribution -> splines
Basic Erosion Simulation / Idea of layering
Shader implementation of fractal noise
Introduction to fractal noise

@CuddlyBunion341 CuddlyBunion341 self-assigned this Feb 1, 2025
@CuddlyBunion341 CuddlyBunion341 marked this pull request as ready for review March 1, 2025 21:52
Copy link
Owner Author

@CuddlyBunion341 CuddlyBunion341 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, lets get this merged please

@CuddlyBunion341 CuddlyBunion341 enabled auto-merge (squash) March 1, 2025 21:55
@CuddlyBunion341 CuddlyBunion341 merged commit 667c879 into main Mar 1, 2025
3 checks passed
@CuddlyBunion341 CuddlyBunion341 deleted the feature/fancy-terrain branch March 1, 2025 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant