Way to break pattern in tiled models, but need engine support


#1

Hi,

I’m trying to model a big room, and I feel always disappointed by the look of it, because when I try to apply some materials over it, I see the repeating patterns and it feel cheap (compared to smaller models with non-tiled materials). Looked for solutions over the months and seen some things “that could” be implemented in Banshee editor and in the framework (as we would need to load back the assets afterward). Unfortunately, I’ve not found any solution that could work outside the editor. The industry should think of a way to export in a exchange format so we could use external tools to make this. Yet the engine need to support the technique.

Decals have been used extensively in the industry for years and are quite ok (great for having bullet holes and blood splat on the floor generated by the engine) and for helping a level artist break the patterns on a large model made of a single tiled texture. The artist need to define the image that would go on a plane that would be placed on the surface model in the editor, then theses decals would be batched. Like this image of a blood splat over the stairs.

Found a good article about them here on Gamasutra

The other option is by using shaders that would offer layering and masking(best option for painting large models and terrain in my opinion). This technique has been used for years for terrain painting, but would be great for texturing large scale models from tiled texture. Each “layer” would be a tiled texture and the user would paint the mask for each layer.

Seen a plugin made for Unity that is doing exactly what I would dream to have (in any game editor) Link here.
Here is an example for creating a layer and a mask on a model and breaking the tiled pattern:
Standard_Ground

The developpers have gone even further. They added the ability that each layer can also contain another shader. So they can “paint” water for example:
water
Water_Dx11

Here, they could apply a “wind” shader that can manipulate the model vertices!
wind

I’ve posted it here, as the framework would need a way to load back and apply theses shaders, still it’s only a recommendation not a request. This would require a lot of work!


#2

Thanks for the breakdown (and the nice gifs). Decal support is coming fairly soon (https://github.com/GameFoundry/bsf/issues/11).

Material layers are also something I want to implement, but it might take a while to think of a design that handles this in a general purpose way. I’ll be working on an in-editor painting system when working on the terrain system so I’ll probably be able to re-use some of that functionality for general purpose material painting.

You can technically set up material layers right now by writing a custom BSL shader, but I certainly want a simpler solution eventually.

I suspect the tool you listed above uses a method that’s far from efficient - rendering each material in its own pass, which requires a 3D model to be drawn X times while also with significant overdraw. While this yields good results visually it would likely severely limit performance in larger scenes. Although I might be wrong without investigating it further.

To provide the same ease of use, while also offering better performance bsf would require a more complex system that involves combining shader code dynamically, which is what I believe UE4 does. But they have a shader node editor that only designs parts of a shader, which can then be combined (layered) fairly easily. I’ll probably need to extend the BSL’s concept of surface shaders to allow for something similar, but that requires a lot more thought :slight_smile:


#3

Thanks, Marko!

That would be really awesome! Having a way to place decals inside the editor would help me make better scenes already! I’ve not heard often that studios used splatting to paint large scale model, this was almost used exclusively used for terrains, and can be considered a “next gen” technique for large models. I’m really happy that you would try to investigate a way to make an implementation!

With a 2k texture, I can make something look good at about the size of a car. Beyond that. the bigger the model, the bigger the required texture. And the size of the room would need more than a 16k texture to look good, so I’m kinda forced to use the tilted texture approach, so it stay as sharp as the model, but there the problem as we see the patterns of the tile. Procedural textures would help, but they would require as much processing as using the splatting technique and I would not have the control over the placement of the textures.

The plugin I mentioned, previously, use only 2 layer (base and top layer only). Seem to use splat over a texture map and not vertex data. Having only 2 layer, could work on some models, but would limit severely in terrains.

As for way to optimize it, I’ve see this on the Unity Asset Store:



They claim that they can support up to 256 textures all rendered in the same pass and no penalty. If you use a PBR workflow then it would be divided by 4, so still great, but I could compare orange with apples… :slight_smile:
Here is a link to it.