A Case Study: The Infinite Marble Floor
Megascans by Quixel have quickly become the industry standard in premade PBR materials for both the AAA and indie developer. This is due to unwavering quality and vast diversity.
At Artomatix, we’re always exploring new ways to take advantage of an Example-Based Workflow through scanning, procedural modeling and, A.I. based automation, in order to take in seed data and expand its value.
Figure 1: “Infinite” marble floor rendered in Marmoset.
Since day one, we decided ArtEngine would be built on a fully node-based non-destructive workflow. This was chosen to give artists the ability to combine features and artistic techniques across a diverse range of type and functionality in order to create anything they could imagine. One of the benefits of adopting a node-based workflow is that it lays the foundation of a fast and easy to use procedural modelling methodology.
In this blog, we walk you through building a simple Artograph that combines Scans, Procedural intent and AI in order to build an infinite marble floor generator in a fraction of the time it would take using any other tool.
Figure 2: The final Artograph for the infinite marble floor.
First, we start with a brief: Build a simple checkerboard marble floor with a metal grating. We turned to our Partners at Quixel and picked a few Megascans that caught our eye; two marbles and a metal.
Figure 3: We chose two interesting looking marbles.
One of the marbles we liked was actually a tiled combination of two marbles that were scanned together from the real world. Because we only wanted the marble that exists along the perimeter of the tile, we ended up having to generate a mask to guide mutating a new 8k texture out of just those regions. Alternatively, we could also invert this mask and generate a new material from the center marble.
Figure 4: When a single scan contains multiple different materials, Mutation lets us quickly build new self-tiling materials using on the features we care about.
We grow out both Megascan marbles to 8k using mutation and then we combine the results into a checkerboard pattern using a simple binary mask.
Figure 5: A basic checkerboard mask generator.
Using a standard Transform node, we can easily modify the number of times our checkerboard mask tiles. Simple transforms when hierarchically ordered give procedural controllability.
We decided to add a metal grouting between 2×2 tile patterns. This was effectively just another simple mask and a metal material provided by the Megascan library.
Figure 6: A second procedural guide map defines where grout is placed.
To give a realistic shape between the different materials that were cut and placed together, we generate new normal maps from the various masks to create bevels and blend them together. We take the final result and blend it with the scanned normals.
Figure 7: Procedurally generated tile shapes are blended with the scanned normal maps.
While experimenting, we decided we’d prefer the white marble to be green. We liked the colors in this reference image and updated our graph to transfer the appearance of this image onto the albedo channel of the white marble.
Figure 8: Transmuting materials to mimic the appearance of examples is a core part of ArtEngine.
We adopt a non-destructive workflow, so once the graph is built we can modify parameters at any stage of the process and the changes will trickle through the node graph. This means we can change the resolution of the texture we mutate, we can increase the number of tiles in the final repeatable texture, we can even hit a “new random seed” button in the mutation nodes and create a completely new version of this floor.
Figure 9: This Artograph is a generative model, changing random seeds and parameters can create infinite varieties.
Postmortem Learnings: Part of the reason why we run these tests is to see the world from our users viewpoint and get a snapshot of what is currently fun/easy in ArtEngine and where functionality is still missing. While building this floor there were a few simple features we added to our own wish list:
- The ability to blend entire Materials using a mask. We currently support the standard blending methods for individual bitmaps, but we never added full material support because we didn’t think it made sense to do things like softlight blend on a normal map (which it doesn’t). In hindsight there are some simple blending types that do make sense on full Materials, such as height blending and normal interpolation blending. Because we didn’t support simple blending on full materials, we had to break them out to their individual maps and run each through a bitmap blending node separately. It got the job done and it wasn’t the end of the world, but it did require about 20 more actions than necessary and the final result produces a very cluttered looking Artograph. This is in direct conflict with our company mission and values, making content creation faster and easier for artists! Expect to see this cleaned up in the next few releases.
- More mask drawing powers! We see masking as a great way for artists to quickly instruct ArtEngine on how to compose their data as well as a great way to give artists a starting point for procedural controls. While we have a 2D mask painting interface that supports different brush types, we still lack basic shape creation tools. In addition, we would have loved a node to find the edges in a binary mask to instantly create grout between tiles/bricks. While we could have drawn these masks manually in ArtEngine using the brush tool, it was easier to jump into Photoshop. Expect this to change soon!
- Finally, we noticed a sluggish user experience with 8k materials. Nodes would take a second or two to load in the 2D/3D viewers after being clicked on and since each node would hold multiple 8k bitmaps, ArtEngine would use up lots of system memory. Unfortunately that’s just the nature of working with 8k materials, so we decided that we need to add a “preview mode” when editing Artographs that uses reduced resolutions and keeps the system snappy and responsive.
Want to know more about ArtEngine – or do a free trial? Pop us a message at [email protected] We would love to hear from you!