Product Chat / [SOLVED] One texture file for several objects

Author
Message
m2design
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 25th Mar 2010
Location:
Posted: 3rd Aug 2019 00:10
If I have one master texture file that contains textures for 4 different "x" files using different sections of the master texture file for each "x" file, is the master texture file duplicated 4 times in memory because it is called out in 4 separate FBE files or is it loaded just once to memory?

Windows 10 creator,64 bit| Intel i7-7700 @3.60GHZ Quad|CPU PASSMARK 10,794|Memory 16GB |NVIDIA GEFORCE GTX 1070|GPU PASSMARK 11,071

The author of this post has marked a post as an answer.

Go to answer
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 3rd Aug 2019 00:27
This post has been marked by the post author as the answer.
Loaded once as long as the 4 x files are in the same folder as the one texture.

Cheers.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 7th Aug 2019 23:31
Quote: "Loaded once as long as the 4 x files are in the same folder as the one texture."

Nice to know this is a requirement. Hopefully adds draw call benefits as well.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th Aug 2019 00:51
If you have 4 models and each one uses a 512x512 texture, would you use a 2048x2048 texture to texture the 4 models?
If this is so, you use a texture of 2048x2048 but make a call, while in the other way, you use a texture of 512x512, but make 4 calls.
Can anyone say which is the best option in terms of performance?
Or maybe you fit the 4 textures into a 512x512 texture.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 8th Aug 2019 07:49
There are a few factors to think about.

The more times a texture is accessed the more likely it will be cached. This improves performance.

So the best returns will be found when one texture is used for a lot of models that are seen by the camera a lot of the time. This reduces draw calls as you say. Video memory will be conserved if that same texture is located in the same folder as all of the models that use it. If not GG will think it’s another texture and load it again (uses file path not just file name).

So with the 4 model example I doubt much difference either way will be noticed.

However if you get up to dozens or hundreds of models in a level then you will definitely see benefits.

I have a level that uses two 4096x4096 textures containing all sorts of individual texture plates for walls, windows, doors, metal etc for approx 300 models (buildings and background assets) and this made huge video memory savings and 10-15 FPS uplift when I moved to this approach.

I guess your mileage will vary, just relaying what I found. It does take pre planning (or retro fitting in my case) to do this on a large scale and may not be for everyone.

Cheers.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th Aug 2019 15:18 Edited at: 8th Aug 2019 15:19
Good info Ciber.

Due that GG already know the 4 textures one entity has, GG could auto-generate a mega texture, and use this instead of the 4 textures. Just a idea.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 8th Aug 2019 16:21 Edited at: 8th Aug 2019 16:22
My demo of the big underground base in New Beginnings was optimised to use as few draw calls as possible It made a noticeable performance boost. I ended up with it running over twice as fast in the main and that was with even more objects later Took months of customisation though.

SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th Aug 2019 18:53
Nice vid DVader.
A lot of work you did there.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-04-23 15:12:04
Your offset time is: 2024-04-23 15:12:04