Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
0
Question by fahimalavi · Aug 07, 2016 at 03:51 PM · mayamodeling

Number of polygons in model to size in KB within ram

Hi, I want to calculate the size of Model in KB in ram. My Maya model has 3.9K vertex, nearly same faces and 7.8K edges. It has 4 animations. I want to create dozens of instances in scene.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Glurth · Aug 07, 2016 at 04:18 PM

Each face will require 2 bytes (int: 0-65k) to index each vertex, and being a triangle, will have 3 such vertex-indicies: total 6 bytes. 6x3.9k= 23.4k

Each vertex will store 3 floating point numbers as coordinates. a float is 4 bytes: total 12 bytes. 12x3.9k= 46.8k

The edges are not stored.

If we assume that each vertex has a unique Normal and UV coordinate:

normal: 3 float coordinaes, UV: 2 floats coordinates total of 5*4 bytes more per vertex = 20*3.9k = 78k

Subtotal: 23.4k + 46.8k + 78k = 148.2k bytes

These 148.2K bytes define the mesh. note: Even if you have multiple objects in unity that use this mesh, the 148k mesh-definition should exists only ONCE in memory.

Not sure how maya defines those animations, but I would suspect the memory used depends on how many verticies you are animating, times how many keys each animation has. I'm also unsure how/when unity will load/use those animations from maya.

Comment
Add comment · Show 3 · 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 fahimalavi · Aug 07, 2016 at 07:27 PM 0
Share

You have calculated impressively the size in ram.

But one questions. For multiple objects won't each object instantiated will have own vertex values as coordinates, so it should maintain its own value ?

If I remember correctly once I developed a game & I instantiated number of same characters but my game got slower when I have 15 characters. $$anonymous$$eshes were nearly same size about ~1$$anonymous$$ more polygon count.

avatar image Owen-Reynolds · Aug 07, 2016 at 07:39 PM 0
Share

The faces are probably stored internally as tri-strips or fans, which take only about 1.4 points/tri, depending on the average length.

avatar image Glurth Owen-Reynolds · Aug 09, 2016 at 01:12 PM 0
Share

An excellent point, those numbers are completely raw, and uncompressed. How much it can be compressed depend, as with most things, on the object's data itself.

@fahimalavi No, multiple objects that use this mesh will share the single mesh in memory (and it's verticies, normals, uv's, and colors). However, each object WILL have it's own TRANSFOR$$anonymous$$. this transform will define how the mesh is oriented, scaled, and positioned in WORLD SPAC$$anonymous$$ Each vertex of the mesh will be processed THROUGH the object's transform when being drawn.

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.

Follow this Question

Answers Answers and Comments

53 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Hide items on export from Maya? 0 Answers

Hi guys , i have a problem that is i imported a rigged file (maya rigged file) in to unity then one end of mesh is squeezing. I don't why? could you please tell me any one what the problem . 1 Answer

Maya Animations getting only partially lost in Unity 0 Answers

How to make bedside table with drawers 1 Answer

How to make AR Floor Plans? 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