Sign in to follow this  
UnIXbLueStar

Texture set

Recommended Posts

What is the best size of texture set? my game is gonna use mass 64x64 textures for terrain. ill store them in a 1024x1024 texture (4096 texture in one). is 1024x1024 reasonable ? and, how do we make a part of texture repeat over a polygon, its just gonna show the others texture included in the set.

Share this post


Link to post
Share on other sites
I think he wanted information about a "Texture Atlas", which includes having many images in a single texture so it doesn't involve that much texture switching. What he is asking for is, how can you get one of those images tiled without the entire atlas tiling on a surface.

Share this post


Link to post
Share on other sites
Quote:
Original post by PinguinDude
I think he wanted information about a "Texture Atlas", which includes having many images in a single texture so it doesn't involve that much texture switching. What he is asking for is, how can you get one of those images tiled without the entire atlas tiling on a surface.


You're right, I should have read his post more carefully.

In that case, take a look at this and this article. It might not be exactly what you want, but it might help you get some ideas.

Share this post


Link to post
Share on other sites
No that is not quite it either, imagine you have a building, it has brick.png and concrete.png and door.png. In this case, he wants all of those textures to be loaded up in 1 big texture. The issue is that, brick.png needs to be repeated over a certain wall, for example 5 times instead of stretched over the wall.

Doing this, with normal UV coordinates will end up in the entire texture atlas being repeat.

Share this post


Link to post
Share on other sites
Quote:
Original post by PinguinDude
No that is not quite it either, imagine you have a building, it has brick.png and concrete.png and door.png. In this case, he wants all of those textures to be loaded up in 1 big texture. The issue is that, brick.png needs to be repeated over a certain wall, for example 5 times instead of stretched over the wall.

Doing this, with normal UV coordinates will end up in the entire texture atlas being repeat.


Just a quick thought (Have not fleshed out)
Options -
1. Repeat Brick.png manaully yourself in the atlas
2. Do not put repeating textures in the atlas
3. Create a repeating Atlas for all repeating textures


Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Kabakwu
Quote:
Original post by PinguinDude
No that is not quite it either, imagine you have a building, it has brick.png and concrete.png and door.png. In this case, he wants all of those textures to be loaded up in 1 big texture. The issue is that, brick.png needs to be repeated over a certain wall, for example 5 times instead of stretched over the wall.

Doing this, with normal UV coordinates will end up in the entire texture atlas being repeat.


Just a quick thought (Have not fleshed out)
Options -
1. Repeat Brick.png manaully yourself in the atlas
2. Do not put repeating textures in the atlas
3. Create a repeating Atlas for all repeating textures


that would kill the purpose of why im doing it.
im trying to save bindtexture calls.
if i have to draw more vertex its not any better.
if i have to make more atlas either.
and even less if i have to cut it from the atlas and make a new one.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kwizatz
1024x1024 is fairly reasonable for today's hardware.

I don't think repeating the texture is possible if you're sticking to the fixed pipeline, you could do it with a fragment/pixel shader though.


any idea of the best technique to put texture on a terrain ?
im making a terrain editor and the terrain is a big plane that can split when more detail needed. Look like this :

[img]http://img340.imageshack.us/img340/818/28784745tx9.jpg[/img]

each quad of the terrain is represented by a square.



Share this post


Link to post
Share on other sites
Quote:
Original post by Kwizatz
Quote:
Original post by UnIXbLueStar
any idea of the best technique to put texture on a terrain ?


Maybe this chapter of GPU Gems 2 can help you out.



actually im searching for the best way to use glBindTexture.

Some people say to put the glBindTexture call in a call list,
some says to draw all polygons using the same texture first,
some say to put all texture in an atlas(now i cant make repeat a part of it on a polygon),
some say to make a huge texture for the whole terrain (not good for a terrain editor).

this is what i mean by texturing technique. The glBindTexture call is my biggest performance eater. What method do people usually use to texture their terrains (assuming the terrain can change) ?

Share this post


Link to post
Share on other sites
I don't see how a display list is suppose to improve performance.
Most of the performance issue is because in part glBindTexture is a state change and the other is because of the texture cache ability of the GPU.

For most games, the performance eater is either blending, overdraw or some CPU overhead because of game logic and physics.
Texture bind is never stated as a bottleneck.

Share this post


Link to post
Share on other sites
Quote:
Original post by UnIXbLueStar
... some says to draw all polygons using the same texture first ...


In your case, that one, and not just for terrain, for everything.

IF you weren't restricted to the fixed function pipeline OR each of your texture tiles fitted perfectly on a terrain quad, then the atlas approach.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this