PBR material blending

With the arrival of SurfaceAppearances and MaterialVariants on Roblox, it’s clear that Roblox is pushing for new art styles on-platform. Worlds like Roblox’s own Community Space envision spaces with more fidelity than we’ve ever had before.

However, there’s a problem. While it’s great we now have these PBR superpowers for building, they’re often too uniform and too static to build believable things without resorting to full-on modelling programs such as Blender and Substance Painter. I propose that options should be explored for more easily blending between materials, both procedurally around geometry and also around user-painted areas for variation.


Hotspot texturing and dulled edges


There is no such thing in real life as a perfect edge. In Roblox, that’s all we have to work with.

Other engines and modelling tools understand this intimately. To allow artists and designers to quickly add realistic grit and variation to the edges of the models they build, they have been experimenting with concepts such as hotspot texturing. These techniques can turn untextured models into terrific-looking assets, without having to switch to a dedicated texturing program. They also reduce the need to create new textures just to add these imperfections, which would take up extra graphics memory and download bandwidth.

One such example of this tooling is leukbaars’ DreamUV plugin for Blender, which allows a texture atlas to be applied to the faces of a mesh extremely quickly.

While I’m not necessarily arguing that hotspot texturing is the right answer for Roblox specifically, what I will argue is that these tools show the importance of being able to quickly add these kinds of details to surfaces. Due to increased exposure to impacts, friction and weather, all sorts of surfaces wear down at the edges like this, for example concrete, brick, paint and metal, and as such it would be largely beneficial to have options for realistically wearing down those sharp corners.

I envision these materials being transferable between any meshes and automatically detecting and following the edges of the geometry. Perhaps options could be provided to select only outermost edges (most exposed) or innermost edges (most sheltered) depending on what effects are desired (e.g. snow/sand piling up in cracks versus chipped stone corners). What’s more, since meshes and surface appearances currently have some pre-processing done already, this step could be extended to include baking these material blends into one unified surface appearance, eliminating most of the cost associated with using multiple materials on a mesh. The exact implementation doesn’t matter as much as what it should enable developers to do without committing to a static textured mesh.


Painted blending and surface imperfections


Right now, terrain blending looks really good. The problem is, terrain isn’t the only time we want to blend materials convincingly; man-made structures wear, tear and accumulate sediment too, and we don’t have the tools to paint that on.

In fact, we don’t even have adequate tools to do this at all. Due to texture resolution limitations (on the hardware level, not just the 1024x limitation) it’s simply not possible to achieve good painted-on material blending using just one surface appearance, as this tutorial from Blender Guru demonstrates during the process of texture painting an abandoned house, with explicit mention of how this negatively impacts game assets. MaximumADHD has also previously tweeted about similar troubles when attempting to recreate levels from old Source games in the Roblox engine.

What we need here is some way to mask between (at least) two materials in some way. At the absolute minimum, this could be driven by a regular old decal, but it would be vastly preferable to have in-studio painting tools to be able to directly work on parts and meshes. This is especially true when considering that the vast majority of objects that’d make use of this technology would be regular part shapes which would otherwise have to be entirely recreated in external software to operate upon, which is beyond tedious.

The transitions can be made high quality by using the normals/displacement of the surface to drive the blending, similar to what’s already done with terrain blending today:

In combination with properties to allow tiling and offset of SurfaceAppearance objects, this could even be used to push past the current visual limitations imposed by the 1024x texture size limit, and squeeze out more visual fidelity from the same pixel count by breaking up the distracting repeating elements with naturally-masked-in variation.


How much of this is possible today?


Technically, all of this is possible with today’s tools. That is, if you fancy either having gigabytes of textures and thousands of meshes, or locking yourself into specialised mesh setups.

To experiment with texture hotspotting, I decided to try and implement my own general-purpose PBR-compatible hotspotting system, to some success. It’s how I created the model in the image at the top of this post:

However - and I’m not making this up - the entire system depends on almost 1,000 unique meshes (!), and it only supports a very limited subset of all possible texture atlas configurations. Furthermore, it drops the framerate of the Studio session quite notably, to the point where it’s probably not viable for use in a real game.

As for painted-on material blending, I previously alluded to the fact that the current texture resolution limitations of SurfaceAppearances mean that, for any non-trivial object, painting on variation is almost always at the compromise of visual clarity. If, as modellers, we forgo that variation, we can get away with tiling our SurfaceAppearance textures at a much smaller size, allowing for vastly improved visual quality. This is especially true for VR use cases where people will be getting very close to the textures:

For those reasons, and many more, I truly believe that one of the biggest steps forward Roblox could do for visual quality and art style right now is to allow more dynamic material blending. Instead of forcing us to rely on more external programs and forcing us to resort to unnecessarily high-resolution textures, we should be able to achieve this visual clarity procedurally via smarter blending options. Such a feature would instantly make high quality material work much more accessible and doable for a larger group of builders, help push the envelope with graphics on the platform and keep performance costs low on the devices that need as much performance as they can get.

177 Likes

WRT hotspot texturing:

Saw this tech a while back and it blew my mind. Never thought to apply it to Roblox in-engine, but if we could even just generate UVs in Studio for this approach, this would be a game changer for people who do a lot of modeling with unions, or people who want to add an extra touch of edge detail to models that are already using regular materials. This wouldn’t require a hand-tailored UV and unique texture for every asset. In best case, you could automatically generate UVs to one texture of edges and panels with only the effort of preparing the single texture. It would be an easy boost to immersion and detail for developers without requiring they become texture artists.

27 Likes

bump, still in need of hotspot texturing and painted blending

1 Like

Bump.

No idea why this hasn’t been implemented yet. Roblox engine is basically a whole decade behind in even basic features compared to modern game engines.
Basic example I’d personally need this is in blending water and foam PBR textures, but also applies really everywhere else in making immersive (not to mention visually pleasing) environments.

5 Likes

Bump. I been wanting stuff like this.

3 Likes