Elvas Tower: Texture resolution and performence - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Texture resolution and performence Wagon for OpenRails Rate Topic: -----

#1 User is offline   Hamza97 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 29 December 2017 - 06:49 AM

Couple of questions regarding a wagon that i am about to complete:

1) The body of wagon is textured using 2k maps. I intend to release the wagon with slight differences i.e. Slight color variation, weathering etc. I am thinking a using a 4k map, with 4 2k maps embedded in it like sort of texture atlas with all the variations i mentioned above. The problem is that i am doubting whether using a 4k maps is okay with regards to performance.

2) This question is not related to this particular wagon but overall will be useful. Assume that there is two separate wagons in two folders WagA and WagB. Both wagon uses an identical alpha blended texture which is there in both folders. My question is that while using both wagons, will OR load the said texture only once, or will load it two times. Hope i am able to explain the question correctly... :sweatingbullets:

Any advice will be useful.... :sign_thanks:

#2 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,350
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 29 December 2017 - 11:17 AM

First, AFAIK OR identifies each texture by \foldername\texturename. What this means is you put the same texture in several folders, all those copies will be loaded to you GPU RAM. OTOH, if you put all the .wags that use that texture into one folder then the texture is loaded only once. This can be important with very large textures.

What I do to avoid this problem is this: I uncompress each of the .s files and for each one find the rows where the .ace files are listed, change the name(s) of the textures that are unique to that model (leaving the generic textures as-is) and if needed, saving hte .s file under a unique name. IOW, if the original texture is boxcar.ace and the builder has made several cars, each in its own folder and each holding boxcar.ace where the image is actually unique to each folder, I'll change that name to something about the individual car, such as SP_45987.ace in one .s file and SP_45932.ace in the other. I then rename boxcar.ace in both folders so they match the name I put into each .s file. I also rename the .s and .sd files as well as the folder names. At this point it becomes safe to move the contents of one folder into the other. Now both models have the same \foldername\texturename for everything they share in common.

Here is a small example:
"\Trainset\NE_ATSF_CE-1\1843-R.ACE"
"\Trainset\NE_ATSF_CE-1\2104-R.ACE"
"\Trainset\NE_ATSF_CE-1\ATSF_Caboose_1843-R.s"
"\Trainset\NE_ATSF_CE-1\ATSF_Caboose_1843-R.sd"
"\Trainset\NE_ATSF_CE-1\ATSF_Caboose_2104-R.s"
"\Trainset\NE_ATSF_CE-1\ATSF_Caboose_2104-R.sd"
"\Trainset\NE_ATSF_CE-1\ATSF_markers.s"
"\Trainset\NE_ATSF_CE-1\ATSF_markers.sd"
"\Trainset\NE_ATSF_CE-1\AdlkMkr.ace"
"\Trainset\NE_ATSF_CE-1\CABInt.ace"
"\Trainset\NE_ATSF_CE-1\NE_ATSF_1843-R.wag"
"\Trainset\NE_ATSF_CE-1\NE_ATSF_2104-R.wag"


The original folders where named something like ATSF_Caboose_1843 and ATSF_Caboose_2104. The new folder, named after teh class name the railroad used, is NE_ATSF_CE-1. If I do reskins I'll be able to drop them into this folder so all of the identicallyu designed cars will be in the same folder.
=========================

Second though, when you are creating new textures, give some consideration to how much area each pixel will cover. In the ideal the texture with the lettering should have the lowest area/pixel. In the past a 512x512 texture would be applied to a typical North American boxcar, giving a ratio of 1 pixel for each 0.94 inches square. Small lettering / numbers could be read but were not entirely clear. Going to a 1024x1024 sized texture changed the ratio to 0.47 inches square and everything is now very sharp. IMO there is no need to use that small ratio on all models.

Hope this is useful.

#3 User is offline   Hamza97 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 29 December 2017 - 09:57 PM

Hmmmmm, that would mean using a 4k would probably be overkill. Therefore i have decided to use a 2k atlas and reduce the individual wagon texture to 1k. Thanks for advice.... :sign_thanks:

#4 User is offline   ErickC 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,001
  • Joined: 18-July 17
  • Gender:Male
  • Location:Hastings, MN, US
  • Simulator:ORTS
  • Country:

Posted 31 December 2017 - 09:19 PM

The ideal texture resolution depends entirely on the mesh resolution. You have to keep them congruent if you want the model to look good. If you have built the model to be viewed at a very close distance, and it has loads of intricate details, but you apply a low-resolution texture to it, such that the pixellation becomes obvious where the difference between a higher and lower resolution model becomes significant, then you need to up the texture resolution. I cover this in detail at this FSDeveloper thread here. In short: you want the textures to start looking bad at around the same distance that the model starts to look bad.

Also remember that one large texture is more efficient than many small ones (if the parts using it can be combined into a single drawcall). If the parts using a different texture can't be collapsed into the main mesh (such as a wheel), I suppose it doesn't matter if there's a separate texture because it's going to be a separate drawcall no matter what you do. But you're using up a lot less storage space if everything is in one image. This becomes significant when we consider memory usage... using too much is a good way to cause a game to crash.

#5 User is offline   Hamza97 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 606
  • Joined: 01-March 15
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 01 January 2018 - 05:14 AM

Thanks for the advice, I have completed the wagon and uploaded it here in file library too, my first contribution.... :sweatingbullets:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users