proceduralgeneration | Unsorted

Telegram-канал proceduralgeneration - procedural generation

99

Created by @r_channels

Subscribe to a channel

procedural generation

Procedural generation of a Town using Celular Automata (details in description) - now animated

https://redd.it/1f5onem
@proceduralgeneration

Читать полностью…

procedural generation

Persistent, non-Euclidean maze that generates at runtime as you explore
https://redd.it/1f5cewx
@proceduralgeneration

Читать полностью…

procedural generation

Question: Hexagonal maze.

I want to start learning a bit about procedural generation with the goal of making 2d hexagon shaped mazes. The final output will be a vector file of some kind.

Any suggestions on what environment is best for this?



https://redd.it/1f55oek
@proceduralgeneration

Читать полностью…

procedural generation

Scalar Field
https://redd.it/1f4lvnd
@proceduralgeneration

Читать полностью…

procedural generation

Eggs Of Time
https://redd.it/1f3k836
@proceduralgeneration

Читать полностью…

procedural generation

Glitch electric lines

https://redd.it/1f389hq
@proceduralgeneration

Читать полностью…

procedural generation

Quick and Dirty question about those pentagonal tiles!
https://redd.it/1f32n6n
@proceduralgeneration

Читать полностью…

procedural generation

is my understanding or summary about wave function collapse right? any advice or feedback plz

i want to implement wfc in python or another language.

i am not biased towards python. houdini, unreal, unity are also welcome.

i know that there are off-the-shelf libraries for wfc already and that there is a wfc solver node in houdini. the point is that i want to implement it by my own.

first i will implement it on a regular square grid on 2d plane.

then extend the algorithm to planar hexatiles(honeycomb),

and eventually apply it on a sphere's surface as the link.

the below is my brief understanding about how wfc works.

i want to hear your opinions.

note that the post is not intended to be an explanation!

terms in this post

cell

a cell is unit chunk.

a grid consists of cells.

theoretically, cells are not necessarily axis-aligned 2d square. it's okay to use hexagon instead. of course in many examples rectangular grids are used typically

a cell has three attributes-location(row/column or y/x), biome, "collapsed or not"(boolean type)-.

biome

it indicates tile type.

an example includes sea, coast, grassland, etc.

but in this context, we should regard the word "biome" as very abstractically.

collapse

when we say that "we collapse a cell", it's meaning that we determine which one and only one biome would be assigned to the cell(sorry for my poor english).

all cells are superpositioned before we perform collapsing them.

algorithm phase

1. prepare ruleset

sometimes rules can be specified implicitly from "input examples" rather than defined explicitly.

2. initially pick a cell randomly and collapse it

3. constraint propagation

once we collapse some cell, then for each superpositioned cell, we update possible biome types that it can possess.

in typical and simplified wfc examples, it's enough to consider only the collapsed cell's four neighbours.

4. find a cell having lowest entropy

i'll ignore why the word "entropy" is used here and what it is.

5. collapse the cell in step 4 and repeat 3-4 until the terminal condition holds.

https://redd.it/1f2dcy1
@proceduralgeneration

Читать полностью…

procedural generation

Hypercube (animation)
https://redd.it/1f23k54
@proceduralgeneration

Читать полностью…

procedural generation

Procedurally Generated city map
https://redd.it/1f1rzs0
@proceduralgeneration

Читать полностью…

procedural generation

what's the name of this tessellation or tiling?

https://preview.redd.it/5pp9wba9jzkd1.png?width=1587&format=png&auto=webp&s=7ba8dacc35084a6978f20d6082969fc7eeb18f32

is there terminology or notion that refers to it?


original post here

https://redd.it/1f1kuhm
@proceduralgeneration

Читать полностью…

procedural generation

schematic wave

https://redd.it/1f15kup
@proceduralgeneration

Читать полностью…

procedural generation

Light Trails

https://redd.it/1f0ygru
@proceduralgeneration

Читать полностью…

procedural generation

FLASH WARNING - Lightning Strike (ASCII_ANSI) [python + c]
https://redd.it/1f0rcea
@proceduralgeneration

Читать полностью…

procedural generation

_rSpike = irandom_range(0, 243);
if _rSpike < 3 {
instance_create_layer( (o*4), (p*4), "instances", oSpike, {_rSpike});
}
}
}
}
}

Pman is the player and the spikes are those flower things. After all this I just initialize it all in an object placed in the room.


Thank you so much for reading!! I hope it wasn't too frustrating XD

P.S. would also love some recommendations on how to make it not look like it's all dripping down the screen. Idk how I made it do that XD

https://redd.it/1f02rpo
@proceduralgeneration

Читать полностью…

procedural generation

Glowy hairs system

https://redd.it/1f5njd4
@proceduralgeneration

Читать полностью…

procedural generation

Cellular Automata Town generator :D
https://redd.it/1f58q99
@proceduralgeneration

Читать полностью…

procedural generation

Rgb lines

https://redd.it/1f50t9u
@proceduralgeneration

Читать полностью…

procedural generation

With some music

https://redd.it/1f403se
@proceduralgeneration

Читать полностью…

procedural generation

Rotating 4-Polytopes
https://redd.it/1f3oks3
@proceduralgeneration

Читать полностью…

procedural generation

Dancing noisy particles

https://redd.it/1f34g9m
@proceduralgeneration

Читать полностью…

procedural generation

Generating abstract pop art (at runtime) for my procedural city's interiors.
https://redd.it/1f2qr5q
@proceduralgeneration

Читать полностью…

procedural generation

Thoughts on whats causing gaps in my mesh generation?

I've been messing w/ a mesh generator using chunks and have figured out most of it on my own but one issue continues to perplex me as to why it's happening. Basically, as I adjust the height modifier for the noise that I'm using, I start to get these gaps in between the chunk seams. Another photo zoomed out. The blue area is the gaps between the seams.

Here's the noise representation in a series of 2d quads. There's no weird seams here so I'm feeling confident that the noise is generating correctly.

Here's the code that sets the height for the Y value based on the noise map:

public void GenerateTerrainMesh(GameObject gameObject, Vector2Int chunkCoordinate, float, heightMap)
{
// Get the x and z sizes of the height map.
int width = heightMap.GetLength(0);
int depth = heightMap.GetLength(1);

vertices = new Vector3(width + 1) * (depth + 1);
triangles = new intwidth * depth * 6;
uvs = new Vector2(width + 1) * (depth + 1);

// Create vertices
int vertexIndex = 0;
for (int x = 0; x < width; x++)
{
for (int z = 0; z < depth; z++)
{
verticesvertexIndex = new Vector3(x, heightMapx, z heightModifier, z);
uvs[vertexIndex] = new Vector2(x / (float)width, z / (float)depth);
vertexIndex++;
}

// Prevents creating a triangle between the end of a row and the beginning of the next.
vertexIndex++;
}

// Create triangles
triangleIndex = 0;

for (int x = 0; x < width - 1; x++)
{
for (int z = 0; z < depth - 1; z++)
{
int currentVertex = x
(depth + 1) + z;
int nextRowVertex = currentVertex + depth + 1;

// Define the triangles in a clockwise order for the top face
AddTriangle(currentVertex, currentVertex + 1, nextRowVertex);
AddTriangle(nextRowVertex, currentVertex + 1, nextRowVertex + 1);
}
}

gameObject.GetComponent<MeshFilter>().mesh.vertices = vertices;
gameObject.GetComponent<MeshFilter>().mesh.triangles = triangles;
gameObject.GetComponent<MeshFilter>().mesh.uv = uvs;

gameObject.GetComponent<MeshFilter>().mesh.RecalculateNormals();
}

Any thoughts or pointers to give me on how to address these gaps in the meshes?

https://redd.it/1f274y3
@proceduralgeneration

Читать полностью…

procedural generation

Looking for Dungeon Generation Techniques Similar to Rogue Fable IV



Hey everyone,

I'm currently working on a project and I'm really inspired by the dungeon generation in Rogue Fable IV. I'm aiming to create something similar where the dungeons feel procedurally generated, yet maintain a certain level of design and challenge throughout.

Does anyone have experience or resources that could help me replicate or get close to this style of dungeon generation?

https://redd.it/1f1tk22
@proceduralgeneration

Читать полностью…

procedural generation

Stretching the Landscape

https://redd.it/1f1r688
@proceduralgeneration

Читать полностью…

procedural generation

Procedural Cracks Shader

I'm looking for a way to add procedural cracks to a building's interior walls, ceilings, and floors. I want to use a shader effect that can be applied over existing materials. What I'm looking for is something like this random Google search image: https://www.freepik.com/free-vector/grunge-style-cracked-texture\_26933757.htm

I've tried using a crack texture, but there are obvious tiling artifacts. I tried using a noise function raised to a high power, which creates a marble-like effect, but I don't like the circular rings it produces. I have some images of that in my blog post: https://3dworldgen.blogspot.com/2024/08/procedural-buildings-interior-dirt.html

For example this one: https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeAUbMTOUunCM-9830ikj1xUCKcuwEO\_AQSQQzIapXsMHOOxUAKpnGKDmI5wGv-MRHEyVdD8AwZqHXnnHZL-RGVYaYyPVmSVAZiYqLROt\_xRSK1WmOame3gBHM-rKLOuImV\_vdXLSyhkiS8OP62Zma5d6TMF1-\_-bYtO-eIRtl2VFl-pEEa79Pq7SY3jRM/s1920/cracked\_basement.jpg

I've also considered those shaders that take an input texture and rotate, mirror, and blend copies together. The problem is that this doesn't work well on small, high contrast features.

Is there a better approach for this? I found this on Shadertoy: https://www.shadertoy.com/view/Xs3fR4

Which is pretty close, except I want to be able to vary the length and amount of cracks per-building rather than having a full set of crossing cracks that cover the entire area. Ideally I would like a way to get isolated cracks in the form of random jagged lines that may cross each other but aren't completely connected. It also needs to be relatively efficient since this could cover the entire screen.

https://redd.it/1f17kh5
@proceduralgeneration

Читать полностью…

procedural generation

Procedural attack waves
https://www.youtube.com/watch?v=QDSk09HDm54

https://redd.it/1f132sc
@proceduralgeneration

Читать полностью…

procedural generation

Light Trails

https://redd.it/1f0yhe3
@proceduralgeneration

Читать полностью…

procedural generation

In an attempt to demystify Houdini, I documented my 30-days-long journey of learning Houdini on this playlist.
https://www.youtube.com/playlist?list=PLV27-9LKREf8YE3JYYxbkn7DYBMaayDAI

https://redd.it/1f0gc8e
@proceduralgeneration

Читать полностью…

procedural generation

How do I detect disconnected islands | Baby's first procedural generation project

So I'm trying out procedural generation for the first time in Game Maker and I'm really proud of myself so far! I'm using a cellular automaton process to generate my tile grid and I like it so far, I just need to figure out one thing. How do I detect and categorize each disconnected island of non-wall tiles. I could use that information for a whole hell of a lot of cool ideas I have, but I haven't been able to figure out how to get it on my own, not for lack of trying, though probably for lack of experience.

Essentially, I want to be able to know when in my generation process I've hit a disconnected island, and then use that information to do things like set a different sprite for the ground, spawn different types of objects there, create teleporters to link them to the big islands, etc. If at all possible, I would love to also be able to detect roughly how big the island is, as in how many total tiles it has. If that's not possible or at least not easy I understand, I'm just curious.

While I have spent a crap ton of time on this, I'm also open to hearing other ideas for how I could generate the game. I like the idea of it feeling like you're traversing various pocket dimensions floating in a void, so as long as it works with a 4x4 tile gridspace and doesn't run terribly on game maker I'm down to hear about it!

Sorry if this post is somewhat vague, I literally just started today so I'm still getting a feel for it. Regardless, the main generation loop is described as best I can below. All code is in GML (game maker's code language)

[Isn't it beautiful! \(in an ugly sort of way\)](https://preview.redd.it/pthyao7oglkd1.png?width=1018&amp;format=png&amp;auto=webp&amp;s=f164ac17f1d39588b4999f66f97a96b0bf3fedfa)

Macros

#macro M_WIDTH room_width/4
#macro M_HEIGHT room_height/4

Noise

function make_noise_grid(_d = 50){
var noise_grid = [0][0];
for(j = 0; j < M_HEIGHT; j++) {
for(i = 0; i < M_WIDTH; i++) {
var _r = irandom_range(1,100)
if(_r > _d) {
noise_grid[i][j] = Tile.ground
} else {
noise_grid[i][j] = Tile.wall
}
}
}
return noise_grid
}

Automation

function apply_cellular_automation(_c, _g = make_noise_grid(50)) {
for(i = 1; i < _c+1; i++) {
var _tGrid = _g
for(j = 0; j < M_HEIGHT; j++) {
for(k = 0; k < M_WIDTH; k++) {
var _nWalls = 0

for(n = (j - 1); n < (j + 2); n++) {
for(m = (k - 1); m < (k + 2); m++) {
if point_in_rectangle(m, n, 18, 16, M_WIDTH-19, M_HEIGHT-17) {

// I commented this if statement out cause for some reason it generated mostly ground and made the walls stick to the edges of the world

//if(n != j or m != k) {
if(_tGrid[m][n] == Tile.wall) {
_nWalls++
}
//}
} else {
_nWalls++
}
}
}

if(_nWalls > 4) {
_g[k][j] = Tile.wall
} else {
_g[k][j] = Tile.ground
}
}
}
}
return _g
}

The actual generation function

function generate_terrain(_itterations, _density = 50 ) {
var _worldNoise = make_noise_grid(_density);
var _worldState = apply_cellular_automation(_itterations, _worldNoise);
var _pMan = false
for (o = 0; o < M_WIDTH; o++) {
for (p = 0; p < M_HEIGHT; p++) {
instance_create_layer( o*4, p*4, "instances", _worldState[o][p]);
if (_worldState[o][p] == Tile.ground) {
if (_pMan == false) {
instance_create_layer( (o*4)+2, (p*4)+2, "instances", oPman);
_pMan = true;
}
var

Читать полностью…
Subscribe to a channel