Texture Blending and Indices #64
Replies: 2 comments
-
This thread is related to the #4 discussion. If texturing is currently Red=base, Green=Overlay, Blue=Blend weight, then we can support 256 textures. But in #4 we talked about limiting it to 32.
The arrays are 8 indices into values like [0, .125, .25 .334, .5, .667, .75, .875, 1] Before the alpha release we should reduce this down to 32 textures 5/5/3, with the remaining reserved. Also we should allow all textures to overlay the base, even the same one so we can switch back and forth with overlay for natural blending. Then later we can refine it all. |
Beta Was this translation helpful? Give feedback.
-
The new control map is in, and noise is applied to the blending edge. The painting tools are working well and this discussion is archived. |
Beta Was this translation helpful? Give feedback.
-
The Control Map
Control map currently uses 3 channels as follows:
Red -> Base texture (background)
Green -> Overlay texture
Blue -> Blend weight between Base and Overlay
Red and Green are both index maps and therefore cannot gradually blend their own indices.
Here's a screenshot from Landscape creation and rendering in REDengine 3 with my own art on top.
The difference between REDEngine's terrain shading and ours is small. One difference is the index blending, where we use height blending and they use linear one. On our side this results in slightly more visible domain/pixel shapes (square/pixelated look), whereas linear is more smooth but unrealistic.
Painting
Painting feels a lot more weird than with splat maps. Currently we have two tools, Paint and Spray.
Both can only paint 0 or 1 indices without blending, but Spray can gradually blend from Base to Overlay.
And here comes the weird part: Since Spray builds up the blend weight, there can be odd blending artifacts between 2 or more Overlay textures.
Index Maps
Index maps are part of the control map (red and green channels). Below is a visualization of how the indices are blended (without height blending). The yellow is the indexed texture (domain) and red/greed is the blending with neighboring indices. We get the blend weights from UVs. The domain's size is the control maps pixel size. The blending happens even if the all the neighboring indices are the same. That allows for easy anti-tiling by rotating each domain randomly.
Beta Was this translation helpful? Give feedback.
All reactions