Jump to content

[SOLVED] Blending textures or materials on a mesh - how?


photo

Recommended Posts

Posted

How do artists blend textures or materials on meshes?

 

I wanted to make architectural blocks and modules to build my level with. After level is assembled, I would like to blend 2 sets of materials or textures - regular and weathered/grunge ones.

 

In Darkplaces / ID Tech 4 it's done through vertex alpha. I paint vertex alpha over the mesh, export it, create a shader that blends 2 textures, where amount of blending is controlled by vertex alpha.

 

How do I do something like that in Unigine, preferably using WYSIWYG tool rather than typing the shader in the notepad :(

 

P.S. I see that terrain uses splat mapping, and there is a good tutorial on that. I am curious about meshes.

 

Thank you.

Posted

You could use mesh_terrain_base material with your 2 sets of material textures as detail textures. For per-pixel detail blending use material mask texture as there is no support for things like vertex alpha in Unigine. Mask texture has to be created in external tool e.g. photoshop

Posted

Thinking about it a little bit more an even better approach might be to assigne your regular texture/normal as diffuse texture and your weathered/grunge one as detail 1 texture. For masking a more efficient R8 format texture could then be used.

Posted

Thanks. What's R8 texture? I wonder if I can make that in GIMP...

Posted

Single channel 8 Bit texture (R=Red channel only, 8 = 8-Bit greyscale 256 levels)

Posted

I actually like the idea of blending with texture masks better, as it allows more details and precision. Vertex alpha blending requires denser mesh, although it renders faster. Plus with blending via vertex alpha you can only (usually; most model formats only support 1 vertex alpha layer) blend 2 textures. So splat mapping is the prettiest way to go, but it's slower afaik.

×
×
  • Create New...