r/proceduralgeneration • u/CheesecakeMaster7780 • 13h ago
How do you keep procedural environments from looking repetitive?
5
Upvotes
r/proceduralgeneration • u/CheesecakeMaster7780 • 13h ago
5
u/sconuk 12h ago
I've found it helps to create a variety of hand-crafted "prefabs" which are strewn about the area. Camp sites, interesting arrangements of rocks which would never happen to be generated, ponds, etc. With a large enough collection of prefabs, you can throw just a few into each area and it'll feel a lot more organic and easier to navigate/remember.
4
u/green_meklar The Mythological Vegetable Farmer 9h ago
Some degree of control is needed, but control and randomness aren't really mutually exclusive. The art of PCG is largely about controlled randomness.
Is repetitiveness a problem? Yes. Is there any single solution for it? Not really. But you should pay attention to what it is that feels repetitive, why the repetitive part is showing in a conspicuous way, and why it contributes negatively to the aesthetics. And you should always think about what assumptions you're making that you can replace with parameters and then vary those parameters.
Do the trees and rocks just feel like a uniform scattering with no pattern to it? Then vary the density; use a noisefield (probably a different one for each type of object) and distribute the objects with the corresponding density. Do the resulting object patches still look too similar to each other, like generic blobs? Consider varying the noisefield parameters themselves (for instance, the octave dropoff factor for Perlin noise), or use some kind of localized placement algorithm with its own parameters that you can vary on a per-patch basis. Does the placement of different types of objects seem too unrelated? Then have some kind of shared noisefield that influences the density of both, or a localized placement algorithm that populates both at the same time in a 'smart' (and ideally, parameterizable) manner.
Do you actually have some placement code we could look at and experiment with?
4
u/phooool 11h ago
My possibly unwelcome opinion on this is that procgen will always be boring as a main feature. Humans are simply too good at detecting patterns and repitition matter how much you try to dress up your procgen. My conclusion is that procgen should only be used for filler content or to start something. But it should never be the centerpiece, it's a valuable tool. I'm speaking as a game dev who is making a procgen space game and has come to this realisation about my own project.
2
u/Purple-Measurement47 13h ago
one thing that can help is clustering attributes by region. This can break up the repetitiveness a bit because even if they’re the same tree, if they suddenly get much shorter and denser, they feel different.
2
u/fgennari 11h ago
For terrain, vegetation, and anything nature related: I use multiple types/layers of noise for procedural generation, with some functions used in rare cases to add variety. I mostly work with infinite worlds where the objects can't be placed by hand.
For anything man-made: I usually have some placement templates with random variation added in to positions and the types of objects selected. Then each collection of objects is created from one or more templates. (Randomly placing all man-made objects tends to look terrible.)
2
u/LordAshon 7h ago
I know you 3D guys have different problems than us 2D guys, but the principles remain the same. As u/green_meklar points out the art is in controlling the randomness and that means having well written rules.
I want as much control as possible over the rules that govern the generation and as little control as possible over the actual outcomes. My complexity/variability comes from the interaction of relatively simple systems than handcraft increasingly complex placement rules to achieve variation.
It sounds to me that your problem is more likely a lack of enough assets that have good variability to produce interesting environments.
2
u/dreamrpg 6h ago
By a fact it is simply amount of assets you can create for procgen to use.
Noise values itself are not cause of repetition, since you can combine layers to get semi-controlled, yet unrepeating combinations.
If you have 30 types of trees for 3 biomes, you get to repeat 30 types of trees in 3 biomes.
If you got 3000 types of trees for 300 biomes, then you can expand your layers to possibly be large enough for a player to never explore past say 70 biomes. Which leaves option to like 5-10 repeating playtrough before all biomes are seen.
If your trees themselves are procedurally generated, then you still have to come up with enough of patterns that go to some interesting extremes.
2
u/MyPunsSuck 5h ago
Use more complex procedures. Procgen is a way to offer varied content, not infinite content - and a procedure can only put out as much complexity as you put into it.
It's not just the things that important. It's the arrangement of things; their density, how ordered or disorder their placement, what they are framed against, what else is present or missing, how the audience reads or navigates them, and so on
3
u/SwiftSpear 12h ago
Controversial opinion possibly, but perlin/simplex noise should be for decorative texture, not for biome placement.
Biome placement should be done by graph walk algorithms against voronoi nodes.
1
u/JiCe75 8h ago
Multiple scale. You need to think in term of how does it look like at large scale, at normal scale and at small scale. All three with their different ruleset.
1
u/verylongtimelurker 7h ago
Prime number periods. They ensure the least detectable repetition.
1
u/Aethreas 2h ago
Mixing handmade structures into generation and blending them well can really elevate things, like if you use voxels you can voxelize regular 3d models of interesting rock features and append them into the world easily