• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by quantum_rez · Jan 14, 2013 at 01:44 PM · modelsizecompressed

my model make my game lag, how can i compressed it ?

Hi, all, sorry i want to ask how can i compress my model in my game, because my model make my game lag. When i only use 5 model, my game not lag, but when i use 10 model, my game lag and can't play anymore because of lag, how can i compressed my model, or how can i make my game not lag when i use many model on it ?

my model is in FBX file.

Thanks

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Setzer22 · Jan 14, 2013 at 01:59 PM

I don't know if there's any program to lower the poly count for a 3d model automatically, otherwise you'll have to do it yourself with a 3d modelling program. If you got the model from someone or somewhere, try to ask if you could get a lower poly version for tht model. It's not the file size what causes you lag, it's the amount of poligons for your 3d model, w$$anonymous$$ch might be too $$anonymous$$gh for a videogame. Especially if you're aiming for mobile platforms (such as android) you should take into account that those devices can't hold many poligons on-screen at the same time.

Someone correct me if I'm wrong, but no characer in your game should exceed 1500 poligons at average (when aiming for a mobile platform at least). You can check the number of triangles of your character's (or model) mesh through the inspector. Just double-click on the "mesh" property of the meshFilter, feedback on the number of triangles for your model might help people here to tell you what's going on more precisely.

Hope it helped, it's not an easy to "fully-answer" question

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Wolfram · Jan 14, 2013 at 02:05 PM

Either simplify the model in your modeling program, or use an external tool such as PolyTrans.

However, the most important t$$anonymous$$ng is to reduce draw calls. One important Unity tool to help reduce these is CombineC$$anonymous$$ldren.cs in the StandardAssets.

Other than that, we would need some more information about your model (how many triangles, meshes, materials, drawcalls, ...).

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image quantum_rez · Jan 14, 2013 at 02:29 PM 0
Share

oh no, my model about 6000 poligons and my game for android, how can i reduce the poligons into 1500 @.@

what's polytrans? i never heard it before ?

so combinechildren.cs attach to my model?

hmm, i don't find where i can find triangles, meshes, materials and drawcalls, i can find it on unity or 3ds max?

so what i need is to reduced my poligons into 1500 right? but when i reduced it into 1500, my model not look like model anymore haha

avatar image Setzer22 · Jan 14, 2013 at 02:47 PM 0
Share

Well yes, reducing your model to a lower poly count equals less quality, and thus, faster drawing. So it won't look anymore like your model, It's like when you reduce a sprite's size, it becomes more "pixelated". Well, it's the 3d equivalent for that.

I'm not really sure of that "1500" triangle count restriction, but with a little ressearch I've found people which recommended not to get over 800-1000 vertices for a mobile game, so it might be even lower. Anyway, you can't have by any means 6k poligons in your mesh for a mobile app, it won't handle it.

Anyway, long story short, blame your modeller if you hired one, or make lower poligon models if you're the modeller. As @Wolfram said, you can also use PolyTrans, which seems to be an application to lower the poly count for your model, but with that you might not get the best results. The best thig to do is to create the model again, using the high poly mesh as a refference, but that's not a game programmer's issue, that's more like a 3d artist issue (Of course this is much more costly than just converting it with a program).

And if your model consists on more than one mesh (which it is very likely). It will also improve your speed greatly combining all the meshes in one (as @Wolfram said, once again), either in your modelling program, or using the builtin Unity method

avatar image Setzer22 · Jan 14, 2013 at 02:49 PM 0
Share

Oh, and to find the drawcalls you should look in Unity, 3ds max won't tell you. When you're on play mode click on the "Stats" button and it will show the current draw calls on screen.

avatar image Wolfram · Jan 14, 2013 at 02:57 PM 0
Share

Exactly, the Stats screen will also show you the number of rendered triangles.

Note the absolute performance killer nowadays are the number of drawcalls, not primarily the polygon count. It can very well be that 10 meshes with 5 materials each and 100 triangles each will render slower than 6000-10000 triangles using one mesh and the same material. This is also the reason why texture atlases are important.

CombineMeshes.cs helps to reduce the drawcalls, especially if your model is split into several meshes (take a look at the hierarchy each child node usually has 1 mesh). The script will not help reducing polygon complexity.

You could also look for tools for LOD generation ("level of detail"), I think there might be some for Unity out there.

avatar image quantum_rez · Jan 14, 2013 at 03:02 PM 0
Share

hmm, ok so i must create the model again and with low poly right, but the problem just like that the model won't look like model anymore hahaha..

yah, i look at polytrans and i'll try to use it later.

i already look from stats so this is the result : Drawcalls : 100++ tris : 150k verts : 140k

that's it,haha.. so what is tris and verts and drawcall too?

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

MMD How to export model and animations to Unity as 3rd person controller? 2 Answers

Unity changes image size 1 Answer

Difference between sizes 1 Answer

Scaling down models 2 Answers

Blender meshes,does size matter? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges