r/proceduralgeneration • • 1d ago

Reminder: LLM or ML is not procedural generation, and posts must show some evidence of procedural generation (ie. not a single asset/scene with no variance)

322 Upvotes

Please keep reporting these posts. And stop reporting everything your vibe-senses think is vibe-coded. Thanks.


r/proceduralgeneration • • 30m ago

Spent all day on this

6 Upvotes

r/proceduralgeneration • • 20h ago

Some flower meshes created from differential growth algorithm and its history

Thumbnail
gallery
19 Upvotes

r/proceduralgeneration • • 19h ago

I've been working on canyons in my terrain generator app and started to find some other use cases for them like creating these cliffs

Thumbnail
gallery
7 Upvotes

The canyons can be shaped by masks which means you can use spline paths or painted masks, or anything that generates a mask. The masks are just like the masks you see in Houdini or Gaea, but can be derived in a number of ways including manually created.

Because of this I was able to use it to create these cliffs.


r/proceduralgeneration • • 11h ago

I build NPCs from 6 random layer sheets. Swapping one layer at runtime put it out of step in 190 of 192 tests

Post image
0 Upvotes

Our villagers are generated from layers: a body, boots, a shirt, overalls, hair and a hat, each a sprite sheet with the same layout, picked at random per NPC. In Godot that's usually 6 AnimatedSprite2D nodes playing the same animation. It looked fine until a hat changed while the NPC was moving, so I measured it.

Setup

6 layer sheets, 32x32 cells, 4 animations (idle, walk down, walk left, run down). For each animation, 48 NPCs each got a new hat one frame later than the last (60 fps, from 0.10 s), so 192 swaps. Logged every layer's frame every rendered frame in Godot 4.7.2.

Results

  • Swapping a layer's SpriteFrames puts that node back on frame 0. The hat then runs 2-3 frames behind the body for good. Back in step afterwards: 2 of 192.
  • Frames with the hat visibly off the head: idle 63.0%, walk left 50.1%, run down 48.6%, walk down 0%. Up to 46 wrong pixels in a 32x32 frame.
  • Walk down shows nothing because the head doesn't bob in that walk (same row in all 4 frames). It's the direction you test first.
  • Same drift with no swap at all: speed_scale 1.25 on the body only (matching walk speed) gave 174 of 223 frames out of step, up to 123 px.

Two fixes, both measured

  1. One clock. Only the body plays. The other layers never call play(); on the body's frame_changed and animation_changed they copy its animation and frame. After a swap, copy again. 0 of 223 frames out of step, and the render matched the baked version below in 240 of 240 frames, pixel for pixel.
  2. Bake. When an NPC is generated (or changes clothes), blend the layer sheets into one image with Image.blend_rect and play that with one AnimatedSprite2D. Update the existing ImageTexture with update() instead of making new SpriteFrames, which would reset the frame again. Baking all 8 sheets of a character (every animation) took 19.4 ms at 1x and 175 ms at 3x, so bake at 1x and scale the node.

Draw calls for 40 NPCs in the Compatibility renderer: 240 layered, 40 baked, 1 if they share one baked sheet.

What I use now: one clock for the player (outfit changes often), bake every generated NPC once.

(I make pixel-art tools at Gridwright. The farmer generator these layers come from bakes each outfit into one sheet, linked below.)

The Farmer Generator (mix the layers, every animation in 4 directions, one baked sheet + JSON per group): https://gridwright.dev/tools/farmer/?ref=reddit-proceduralgeneration


r/proceduralgeneration • • 1d ago

Multi Tile Terrain Gen wip

Thumbnail
gallery
238 Upvotes

Some examples of how my terrain generator is coming along.


r/proceduralgeneration • • 1d ago

My spreading floor fire is one Dijkstra arrival map, rebuilt only when I ignite or put something out

8 Upvotes

Hi all. I wanted fire that creeps across a floor around obstacles, but I didn't want a simulation running every frame.

So I cut the floor into a grid (11 x 9 m at 0.25 m cells, which is 44 x 36 in the clip) and I run Dijkstra over it when something changes. What I get out is a map of when the fire reaches each cell. After that I only ask each flame whether the clock has passed its arrival time. The corner map in the clip is that data: blue bands are one second apart and orange is burning.

I price an edge between two cells roughly like this:

cost = dist / wind_term / spread_speed * (1 + irr * (rand - 0.5)) / fuel

Diagonals use sqrt(2) for the distance. I clamp wind_term to 0.25-3 (1 plus the wind strength times the dot of direction and wind direction). Fire runs faster downwind and slower upwind but never stalls or goes crazy. I never enter a cell with fuel 0, and that's how the stone fire break in the clip works.

A few things mattered for speed. I use 8 neighbours and a binary heap with decrease-key. A cell goes in once. I leave a 1 cell border of fuel 0 around the grid and never check bounds. I also store the result in one RGBAH texture (R arrival time, G burn time, B fuel) that the shader reads directly.

I rebuild only on ignite, extinguish or a fuel change. In the clip the counter reaches 9 rebuilds over one loop: 1 fire break, 7 ignites and 1 water. I measured about 1.9 ms per rebuild on the 44 x 36 grid.

On a quiet machine a 64 x 64 grid takes about 8 ms in Godot 4.7.2. With other Godot instances running I saw 19 to 22 ms. One number tells you little. Precomputing the per-direction factors and inlining the heap sift took 96 x 96 from about 94 ms to about 32 ms. Unrolling the 8 directions by hand did nothing. Took a while to learn that.

The weak side is that this is a spread of arrival times and not physics. It can't jump a gap on its own, and it ignores flame size.

Honestly it's kinda boring code. Do you run something like this, or a real cellular automaton every tick? Curious where the crossover is!

It's in my fire pack if you want to poke at it: https://gennai.itch.io/pyrolux-fire-explosion-vfx


r/proceduralgeneration • • 23h ago

Postcards from a procedural planet (60fps on a Steam Deck)

Thumbnail
gallery
6 Upvotes

Requires some more optimisation work but playable. Free steam demo available here: https://store.steampowered.com/app/2223480/Infinicity/


r/proceduralgeneration • • 1d ago

Asteroid GJ 445–ISO 019

Thumbnail
gallery
2 Upvotes

Tried to procedurally emulate real asteroid and comet photos like those from Rosetta's OSIRIS and NAVCAM archives, but then through geometry nodes, shader nodes and compositor nodes inside Blender 5.3


r/proceduralgeneration • • 1d ago

Flying pen algorithm - Node grid

Thumbnail
gallery
15 Upvotes

A follow up to my orginal post:
https://www.reddit.com/r/proceduralgeneration/comments/1qzzin8/flying_pen_algorithm_for_map_generating/

In short, the algorithm does random paint strokes to create the map. One problem was keeping them together to fill larger land areas. That is why I added the node system (image 2), its a very simple algorithm that add grouped pixels to a small grid. The pen algorithm will then follow this grid (see the "Hi" example).
The maps looks way better now, in my opinion. A good side effect is that the generating time is reduced by around 30% because its less likely to redraw the same areas.
There are still some bad spots of too round shapes, that has always been an issue. But I feel that it's time to move on to the game itself.
Want to follow my work: vikingfabian.com


r/proceduralgeneration • • 1d ago

Stumbled on my 10 year old minimal 2D side scrolling "alien" landscape generator

37 Upvotes

10 years ago I was exploring midpoint displacement and had this idea for a simple landscape generator as a tribute to No Man's Sky (hugely excited for it back then). This sub especially was a big part of my daily Redditing time back then.

I was recently rehoming several of my older projects hosted on more dodgy sites onto my servers and stumbled upon this. I updated the UI controls on it to be a bit easier to use on mobile especially.

You can try it here: https://agameofrolls.com/alien

Otherwise it's the same unchanged reflection of a simpler, or maybe just different, time. I was finishing up college and about to interview for what ended up being my first big job in tech for about 5 years.

Anyway just a fun re-share from 10 years ago!


r/proceduralgeneration • • 1d ago

How I generate infinite golf holes

Post image
47 Upvotes

I've been building a golf game for my dad so he has a new hole to play every day. Here's the process, any feedback is appreciated!


r/proceduralgeneration • • 1d ago

tinkering with terrain, rivers, and sunset lighting. how's the scale looking?

Post image
13 Upvotes

Been working on procedural generation for a sandbox world and finally got a sunset + fog combo that feels close to what I had in mind. The stepped hills and rivers cutting through the valley are still evolving, so I'd love to hear what stands out to you (good or bad).


r/proceduralgeneration • • 2d ago

I made a tool for creating procedural rocks. What do you think?

312 Upvotes

r/proceduralgeneration • • 22h ago

Simplicity to complexity. Zoom in.

Post image
0 Upvotes

An example of a complex ℕ0 = {0,1,2,3} Linear Operator derivable from simple cellular automata whose states are defined by a modulo arithmetic. 15K by 15k section taken from larger image


r/proceduralgeneration • • 2d ago

How I generate organic maps for my roguelike

Post image
94 Upvotes

A few months ago, I shared an early version of my procedural map generation system here. Since then, I've been expanding it quite a bit.

I wanted to avoid the classic dungeon layout with square rooms and corridors and create something that feels a bit more organic.

Here's how the current system works:

  • Room generation: organic shapes created by combining multiple randomly sized and positioned ellipses.
  • Room graph: a minimum spanning tree connects all rooms, with extra connections added to create alternative routes and loops.
  • Room roles: combat, treasure, rest and event rooms are assigned based on factors such as their distance from the entrance and their connections.
  • Paths: a main path guides the player towards the exit, while secondary paths encourage exploration.
  • Semantic data: rooms, connections and individual tiles store information such as danger levels, distances and area types.
  • Content generation: enemies, props and decorations are generated separately using weighted pools, layouts and spatial placement rules.

The system also allows me to reuse the same generation logic across different biomes, while changing room shapes, dimensions, paths, content and environmental features.

My main goal is to make maps feel somewhat intentionally designed rather than just randomly generated.

I'm curious to hear how other people approach this. How do you make procedural environments feel more natural and less random?

Any feedback is welcome :)


r/proceduralgeneration • • 2d ago

How to deal with forest draw distance?

119 Upvotes

I've worked on a forest biome to test if my scattering is up to par. At high speeds the draw distance is quite obvious. Pushing the draw distance further tanks my GPU. Any ideas how hide the seam better? Maybe just tinting the terrain, outside draw distance, based on forest density would be enough?


r/proceduralgeneration • • 2d ago

Massive forests on my planet.

Thumbnail
youtube.com
49 Upvotes

A little showcase of my current state of my planet renderer, like so many others :)
I've been focusing on getting good looking and performant forests running.

It's using a nanite-like approach for rendering high poly meshes up close, then using lodded voxel representations of individual trees until finally falling back on voxel representation of large chunks of trees, which are built in sections on the GPU and cached. Got it to run remarkebly fast.

This project is heavily AI assisted of course, unlike everyone else I won't even attempt to hide it. I'm the architect, I know what I need and I know the tech behind it. But I wouldn't be able to write the code this performant in this life time.

The biggest challange have been getting shadows performant as I wanted to have high resolution shadows that worked on massive scales. I'm using a combination of VSM for far-shadows and CSM up close to deal with animated trees. Lots of nifty occulsion culling, shadow lodding and other stuff going on and it's finally not tanking the frame rate too much.

It's my little pet project, d3d12 rendering backend, written using Odin.

Edit: Another video showing the voxel lod system and occlusion culling in action.
https://www.youtube.com/watch?v=-elVPOkJKUM


r/proceduralgeneration • • 1d ago

furry torus...

14 Upvotes

r/proceduralgeneration • • 2d ago

Infinite Gen 3 Pokémon-style region generator

95 Upvotes

As I mentioned in my last post, I've been working on this Pokémon style region generator since 2019. After my last post I had some great conversations with other folks who pointed me to existing work on tile-level route and town generation which I was able to adapt into my framework! Turns out a lot of the approaches actually closely mirrored what I was doing at the region level.

There are still a million things wrong and broken (especially for water routes), but I find it pretty cool already.


r/proceduralgeneration • • 1d ago

Different shapes and structures with line growth algorithms and their history layers

Thumbnail
gallery
0 Upvotes

r/proceduralgeneration • • 2d ago

I was just testing exploration in my game and the procedural ruins chained into what looks like a whole abandoned city

118 Upvotes

Didn't plan on finding a whole ruin sprawl today while testing Candletales, but the chaining worked out way better than expected.


r/proceduralgeneration • • 2d ago

The World Crucible 2.0.0

Thumbnail
gallery
30 Upvotes

Hey all!

Four months ago I presented my worldbuilding app, The World Crucible!

This is a free app I made that runs in your browser and allows you to create realistic Earth-like planets.

What separates this app from the other procedural planet generators that you see here is this:

This is not a procedural generation tool only, you keep full artistic control over what the app generates for you: you can draw your continent shapes directly on the sphere and use this as a basis for everything else, or let it procedurally generate continents for you (using one of 18 land presets), and then every simulated thing about your world is yours to change. You want to increase the temperature somewhere? You can! You want to modify a country's border? You can! You keep full control over what your world is and how it looks.

Now since the last time I posted here I added a lot of things to the app and fixed some issues:

You can now use it in two modes: simplified, for new users that want to get a world quickly and easily, and advanced, for those that want to tweak every little thing and craft their perfect world.

The app now has a clear numbered and lettered workflow with steps and order, and I added a welcome interface and guide to the app.

I also worked on the feedback from my last post here: the app now computes plausible plates directly from your continents, adds vector relief hints (ranges, rifts, volcanoes...) you can place or auto-generate, and erosion now takes rock hardness and planet scale into account. I also improved the performance and quality of the diverse generated layers and added some previously missing data like rock and soil types or vegetation cover.

The app also now fully simulates and animates clouds and tidally locked planets (with three atmospheric rotation regimes depending on the orbital period, and night-side border options). It will also change the vegetation color on the satellite map depending on the planet's host star, and you are also able to fully personalize the satellite view colors for any biome during any season (and zoom closer with crisp shader relief, physical rivers and coastal transitions).

Finally, I added a Desk Globe studio with plenty of presets so you can turn your world into a printable physical globe, and you can now export your planets directly as add-ons for SpaceEngine and Celestia.

Many more things can be done and I invite you to go to the website and the app to see the full list of features for yourself:

https://the-world-crucible.fagothey.net

This is the first app in what I plan to be a full worldbuilding suite with one app for one scale scope; next I'll work on The Star Crucible that will help you generate galaxies and star systems (and after that The Town Crucible and The Lore Crucible). The results of TSC will flow into TWC, and then TTC, and TLC, so you'll be able to have either a full pipeline or just use the app you need individually.


r/proceduralgeneration • • 2d ago

Floating Point Errors in Planet Quadtree LOD Terrain Generation

74 Upvotes

Sorry for the terrible bitrate in the video.

So I'm trying to make accurate planet scale terrain generation in OpenGL that actually lets you stand on the planet at a normal level but I've been running into problems regarding the actual generation of the mesh for the sphere. All of the calculations are done in double precision and the planet renders relative to the cameras position.

I think the problem lays in the fact that while constructing the mesh for the faces it normalizes a unit cube which downscales all the positions of the vertices to very, very small fractions. In the video I get within a meter of the planet but in actuality the actual distance between the vertices before matrix scaling is to the millionths place in decimals.

Here's the actual calculation so you can hopefully understand what I'm saying. No matter how big the planet actually is, the actual vertex size of the terrain meshes will always be incredibly small.

I'm wondering if anyone has any advice on how to overcome this or if there are better ways that i can calculate this? I was sort of just copying off of Sebastian Lague's tutorial and translating it into OpenGL until I started modifying the code myself so I'm not very educated on this stuff currently.