Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
0
Question by Luke 4 · Apr 29, 2011 at 08:42 PM · verticesvertexpolygonpolygon-count

Vertex count 10 times higher in Unity

Hi,

i know, its discussed here quite often and this question was asked several times, but what i came to understand from that is what is causing the problem, but not the solution. My model has 300 vertices in Max, but in Unity its like 4000 vetices ??? I realy dont know what i should do about this. The model has to be textured way it is textured, so making less uvs is not option.

Is there realy no way around the vertex count, how to take the count in Unity close to the count in 3d modeling software ? Any help greatly appriciated ( any links to tutorials on this topic would be also welcome. By the way, how come that after countless hours spent with trainings for unity no one mentioned this ? )

Thanks

Luke

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

5 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by xandermacleod · Jun 06, 2013 at 10:53 AM

To be exact. The GPU automatically creates extra vertices in order to handle hard-edges, UV-splits and additional lights.

If a vertex is part of a hard-edge, then the vertex will have multiple tangents, normals and bi-normals. When a vertex is part of a softened edge, it only has 1 tangent, normal and bi-normal. Because for lighting purposes the GPU needs to perform a separate calculation for each tan/norm/bi-norm, it creates a new vertex for each. The same is true where there are UV-splits (these do not stack however, so if a vertex is on the edge of a UV-split and is part of a hard-edge it will not duplicate the vertex twice the amount). The number of vertexes in Unity will then be equal to the number of vertex-tangents the model has.

In addition to this for each additional render pass, the vertex count is added on top of the original vertex count. i.e 5 render passes on a 4000 vert model, for all intents and purposes equates to a 20000 vert model.

For more information, check out this helpful video provided by CGcookie:

http://cgcookie.com/unity/2013/04/18/understanding-gpu-vertex-count/

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 xandermacleod · Jun 06, 2013 at 10:56 AM 1
Share

there's a good chance you might have told $$anonymous$$ax to make all of your edges hard-edges to get the kind of numbers you have. Try to always make the models have soft-edges, and then add back the hard edges sparingly where you need them.

avatar image whiteforst xandermacleod · Apr 06, 2019 at 01:03 PM 0
Share

can you please explain more you technique ? i mean when and where to add back the hard edges?

avatar image
2

Answer by Bunny83 · Apr 29, 2011 at 09:00 PM

There's not a lot you can do. A Vertex in unity contains the position, the normal and the uv coordinates. A vertex that is shared in 3dsmax by 4 triangles will be splitted into 4 vertices if:

  • it has a different normal vector
  • it has a different uv coordinate
  • it's part of a submesh because a different material should be applied to it.

It's hard to believe that 300 vertices will produce 4000. That would mean every vertex is used by around 13 triangles and every triangle have something special. What kind of mesh do you talk about?

Comment
Add comment · Show 5 · 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 Luke 4 · Apr 29, 2011 at 09:08 PM 0
Share

thanks for quick reply. Its simple ship model, there is quite a lot separate objects, about 20 i guess, but those are all boxes and its all attached together and applied one material to the whole model ( multi subobject ). There are 3 textures and every object in model has uvs, of course. It is realy very low poly, i dont know what i did wrong, if the count was doubled, i would scratch my head, but it would be still ok, but 10 times more ?

avatar image Luke 4 · Apr 29, 2011 at 09:26 PM 0
Share

i just tried to export simple cube with basic material and the vertex count is six times higher than in $$anonymous$$ax... ? I am realy confused.

avatar image Bunny83 · Apr 29, 2011 at 09:34 PM 0
Share

6 times doesn't make much sense. A cube have the problem that you have 6 different normals for each side (otherwise the cube will look more like a sphere) That means each side have 4 vertices * 6 sides will result in 24 vertices. The highest amount would be 6 vertices per side (3 for each triangle) but even that would result in 36 vertices which is 4.5 times the original count (8). How do you import your model into Unity? I mean what export format do you use?

avatar image Luke 4 · Apr 29, 2011 at 09:44 PM 0
Share

the cube has 8 vertices and in Unity it is 48 vertices. I use regular fbx export selected, i dont adjust any settings and just export.

avatar image Bunny83 · Apr 30, 2011 at 12:42 AM 0
Share

I'm pretty sure there have to be something wrong in your workflow. I'm just a programmer so i can't give you any good advise regarding 3dsmax. Other people have similar issues but in most cases it's the common shared vertices problem. See this question: http://answers.unity3d.com/questions/30966/why-is-unity-got-more-vertices-than-3dsmax

avatar image
0

Answer by cmyk3000 · May 20, 2016 at 03:52 AM

because Unity is not counting the geometry vertex but the UV vertex number.

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 sharbel · Oct 09, 2017 at 02:57 PM

Unity's realtime light (realtime shadows) adds calculation to each object affected by realtime light in the scene, which means it'll add more detail to it. You didn't do anything wrong in exporting. Just turn off the directional (or any other) realtime light and then check the Stats of your game scene. It should then correctly display the vertex count that you have.

Baking is a solution for that.

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 inpeckable891 · Nov 06, 2021 at 07:01 PM

For me, when I change my lighting from soft or hard shadows to no shadows, the vert count decreases dramatically. Also for some reason, the first(default direction light in every scene) light does not reduce vert count when deleted, but if you were to have multiple directional lights in your scene and deleted them, the vert count would decrease.

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

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

7 People are following this question.

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

Related Questions

Selecting a single polygon / face at runtime 1 Answer

Why does my script-made mesh only look visible from one side??? 1 Answer

Real pivot rotation of all vertices in a mesh? 2 Answers

How do you get unique vertex data from a mesh? 1 Answer

vertices in current camera view 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