Is plataformer kit well sized for animations?
by Matthews_30 · in Torque Game Builder · 05/02/2008 (6:16 pm) · 7 replies
The thing is i want to buy the plataformer starter kit, but it has 2d art based on a 170x170pixels images in 3columns x 4rows (510x680) to make the animation work (you can donwload the demo), but i remember some versions ago that garagegames recommended to use "power of 2" for images..64, 128, 256.
can somebody comment about this i would like to buy it and tart using some recommended sized.
please any comment may help me.
thanks a lot.
matt.
can somebody comment about this i would like to buy it and tart using some recommended sized.
please any comment may help me.
thanks a lot.
matt.
#2
TGB essentially doesn't just send what you specify to the card and just error, it does all the hard work for you and you can control the process if you wish. You also have a bunch of options you can configure.
The above link is a document I wrote a while ago to detail this and more.
Hope it helps!
Melv.
05/05/2008 (10:34 am)
TGB internally processes image-data and rearranges it at runtime to suit the graphics cards constraints. It's all detailed here.TGB essentially doesn't just send what you specify to the card and just error, it does all the hard work for you and you can control the process if you wish. You also have a bunch of options you can configure.
The above link is a document I wrote a while ago to detail this and more.
Hope it helps!
Melv.
#3
05/05/2008 (10:53 am)
Melv is so full of awesome, he does GPU's work for them!
#4
this was the text i read some time ago and trigered my question.
would be better to provide a power of to dimension image, or will it be the same? i imagine if we proveide a non power of 2 size, our gpu will have to process it making the card to use more resources... or not?
matt.
05/05/2008 (7:10 pm)
Quote:There's also a limitation (on some cards) that the dimensions of these texture-objects have to be a power-of-two in size e.g. 2,4,8,16,32,64,128,256,1024,2048,4096 etc.
this was the text i read some time ago and trigered my question.
would be better to provide a power of to dimension image, or will it be the same? i imagine if we proveide a non power of 2 size, our gpu will have to process it making the card to use more resources... or not?
matt.
#5
In very early versions you had to do this yourself. We then decided that we need to take away this issue from the hands of people who don't want to deal with it but make sure that developers who wanted to fine-tune it could make appropriate changes.
What T2D does is take the bitmap, no matter what size it is and ignores the fact that it may not be a POT. Again, you don't have to provide a POT bitmap. T2D then needs to determine what frames are in this bitmap. As you know there are three different modes, FULL, CELL and KEY. These modes allow T2D to determine where the frames are within this bitmap. When T2D has determined how many frames there are and where they are in the bitmap it can then consider how to construct a texture for your graphics card.
Previously, the bitmap was just uploaded to the card where it became a texture. It hasn't done this for a long time though and what happens now is that it takes the frames and constructs a texture appropriate for your graphics card and its constraints.
One of those constraints is that textures must be a POT. Another is that there's a maximum sized texture that your card can handle. More powerful cards tend to handle bigger textures so you see values like 512, 1024, 2048, 4096 and even 8192. There are also other parameters that the user can control when creating an imageMap all of which as described in the link.
So given these constraints T2D takes the original bitmap and extracts the frames and packs them into a texture compatible with your card. Actually it may have to use multiple textures. For instance if you had a bitmap that was huge and contained more image-data than it could pack into say a 1024x1024 texture (this may be the cards limit) it would have to create multiple textures to contain them all.
This is all done in the background automatically and T2D tries to reduce wasted space or increase performance and you can select this as an option. The difference is small though.
Anyway, it means that there isn't necessarily a one-to-one relationship between your artwork and the textures on the card. This frees you up from having to worry about the targets graphics card or create your artwork for a minimum spec although you are free to control it yourself and do so if you wish. Something added, nothing taken away.
The trouble comes when you have (for instance) a single framed bitmap. In this case (if you understand above) T2D cannot do anything with a single frame. All it can do is put it in a single texture. If the original bitmap is not a POT in size then it has to create a texture the next POT in size and put the single-frame at the top-left of if. This means wasted graphics card memory from all the padding.
Again though, you don't have to worry about this as it will work but you should be mindful of the results. In most cases you are free to create your artwork as you wish and there are very few instances where you need to change your art to suit a graphics card.
With that said, developing art with an eye on size and performance details would mean you have a handle on the effects but it's not essential and certainly something that beginners don't want to be bothered with at least at the start.
T2D can be asked to dump-out the images that it is sending to the graphics card as well as a host of other memory and performance metrics. Be aware though that a bug introduced a little while ago fragged certain aspects of the engine (outside of the tools) writing to the disk so this was broken. I recently fixed this issue which affected image-maps, particles, ActionMaps etc. That missed the beta but is ready to go for the next release.
In summary, use whatever sizes you want, T2D will just "deal" with it but be mindful of the effects and try to understand the reasonable limits of graphics cards in general. The best rule is to keep your texture sizes down to the minimum you can. Try putting a large 1024x1024 texture as a particle and see that performance will drop very quickly. Try changing this texture to a 64x64 and performance will rocket.
Also, try looking at some of the image-map metrics on total size of uploaded textures as this'll give you an approximate idea on how much card memory your target audience will need.
Hope this helps,
Melv.
05/06/2008 (3:19 am)
It's really explained fully in the link above and it's hard to go into all the details here but essentially the problem is that on a card where the constraint that textures be a POT, T2D has to do some conversion.In very early versions you had to do this yourself. We then decided that we need to take away this issue from the hands of people who don't want to deal with it but make sure that developers who wanted to fine-tune it could make appropriate changes.
What T2D does is take the bitmap, no matter what size it is and ignores the fact that it may not be a POT. Again, you don't have to provide a POT bitmap. T2D then needs to determine what frames are in this bitmap. As you know there are three different modes, FULL, CELL and KEY. These modes allow T2D to determine where the frames are within this bitmap. When T2D has determined how many frames there are and where they are in the bitmap it can then consider how to construct a texture for your graphics card.
Previously, the bitmap was just uploaded to the card where it became a texture. It hasn't done this for a long time though and what happens now is that it takes the frames and constructs a texture appropriate for your graphics card and its constraints.
One of those constraints is that textures must be a POT. Another is that there's a maximum sized texture that your card can handle. More powerful cards tend to handle bigger textures so you see values like 512, 1024, 2048, 4096 and even 8192. There are also other parameters that the user can control when creating an imageMap all of which as described in the link.
So given these constraints T2D takes the original bitmap and extracts the frames and packs them into a texture compatible with your card. Actually it may have to use multiple textures. For instance if you had a bitmap that was huge and contained more image-data than it could pack into say a 1024x1024 texture (this may be the cards limit) it would have to create multiple textures to contain them all.
This is all done in the background automatically and T2D tries to reduce wasted space or increase performance and you can select this as an option. The difference is small though.
Anyway, it means that there isn't necessarily a one-to-one relationship between your artwork and the textures on the card. This frees you up from having to worry about the targets graphics card or create your artwork for a minimum spec although you are free to control it yourself and do so if you wish. Something added, nothing taken away.
The trouble comes when you have (for instance) a single framed bitmap. In this case (if you understand above) T2D cannot do anything with a single frame. All it can do is put it in a single texture. If the original bitmap is not a POT in size then it has to create a texture the next POT in size and put the single-frame at the top-left of if. This means wasted graphics card memory from all the padding.
Again though, you don't have to worry about this as it will work but you should be mindful of the results. In most cases you are free to create your artwork as you wish and there are very few instances where you need to change your art to suit a graphics card.
With that said, developing art with an eye on size and performance details would mean you have a handle on the effects but it's not essential and certainly something that beginners don't want to be bothered with at least at the start.
T2D can be asked to dump-out the images that it is sending to the graphics card as well as a host of other memory and performance metrics. Be aware though that a bug introduced a little while ago fragged certain aspects of the engine (outside of the tools) writing to the disk so this was broken. I recently fixed this issue which affected image-maps, particles, ActionMaps etc. That missed the beta but is ready to go for the next release.
In summary, use whatever sizes you want, T2D will just "deal" with it but be mindful of the effects and try to understand the reasonable limits of graphics cards in general. The best rule is to keep your texture sizes down to the minimum you can. Try putting a large 1024x1024 texture as a particle and see that performance will drop very quickly. Try changing this texture to a 64x64 and performance will rocket.
Also, try looking at some of the image-map metrics on total size of uploaded textures as this'll give you an approximate idea on how much card memory your target audience will need.
Hope this helps,
Melv.
Associate David Montgomery-Blake
David MontgomeryBlake