Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Make textures in high or low resolution

Author
Message
Tower
15
Years of Service
User Offline
Joined: 13th Sep 2009
Location: London
Posted: 26th Mar 2010 23:40
You make a game and you want it to run in high and low resolution mode. You give the player the option to choose which mode he wants. When you make the textures which mode you should work with? Should you make the textures in a high resolution (i.e. 1280 x 1024)? Is so, and then you run the game in a low resolution mode will it work? I know some may laugh at my question but I’m novice and I need to know. I suppose you need to make the textures in the highest possible resolution and then they’ll probably work even with low resolution graphic cards.
Dia
19
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 27th Mar 2010 06:07
the resolution you 'make' your textures in doesn't matter really does it?

I mean a 256x256 texture will take up the same amount of space whether or not you run in 300x200 res or 1280x1024.

with most applications I create my textures in as big a size as I can, then squash it down to size depending on the mesh that is being textured, and the definition I need to display.

For example, texturing a soldier figure:

if it is to be used in a RTT/RTS type game, then it is unlikely to be zoomed in on very much, and hence not a lot of definition is necessary, so I would probably use a 512x512 texture (or even smaller)

if it was to be in a FPS then chances are that the soldier would at some stage be zoomed in on quite highly, and so would require a more detailed texture (1024x1024 or bigger)

the good thing (or bad, depending on your point of view) is that a lot of the directx interface means that you dont have to worry about it too much. Your mesh and texture goes in one end, then some magic occurs inside the code, and then it appears on your screen

This is not the Sig you are looking for....
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Mar 2010 10:51 Edited at: 27th Mar 2010 10:52
@Tower: Don't feel bad for asking questions. Everyone has to learn somehow

The thing to learn here is that texture resolution and screen resolution are two completely separate things. You can make a texture with a size of 2048x2048 and expect it to run just as well on a 640x480 screen as well as it runs on a 1280x960 screen.

However, something to keep in mind is that older graphics cards usually have less video memory, and so really big textures might be too much for them to handle. Also, using high screen resolutions means that the GPU has to think about many more pixels, so the best way to be old-graphics-card friendly would be to offer two different options like Screen Resolution, and Texture Quality. That way, high-end computers could run your game on the highest screen resolution with the largest textures, and low-end computers won't choke to death on the graphics.

Edit: typos
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Mar 2010 12:36
As has already been stated, screen resolution and texture quality aren't related. But, as Kira Vakaan says, you do have to make a balanced decision between nice high-rez textures which will make older GFX cards choke and low-rez textures which will run OK on them, but not take advantage of the abilities of new GFX cards.

If you give the user the option of setting the texture quality to high or low on the options screen, you can supply two (or more if you feel like it) textures with a model.

One can be a 1024x1024 texture (or bigger) for the Hi-Q version and the other 256x256 for Lo-Q.

One tip that I have used before is to save textures as 256 colour images as they are much smaller. With many models, when textured you can't tell the difference.

This gives you the option of the Lo-Q texture also being 1024x1024 but being only 256 colours a bit easier on lower end GFX cards.

TDK

Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Mar 2010 12:42
Quote: "One tip that I have used before is to save textures as 256 colour images as they are much smaller"

That's an interesting thought. But wouldn't it consume an equal amount of video memory, as the texture is interpreted before it's dumped into the RAM?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Mar 2010 12:57
Quote: "wouldn't it consume an equal amount of video memory, as the texture is interpreted before it's dumped into the RAM?"


I don't think so - if you are using uncompressed BMP files.

What you are saying is true for compressed files - like JPGs - but of course you can't save a 256 colour JPG - they force a switch to 16 million colours when you save them.

A 150K JPG uncompresses to around 3.5MB but that same texture saves as an uncompressed 256 colour BMP image which looks identical but is only 1.2MB.

All I can say is that in the past, programs certainly seem to be less sluggish when 256 colour textures have been used.

Try it yourself.

TDK

Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Mar 2010 13:02
Huh, to be quite honest, I'm pretty ignorant as to how DirectX stores textures in memory. I'll take your word for it
Tower
15
Years of Service
User Offline
Joined: 13th Sep 2009
Location: London
Posted: 27th Mar 2010 14:27
Thank you all for your response. Very helpful. I didn’t know that you can make two or more textures (high or low quality) of the same model.
For example you want to make a texture of a Temple, a desk and a user interface button. Does this mean you can make 3 textures of the Temple with (1280x1024,860x640 and 460x360 resolution),three textures of the desk (1280x1024,860x640, 460x360),and 3 of the user interface button (1280x1024,860x640, 460x360).Then you give the player the option to select the resolution in the options menu.
When you make a texture of a small object (i.e. a user interface button) do you have to make it as small as it appears on the game or you make it big and then you squash it down to size using Dark Basic Pro commands?
luskos
17
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 28th Mar 2010 08:35 Edited at: 28th Mar 2010 10:00
For example: Resolution is 640x480, low q textures(256x256), ugly result,or 1280x1024, high q textures(1024x1024), beautiful result.Complicated games can also change textures depending on LOD.About the texture of the small object, you can make it as big as you want.Let`s say you want to make icon for some character in your game, you can make it 32x32 pixels and paste it like that, or you can make it 64x64 and scale it.If you paste the two versions next to each other they will be with the same size on screen.Just 64x64 version will be pretty, because it`ll be more detailed.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 28th Mar 2010 16:22
@Tower: Something to keep in mind about texture sizes, is that the GPU works best with powers of two. So using a texture with a size like 256x256, or 512x512 will probably work smoother than something like 640x480, or 800x600.

Also, you can texture any object of any size with any texture of any size. What that implies is that you can have as many versions of as many textures as you want, and those textures can be any size you want (preferably a power of two). DBPro will automatically scale an stretch the texture so that it fits on the object just right. That also means that you could do some optimization in a scenario like this: You have a small object that will never take up more than 1/4 of the screen, so you know that your texture doesn't have to take up 1/4 of the screen. If your texture will always be viewed at or less than a certain size, you're wasting detail by making it bigger than that size.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Mar 2010 22:26 Edited at: 28th Mar 2010 22:28
Quote: "Does this mean you can make 3 textures of the Temple"


Sure, but as Kira Vakaan says you want to keep them the right dimensions.

Make the first 1024x1024 texture and save it as Temple_Hi, resize it to 512x512 and save that as Temple_Med and then resize the first one again (to reduce quality loss) to 256x256 and save that as Temple_Lo.

You would load the object and depending on the user's texture quality settings load the required texture:



If you do this, out of interest, try saving 256 colour images for all three and see if you see any difference compared to the saving in file sizes.

TDK

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Apr 2010 07:36 Edited at: 6th Apr 2010 07:44
Once you have a UV map texture for an object, you can resize up or down to your hearts content as long as, like TDK man says, you keep the same aspect.
One simple rule with computers and compression, the smaller the initial uncompressed file, the smaller it will be compressed. So reducing your images to 256 colour, or less , will always reduce overheads. Common sense when you think about it really.
I still remember working with 8,16 and 32! colour palettes. Amazing what you can do with em really, well in Dpaint 4 lol . I used to reduce all my textures to minimum 256 colour when I coded in DB classic. Don't bother so much nowadays, but that's only because I am spoiled by modern hardware!
Edit - Oh! I almost forgot, somebody said 640x480, 256 colour textures = ugly. I personally think running your 3d app in 320x200 looks uber cool and really retro! if you have never tried it, have a look lol, fair enough, it's not what you want these days, but if you want a retro look what could be better! It's like running your game in dosbox emulator

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2024-09-28 16:34:35
Your offset time is: 2024-09-28 16:34:35