Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
1
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
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
15
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
Add comment · 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.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

A node in a childnode? 1 Answer

Creating an octopus / squid that spits ink with a particle system? 1 Answer

Tessellation + total vert/tri count 0 Answers

Guy's that know the standard physics 1 Answer

hollow objects, hollow mesh? 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