procedural generation
121 subscribers
4.9K photos
1.43K videos
2 files
10.4K links
Created by @r_channels
Download Telegram
How could you create very abstract and ever-changing terrain?

I've been experimenting with procedurally generated terrain in Roblox, specifically with modifying 3D Perlin noise. While I've managed to create a variety of terrains, from abstract to realistic, I'm facing a challenge.

The issue is that the generated terrain tends to look quite similar across the map due to the inherent characteristics of Perlin noise. I'm on a quest to achieve something more extraordinary – a terrain that becomes increasingly bizarre and otherworldly the further you travel, almost like stepping into another dimension. Something that always looks different and unique.

Is it simply a matter of adding more noise layers, with varying levels of amplitude and frequency, or are there other methods to break away from the Perlin noise predictability and achieve that mind-bending, alien, or and almost inter dimensional effect?

https://redd.it/18tu9y3
@proceduralgeneration
This media is not supported in your browser
VIEW IN TELEGRAM
Realistic Ocean Simulation Week 10: Generated normal maps and ocean mesh. Currently, running DFT with 16284 distinct frequencies (Small amount).
https://redd.it/18t48no
@proceduralgeneration
Games with a lot of procedural content

Hi! Is any games that generates a lot of content procedurally? Not only map or dungeons. I mean random/procedural NPCs, divines, mythology, lore, quests, races, etc.
I know, Dwarf Fortress and Wizards and Warlords can do some of that.

https://redd.it/18w5h0j
@proceduralgeneration
What algorithm would work best for rigid stepped elevations, while having smooth portions.

Wow, that's a long title! But it basically describes exactly what I'm looking for. I had previously been using fractal noise with octaves in order to create terrain, and this worked very well for things such as large "relatively smooth / flat" areas of land mass.


However I am wondering what algorithm would work best to incorporate rocky formations or ridges on top of these smooth portions. Sort of like a step elevation.

Below are a few pictures which represent what I'm attempting to achieve. Thanks for your time! :)


​

Ridges and a sort of \\"step\\" elevation




Rocky Formations, etc...

https://redd.it/18sljn1
@proceduralgeneration
more voronoi trouble...why are some cell walls not extending to their circumcenter?

if you have seen some of my other posts, you know i am working on developing a voronoi based city using threejs. I am taking a different approach now, utilizing the [delaunator npm package](https://github.com/mapbox/delaunator) to detect circumcenters, and then connect them to form the cell walls.

i have spent all day trying to figure out why some of these walls are not reaching their end points (see image below)

https://preview.redd.it/lhfb5807jy8c1.png?width=1615&format=png&auto=webp&s=f0a5e33b4731558ba6ca69fe4916d3a04cd003e7

here is my script. any ideas what is causing this problem? thank you

import Delaunator from "delaunator";
import * as THREE from "three";
import { _math } from "../_/math";

export const getVertexData = (x: number, y: number) => {
const gridSize = 100; //500?
const roadWidth = 5;
const currentGrid = [Math.floor(x / gridSize), Math.floor(y / gridSize)];
var points = [];

for (let ix = currentGrid[0] - 1; ix <= currentGrid[0] + 1; ix++) {
for (let iy = currentGrid[1] - 1; iy <= currentGrid[1] + 1; iy++) {
var pointX = _math.seed_rand(ix + "X" + iy);
var pointY = _math.seed_rand(ix + "Y" + iy);
var point = new THREE.Vector3(
(ix + pointX) * gridSize,
(iy + pointY) * gridSize,
0
);
points.push(point);
}
}

var currentVertex = new THREE.Vector3(x, y, 0);
const delaunay = Delaunator.from(points.map((point) => [point.x, point.y]));

const circumcenters = [];
for (let i = 0; i < delaunay.triangles.length; i += 3) {
const a = points[delaunay.triangles[i]];
const b = points[delaunay.triangles[i + 1]];
const c = points[delaunay.triangles[i + 2]];

const ad = a.x * a.x + a.y * a.y;
const bd = b.x * b.x + b.y * b.y;
const cd = c.x * c.x + c.y * c.y;
const D = 2 * (a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y));
const circumcenter = new THREE.Vector3(
(1 / D) * (ad * (b.y - c.y) + bd * (c.y - a.y) + cd * (a.y - b.y)),
(1 / D) * (ad * (c.x - b.x) + bd * (a.x - c.x) + cd * (b.x - a.x)),
0
);

circumcenters.push(circumcenter);
}

const voronoiWalls = [];
for (let i = 0; i < delaunay.halfedges.length; i++) {
const edge = delaunay.halfedges[i];

if (edge !== -1) {
const v1 = circumcenters[Math.floor(i / 3)];
const v2 = circumcenters[Math.floor(edge / 3)];

if (v1 && v2) voronoiWalls.push(new THREE.Line3(v1, v2));
}
}

for (let i = 0; i < voronoiWalls.length; i++) {
var closestPoint = new THREE.Vector3(0, 0, 0);
voronoiWalls[i].closestPointToPoint(currentVertex, true, closestPoint);
if (currentVertex.distanceTo(closestPoint) <= roadWidth) return "road";
}

return "block";
};

Edit: i have confirmed that the circumcenters are in the correct spots. i think this may have something to do with the voronoiWall calculations...having a bit of trouble understanding the delaunator plugin. Here are the docs i've been trying to follow: [https://mapbox.github.io/delaunator/#incoming-edge-index](https://mapbox.github.io/delaunator/#incoming-edge-index)

https://redd.it/18sk7jv
@proceduralgeneration
I have been working on a procgen dungeon maker and I have no idea what I am doing.

I am not exactly sure what I am doing wrong. Wvwry time I think I am getting close, my logic in the code just goes bonkers. It always overlaps no matter what I do! The rooms always overlap each other. I'm aware this is a learning curve kind of thing. Does anyone have a good tutorial/guide for the coding algorithm needed for procgen to work with room prefabs and specific door locations per room?

https://redd.it/18wnoju
@proceduralgeneration