Jump to content

Technical question about textures


Recommended Posts

So, if you have multiple parts that use the same texture, does the game know to only load that texture once, or does it reload a new instance of the same texture for each part?

Here's where I'm going with this:

If I understand correctly, a lot of the memory usage in the game is from loading textures.  Each part in stock, and each mod loads a series of textures to wrap around its parts, and each of those textures eats up some memory.  It seems to me that there are only so many variants of textures that the game really needs.  Some kind of insulated material, various metal textures, engine bell-like textures, etc.  

So if there was a community texture palette that was, say, 2048X2048, but contained a whole bunch of samples of various materials to wrap your models in, would it ultimately save memory?  I get that some people are going to want to add unique elements to their mods, but for mods that just need a stock-alike look, would this be more effective than each part or mod loading its own unique texture?

Edited by JJE64
Link to comment
Share on other sites

I believe that yes, it only gets loaded once.

@NecroBones uses this to great effect in the SpaceY mod:  lots of parts, but they share textures so that the memory footprint is quite lightweight considering the amount of content in the mod.

Link to comment
Share on other sites

Okay, so we have various community mods, why not a community texture map?

i think if mod developers were to sign on to such a thing, it would dramatically reduce the game's memory requirements. 

An added bonus would be a serious amount of continuity between the visual appearance of parts, as well. 

Edited by JJE64
Link to comment
Share on other sites

4 hours ago, JJE64 said:

Okay, so we have various community mods, why not a community texture map?

i think if mod developers were to sign on to such a thing, it would dramatically reduce the game's memory requirements. 

An added bonus would be a serious amount of continuity between the visual appearance of parts, as well. 

In theory one has already been started: the stock textures. A few mods rely on stock textures, so it's being taken advantage of to a small degree. (Though admittedly, until the Porkification of the rocket parts, the stock textures themselves are  a bit disparate other then the MK2 and MK3 line of parts. The Size-3 parts are sorta inline with one another, I think. Sizes 0-2 are all over the place though.)

As for why a community texture map hasn't happened (and probably won't): Artistic/creative freedom.

Some users/modder get slightly miffed when asked way a mod isn't more stock-a-like. Also, textures aren't a one size-fits-all aspect (unlike functional plugins that have defined uses and function for conformity.) You'd have to get modder to also agree on part design practices and such. That's not gonna happen (at least not on a very broad scale). Everyone has their own vision for their mod. Stock/common textures may not cut it.

There would be benefits, of course, like reduced workload (not as much texturing time, and some modder admit they suck at texturing as well). However, I find it hard to see a community-agree texture map. It's just too restrictive. Also might wind up being a little bland if EVERYTHING started looking too similar. And of course, there's the management of such an undertaking as well. It won't be easy by any means at all.

Lastly, some user might not like the idea of need a texture pack as a dependencies if they're using a small mod that doesn't use much from such a pack. Imagine needing to download an install like 100MB or more of textures to use a mod that using like 1% of the packs content. Users who know how can purge the unneeded textures, but it seems a lot of user depend on something like CKAN to manage their mods. Those who do probably can't/won't bother with manual mod tweaks (and that's assuming CKAN won't complain about an installed mod not matching it's database...)

Yeah, you can have mods include only the textures they use, but it sorta defeats the purpose of having a centralized texture pack. (Imagine if the texture pack got updated and the same texture file from 2 different mods are different for some reason.)

Link to comment
Share on other sites

Some sort of Community Texture Pack would really be able to reduce the memory size (a lot). Or at least at the first look.

You are right, that parts created with the "CTP" would all share the same style and may also look more stock-a-like. But there are some downsides of this concept:

  1. Every modder has their own view on what is a good texture and what is not. Many have developed their own distinctive style that is unique for the mod/author and they don't want their mod to look generic and like all the other mods out there.
  2. The models would have to be more detailed. Many details of the models are created with the help of the texture. And many textures are specifically designed to fit one model. One would have to model the details and increase the number of plygons per part to achieve the same level of detail with generic textures.
    And i doubt that every detail can be create only with generic textures (e.g. texts, special icons)
  3. There would have to be one material for every texture that is used in a model. Complex mods might need more than 10 materials for only one part. This would introduce a computational overhead. So we have some kind of Memory Usage to Computing Time tradeoff here. And computing time is better spend for the physics simulation. 
  4. There would have to be a lot of tileable textures to account for every possible situation. And there will be more and more over the time when modders add new ones that fit with their specific case. This would make the "CTP" really big.
  5. Many mods would only need to use a small portion of all the textures provided by "CTP". Especially when only a few mods are installed, the memory usage will be higher with "CTP".

I do not want to talk this down. It is a good idea, but i doubt that it would be feasible. 

 

 

 

 

Edited by Nils277
Link to comment
Share on other sites

Nils277 pretty much sums it up.
Key Points:
1) KSP restricts one material per mesh. - This complicates things greatly when it comes to shared textures. And the additional overhead of creating complex model meshes to match pre-defined textures is not worth it.
2) Artistic License.
3) Most good mods already share textures amongst their own models/assets within the mod.

I'll add this: A model is not a model without a texture (in my mind anyway) which brings us back to 2).
 

Link to comment
Share on other sites

17 hours ago, Snark said:

I believe that yes, it only gets loaded once.

@NecroBones uses this to great effect in the SpaceY mod:  lots of parts, but they share textures so that the memory footprint is quite lightweight considering the amount of content in the mod.

Ven does that as well, in fact at one point (maybe still) his stock part revamp actually reduced the memory load if you removed the stock textures.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...