Hi community,
i made another experiment for displaying terrain. I want to show you. The code is not very good but maybe you find some interesting lines for you, im programming in zen-way ;-)
Its with single-nodes for every tile like the first tutorial from saigumi.
I tested how to use alphablending (is it the right name ?) with the irrlichtmaterial with two texturelayers to delete the seams between two different tiles. Cause thers only two layer, you should not use more than two textures betwenn two tiles.
Click at downloadsection below at
http://zenprogramming.tripod.com
PS:
i forgot the theory:
You have two textures and you want not a hard seam, you want that the textures smooth merge together.
you take a material with more than one texture layer. In this example with two layers EMT_SOLID_2_LAYER .
set with node->setMaterialType(video::EMT_SOLID_2_LAYER );
You set the alpha-value of one or two or tree edges of the texture on top to transparent direct to the vertex with for example, so through the transparent you see the next texture layer:
v[0].Color.setAlpha(254);
How to : Alphablending with EMT_SOLID_2_LAYER
-
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany
How to : Alphablending with EMT_SOLID_2_LAYER
Last edited by knightoflight on Mon Aug 09, 2004 8:12 am, edited 1 time in total.
-
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany
-
- Posts: 199
- Joined: Sun Aug 24, 2003 5:47 pm
- Location: Germany