• Advertisement
Sign in to follow this  

Use very large images, max texture size?

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

Hi

Im using HGE engine (which uses direct X) for a game. In it I use HUGE image-files for my maps-background.

 

If a map-image is 8000x6000 pixels (or whatever) should i split it up and load those seperately? (lets say into 2048x2048 images) Some graphic-cards cannot handle very large images (textures) right?

 

Or would that be handled automatically by direct X? The engine is kinda old so i dont have anyone to ask at the specific engine-forum.

 

Is 2048x2048 size ok for most cards? Manually dividing into 1024x1024 would be a shore...

 

Thanks!
Erik

Share this post


Link to post
Share on other sites
Advertisement

Is 2048x2048 size ok for most cards?

Yep.
 

Manually dividing into 1024x1024 would be a shore...

Use ImageMagick - it's a very widely used command-line tool that allows you to batch-process many complex image operations; I use it alot (in simple ways) for batch-processing my game's assets.
 
After installing ImageMagick on your computer, you want the 'convert' command, and want to use 'crop' (but without any specific position) to crop out each piece of your background into a seperate file.

 

I like to use ImageMagick in empty folders with only the image I'm working on, because it'll output dozens of new images from your background.

So create an empty folder, copy your background into it, shift+right-click on the folder in Windows Explorer and select "open command window here", paste in the below command, and hit enter.

convert MapBackground.jpg -crop 2048x2048 "MapBackgroundPiece.jpg"

Replace "MapBackground.jpg" with your background's filename. It can be .png or some other format if you want; and you can change the output filename ("MapBackroundPiece.jpg") to whatever you want - it'll have a number appended to the base filename for each piece that is generated.

Share this post


Link to post
Share on other sites

I know nothing about the engine you're using, so I don't really know if it has the same limitations as Direct3D or if it automatically splits huge textures (unlikely). If it doesn't split the textures automatically, then it has the feature level's limitation which is:

  • D3D_FEATURE_LEVEL_9_1 - 2048x2048
  • D3D_FEATURE_LEVEL_9_2 - 2048x2048
  • D3D_FEATURE_LEVEL_9_3 - 4096x4096
  • D3D_FEATURE_LEVEL_10_0 - 8192x8192
  • D3D_FEATURE_LEVEL_10_1 - 8192x8192
  • D3D_FEATURE_LEVEL_11_0 - 16384x16384
  • D3D_FEATURE_LEVEL_11_1 - 16384x16384
  • D3D_FEATURE_LEVEL_12_0 - 16384x16384
  • D3D_FEATURE_LEVEL_12_1 - 16384x16384

So, as you see, you could use up to 4096x4096 textures and most GPU's would still support your game.
 
PS: Trying to create a 8000x6000 texture in anything less than 10.0 would fail, so it would be a good idea to split. I suggest splitting to four 4000x3000 textures, unless you need to support Direct3D 9.2.
 
PS2: Source: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx#Overview

Edited by LHLaurini

Share this post


Link to post
Share on other sites
I would also play around and try different sizes, then you can pick the one with acceptable looks and performance (balance). Using larger textures without noticable difference would be a waste.

Share this post


Link to post
Share on other sites

I would also play around and try different sizes, then you can pick the one with acceptable looks and performance (balance). Using larger textures without noticable difference would be a waste.


I partly disagree. Let's say the developer has a 1080p screen, but the player has a 4k one. Greater textures would be a waste on 1080p and smaller screens, but would pay off on greater screens. That's why games should support multiple texture sizes as a "quality" option.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement