Switching Solid Color Materials for a Texture Atlas
I started making 3D Games using Unity and I noticed some people have severe slowdown issues when playing my games. From some research, I learned about the best practices when making games to help with the memory usage.
What I've tried so far is to disable gameobjects when they're not shown onscreen and lowering the Clipping Planes Far value. They worked well, but I also read that using too many materials is bad for the memory usage and data processing. Currently I'm using about 30 materials with solid colors - lots of models are using more than one material.
I know two possible routes I could take are Vertex Coloring and Texture Atlases (using one material). I don't want to use Vertex Coloring for now since I have no experience, so I'm trying Texture Atlas. The thing is - it's a lot of work to make one, so I'm starting to question if it really is a good idea to make one using solid colors.
Has someone here used Texture Atlas like this before? Should I worry about creating one? Thanks for the attention!
There are much bigger performance hogs than 30 materials...
Anti-aliasing
Shadows (soft are much worse, but hard still sucks resources)
Loads of rigidbodies
Low physics timestep
Image FX
Realtime lights in general
Number of pixel lights
VSync
Soft particles
(These are not in any particular order)
I understand there are bigger hogs - but should I worry about setting down the number of materials I use? I don't want to finish my project with lots of materials, only to find out they are messing with my game's performance.
30 materials shouldn't be whats decreasing performance, although it would be optimal to store all of the colors in a small atlas (a 32x32 image could store 1,024 colors...).
Your answer
Follow this Question
Related Questions
Problem with transparency of an object 0 Answers
Texture Atlas - Texture Size vs Material Count 0 Answers
How can i disable/fix this "effect"/bug? 1 Answer
How do I make an atlas for the Standard Cube... 0 Answers
Offset texture based on world space 0 Answers