Cerez Posted June 6, 2015 Share Posted June 6, 2015 This is a bit of an expert query, but I'm wondering if anyone knows the answer. I'm trying to find out what is best practice for using image files for player model textures in JKA in consideration to performance. Specifically I'm interested in four closely related questions: 1. When loading a texture for a section of the model, does JKA load the entire image file that's named as the source, or only the area of the image file that corresponds to the model section, based on the UV Map? 2. If the same image file is used on multiple sections of the model for the textures, will JKA reload the same image file each time, or keep it in memory and simply re-use it on each model section? 3. When using cull twoside, is it important to cover only the minimum two-sided texture area required? 4. How much of an impact do player model texture files make in practical terms on the speed of the game? Is this something that I should be worrying about at all? Asgarath83 likes this Link to comment
Solution mrwonko Posted June 6, 2015 Solution Share Posted June 6, 2015 the whole file is loaded and kept in memoryeach file is only loaded onceIt may be marginally faster, but it probably makes no difference practically.Probably nothing to worry about, unless you use dozens of textures at 2k+ resolution. Cerez likes this Link to comment
Cerez Posted June 6, 2015 Author Share Posted June 6, 2015 Makes sense. Thanks, @@mrwonko! So reusing the same image file as textures for different model sections (or even models) would technically improve performance, not hinder it, right? I guess it's only a matter of how neat you want to keep your textures for ease of use, and how much space you have to work with within the given resolution of the image file. (My biggest texture file is 1024x1024 currently, so I guess this question in my case is quite trivial, then.) NumberWan likes this Link to comment
NumberWan Posted June 6, 2015 Share Posted June 6, 2015 @@Cerez Yes, using the same texture helps a lot. It's also applicable, when you deal with NPC count for instance: you use the same model and NPC file, but different skins for instance. Thus instead of 300+ characters you can have thousands of them in your story. Cerez likes this Link to comment
Didz Posted June 6, 2015 Share Posted June 6, 2015 Yep, reusing the texture file for different parts of the model would be beneficial. It means less images need to be loaded into memory at once. It's essentially a form of a Texture Atlas. For a list of all the images loaded by the game while playing, just use the /imagelist command in the console. And yeah, it's just finding a good balance of separating textures into different files and working with the resolution you want to. If it's easier to split the textures out, do it. If it's easier to have it on one texture for UV mapping, do it. Optimisation can be left until afterwards if necessary. Cerez likes this Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now