Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Aeleas

Game compression ?

Question

Posted (edited)

Hi

I want to know the right and good way to compress my game when i build it.

Here is image show statistics. is there any thing wrong ?

image.png

I made 3 levels with all my enemies there. The size of the game file 3GB in the desktop. When i build my game i get 1GB.

All textures quality 1024*1024. But in unity i get 2048 on the setting window ? do i need to change anything ?

gun_PNG1367.png

some of my enemies have more that 10 materials. is this wrong ?

What you suggest or advice me to do ?

Edited by Aeleas

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Where to start...


a Texture in Unity doesn't go higher than the actual resolution of the texture in the inspector. So you dont have to worry about locking the size unless you go lower than the actual resolution. If you want to drastically decrease the size of the textures set them lower in size and change the filtering mode.

 

So, looking at that texture it doesn't even look like you need any texture detail, consider using material color. If you insist on having albedo/diffuse detail you might consider using a single atlas to save on batching performance, as materials that are shared batches those GameObjects together. Other than that be sure to mark all non movable GameObjects as static for occlusion and navigation.

 

There are more ways to increase these savings based on the type of shader you are using and how that shader uses the lighting in the scene. For instance, is it diffuse only or does it support additional maps?

Using more than 1 material on a GameObject is never advised, to put it simply, for every new material the gpu has to run another drawcall, so the less you have the better.

 

If these dont assist much please share your file hierarchy so that we can check whether we can sort it better in order to accompany performance gain/size reduction. 

Share this post


Link to post
Share on other sites
  • 0

Thank you for all these information.

From what I read I think I can see where is my problem. Materials, is it really a big problem now ? I'm talking about the size not the performance.

Please login or register to see this quote.

How to do this ? you mean the window ?

 

Share this post


Link to post
Share on other sites
  • 0

As for the materials, it wont impact the game's size too much, they are very small, especially after build. Its more a performance thing. 

Share a screenshot of your inspector in the unity editor, I want to see your file structure. 

 

Also, be sure to remove the alpha channels from your albedo/diffuse maps if you aren't using translucent shaders. You can do this by saving the textures as any format that doesn't support and A channel, so there's no transparent channel, such as jpg. 

Edited by Johannes

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

Good point. I'm not using shader yet. I'm using albedo map.

image.png

do you see any wrong thing ? all textures formate is jpeg.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×