huge textures

Started by
8 comments, last by DuckWizard 19 years, 11 months ago
I''m using a quadtree (half an octree) to render a heightmap terrain. Whenever I refer to "quads", I''m talking about 16x16 chunks of vertices, not polygons. Since I''m using vertex arrays to render each quad, there''s no way to get different textures on the landscape (since you can only use one texture per vertex array). So I thought, maybe I''ll just make a single, highly detailed texture for each quad. If I do this, it means I''m going to have the equivalent of a texture between 4096x4096 and 8192x8192. Is this a really bad idea? I think my computer will probably be able to handle it, because I have a ridiculously large amount of memory on my video card (256MB)... but will the average gamer''s PC be able to handle so much texture data? Anyone have a better way to do multiple textures with vertex arrays? I don''t really want to do a separate pass for each texture I want to use, because that would be pretty slow I think. Wouldn''t it? Thanks, -Jeremy
Advertisement
4096x4096x4 (32 bpp) is already 64 MB.
Unless your target systems are GF4 cards, I wouldn''t recommand it. You should go for 512x512 textures, using multitexturing.
You can use multi-texture with vertex arrays.

I believe its done like:
glClientActiveTexture(GL_TEXTURE0);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(...);
glClientActiveTexture(GL_TEXTURE1);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer(...);

etc.

Hopefully someone will correct me if im wrong.

Waramp.

"Before you insult a man, walk a mile in his shoes.
That way, when you do insult him, you''ll be a mile away, and you''ll have his shoes."
Waramp.Before you insult a man, walk a mile in his shoes.That way, when you do insult him, you'll be a mile away, and you'll have his shoes.
WarAmp: Even if multitexturing works, that means I can only use as many textures as I have texture units - 3 or 4 if it''s a good video board. That''s not enough texture variety.

Thanks for the suggestion though.
Well, yeah, that''s why you change the textures every once in a while, you don''t use the same textures all over.
I see what you''re saying.. so each quad can only have 2 or 3 textures... I can live with that.

I''ll try it right now. Thanks for the tips y''all.
it should be noted that currently ATI cards can only handle a max of 2048*2048 texture size.
Ya only 2 or 3 textures per pass.

I have a gf2mx400, but I make N + 2 (roughly) passes on my terrain, where N is the number of texture layers the terrain has applied to it. Of course, I don''t draw a ''quad'' if it doesnt need that specific Texture, but it''s still a quackload of passes over the terrain.

Clicky


and yes the framerate is crap. Hoping VBO''s will help me out once I get them implemented.

Waramp.

"Before you insult a man, walk a mile in his shoes.
That way, when you do insult him, you''ll be a mile away, and you''ll have his shoes."
Waramp.Before you insult a man, walk a mile in his shoes.That way, when you do insult him, you'll be a mile away, and you'll have his shoes.
Jesus H. Christ in a chicken basket. That''s gaw-geous!

What kind of framerates do you get with those 3D trees?

And how do you implement the multiple passes? I''m trying to use multiple passes by rendering the terrain a few times with different vertex colors (with alpha) but I can''t get the glDrawElements command to use the color array (see my other thread)

Thanks,
-Jeremy
On my gf2mx, framerate is 8-20 fps depending on # of trees. Each tree is roughly 600 triangles. They are stored as display lists, and lots of glTranslates, glCallList are done. Animated using a special modelview matrix to 'rotate' them based on the wind amount and the height of the vertex.


As for the multiple passes on the terrain, look no further than this classic:

Creating detailed terrain under severe limitations




Waramp.

"Before you insult a man, walk a mile in his shoes.
That way, when you do insult him, you'll be a mile away, and you'll have his shoes."


[edited by - waramp on May 18, 2004 10:41:57 AM]
Waramp.Before you insult a man, walk a mile in his shoes.That way, when you do insult him, you'll be a mile away, and you'll have his shoes.

This topic is closed to new replies.

Advertisement