Questions tagged [procedural-generation]

Programmatic generation of content (graphics, sounds, level-design,...) using random or pseudo-random processes, usually on the fly.

535 questions
3
votes
1 answer

Can I use a 3-dimensional simplex noise implementation to generate noise over a spherical surface?

Say, I want to generate noise over a sphere. I want to do this to procedurally generate three-dimensional 'blobs'. And use these blobs to generate low poly trees, somewhat like this: Can I accomplish this as follows? First define a sphere that…
matthiasdv
  • 1,136
  • 2
  • 15
  • 26
3
votes
1 answer

Procedural urban modeling - polygon subdivision (maybe better ideas?)

Question: How to "divide polygon" to create quads adjacent to the each segment. My 1st idea: Divide each segment of polygon. Move each newly created point - perpendicular to divided segment. Now we get points for quads. At the end - remove…
user3688059
  • 160
  • 1
  • 8
3
votes
2 answers

What is the average color of a star?

I am trying to procedurally generate point stars to create a starfield background for my game. I want to weight the color production based on an average star's real color. Can anyone point me in the direction of this sort of data?
RCIX
  • 38,647
  • 50
  • 150
  • 207
3
votes
1 answer

Calculating uv texture coords for a procedurally generated circle mesh

I am trying to calculate the uv's for a mesh I generate in code. It's a very simple circle (2d) and I want to texture it like follows and using this code for the uvs uvs[i] = new Vector2((verts[i].x+radius)/(radius),…
KMoore
  • 171
  • 1
  • 10
3
votes
1 answer

Using Markov chains for procedural music generation

Does anyone know of an online resource where I can find stochastic matrices for an nth order Markov chain describing the probability of a note being played based on the previous n notes (for different musical genres, if possible)? I am looking for…
3
votes
0 answers

How can I optimize Marching Cubes algorithm? How can I combine similar groups of faces?

After 3-4 days of working on a 256 look up table for the marching cubes algorithm I finally have it working. Now That I have it working I want to try to optimize it. One thing I thought of is removing big flat areas with one float area. Example…
3
votes
2 answers

Diamond-Square Algorithm doesn't produce "smooth" noise

I recently put together an implementation of the Diamond-Square procedural generation algorithm in C#. However, the generated noise has very apparent borders between the "squares" that are worked with. The pseudocode looks something like…
Wilson
  • 8,570
  • 20
  • 66
  • 101
3
votes
1 answer

Haskell OpenGL procedural generation

I am trying to use Haskell to procedurally generate a triangulated square terrain of a given width to be given to OpenGL. The only thing that is actually procedurally generated is the heights, which is not hard at all, I just use a random function…
functorial
  • 687
  • 5
  • 13
3
votes
2 answers

How to implement midpoint displacement

I'm trying to implement procedural generation in my game. I want to really grasp and understand all of the algorithms nessecary rather than simply copying/pasting existing code. In order to do this I've attempted to implement 1D midpoint…
rmaes4
  • 555
  • 9
  • 22
3
votes
2 answers

A way of generating chunks

I'm making a game and I'm actually on the generation of the map. The map is generated procedurally with some algorithms. There's no problems with this. The problem is that my map can be huge. So I've thought about cutting the map in chunks. My…
tho
  • 130
  • 8
3
votes
1 answer

Selecting points randomly in regions corresponding with neighbors, avoiding infinite recursion

Pardon the wall of text. I'll add images later. I need to generate a somewhat realistic map of cubic meter voxels, with water, sand, grasses, trees, minerals, deserts, beaches, islands, etc, without any sort of voronoi cop-out(i.e. be smart about…
3
votes
0 answers

Procedural Generation of City Streets?

I've read up on L-Systems, read Parish & Muller and Kelly & McCabe, and tried implementing this, but I'm really not having any luck at all (all my streets tend to go in one direction, never branch, etc.). Can anyone provide some source code, or some…
roach374
  • 61
  • 1
  • 6
3
votes
1 answer

How can I generate and play back procedural sounds (square wave, etc.) in Lazarus/Free Pascal?

How can I play and synthesize custom waves in Lazarus/Free Pascal? The solution has to be realtime-friendly, as it is for a game engine. It should be also multi-platform, so it can be used on win32, Linux and Mac. FMOD/BASS are out (even if…
Dariusz G. Jagielski
  • 655
  • 3
  • 11
  • 22
3
votes
3 answers

I need a javascript function that maps two coordinates to a pseudo-random value between 0 and 1

Additional requirements: Input of the function are two numbers, not necessarily integers Speed is the major concern; it should be as fast as possible Doesn't have to be secure, as long as its output looks sufficiently…
user1542912
  • 106
  • 5
2
votes
2 answers

Procedurally Generating a Massive Universe

I'm creating a text-based game, and trying to implement procedural world generation. My initial plan was a bit haphazard: each universe has a 3D array of galaxies, of solar systems, which then in turn would be propagated with randomized celestial…
Matticus
  • 155
  • 2
  • 10