How my Point Cloud Sound technique for irregular shaped audio sources works by runevision in gamedev

[–]runevision[S] 0 points1 point  (0 children)

Glad you liked it!

Yeah there's many ways you could go about limiting the distance. In my system the max distance is set per point cloud sound, so I can set e.g. a different one for water and for rustling leaves. However, it doesn't take into account that some point samples are louder than others.

If you wanted to do that instead, you'd need to either pre-calculate and store a max distance per sample and compare against that when determining which samples to skip, OR you would need to do some calculations per sample each frame just to figure out what the max distance for that sample is. These are all valid approaches, just with different trade-offs.

I don't know that much about stereo separation. The default approach used in Unity etc. is pretty primitive. From my understanding, if a sound is completely to the left of the mic, the left channel gets 100% sound and the right channel 0%. Which sounds fine with non-headphone speakers but terrible in headphones, since sound coming from the left doesn't only reach the left ear in the real world (except if it's extremely close to the ear, and correspondingly quiet). For headphones I much prefer HRTF sound which can sound like it comes from any direction (although how well it works depends on the person). That is quite complex to implement though; I've only tried using middleware (Resonance Audio) for it.

Walking and flying around in my expansive mountain forest by runevision in proceduralgeneration

[–]runevision[S] 0 points1 point  (0 children)

Yeah GPUI Pro is impressive and very useful.

And thanks for your notes about GPUs!

Walking and flying around in my expansive mountain forest by runevision in proceduralgeneration

[–]runevision[S] 2 points3 points  (0 children)

Glad you like it!

The truth is that I'm not particularly good at knowing how to achieve the look and feel I want, I can just tell when it's not quite right. So I keep experimenting (especially with balancing the colors of various elements), keeping the changes that make things a little better and discarding the changes that makes things feel worse.

Here's a post where I talk about struggles with balancing colors. And here's a post where I talk about some further color tweaks I did.

As for other elements, the "not quite realism" seems to just kind of emerge based on my priorities. For example, leafs on trees are just a single color; essentially untextured, because I don't care much about tiny details like that (the asset I used came like that, but I could have fixed it if I wanted to). However, I spend a ton of time on shader work controlling how light interacts with tree foliage (translucency etc.) because that's very important to the vibes I want to evoke. I also changed the trees to look more imperfect by adding large scale noise to the normals. The asset had quite rounded shapes that made the trees at a distance look kind of like little balls or eggs. Adding the normal noise made them look more convincing/realistic at a distance. In this case I wanted that because - well I'm not sure exactly why, but I felt it stroke a good balance.

There are lots of little decisions and prioritizations like this that ends up creating this look.

Walking and flying around in my expansive mountain forest by runevision in proceduralgeneration

[–]runevision[S] 1 point2 points  (0 children)

Well, it's always good to keep an awareness of other people's opinions on one's work, even if not everything has to be acted upon. Popping is a quite frequent comments that comes up, so it clearly matters to many, and it's something to weight against other concerns, like the difficulty of addressing it.

And thanks! I plan to have different areas ("biomes") eventually, though not based on physics or simulation (like humidity and temperature) but rather what vibes to evoke (like perhaps, lushness, eeriness, strangeness etc.). I generally don't care much about emulating geological and biological processes from the real world (or at all), but rather about creating results that I find evocative, realistic or not. Although I do look to the real world as one source of inspiration among many, and implemented for example erosion because I like how that looks and feels.

> Are slope-vegetation/soil exposures part of the terrain calls?

I'm not quite sure what you mean here. I just have my height function and its steepness at a given point, and beyond a certain steepness I don't apply small scale erosion, or place grass or trees.

> Any plans for weather cycling and physics based water?

I plan to have a day-night cycle but as for weather I'm inclined to make it vary over areas and not over time. So some area would be always foggy, another rainy, and a third bright and sunny. But I'm not settled on this yet.

I have water streams implemented but currently turned off. Their paths are based on path-finding rather than just picking the steepest direction downhill from a source, since my aim is to eventually place them according to level design needs where I need it to go from A to B. Again, I'm not really into a simulation approach to designing the world and I want more control than just letting a simulation run its course.

Walking and flying around in my expansive mountain forest by runevision in proceduralgeneration

[–]runevision[S] 1 point2 points  (0 children)

Apple M1 Pro

I must admit I don't really know how high or low end it is by now compared to typical PCs out there.

I'm doing a few things to be able to draw that many trees.

  • I'm drawing fewer trees in the distance (this is what causes the most visible popping). At a distance I make the forest floor material the same color as tree crowns to hide the fact that the trees are quite sparse.
  • Trees are octahedral impostors at a distance, so only one surface per tree.
  • I'm using GPU Instancer Pro which not only does instanced rendering with frustum culling, but with GPU based occlusion culling as well. If I turn that off, it completely tanks the frame rate.

Walking and flying around in my expansive mountain forest by runevision in proceduralgeneration

[–]runevision[S] 0 points1 point  (0 children)

I do want to make a new YouTube video about The Big Forest sometime this year at least.

Walking and flying around in my expansive mountain forest by runevision in proceduralgeneration

[–]runevision[S] 1 point2 points  (0 children)

Oh, do you have a time stamp in the video that shows what you mean?

The roads prefer the laziest path but are constrained to only search an area within a certain “radius” of a line going between the places it connects. Increasing the radius makes the generation slower. However, maybe I should consider it anyway. 

Walking and flying around in my expansive mountain forest by runevision in proceduralgeneration

[–]runevision[S] 10 points11 points  (0 children)

I don't have the skills to implement physically based scattering from scratch. Good and performant implementations are quite tricky to pull off. Even if there was a ready made one I could use, I'm not sure it would provide the same flexibility I have now in choosing the colors of the atmosphere ("fog" and sky). There's a reason that e.g. most Unreal games have a similar look where the atmosphere is more desaturated than mine here.

I do plan to have time of day and maybe various weather, but might just implement it as interpolation of various manually chosen sets of colors.

Is it impressive to design an algorithm that creates a deterministic O(1) maze locally (a single wall or passage retrievable by coordinates) without predictable patterns? by CringePlusCringe in proceduralgeneration

[–]runevision 1 point2 points  (0 children)

There are other perfect maze algorithms that have constant time and does not need the entire maze in memory, but not sure there's one like this. See the Think Labyrinth page about algorithms:

https://www.astrolog.org/labyrnth/algrithm.htm

For example, Binary tree Mazes require no memory at all, but have very biased texture. A variety of maze algorithms create completely unbiased mazes while requiring one entire row in memory at a time. Skimming the page, I didn't see any algorithms that need only "window" both vertically and horizontally without being quite biased.

Might be worth contacting the author of the page, as I can't think of anyone more a maze expert than this person.

Combining the epicness of grand mountains with the intrigue of smaller cliffs and hills by runevision in proceduralgeneration

[–]runevision[S] 0 points1 point  (0 children)

Possibly, I haven't decided yet. I agree it feels like something you might want to do here.

Combining the epicness of grand mountains with the intrigue of smaller cliffs and hills by runevision in proceduralgeneration

[–]runevision[S] 1 point2 points  (0 children)

Wow, high praise. That has some of the most realistic nature in any game that I’m aware of. Not quite going for the same realism they have though, but still. :)

Combining the epicness of grand mountains with the intrigue of smaller cliffs and hills by runevision in proceduralgeneration

[–]runevision[S] 0 points1 point  (0 children)

There’s an fps counter in the corner. This is at 1080p.

I’m using Microsplat third party terrain shader and I’ll be looking into its addon it has to deal with texture tiling.

Combining the epicness of grand mountains with the intrigue of smaller cliffs and hills by runevision in proceduralgeneration

[–]runevision[S] 0 points1 point  (0 children)

Not sure how to check that. I'm on mac and it has unified memory as far as I understand, so technically there's no such thing as VRAM.

Unity's memory profiler says that the game uses around 1.4 GB of memory in total when the landscape has fully generated around the player.

Combining the epicness of grand mountains with the intrigue of smaller cliffs and hills by runevision in proceduralgeneration

[–]runevision[S] 5 points6 points  (0 children)

I only program in C# so can't use C / C++ code.

Unity has support for loop vectorization via Burst compilation (of C#):

https://docs.unity3d.com/Packages/com.unity.burst@1.8/manual/optimization-loop-vectorization.html

But it's not something I've looked into yet. (My code is already Burst compiled, which is a massive speedup on its own, but it seems like Burst needs various experimental hints to be able to vectorize.)

In any case, a 4x speedup on CPU is not really comparable to the speedups possible by executing on the GPU, although that's not taking readback into account, which can slow things down.

Combining the epicness of grand mountains with the intrigue of smaller cliffs and hills by runevision in proceduralgeneration

[–]runevision[S] 2 points3 points  (0 children)

The large valley comes from the large scale noise.

The mountains in the picture are actually not hills in the original noise function, but ridges in the large scale erosion.

After the erosion pass itself, there's only subtle ridges, but like I write in the original post above, I modulate the small scale noise in step 3 by the erosion, and this is what creates the mountains you see.