Programmatic generation of content (graphics, sounds, level-design,...) using random or pseudo-random processes, usually on the fly.
Questions tagged [procedural-generation]
535 questions
2
votes
2 answers
Displacing Vertices in the Vertex shader
My code creates a grid of lots of vertices and then displaces them by a random noise value in height in the vertex shader. Moving around using
glTranslated(-camera.x, -camera.y, -camera.z);
works fine, but that would mean you could go until the…

Orpheon
- 181
- 2
- 10
2
votes
2 answers
Lining up terrain chunks (Diamond-square algorithm)
I'm programming a terrain engine that uses Minecraft-esque chunks. The chunks are generated seperately using the Diamond-square algorithm.
The problem is that these chunks aren't lining up, they're completely seperate. I've tried a lot of things to…

BK-TN
- 23
- 5
1
vote
1 answer
How to implement the diamond-square algorithm?
I was reading this: http://www.gameprogrammer.com/fractal.html#diamond
And it says:
This is the starting-point for the iterative subdivision routine,
which is in two steps:
The diamond step: Taking a square of four points, generate a random value…

Razor Storm
- 12,167
- 20
- 88
- 148
1
vote
1 answer
Generating connected rooms with corridors using Minimum Spanning Tree in Unity
I've been working on a top-down game that involves procedurally generating levels. So far, I've managed to create individual rooms based on a seed, but now I'm facing a challenge when trying to connect these rooms together using corridors. Instead…

Rejwen
- 11
- 1
1
vote
0 answers
Weird Lighting on Marching Cubes mesh in Unity3D
I'm working on an implementation of the Marching Cubes algorithm in Unity. I just implemented smooth shading to my mesh and now I'm getting some weird lighting effects. I'm new to this algorithm and I admit I don't really know what I'm doing to well…

cooldev
- 41
- 4
1
vote
0 answers
procedural animation
I am trying to work out the best approach to have a physics-enabled animation within pygame.
After researching how it is implemented I have come to find myself much more confused than when I set off.
If possible could you point me in the direction…

Ico Twilight
- 43
- 5
1
vote
0 answers
Why does my generated mesh have some distortion?
error detail
this mesh is generated by my script.I want to generate a voronoi diagram and split a plane to three zones.And I drag a material to one of the zones to test the generated result.
using SharpVoronoiLib;
using System.Collections;
using…

fanying
- 13
- 4
1
vote
1 answer
How do I add a wave to a curved surface composed of triangle primatives in C++?
I want to preface this post: This is perhaps more of a math question than a coding question.
I am developing a plant (lettuce) model which involves somewhat complex geometry. At this stage I have a surface curved in 2 dimensions but now I want to…

Jonny Bliss
- 21
- 1
1
vote
2 answers
How to arrange faces of a quad sphere to simplify neighbour lookup?
I'm working on a procedural planet generator that uses a quad sphere, or quadrilateralized spherical cube, to represent its surface.
Most authors seem to number and arrange the faces arbitrarily, and so did I. For example, this is the arrangement…

Thomas
- 174,939
- 50
- 355
- 478
1
vote
1 answer
Pathfinding in isometric game with autotiles: How to modify NavigationMesh
Im generating a map proceduraly with isometric autotiles. Each tile has its navigation poligon defined in the Tilemap editor. The Navigationmesh is working fine. The thing is that the map I generate is bigger than the actually playable area. I dont…

Iakl
- 23
- 5
1
vote
1 answer
Why does my procedural grid mesh not triangulate properly for grids bigger than 256x256?
I've been making procedural terrain height maps with the diamond square algorithm and the mesh with the triangulation method below:
public Map GenerateMap()
{
Mesh mapMesh = new();
vertices = new…

Ryan Humphreys
- 31
- 4
1
vote
1 answer
Cant get to work Godot Navigation Mode in TileMaps (2D)
i'm using Godot 3.51 for a 2D game and I cant get to work the navigation mode in TileMaps. Here is what i`m doing:
I'm generating a map procedurally with sea and land tiles. Thus, I want to generate a navigation mesh the same way. i.e.: land tiles…

Iakl
- 23
- 5
1
vote
1 answer
Best way to triangulate a screw/spiral/helix
I'm procedurally generating some paths and have a need to create a smooth "spiral" around a point. (Imagine a car park ramp but with a central point).
Something like this:
Top down view
Side on
However - if you look closely - it's not a smooth…

THJSmith
- 108
- 7
1
vote
2 answers
Simultaneously iterating through sequences of coordinate values, drawing lines between pairs of them in Turtle graphics
In Python 3.10, I'm using Turtle graphics to write a program that currently only draws a random amount of polygonal shapes (2-5) with a random amount of points/sides (3-8) that appear on the screen in random places. To complete the program, I want…

blawazahaha
- 13
- 3
1
vote
1 answer
How to interpolate between fixed values in a 2D grid for biome-generation?
I am currently implementing biome-generation in my game and I want to make the type of a biome dependent on humidity and temperature values that are generated from gradual noise.
different Biomes should have different heights and without…

BrunoWallner
- 417
- 3
- 10