Computing normals for 2D Perlin Noise
I am making a 3d terrain renderer using Perlin Noise, my program currently evaluates noise function in the Tessellation Shader. Before, I used to compute flat normals in the fragment shader. Now I want to implement PBR, and decided I have to switch to per-vertex normals for better quality of render.
I used central-differences method to compute normals:
vec3 normalY = vec3(down.x, downNoise, down.z) - vec3(up.x, upNoise, up.z);
vec3 normalX = vec3(left.x, leftNoise, left.z) - vec3(right.x, rightNoise, right.z);
Which gives me:
https://preview.redd.it/j1v78wvlb27e1.png?width=1920&format=png&auto=webp&s=f2620a687353bef251b367eb8413a026c6c6907e
I like the result, but it drops my FPS to 20-30, and I didn't include PBR yet.
Two questions from here:
Is there a more effective way to go about normals in my case? I REALLY don't want to migrate the Noise function to the CPU..
Is it possible to use flat-shading with PBR? Flat-shading gave me pretty good results on high tessellation levels, but I'm not sure how it will work with PBR..
TL;DR
How to calculate normals for perlin noise in tessellation shader effectively.
How good is flat-shading + PBR?Computing normals for 2D Perlin Noise
(https://preview.redd.it/computing-normals-for-2d-perlin-noise-v0-u8hyypkn827e1.png?width=1920&format=png&auto=webp&s=facfe707e82f5840c1c13a51fdca76d9a8a532b5)
https://redd.it/1hf00j1
@proceduralgeneration
Trying to conceptualize layout generation, explanation inside
https://preview.redd.it/kfr6rnuapw6e1.png?width=771&format=png&auto=webp&s=3e6115b7844e157b918d7927462061291d15059a
I've been able to make a maze/room marching thing for a while now, but I've had a hard time trying to conceptualize placing things inside it. If anything I do here sounds familiar, I'd like to know if there's a name for something similar! I've been at the end of a coding project many a time before finding out someone already conceptualized something similar before.
Layer 1: After making our rooms, we'll divide the room in half up and down. If big enough, we'll randomly decide to split the room into two or not. At this point, we'll choose a division from up and down and from left and right. Wherever our intersection is, we'll save it and possibly use it later.
Layer 2: We'll put our walls and the center of the room into two other sets. We'll also put the cells directly adjacent to hallways into their own set, where we'll try never to push from so the player can actually get in and out of the room.
Layer 3: We'll check our 'Landmarks'. These are bundles of data that we'll place important decorations at- a computer desk, a chest, maybe a dangerous trap or something. These are room specific, and while we're making the maze, we put every room into a category that tells it what landmarks it can pick from. If there's anything we can put into the intersection, we'll put it there.
Layer 4: The rest of the room will need to be populated. The Landmarks have information about what other decorations will be good to put into the adjacent cells. For example, a chemical storage cabinet will have lab materials like beakers and notes, Jail cells could have keys and adjacent, empty cells and a kitchen could populate the room with a stove, cabinets and the like.
What do you think? I'm also considering determining the landmark first, then splitting up the room after to place all the cells. Thanks for reading all of this! Check out my maze algorithm at work as a reward :).
https://reddit.com/link/1heheoj/video/impn1gxyvw6e1/player
https://redd.it/1heheoj
@proceduralgeneration
GN: Stylized weathered stone generator
Made this stone generator with Geometry Nodes for my project, you can block out structures with just cubes and get this stylized weathering applied to it.
https://reddit.com/link/1he7gel/video/gyllsfgvqt6e1/player
https://redd.it/1he7gel
@proceduralgeneration
HelpWFC hexmap generation
Hey folks, I'm looking for a little help.
I'd like to generate a hex grid utilizing wave function collapse. I know the relations between all the hexes I want to use and have a specific grid size I'd want.
I don't care for post-generation interactivity, just output the whole thing as an image and I'm good.
But all the WFC project downloads I've looked at are game engine locked ones, or ones that create "similar" images based off a sample image, not a set of relationships.
If anyone knows a project I can grab where I can plug in my hex tiles, their relations, and the output tilesize to get an image file output, I'd really appreciate it!
https://redd.it/1hd9auv
@proceduralgeneration
Generating clues for a logic grid puzzle
I'm working on a small project on my spare time that is basically a murder mystery game set on the Orient Express and heavily inspired by Murdle. Generating a logic grid is, of course, pretty simple, but the clues are a trickier problem. The game plays out as a simple choose-your-own-adventure style interactive fiction, where you can visit all the cars on the train and examine things and talk to people to gain clues.
Main two main problems are:
\- How to gauge when I have enough clues so that the game is solvable? I could just generate a clue for each data point and score the game so that the fewer clues you need to solve the puzzle, the higher score you get, but it does feel quite boring.
\- How to get from a data point into an actual clue? I can probably start with really simple stuff (add a fingerprint from each suspect to their murder weapon), but I'm not sure how to go about the more complex and indirect clues. For example, how to make a clue that tells someone did not have a weapon.
I found this very recent article about the subject, but unfortunately it's behind a paywall.
If anyone has experience doing anything similar, I'd be happy to get any pointers, links to related articles, and so on!
https://redd.it/1hcl3bc
@proceduralgeneration
Did little groundwork for an proceudral Environment experiment.
https://preview.redd.it/oouvfzmmc76e1.png?width=1033&format=png&auto=webp&s=a71edc0f8e4f182f8e3cd55e01bda0f1424e910b
https://redd.it/1hbr4np
@proceduralgeneration
Simulated Tectonics of a molten planet - another Rock3 preview
https://redd.it/1hatu7u
@proceduralgeneration
Snaking sinusoidal spears of (procgen) sorrow
https://redd.it/1haka5u
@proceduralgeneration
floating_world {12/8/24}, "stormy weather" + 2 - python & gimp
https://redd.it/1ha2wjk
@proceduralgeneration
Lost resource about procedural world generation for games
Hi folks, some time ago (couple years ago).
I found an website, where author was describing in details how games were tackling world generation, but unfortunatelly I am no able to find it myself, but maybe someone got a link to it.
I remember there were articles about Blasphemous and their node based world generation. Spelunky, and much more.
https://redd.it/1h8xgub
@proceduralgeneration
Progress video for group proc gen project!
https://redd.it/1h8gwhj
@proceduralgeneration
Procedural shelves full of procedural books. The titles are generated from word combinations and I swear I didn't plan that last one.
https://redd.it/1hf3dqr
@proceduralgeneration
Learning about PCG
Hi there,
I'm embarking on a journey as it pertains to PCG, I'm particularly interested in how it applies to game programming, for example:
- world gen
- civilization and story gen
- quest generation
- dungeon generation
I have a high level idea from doing procedural things in blender with noise, etc. I'm going to read through the wiki but I'm curious if anyone has any resources for the above focuses as well?
I'm an intermediate programmer, I understand a few languages and how things work in concept, and eager to learn.
Caves of Qud and Dwarf fortress comes to mind when I think of examples done well.
Thanks for your time.
https://redd.it/1hez239
@proceduralgeneration
Trying to add some visual flair / polish to the (still) 100% procgen game side-project
https://youtu.be/loVhtRwQRrs
https://redd.it/1he81nf
@proceduralgeneration
Image to UnicodeASCII Generator by Reactorcore
https://reactorcore.itch.io/image-to-unicodeascii-generator
https://redd.it/1hdd14x
@proceduralgeneration
Ah shit, here we go again
I made my first triangles for my procedural planet generation!
I made terrain generators 3-4 times before but this time I'm using dynamic meshes in unreal engine because of their amazing support. It's just like using a modelling program, It has built-in boolean, mesh selection, bevel...
But real funny part is most hard part of terrain generation for me is just making a proper, goddamn bugless plane! And I just figured out that I can just watch some opengl terrain generations videos for learning how real plane algoritms work. I hope I can make it this time
https://preview.redd.it/4nvxs1qyqh6e1.png?width=1902&format=png&auto=webp&s=b43bbda15694fc7a08d39297a602d9743c0a2045
https://redd.it/1hcwy65
@proceduralgeneration
A procedural solar system somewhere...
https://redd.it/1hchutq
@proceduralgeneration
I want to build a procedural generation system in Unreal. Advice?
I'm looking to generate dungeons, buildings, etc. Not landscapes or meshes.
My current plan centers around Reagents and Recipes. A Reagent is something that can be placed in the level, which might contain a Recipe for placing more Reagents. I also have an AssetManager which will allow me to get Reagents by tag. I want breadth first generation. I want to have many different simple generation algorithms.
I'm currently struggling with how to organize my classes. Might you be interested in talking to me about it?
https://redd.it/1hbw0hk
@proceduralgeneration
I made a low poly spaceship generator in Unity. I use a genetic algorithm to be able to breed, mutate and generate ships. An array of Int8s is the alleles, for each 'gene', I read a segment of the array as a 256 base number, then apply that number to a decision of measurement in the design.
https://redd.it/1hb63q3
@proceduralgeneration
Realtime animation of a Peter de Jong attractor, WebGPU
https://www.youtube.com/watch?v=wdr7b9Z3S6Y
https://redd.it/1hal38v
@proceduralgeneration
Procedurally generating terrain details at runtime in unity c#
Hi! I have a procedurally generated terrain in unity. I've been working on foliage, and I would like to use unity's Detail objects to do so. I'd like to use these because they auto-place and auto-cull, which means I can have millions in the game, but only a couple thousand on screen at a time. My project uses runtime generation, and the world is infinite, so the ability to cull meshes beyond view distance is crucial. I'm going to need literally millions of foliage actors for grass, trees, etc. It's a big world.
I understand that I could probably do this with prefabs (and that's actually what my project looks like right now) but I would like to use unity's detail painting to streamline everything (plus it allows me to control a lot of factors such as "density" and "align to slope" that would be tedious to code myself). Right now, I generate "Detail Prototypes" and "detail layers" but when the time comes to generate, I just select random points and instantiate the prefab of the detail prototype, not the prototype itself.
Currently, in the editor, I can paint detail objects (the prototype itself) on terrain manually, but is there a command for me to do this using c# at runtime?
Note: I have functioning "detail layers," just no way to populate them with "detail objects." currently, I generate prefabs at random points within the detail layers.
This is what my project looks like so far. I have a detail layer that corresponds to a certain biome \(mountains\) and spawns \\"bushes\\" \(cubes\) everywhere within the detail layer.
https://redd.it/1haf6a8
@proceduralgeneration
My passion project, procedural generation and world building, an update to of some of the components I've been working on.
https://redd.it/1h8wr8b
@proceduralgeneration
A few steps closer to the proc gen city game demo (C++/OpenGL/GLSL)
https://youtu.be/ZgHeLg8nSHU
https://redd.it/1h837cr
@proceduralgeneration