Procedural Content Methods
?Procedural content for games is the way to go!
Hello! I have some thoughts on procedural content creation for games which I wanted to share….as I wrote this article, Epic showcased an impressive real-time demo which, for me, brought to mind an interesting thought. Are there ways in which game developers (both big and small) can leverage procedural methods to help create the vast amount of detail expected in future games? Well, IMHO, yes! And there is no better time than now to invest in procedural content methods. Have a read and let me know what YOU think.
But first…. Procedural content? Do you mean creating an entire game level procedurally (like a dungeon generator)? Or do you mean making a bunch of individual procedural assets (i.e. rocks) and then artistically placing them in my favorite game engine to create a level? Or….do you mean making a rough level layout and procedurally populating the environment with a palette of assets? Or….do you mean all the above and more?! Good question…. maybe I should begin by defining what I want to communicate in this article.
There are an increasing number of ways that proceduralism can be used to augment your teams’ productivity and even raise the quality bar of your product. This is not an exhaustive article on proceduralism and its uses, but I will show some production proven examples of how you might want to use proceduralism…. or maybe I will simply encourage you to investigate it further? I hope you will enjoy the read!
Procedural content creation is a vast term. One can use procedural methods to make all the above and more……but in reality, and in my opinion, procedural methods should be employed where they have the biggest impact coupled with the smallest disruption. Dang it! I have gone ahead and mentioned two more terms which I had better define….
Impact.
By this I mean the benefits that procedural methods can bring to your team i.e. time saving/money saving (helping artists to create more content in less time). It could mean that more menial tasks like generating collision meshes or UV layouts are all handled procedurally rather than by hand – allowing the artist to be artists more of the time which will improve creativity and allow more iteration time on the visual side. It could also mean enabling the artists to more easily create a consistent visual look to multiple assets by adopting procedural methods.
Disruption.
The other term I mentioned was ‘disruption’. I totally understand that a certain level of investment is needed when considering implementing or adopting procedural methods. Sometimes, and I say this from experience, people can be genuinely concerned about adopting yet another 3d program into an already well-established pipeline. Or maybe the concern is adding a 3d package that isn’t well understood and may require specialist experience. This too is understandable, and these are some genuine concerns there but – and this is the other reason I decided to write this – these concerns need to have ‘their day in court’ so to speak.
A good implementation of proceduralism will free up artists to focus on the art, to stay in the flow of creativity and even open up new ways of creating art. Procedural content workflows implemented badly detract from the artistry and create a staggered effect to the creative process which can be tolerated, but IMO will slowly kill creativity.
Some might say that procedural content is a no brainer…..or that it has no limits….BUT….and here it comes….as we all know….games do have limits….and games have things called deadlines and release dates. That means that planning and (possibly) limiting the scope of implementing proceduralism into your workflow is extremely important and should not be underestimated.
I believe that a well thought out implementation of proceduralism will result in a healthy amount of impact whilst minimizing disruption. This would be best overseen by someone with good production experience in procedural content creation or at the very least someone who has done some serious research into how and when to implement it into an already established pipeline.
The software we have access to these days is amazing!
Houdini = proceduralism! I have had the pleasure of using it for almost 10 years thanks to a knowledgeable and forward-thinking manager (thanks Mike!). Since the very beginning, the benefits were clear for the task in hand, which was destruction. We could design system like node trees in Houdini which would output an impressive game ready destructible asset. Not only would we get a fractured mesh, but we would get a matching collision mesh and simulated animation. This had the extra bonus of being able to output almost countless variations for(almost) free. Despite that huge benefit, at that time, some of the ‘game art’ functionality was not as clear to use as other apps, and so adoption was limited.
I am so pleased to say that the creators of Houdini- SideFX - has never disappointed with updates. The current set of modelling tools, UVing tools, and all the other ‘game’ art type functionality, PLUS its procedural workflow has made usefulness to the game community go through the roof. They even have a bunch of tools to help with outputting animations of rigid body simulations into your favorite game editor, and other tools to help easily create animated sprite sheets (flipbooks). Oh, and it has all kinds of dynamic solvers for fire, smoke, fluid etc. which are of the highest quality – they all work and interact together and for that reason it is my weapon of choice for content creation.
However, I am a big believer in using tools for what they were designed for…or for the thing that you know how to use them best for…….for example it is quite possible to spend time making Houdini do all the PBR texturing functionality that SubstancePainter provides…..but honestly, why invest the time mimicking a software that has been purposely designed to do this one thing very well….and by developers that have spent years testing it….and now with the backing of Adobe? For me, it makes sense to use Houdini for the things that I know I cant easily do in any other app and with the control that I want to have and with the ability to make setups into tools for other artists to benefit from. Then I send the results to SubstancePainter and let it do its thing. Then send it on to your favorite game engine of choice and voila! Realtime awesomeness! This is my opinion right now – what do you think? And how do you use different 3d apps to generate your game content?
Alrighty, let us look at some examples. To accompany this article, I decided that a cool demonstration would be to create a believable ‘game’ environment using almost 100% procedural methods. This environment would be a place where the player can run around and look around freely and see firsthand the visual benefits of this workflow.
I decided to make a rocky cave tunnel which would open out into a small outdoor environment.
It would have AAA quality models, PBR texturing, and I planned to light it as best as possible (I am not a pro lighter and respect the amazing improvement that pro lighters bring to the table). I planned to add some vfx……just cause I like environments that have some kind of life to them…..and it also allows me to flex my creative muscles in other ways. Finally, it would have some sun lighting, atmospheric fog and post fx to suggest a ‘finished’ quality product. It would hint at gameplay and offer some intrigue….suggesting that this may be part of a bigger world or a bigger demo experience.
Lets roughly go through the steps taken to create this demo space.
The first rock.
First, I opened up Houdini and made a super rough 3d shape – literally a subdivided box that was smoothed a little.
After subdividing the geometry a ridiculous amount, I then used several layered 3D textures to displace my input geo. Some layers were masked by other procedural textures so that I could add/remove detail wherever I wanted – the idea here is that everything is artist controlled.
(This is oversimplifying the setup a bunch for readability (and so that you do not fall asleep just yet….) but if anyone is interested in hearing the fine details then let me know).
The node setup branches here – outputting the high detailed rock geometry – and applying UVs to a lo poly version of the rock.
Now we jump over to SubstancePainter where I have already prepared a decent PBR material. BTW, I like to start from the awesome presets that SubstancePainter gives you and customize them to my hearts content until a look is defined. The tools for texturing, the tools for painting, the options for building masks, and the viewport display are all incredible.
The hi and lo model are brought in and I bake the textures………..I tweak the scale of the textured detail a little and decide to export.
Over to Unreal (or your favorite game engine of choice!).
SubstancePainter exported 3 textures. A base color (diffuse) texture.
AO, roughness, and metallic are combined into the RGB channels of a single texture.
And a normal map, capturing all the hi def geometry and additional SubstancePainter texture detail.
These are imported into Unreal and plugged in to the slots of a standard PBR ready Material.
The Lo poly version of the model is imported, and the Material assigned. At this point the model should look remarkably close to the quality of the 3d viewport in SP.
I like how its looking!
To further extend the usage of these assets (and to hide the fact that we are using the same rocks more than once), I made a material in Unreal that layers ‘moss’ on the top of the rocks……but not only that….it is a dynamic material effect based on the rocks orientation! This was influenced by some awesome starter content which is full of exciting demo assets to learn from.
With that material applied, if I rotate my rock, the ‘moss’ stays on top! This is a good example of using each apps strength and combining them together for fantastic results. The results are clearly greater than the sum of their parts.
If you have not already clicked (and it may not be totally obvious just yet….), from this point on you will see the ridiculous awesomeness that procedural content affords - Hang on to your seat!
Variations for free! (almost)
One single rock….hmmm…..I guess we can randomize the position, orientation and scale a fair amount make it appear to be a variety of rocks….. but we are going to need some more shapes to play with if this space is going to look like a real game environment.
Time to make a variation based on our first rock. Well, all I need to do at this point is add another rough ‘blob’ of a model to the top of my Houdini node graph, tweak the layers of displacement and see what comes out at the other end. This isn’t zero amount of work - the tweaking takes a small amount of time – but honestly, once the groundwork for the ‘look’ has been established on the first rock, the following variants will have the same mount of geometry detail, and the same consistent look for almost free.
Here is the proof – a rough shape of a curved wall transformed into an awesome game ready PBR textured asset.
These first two assets are looking decent already, don’t you think? After all, that is the whole point of making this procedurally. Next, I work in Houdini to make the setup more user friendly. I expose some handy parameters so that I could move the displaced details around and mask different areas of the model. With this kind of functionality, you can give as much or as little artistic control to the process as you want.
In total I create about 6 unique rough shapes to form walls, floor, a pillar and a ring of rock, changing the layered displacements per object just a little.
Each of these has a hi and lo poly model output and is passed through SubstancePainter. (BTW I do understand that some of these steps could be further automated using Python…. but I’m not quite there quite yet…..).
Anyways, suddenly, I have half a dozen awesome looking and PBR textured rock pieces to play with in Unreal! Not only that, but because they have had the same procedural treatment, they have a visual consistency that is incredibly organic and the same high-quality detail throughout – perfect for showcasing this workflow.
So, next I spend a bunch of time laying out the assets into what I think is a rather good looking and believable game environment.
Placing, scaling, all these assets is a joy in modern game editors! The real-time viewport is amazing. After placing a bunch of lights and a quick lighting bake the visual quality of the scene is almost where I want it to be.
This is the way to make game art and I have only scratched the surface of proceduralism……
I’ll kind of stop right here and show the video of a run through of a nearly complete space.
So you can make rocks….big deal….What else could I use this for?
Good question – thanks for asking! Here are a couple more examples of procedural methods used to create more content for our scene.
Remember, the proceduralness of each method means that we can output variations for (almost) free and we can reuse the methods on different input geometry to get unique but expected results.
Firstly, I used Houdini to create some piles of rubble. As Houdini has loads of options for simulating stuff, it made sense to import some of the environment from Unreal, then us it as collision meshes so that the rubble is as physically correct as possible. I made a small variation of fractured rock pieces (using the very cool Boolean shatter tool), lined them up, and fired them towards the cave walls!
After an extremely fast simulation, I had a settled pile of rocks ready to push through to Substance and into Unreal. Once again, this is just one way of using the software to do helpful stuff – there are loads of other ways and other tools that can accomplish similar results. This was well known territory for me to get the best result in a hurry.
Here is an image of the stages of prep for the rubble simulation –
Secondly, I made a grass tool in Houdini to generate clumps of grass. I exposed artist controls for grass length, blade profile, gravity bend, grass spread, even an additional bias direction to simulate grass that has grown with a wind influence. The setup automatically generates UVs and vertex colors which can be used in by the Unreal material to modulate the wind effect (making the base of the grass static and the ends of the grass wavy).
This asset’s use can be further augmented by using it as one of the ‘brushes’ that gets scattered in Unreal. This allows the artist to paint areas of vegetation, with fantastic control over scatter controls and handling multiple scatter objects easily.
For my mini production, this tool created 2 variations of the grass clump. As you know by now, it is a procedural setup and therefore can produce an almost infinite amount of variations – if that is what you need.
Wait a minute! I can see some mushrooms in that environment…..do they have something to do with this procedural workflow too?
Yes! Well spotted! I recently demonstrated a variety of procedural methods to a local game studio.
I used this environment to showcase multiple methods of how proceduralism can aid in production.
One of the examples was object scattering…..
I had already exported this section of environment from Unreal into Houdini to simulate the rubble. I decided to use this same space to demo object scattering – but once again I wanted to show off artistic control of scattering which is way more attractive than plain scattering.
The idea was to generate a mask near where the floor meets the walls – with controls for spread, and blending. Then we scatter points in this masked area and divide the points into 3 groups. The points are given a range of values which will be used to drive the scale of objects assigned to them. The 3 groups correspond to 3 different types of object – mushrooms, spheres and leaf.
There are many ways this setup can be used next. I decided on the fastest turnaround which was to export the scattered geo and go through SP into Unreal- exactly like I had done with the rocks. It worked out very well! So natural.
In case you were wondering about other methods…..we could have exported the points to Unreal and assigned instanced geo over there…..we could have exported small collections of objects to be reused in other similarly flat areas of environment…..we could have even used HoudiniEngine inside of unreal to see and control the scattering live!
You could even automate the processing of a folder full of assets – i.e. a wall, a floor, a bend, some steps – all processed with hi and lo meshes created, sent automatically through SubstancePainter and ready for import into you favorite game editor!
It’s all too much!....or is it?
So many options…..and so many different depths of implementation - but that is the trick…..what level of investment do you want to make into this kind of workflow? Where should you draw the line between impact and disruption? How much time do you have? Could you already benefit from some of the tried and true methods available – it’s not all unknown territory and there are some helpful folks out there just waiting to help guide through this subject so you don’t get stuck in the weeds! I also want to assure you that it is possible to dip your toes into the waters of proceduralism without falling all the way in and drowning.
Despite having only scratched the surface of how proceduralism can be used in your workflow,
I hope I have made a clear case for it and given you some useful examples.
To answer the question raised by the title of this article – “Procedural Content Methods – should I add some to my workflow?” – the answer is – YES! Whether you have time and resources to jump in and fully invest in proceduralism or whether you have a small amount of time to investigate proceduralism, or maybe you know you need specialist advice or good research, I guarantee you won’t be disappointed.
Please let me know what you think of this article and the examples mentioned – I am interested in hearing your opinion.
Let me know your experience with procedural content, maybe you already have a list of pros and cons.
And especially let me know if this article has removed some of the fear and maybe encouraged you to look further into the subject of proceduralism.
Thanks for reading, from Chris Woods
P.S. Feel free to comment and connect on LinkedIn.
#sidefxhoudini, #unrealengine, #substancepainter, #unity, #gameart
Project Art Director @ Hidden Path
4 年This is a fantastic write up Chris! Also digging the lighting and atmosphere in the cave!
VFX Manager @ Riot Games (No Crypto, DeFi, NFT, or GenAI)
4 年Awesome overview of how procedural content, creation methods, and friendly tools can empower an artist to accomplish so much on their own. Thanks for sharing, Chris!
Great work figuring all that and implementing it so well!
Fantastic document, Chris! This is awesome!
Creative Director at Discord
4 年Great write up. Thanks for sharing. Procedural content creation and assists are incredible now and workflows and tools will only continue to improve.