S0rn0
(S0rn0)
July 7, 2016, 3:48am
46
While I definitely get the desire for doing separate materials, it’s likely going to limit you rather quickly. The problem with the RMC, and well any component for this, is that to do separate materials you need separate draws. For the RMC that translates into separate sections for each material. If you have a couple materials, you’re probably OK, but if you have tens or hundreds of materials, you’re going to get very poor performance for any decent scale voxel. The problem is pretty simple if you have 100 chunks with 1 material you have 100 draw calls, if you have 2 materials you have 200 draw calls, so the count goes up very rapidly and it won’t take long at that rate to start limiting yourself by the draw call counts.
Atlasing is one way to get around it, another way is to use texture arrays. I have an open PR ( https://github.com/EpicGames/UnrealEngine/pull/2340 ) for that to the engine but have no idea if/when it would be merged. So if you want to use a source build of the engine you can find them in my repo ( UnrealEngine · GitHub ) but that would require building from source.
With either atlas or texture arrays you can use additional textures to supply the other PBR info/normals etc. The only time I split apart the mesh in my system is for things like foliage and water which need a completely different render model.
You basically said word for word what I was thinking. I will be looking into the texture arrays for sure that could be a nicer approach.
It looks like they are getting a bit of attention and a merge will be happening sooner than later.
Thanks for your very detailed answer.