Terrain Materials #4
Replies: 2 comments 1 reply
-
Again, Juan confuses me. I'll answer in a weird order...here we GO
It's not because it will only use constant lookup. 19 is not much but we can go lower, down to 8-11 with branching. The vram would become issue if all 256 slots were used. 32 would be ideal. MicroSplat for Unity has 32, and MegaSplat 256. I need look into the Witcher 3 papers.
Like I said in the TerrainStorage discussion, TextureArray should not be saved. They need to be generated often (textures being edited a lot), so why not generate them every time? For the editor they should be only partially updated! And it would be best if the textures could be use anywhere, not just in terrain. So, no new import thingy.
Godot normal maps are RA format, meaning they only use 2 channels (RG in reality, actual format is RA_AS_RG). This does not allow to have anything else on any other channel. But we could still use RG channels, AO in B and roughness in A. |
Beta Was this translation helpful? Give feedback.
-
We have a solid material class with 32 textures. There's nothing remaining in this conversation so it is archived. |
Beta Was this translation helpful? Give feedback.
-
Juan Wrote:
Terrain Materials
For modern terrain rendering, texture arrays must be used. This ensures quick access to all textures needed to render terrain. For creating these textures, we would need something similar to how atlas textures work:
A texture would need to be imported as a Terrain texture, this type change can happen at the time its assigned to the terrain.
The terrain will have material slots, which are basically albedo, normal and ORM and emissive textures. They need to be filled but can be skipped if not used.
The textures selected will probably need to be encoded to an RGBA texture array (3 slots). Emission can be encoded in Albedo with alpha be used as interpolation + energy. Normal can use RA format for quality.
...
Up to a certain distance (1km ? 2 km?) the shader reads the "material index" texture, which is basically a 16 bits 4096 x 4096 (as example, can be changed) containing material indices.
The 4 materials to blend are obtained, materials are read and blended (most likely using triplanar).
Beyond that distance, to avoid aliasing in the algorithm above, the terrain is blended into low resolution albedo+e, metallic textures that are read directly.
--
My Interpretation:
Goal: * High number of textures.
16 at least. Witcher3 has 32. Up to 256 is nice, but is it necessary?
I had a hard enough time filling out 16 textures for my game, and it's a big game for the Godot community. It already takes a lot of vram. 32 is more than I need. With W3 techniques I'll be able to blend textures in unique ways that results in many variations (eg grass, cobblestone, grass covered cobblestone, cobblestone poking through grass). And I have a color map, which can vary any of the obvious textures, but it can also create more based on variable textures. eg. Snow + light desaturated brown is sand, +dark brown is mud or dirt. + other colors can be a blending agent between other materials.
256 textures is a
shiny feature
number, but I can't imagine any game actually using it, or using that much of precious vram. If it's free, then fine, but if an index based shader is significantly more expensive than one that only supports 16-32, I have a hard time justifying the performance.What do you think about Juan's notes, my interpretations, and the number of textures?
Reference:
Index map terrain w/ 3D projection and detiling
The Witcher 3 Clipmap Terrain and Texturing
Beta Was this translation helpful? Give feedback.
All reactions