Page 1 of 1

A Lot of Textures?

PostPosted: Tue May 24, 2011 5:55 am
by bnewton81
I'm having trouble putting textures into perspective, as far as how many is a lot. What do textures effect? Like size of the overall age of course, but does that slow down performance or just take longer to download? I feel the pain of game designers having to work within such tight restraints. Is it only the overall size of your textures that matter or the number of individual textures?

Re: A Lot of Textures?

PostPosted: Tue May 24, 2011 7:22 am
by Aloys
I understand your frustration, it is a pretty complicated subject. :/ It would deserve a full wiki article.
When you create an Age you need to set for yourself a texture 'budget' where you specify a maximum total weight of textures that can be handled by the graphic card of the computer. Uru targets cards with 64mb of memory; so your total texture budget should be less than that number: 64 megabytes. It needs to be less because there are also the textures for the avatar, as well as the Ki, and other interface stuff that needs to fit. To be safe you need to aim for around 40 megs. Obviously Uru is 'old' and recent cards have much more memory; but you want your Ages to also work for older cards.
To calculate that number you need to measure the actual weight of the textures files. This depends on both the number of textures and also the size of them. (For instance if you have three 10x10 textures, or one 30x30 texture that is exactly the same weight.) To give you a more precise idea, a texture of 1024x1024 weights around 3 megabytes. But that is for a non-compressed texture however; PyPRP compresses the textures during the export so that they weight much less. The compression depends on the texture, but usually a compressed 1024x1024 texture weights less than 1mb. Textures with an alpha channel for transparency are 30% heavier.

Have a look at the Cyan textures PRPs (with a tool like PrpTool). They will give you a good idea of what size of textures to use. All of their PRPs weights less than 50megs; except for the City. And most of them are actually bellow 40megs. If your textures PRP file is larger than 40megs you need to cut down on the textures. :)

Side note:
In theory you do not need to worry about the total size of the textures in the whole Age because there are ways to only load the textures that are displayed in a specific area, and not worry about the textures at the other end of the Age. But these are advanced techniques (like vis regions, occluders, or page swapping) that we do not use often. So unless you plan to use that you do not need to worry about it. Just calculates the weight of your textures for the whole Age; it's safer.

If somebody else has some light to shed on this, please do. That's an important topic that isn't discussed a lot.

Re: A Lot of Textures?

PostPosted: Tue May 24, 2011 9:53 am
by tachzusamm
Some words about the "compression" PyPRP does during the export.
Well, this compression is not compareable to JPEG or PNG compression, which depends on the content of the image.
The compression that is applied is either DXT1 (no alpha) or DXT5 (with alpha). And the size of the texture, when exported, does not depend on the content - only on the dimensions.
So, a 512 x 512 DXT1 texture for example always has the same size in bytes, no matter how it looks.

To get an impression about the size in bytes of your textures, just have a look into your texture cache folder below your dat directory. Those are the sizes in bytes finally exported (well, plus some bytes header inserted by PyPRP for the cache management (or other purposes?) - but those few bytes can be ignored). You will see that textures compareable in pixel size will have nearly the same file size. Grouped by alpha / non-alpha, of course.

By the way, using JPEG images does not help; even heavily compressed jpeg images will be converted to DXT1 for URU.

Regarding the "URU is designed for GPUs with 64MB Ram" rule: I assume that computers with 64MB video memory are really a minority now. It's my personal opinion that it's okay to assume that 128MB is the average lowest minimum today. But, as said: My opinion.

(Maybe we should start a "Which graphics hardware do you currently use for playing URU" poll thread? Somewhere. Maybe here.
I did such an attempt 4 years ago during Myst online in a german forum, and there was only one person using a 64MB card. And I doubt his computer still operates properly.)


Some techno-babble (not really needed to understand, just for reference):
http://en.wikipedia.org/wiki/S3_Texture_Compression
http://www.fsdeveloper.com/wiki/index.p ... _explained

EDIT:
I forgot to answer this question:
bnewton81 wrote:What do textures effect? Like size of the overall age of course, but does that slow down performance or just take longer to download?

Normally, this just causes a longer download, or more precisely, load time for the age. EXCEPT the whole textures do not fit completely into the graphic card memory.

Re-using textures whereever possible (e.g. the same bark texture for multiple trees, just making them appear different with some vertex painting) does help a lot by the way.

Oh, and you might want to read this:
viewtopic.php?f=7&t=4099&start=30#p45838

Re: A Lot of Textures?

PostPosted: Tue May 24, 2011 10:18 am
by Aloys
Very useful infos here; thanks for those. I'm not too familiar with the DXTC compression schemes so I'll have a good look at those links. The FSdeveloper article in particular looks quite in-depth. I'll update the wiki with all this tonight.

Regarding the "URU is designed for GPUs with 64MB Ram" rule: I assume that computers with 64MB video memory are really a minority now. It's my personal opinion that it's okay to assume that 128MB is the average lowest minimum today. But, as said: My opinion.

I agree, my personnal rule is to target more or less the same system spec requirements just to be safe and think of the people with really old computers. :) But you are right that Uru was released in 2003, and GPUs with 64megs or RAM are a real minority now. Many of them today have litterally 10x that number.

Re: A Lot of Textures?

PostPosted: Tue May 24, 2011 5:02 pm
by Aloys
I rewrote and expanded the relevant section in the Performance Optimization wiki page.
If anyone has anything to add or change, be my guest. :)

Re: A Lot of Textures?

PostPosted: Tue May 24, 2011 6:46 pm
by Branan
40MB for textures was a reasonable limit back when Uru was introduced. If you want to keep compatibillity with everyone still running Uru on ancient hardware, it's a good target. Those would be cards with 32MB-64MB of RAM.

Most modern cards have at least 256MB, even fairly low end ones. High end cards can have up to 1GB. I personally wouldn't worry too much about texture PRP sizes as far as performance goes.

Re: A Lot of Textures?

PostPosted: Tue May 24, 2011 7:10 pm
by bnewton81
Very useful info guys. I think I am not going to worry about the texture size too much now. I doubt many ppl today are using computers with less than 128mb of mem. But I will probably still employ visregions and occluders and such. I am thinking that i could save lots of space by having a couple of textures with alpha one for scratches, one for dust and the like, and use them on every texture requiring that detail. No one will be able to tell that two dust overlay textures are the same. Also i can save the "overlay" textures in a folder and use them for every age as a base set of age textures. Just had this idea. Thanks for the help.

Re: A Lot of Textures?

PostPosted: Tue May 24, 2011 7:47 pm
by Calena
I'm glad you asked this question, because this is exactly the information I needed, too. I've been trying so hard to keep my texture file below 40 Mg I learned to put two or three textures on one photo and map to which one I needed. Great trick, but even better that I don't have to do that anymore.

Thank you :P .