Archived

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

Are textures are store in video card's ram?

This topic is 5334 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

Ok, I''m working on a game like starcraft. And we want it to be in 2d. BUT, for all my units, I will have 520Mo Textures to load for all units. (56 units) So first, the question is : Are those textures will be put in the ram of the video card? (So no body have a card of 520DDR ) Second : How starcraft have put ALL theirs sprite in the ram !?! They have a lot on animation. And 16bits texture. (me I want 24bits...) So, if there is no way to make it, we will make in in 3d. BUT, we really want it to be in 2d, like sc, but using OpenGL for cool effects.

Share this post


Link to post
Share on other sites
quote:

BUT, for all my units, I will have 520Mo Textures to load for all units. (56 units)


?!!

You should seriously reconsider the design of your graphics system...

Share this post


Link to post
Share on other sites
Thats not an answer to the question.

I dont have a graphic system for this game,
because I want to know first how i will make it.

Share this post


Link to post
Share on other sites
If you use texture objects, then as many textures as possible will be cached in video local memory, using an LRU algorithm.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
Right. And if you try to load 520MB worth of textures, then, well, evil things will happen on a standard consumer level PC.

Point is, that if you need to load that many textures for a tile based 2D game, then there is something fundamentally wrong with your approach. There is no way this is going to work on a standard PC, especially if all units are visible at the same time (or in the same level). You should investigate into compression algorithms.


[edited by - Yann L on May 6, 2003 10:15:41 PM]

Share this post


Link to post
Share on other sites
The textures that can fit in the video card will fit, and the rest will go into system memory...

I agree with Yann though.. i think the reason he didn''t answer was becuase there is no way you should have 520mb of textures. Either use low depth sprites, low resolution sprites, or fewer sprites / frames of animation. If you really need all that detail, 3D would definitely be the way to go... that''s my 1.5 cents

Share this post


Link to post
Share on other sites
and no one have idea how starcraft made it?
Because me I have 3 layer for a unit.
For all sprites. For all animations.
layer:
#1 is the shadow. Blending mode
#2 is the unit, 32bits, alpha value for transparence
#3 is the color to be put on the unit. Its color spot, blending in white and just change the color.

So the layer things work perfectly, but it take :
24 + 32 + 24 bits pictures per frame for each unit....

And what is LRU algorithm. ????

Share this post


Link to post
Share on other sites
quote:

So the layer things work perfectly, but it take :
24 + 32 + 24 bits pictures per frame for each unit....


Ouch... Well, set aside that you generally don''t need 24 bit for a shadow, you should only have a single layer per unit/animation frame: the 32bit one (your number 2). I would also suggest compressing it, perhaps using 8bit indexed with local palette.

Anyway, the shadow and selection colour is created on the fly, by manipulating the original 32bit unit image. OpenGL can do that for you, by using different blending and texture combiner setups.

quote:

And what is LRU algorithm.


LRU = least recently used. Check out Google, it''s a commonly used caching algorithm.

Share this post


Link to post
Share on other sites
hum. I will make it in 3d.
Stay the engine I have.
Because if i make it in 2d, I will not get better than sc..
So we are in 2003, so 3d is more apropriate

Share this post


Link to post
Share on other sites
Because I wanted full detail on them.
I explained the layer thing, and I need 16 angles for each unit (for smooth rotating), I need 6 to 7 frame for the animation (probably more) per unit.
So just make mathematic :

64Pixel * 64Pixel * (24bits + 32bits + 24bits) * 6Frame * 16View * 56Units
= 1 761 607 680 bits
= 1 720 320 Kb
= 1 680 Mb

And after some optimisation and sacrefice, I arrived to 520Mb
Probably its because I wanted them 64x64 pixel texture. Better resolution than SC, (800x600) but the unit same size in the screen. So I had no choice to make texture 64x64 for unit like tank.

But now, I''m making them in 3d..

Share this post


Link to post
Share on other sites
Ah, you mean 520 megabits. In that case, it's only 65 megabytes, which may be possible on a 128MB card, although it still seems excessive. Hint: the distinction is important; generally megabits are only used when referring to network data transfer (as in Mbps)

Anyway, if you still want to do this in 2D, there are some pretty significant improvements which should get the size down:

As Yann L mentions, you can get the pixel depth down from your massive 80 bits size down to 32 or even 8.

Second, if some units are larger than others, you should use appropriately sized textures. There's no reason to make them all 64x64 just because the largest units are.

[edited by - benjamin bunny on May 7, 2003 9:28:21 PM]

Share this post


Link to post
Share on other sites
hum... interesting.
So you mean I have a color pal of 256 colors, and my 8bit unit (256 col) that refer to the palette.

So all the colors of the unit will be find in that pal, excep if I have a clown unit lol. (no way ), so, Can I set a palette for each unit in ogl and use 8bits textures??

Share this post


Link to post
Share on other sites
Hey guys, sorry if my english is poor.

Thats why I dont always understand things, its not I''m not a good programer, Its generaly I dont understand the meaning of your sentences

Share this post


Link to post
Share on other sites