Terrain Texture Splatting using Alpha maps


Attention! 👉Starting November 2024, BlitzCoder.org will now be BlitzBasic.org.

 

Tweet blitz3d maps terrain tutorials
BlitzCoder

Tested to work on 2 alphamaps (3 Textures) and possibly unlimited number of layers. In this video example below, each layer also has the same shadow map texture and unique detail texture applied.

This is the same technique as posted here, just doing an alpha blend (Flag 2) terrain on top of each other with the corresponding alpha map or splatting mask.

To optimize the tris output, provide lesser details (TerrainDetail command) on textures that are less prominent or manage LOD when player is closer to specific texture regions when having more layers.

I think this is better compared to uv mesh terrain which has 2 to 3x more tris and does not manage or do LOD.

..also working on using UV2 and masking if it is a possibility to have lesser terrain layers and cut more tris in half.

RemiD commented:

nice

markcwm commented:

Hey Ron,

looks great, are you using 3 terrains? What do you set the EntityFX to on the 'middle' layer?

Openb3d only has one set of terrain uvs as well.

BlitzCoder commented:

cheers guys. I'm sure this has been done before in some form or another when looking at some previous b3d based terrain editors. Same concept with the alpha blending, mostly mesh based terrains. I just figured it works on both.

@Mark
Yes, it is using 3 terrains. No FX on the base terrain and then force alpha blending (Flag 32) on succeeding ones

Openb3d only has one set of terrain uvs as well.

ah thanks for the heads up The popping up lod even with morphing enabled somehow ruins the visuals a bit w/ or w/o this method. I guess that's one advantage of using mesh terrains.

I'm thinking a mix of both (where the pop-up areas appear, like water banks or tall hills) would also be a nice touch.

markcwm commented:

Hi Ron,

I tried this out in Openb3d. Had a bit of trouble with it as terrains didn't have any alpha blending code. Anyway, I used Kryzon's demo and now have a base layer, 2nd layer masked map with texture and 3rd layer alpha map with texture. I also added a 2nd uv set to terrain.cpp but since you can just use ScaleTexture I'm wondering if there's any actual need for it. How would you use it?

BlitzCoder commented:

I also added a 2nd uv set to terrain.cpp but since you can just use ScaleTexture I'm wondering if there's any actual need for it. How would you use it?

That's awesome The idea is to use less or half the mesh or terrain entity by using the 2nd uv and masking out the 1st uv textures.

It's still a proof of concept but I recall doing a simple test on that.

Reply To Topic (minimum 10 characters)

Please log in to reply