• 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
Question by Thet Naing Swe · Dec 09, 2010 at 02:57 PM · physicsverticescount

why is Unity got more vertices than 3dsmax

Hi when I modeled the objects in 3dsmax and export them to FBX for Unity, the vertices count becomes nearly double... In Unity iPhone, to get the dynamic batching working, we have to restrict vertices to under 280 and even I modelled with 150 vertices in max, Unity double it up... What happened?

Comment
soulzero

People who like this

1 Show 0
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
Best Answer

Answer by skovacs1 · Dec 09, 2010 at 03:32 PM

3DS Max will single-counts shared vertices with separate normals, but when importing, Unity will split per-vertex normals. If your mesh does not smooth the normals across vertices (smoothing groups), you will get an increase in vertices because each face will have each of its vertices with separate normals generate a separate vertex with a separate normal in the export rather than sharing the vertices with other faces. To resolve this, you should apply smoothing groups to your model, sharing smoothing groups across all smooth faces.

For example:

A plane with a pivot positioned at the lower-left corner can be defined as:

Vector3[] vertices = new Vector3[6];
Vector3[] normals = new Vector3[6];
Vector2[] uv = new Vector2[6];
int[] triangles = new int[6];
uv[0] = new Vector2(0.0f,0.0f);
uv[1] = new Vector2(0.0f,1.0f);
uv[2] = new Vector2(1.0f,1.0f);
uv[3] = new Vector2(0.0f,0.0f);
uv[4] = new Vector2(1.0f,1.0f;
uv[5] = new Vector2(1.0f,0.0f);
for(int i = 0; i < 6; i++) {
    vertices[i] = new Vector3(uv[i]);
    normals[i] = Vector3.forward;
    triangles[i] = i;
}

or:

Vector3[] vertices = new Vector3[4];
Vector3[] normals = new Vector3[4];
Vector2[] uv = new Vector2[4];
int[] triangles = new int[6];
uv[0] = new Vector2(0.0f,0.0f);
uv[1] = new Vector2(0.0f,1.0f);
uv[2] = new Vector2(1.0f,1.0f);
uv[3] = new Vector2(1.0f,0.0f);
for(int i = 0; i < 4; i++) {
    vertices[i] = new Vector3(uv[i]);
    normals[i] = Vector3.forward;
}
for(int i = 0; i < 3; i++) triangles[i] = i;
triangles[3] = 0; //shared
triangles[4] = 2; //shared
triangles[5] = 3;

Notice how the exact same plane can have nearly double the vertices. Because the normals were not shared in 3DS max across the triangle faces, each face gets each of its vertices separated as in the first example. The same plane with a smoothing group across the two triangles or defined as the same face in an editable poly (essentially hiding the edge and smoothing the normals) will generate the second example.

Comment
soulzero
Mystyr Nile
The_r0nin
Thom Denick
Rush-Rage-Games
burnumd
Murcho
Thet Naing Swe
Bunny83
Uriel_96
mugen
AngryOldMan
bariscigal
Aldrick
dvochin2

People who like this

15 Show 2 · 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 Thet Naing Swe · Dec 12, 2010 at 01:52 AM 0
Share

Thanks... This really help me alot.. It can save double vertices and now my world can up to double the previous vertices count. :)

avatar image Helical · Nov 26, 2017 at 12:13 PM 0
Share

Using your explanation For each vertex in the mesh I count how many faces in different directions it has. This sums up well in my meshes.

Wanted to add that turning off the Light and the very recent "Allow HDR" on the Camera object also reduce vertex count on objects during runtime, which can be inspected in the "Stats" window.

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

1 Person is following this question.

avatar image

Related Questions

A node in a childnode? 1 Answer

make animal tail for 2d game 1 Answer

How to make a rigidbody stick to a path? 0 Answers

Ragdoll Stuck problem 1 Answer

Strange Rigidbody Behavior 0 Answers


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