Tuesday, September 22, 2009

The first test for new terrain design

Hi

I test the new algorithm for the tiled terrain and it works well with texture ID.

For solving the texture filtering problem with tile texturing I copy 16 pixel from each side to opposite side of the texture and don't use small mipmap level so the hardware texture filtering works well.

Here is a screen shot I know it is not seem to be good but when I add blending you can see a good screen shot. For now I want to add PhysX engine for terrain pickings and future physics dynamics.

Friday, September 4, 2009

A new tiled terrain design

Hello
After many days of thinking hard on tile terrain finally find a good way to build the terrain.

Before start talking about algorithm I have to say I’m not implemented this algorithm yet and things may be change later.

TextureID:

For storing the tile texcoords I use one textureID with A32R32G32B32F format for storing the tile texcoords offsets then in the pixel shader I use it to map the tiles to the terrain.

I get the idea from Journal of Ysaneya.

No mipmap and texture filtering is needed for this texture.

Vertex:

I need one texcoord for my vertices and they start from 0 to number of columns/rows increase one per vertex.

How to map the tiles:

In the pixel shader I read the tiles offset and creates their texcoord.

X = 1 / number of columns in the tile texture
U = Uoffset + u * X;

For reading the Uoffset from TextureID I can use something like above formula.

X = 1 / TextureID size;
U = u * X;

Thursday, August 27, 2009

Tile terrain

Hi

I worked on tile texture and add this to engine but when I saw Red Alert 3 terrain my mind changed.

I want to add a tile terrain something like Red Alert 3 terrain. Its a tile terrain too. I think I can add this type of tile texturing.

I think a way to combine both of them(WarCraft III style and Red Alert 3) is a good idea.

Friday, August 21, 2009

More active this year

Hi all
I want to be more active this year and work on Kochol Game Engine more.
I hope it become a more useful engine soon.

Currently I work on tile texturing for a tile based terrain like WarCraft III terrain.

The problem with tile texturing is the Anisotropic filter that combine the tiles edge with each other and if you turn this off the quality become bad.

I skip one pixel from each side when I create the UV for terrain and the problem solved but there is another problem with mipmaps.

I have to create mipmaps by a custom way that scale each tile and place it on the mipmap. I use devil to achieve this.

And for a 16*16 tile I use a 16*16 mipmap never less mipmap levels.

Wish me luck.