Archived

This topic is now archived and is closed to further replies.

huge textures

This topic is 4961 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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."

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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."

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites