logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

Crafting a Procedural Shield Generator

Lucas DZIURA talked about the production of Procedural Shield Generator made with Substance Designer, Houdini, and UE4.

Lucas DZIURA talked about the production of Procedural Shield Generator made with Substance DesignerHoudini, and UE4.

Introduction

Hello, my name is Lucas DZIURA, I’m 19 and I’m currently a third-year student in Game Art at ArtFX, Montpellier, France. I started learning 3D on my own about one year and a half ago, and I’ve been in love with it ever since. I first started with water simulations in Blender because I stumbled on a SIGGRAPH video about fluids and particles simulation. I quickly started exploring the endless possibilities of 3D and about 8 months ago I found out about the Substance suite and particularly Substance Designer, which led me to more complex software solutions such as Houdini. That’s when I fell in love with proceduralism. I found it very appealing that you can “teach” a computer how to make a huge amount of unique content in a very short time, with a quality close to handmade props. That’s why I was inspired to become a Technical Artist.

Aside from studying, I’m currently working as a freelance artist for Pixowl on The Sandbox, a 3D voxel game, and I’m working hard to find a way into this wonderful industry.

Shield Generator

After I saw this artwork from Abdulla Mannuthodikayil I tried my hand at “sculpting” in Substance Designer. I started by doing only a base shield and tried to get everything in place. I don’t remember exactly how but I thought I could make a shield generator out of this base shield, and this is how the whole thing started.

Proceduralism was not only an option but a requirement for this project as my goals were:

  • Make a shield generator able to produce a big amount of shield variations
  • Find a way to have the fewer steps possible from Substance Designer all the way to integration in UE4
  • Convert the texture into a 3D mesh with a decent polycount to be qualified as “Game ready props”

Some features were not thought ahead, but rather while I was doing the project, like the ability to get random shields or different LODs.

1 of 2

Houdini Workflow

The role of Houdini in this project was to convert my 2D shield texture into a 3D model.

For that, I used an exotic way to do it. I converted my shield heightmap into terrain, with the heightfield tool with specific settings to get the most data out of it in Houdini. Then converted it into a mesh and resized it. I reduced its polygon count until a decent one, merged the front and back sides, UV unwrapped them and that’s it!

3 LODs and the network used:

There is a lot of poly reduce nodes since I wanted to reduce polycount by steps in order to keep the most information and not just reduce all at once. UVs are just an orthographic projection since we are extracting the mesh from the texture and not the other way around.

This allows skipping the High/low bake part because the map the data is extracted from is “high” and the mesh generated is low. So the high-quality normals will fit perfectly on the mesh and give the effect that would have been achieved through a bake.

Export to UE4

In order to export this content into UE4, I import all my meshes and open my LOD0 Mesh, scroll to LOD settings in Details, and define my two other meshes as LOD1 and LOD2. This gives me more control over optimization than the Unreal Auto LOD system.

I also have Instances of this material that allow me to just drag and drop the shield textures into it.

Apply it to the mesh and that’s all. In about a dozen clicks, we have our shield integrated and game-ready.

Example of shield meshes rendered this way in UE4

Substance Designer Workflow

The biggest part of this project was the generator itself in Substance Designer.

This is what the graph looks like, there are 11 outputs, 5 for each side and 1 opacity mask.

There are also 33 parameters, two third of them allow you to create your own shield, the other third is for randomly generated shields.

Here is a demo of the generator in action:

My process was to create different modules such as the base shape, central patterns, main patterns, rivets, wood, etc. and then assemble them with an “assembly line” of blend nodes.

This way I had control over each part of the shield individually and it was easier to make them interact with each other with some defined rules.

In fact, as we will see later on, some module values define whether some modules appear or not, and if they do, the number of them to appear.

Also, this allows to quickly implement new features in some modules without breaking the whole thing.

Here I only changed 1 node of the base shape and everything sort of adapted, even though I did not plan to add different shapes at the beginning. This shows how with some tweaks we could very easily implement Themed Alpha shapes to create shields from specific periods such as Roman or Greek Hoplite shields.

Here is the process of layering the modules to create the final heightmap:

Here are the 5 PBR textures from the generator (for the front side):

Diversity & Randomness

The shapes diversity was one of the main focus of this project.

Except for the central patterns that I made by hand, all the rest is procedurally generated. In order to achieve that I used a lot of splatter circular, mirror grayscale and edge detect.

Here’s how a pattern is created and some examples of randomly generated patterns:

Each step of creating the pattern can be influenced by changes of the shapes, the number of patterns, the scale, etc. and that’s what gives the pattern its versatility.

I talked on how each module interacts with another according to some sort of rules. To make these rules I used the function graph for some specific parameters

Here is an example:

I translated this function graph which is node-based into C++ code in the top right corner. Substance Designer is quite amazing as we can literally code on how the parameters react in a very similar way to Houdini.

For the random generation, I had to code each parameter which can be changed by hand with a “Global Random” node. This node is driven by a custom parameter which is modified by a set of operations such as square roots, multiplication, etc. to make each “Global Random” node output number different in each function.

Furthermore, the “Global Random” takes a float as an input which defines the range in which the number will be generated. This is very practical since clamping the output of a randomly generated number is not optimal. Let’s say you clamp it to have a minimum of 3 and a maximum of 9, everything above 9 will return 9 and that’s a lot of numbers. It will have repercussions on how the pattern will repeat since it will return 9 very often.

Also, I had to keep in mind that the way we see the generated content is very different from how it is built. For example, from a code perspective, a 0, 0, 0 black is different than a 1, 1, 1 black, but from a visual perspective, it’s indistinguishable. That’s why I had to implement steps for colors, so I could only generate colors that are perceived as different (even if the changes are very subtle) rather than just using 255^3 colors.

Another feature is that you can still change some shield parameters such as metal color or pattern number after it has been randomly generated.

One of the not planned features that just ended up being possible is that the seed number can be large enough to fit a birthdate like DDMMYYYY which is what I used to test if I didn’t have redundancy in my random parameters. It’s actually quite exciting to have something entirely unique in front of your eyes.

Proceduralism in Game Development

I see this project more as a lab experiment rather than a viable workflow since it’s less optimized than handmade props, and you have less control over what you doing. However, I think that the growing interest in proceduralism in game production is a good thing. In my opinion, it will allow artists to spend more time on pure artistic creation and less on boring stuff like retopology, UV unwrapping, etc. Ubisoft proved it a few times with Far Cry 5 and Ghost Recon Wildlands where they used Houdini to generate the whole world entirely procedurally. It gave the artists a solid base to create a realistic world. To me, the downside of such methods is that it requires a deep knowledge of procedural packaging and it’s quite complex but in the right hands can create beautiful results. Whereas it’s a good idea to generate terrains as Ubisoft did, I think it’s more time-consuming to create a generator for props than to create 2-3 props that you need manually since a simple generator can only produce one specific range of objects.

To my mind, the best workflow is already used in some studios which is a combination of handcrafted art and proceduralism to get the job done very quickly and with high quality.

Overall, I’d say Houdini and Substance Designer are essential software solutions for creating open worlds with a lot of content.

Afterward

I hope I helped someone with this article. Here is my artstation where I will post my new projects and where you can send me questions if you have any.

Also, I would like to say thank you to Sofie Chabrol for her pertinent feedbacks and help.

Lucas DZIURA, 3D Artist

Interview conducted by Kirill Tokarev

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more