July 28th, 2024

My favorite tools and techniques for procedural gamedev

Casey Primozic shares his procedural game development techniques, focusing on seamless textures, custom shaders, AI-generated textures, and volumetric effects, while exploring future applications like Constructive Solid Geometry for 3D manipulation.

Read original articleLink Icon
My favorite tools and techniques for procedural gamedev

Casey Primozic discusses his favorite tools and techniques for procedural game development, focusing on various methods for enhancing 3D scenes and levels. He emphasizes the use of seamless textures and custom shaders, particularly highlighting triplanar mapping, which allows for effective texturing without predefined UV maps. He has improved this technique to enhance visual quality and performance. Hex tiling is another method he employs to eliminate visible texture repetition, although it requires predefined UV mapping. To optimize performance in complex scenes, he utilizes a depth pre-pass, which can significantly reduce rendering costs.

Primozic also incorporates AI-generated textures into his projects, finding them beneficial when used judiciously. He has developed a versatile shader for volumetric fog and clouds, enhancing the dynamism of static levels. His work on procedural mesh processing aims to create more realistic structures from low-poly meshes, while his terrain generation system employs noise functions and a level of detail (LoD) approach for efficient rendering.

Looking ahead, he expresses interest in exploring Constructive Solid Geometry (CSG) for manipulating 3D space, which could allow for creative effects like simulating decay in structures. Overall, his blog serves as a resource for those interested in procedural game development techniques, with insights into practical implementations and future explorations in the field.

Related

Homegrown Rendering with Rust

Homegrown Rendering with Rust

Embark Studios develops a creative platform for user-generated content, emphasizing gameplay over graphics. They leverage Rust for 3D rendering, introducing the experimental "kajiya" renderer for learning purposes. The team aims to simplify rendering for user-generated content, utilizing Vulkan API and Rust's versatility for GPU programming. They seek to enhance Rust's ecosystem for GPU programming.

Total Annihilation Graphics Engine (2012)

Total Annihilation Graphics Engine (2012)

The article details Jon Mavor's work on Total Annihilation's graphics engine, overcoming hardware limitations and implementing optimizations like caching units as sprites and improving image quality. Mavor's dedication and technical insights are well-received.

How Spore's Creature Creator was made, 2003-2008

How Spore's Creature Creator was made, 2003-2008

Chris Hecker's website showcases his detailed insights on Spore's creature design, covering skin mesh, texturing, animation, and AI. He explains challenges in real-time mesh generation, texture atlases, implicit surfaces, and procedural paint systems.

Understanding 3D Graphics: Terms and concepts useful for starting with 3D

Understanding 3D Graphics: Terms and concepts useful for starting with 3D

This article explains key concepts in 3D graphics for beginners, covering shape, color, shaders, textures, PBR, UV mapping, materials, and normal maps. It discusses trade-offs between geometry and texture quality.

Introduction to Realtime Fluid Simulation for Programmers and Technical Artists

Introduction to Realtime Fluid Simulation for Programmers and Technical Artists

The article introduces real-time fluid simulation for programmers and artists, focusing on geometrical concepts in Unity 3D. It discusses fundamental behaviors, initial flaws, and encourages developing a more accurate simulation.

Link Icon 5 comments
By @foota - 3 months
I've dabbled in trying to do procedural generation in the past (in particular to make good looking trees), and I feel like the missing component (to me) was easy ways to connect geometry. It's easy to make two cylinders, but then trying to join them together is very hard.

In theory CSG can fill this niche, but it can be a bit difficult to think about the problem in that way (for me, at least) since you can no longer view it as just for looping to add vertices, but you instead need to model everything as a 3d shape.

I tried building some routines to take two loops of vertices and connect them through heuristics by adding faces, but I had a hard time getting it to work well (choosing which vertices should connect was much harder than I expected, it was easy to get really bad looking connections).

What I really want to do someday is make a game where there is a system for different modular procedural generation systems to work together in a way that allows for spontaneity. So e.g., systems could "claim" slices of the world, delegate parts of it to other systems (e.g., put some plant here) and connect with other adjacent things.

By @TillE - 3 months
Good terrain generation is not trivial, either at world scale or down at eye level. The straightforward approach yields what you see in the article, a craggy heightmap which looks like almost nothing in reality and isn't particularly interesting to explore.

Dwarf Fortress for example starts with basic midpoint displacement but then does a lot of custom massaging.

By @Crudodev - 3 months
Very interesting article especially for me as 3d Artist. Good article on this topic very rare.

Im gonna give a try the Three.js

By @abj - 3 months
Great write up on all these procedural techniques in the web, really helpful.

If anyone is interested in a WIP procedural RPG level editor, check out https://github.com/gamedevgrunt/3D-Action-RPG-JavaScript

By @Const-me - 3 months
I have had mixed experiences with using depth pre-pass. When I tried it a few times, I didn’t see any significant performance improvements on midrange to high end desktop GPUs. I'm not entirely sure why, but I suspect it was due to early Z rejection saving pixel shader invocations. Typically, I render my opaque meshes in front-to-back order.

To be fair, my experimentation was within the context of a CAD/CAM application rather than a game. The scenes were quite different from typical game environments, with minimal textures and very high-poly geometry.