BGE Texture Splatting SOLVED!

I know what your thinking. DUH this has been talked about.

I know how to accomplish Texture splatting in the BGE, and of course it looks quite awesome. However there seems to be one small detail that makes a HUGE difference.
For some reason, despite all the hubub and awesomeness of the texture splatting feature in the BGE, the one thing missing is the fact that you can only use 2 textures and 1 stencil!!!

So im writing this in askance, HAS ANYONE FIGURED OUT how to use more than one stencil?? This has been talked about in other places, and ive seen others say you can.

I know for a fact that game engines use more than one stencil. Ive done all the reading I can do and ive seen it in multiple places. Here is one.

Based on that article, you can use 4 settings a RED, a BLUE, a GREEN and BLACK. For each color, you can have a different texture splatted.

Here is one that is actually used…

In this one, you can see it in action directly, and even its using 5 textures…

Here is an example if what one of the multiple Layer stencils looks like.

http://www.bundysoft.com/docs/doku.php?id=l3dt:userguide:ops:alpha

SO… in conclusion, can anyone figure out how to;

A, Use multiple B&W stencils to get more than one texture on a single terrain.
B, Use one of these RGBA Texture stencils to get more than one splatted texture

GO FORTH MY FELLOW BLENDERERS!!! LETS LEARN TOGETHER!!!

Peace
Terry

You can use more than one stencil, just keep adding them in-between textures.
It would go: texture-stencil-texture-stencil-texture. I don’t know if there’s a limit for stencil maps, but it isn’t just one.

Don’t have any ideas about the rgba stencils, only tried b/w.

Well I don’t have GLSL so I wouldn’t know, but, would it be more like:
texture-stencil-texture texture-stencil-texture texture-stencil-texture.
Other wise two stencils would be sharing a texture? Or is it meant to be that.

wow… you can use more than 1 stencil, check out desideratum in my sig and look at the materials on the ground.

Not really, you use stencils to define different areas for different textures, so you just have to put them wherever it fits your needs.

Ok have done the same setup with the texture stencil texture stencil texture stencil…

And it doesnt work…

ill ahve to keep trying…

ill post a blend when I get back from work of what im talking about…

Do they have to be more than 8bit stencils? IE NOT grayscale.?

Cause thats what im using the 8bit… maybe ill try better ones.

Rozzy, can you please post an example of what you have in that game so I can look at it PLEASE!!!

Thanks for the replys
Terry

p.s. maybe I should say that im wanting this multiple stencils on one object??

Use nodes for multiple stencils, create vertex color channels and use the channels to mix materials using the mix node.

Nickadimos I’ve made a .blend, hope it works for you. Here’s a screen of how it should look. There’re 3 color textures and 2 stencil textures. Hope they’re packed alright.

Attachments


stencils.blend (238 KB)

Thank you!

All the other tutorials I read never said anything about the first stencil had to have all the data for all the other stencils…

What a Kick in the pants!!!

So I tried it out and was able to get 7 textures with 7 stencils to work…

It turns out the GLSL saps your framerate no matter how many Tex/stencils you use as I tested it at every interval as I went and it was the same draw on the BGE. I was down to 42FPS

I even mixed 2 materials with nodes, one with the 7 stencils and one with a megatexture of the land I was working with and it was the same again. 42FPS

Even with 50 650 poly trees, it still ran at around 28 fps.

The only time you lose more framerates is if you tile whatever image more than a power of 15 it seems.

Anyway
Thanks again ROZZY and SICK!!
Terry

Here is the Tutorial I read that explains it all!

http://en.wikibooks.org/wiki/Blender…ure_Stenciling