texture splatting - mix multiple (4) textures

In my game I’m trying to use texture splatting technique which allow me to have up to 5 textures on landscape chunk. For this I need to generate blend map so my game engine know how to blend those textures. I was googling a lot and found few tutorials describing how to mix 2 textures with one stencil. But I need to mix 4 textures and since I’m very new in Blender and design I’m experiencing few problems:

  1. For beginning I added 3 textures (grass, dirt and sand) and 2 stencils between them. But with this approach I can only draw sand on dirt, I cant add sand on grass because first stencil block it. It does change stencil but I can’t see sand over grass.

https://sc-cdn.scaleengine.net/i/a0bfdd86ab4cab23beea013f6b98b391.png

how can I solve this?

  1. At least I can paint on stencils and now I have to combine them to get one colored texture with each channel intensity of some texture. I was manage to achieve this using node editor:

but now, how do I export this to external image file so that I can use this blend map in my game?

Maybe in common I moving in wrong direction and there are better ways to generate blend map for 4 textures, while painting on landscape mesh in Blender?

Attachments



Put your game in GLSL mode and just use it with the nodes! No need to change anything.

I do the whole lot in nodes, using the R, G, and B channels of a texture to define which of the layers to display. Painting it is a little unintuitive though.

I already have GLSL turned on in Blender and I’m using nodes but still I have those problems,

I made this some Days ago. Maybe it helps. German, but you’ll understand. :yes:
Splatmaps in Game Engine

mix that with this :smiley:
/uploads/default/original/4X/6/c/8/6c8976066fd43729b3da9955c3b0c7123a2805d0.blend

you can paint vertex color in real time
never made a system to generate output I’m afraid.