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 /
avatar image
0
Question by pranskevicius · Jan 11, 2017 at 09:16 AM · webgllow polytrisverts

1 million verts and 0.5million tris in Low-poly WebGL game

Just as topic says - low poly WebGL game has 0.8-1 million verts and half this tris. Models aren't detail at all. Why is that?

IMAGE

Comment
Add comment · Show 19
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 tanoshimi · Jan 11, 2017 at 09:20 AM 0
Share

I don't quite understand the question. Why do you have 1million verts in the stats display? Because that's how many are being rendered on the screen.

Did you create these models? How many verts/tris do you think they should contain? Please post a screenshot of the scene view in wireframe mode so we can see how the models are structured.

Also, is that a terrain component that I see just cropped off the right hand side of your image? That will go some way to explaining the vert/tri count...

avatar image pranskevicius tanoshimi · Jan 11, 2017 at 02:11 PM 0
Share

This is wireframe mode: I$$anonymous$$AGE versus normal mode: I$$anonymous$$AGE

I didn't create these models, I took them from Unity Assets Store for free.

I think the number of verts/tris is just insane, I tried to optimize the game as much as I could but integrated GPUs can still hardly handle it.. It is very sad keeping in $$anonymous$$d that models are low poly

Yes, I use terrain and I also use lower/higher tool as well as brushes to change texture of my path.

avatar image tanoshimi pranskevicius · Jan 11, 2017 at 02:51 PM 0
Share

The models seem ok (you can select each mesh individually in the inspector and count the verts/tris there) but there's obviously something not right in the scene. What happens to the counts if you disable the terrain?

Show more comments
Show more comments
avatar image RobAnthem · Jan 11, 2017 at 09:22 AM 0
Share

That's low poly buddy... not sure what you're expecting, but high poly is like 100k-250k verts per model.

avatar image tanoshimi RobAnthem · Jan 11, 2017 at 09:25 AM 0
Share

The portion of the scene shown in the screenshot could be modelled using a couple of hundred verts.... i.e. a thousand times less than that.

avatar image RobAnthem tanoshimi · Jan 11, 2017 at 09:31 AM 0
Share

I did NOT see that scene, jesus christ those should be 60 vert models. I'm assu$$anonymous$$g he did not model them himself, but whoever did needs a bit of a whoopin lol. $$anonymous$$y average low poly model is around 380 verts, but thats with rounded edges...

avatar image aflatau · Jan 11, 2017 at 10:49 AM 0
Share

How many lights / shadows are you doing? Do me a solid and go to any lights in the scene and turn off shadows...

avatar image pranskevicius aflatau · Jan 11, 2017 at 02:18 PM 0
Share

I only use 1 directional light. I tried to turn off shadows, but not much have changed apart that shadows are now gone! Could this noticeably help to improve performance when exported to WebGL?

avatar image pranskevicius · Jan 11, 2017 at 05:08 PM 0
Share

@Doublemax>> There are couple of hundred objects: I$$anonymous$$AGE

avatar image pranskevicius · Jan 12, 2017 at 12:42 PM 0
Share

1.7million verts!! WHAT?! There's nothing that could possible have that much vertex in this I$$anonymous$$AGE: URL

Far Clipping Plane is downgraded from 200 to 110.

avatar image tanoshimi pranskevicius · Jan 12, 2017 at 12:52 PM 0
Share

Your batch count is enormous too - there's definitely something not right. What shader are you using on the material(s)? How many passes does it have? Do you have any pixel lights in the scene (point/spot)?

avatar image pranskevicius tanoshimi · Jan 12, 2017 at 02:36 PM 0
Share

I mostly use Standard shader. There are few objects that uses Standard Specular and I also use GUI/3D Text shader for my post signs text, here is the shader: http://wiki.unity3d.com/index.php?title=3DText. I DON'T have any pixel lights in the scene, I only use one directional light. How many tris/verts am I suppose to get here approximately? It's usually 0.4-0.55 million but there are two places where it goes up to 1-1.7 million and I can't figure it out. $$anonymous$$aybe its those 3D text shaders? But nothing changes when I remove them.

EDIT: I also use standard assets' water4simple with FX/Water shader which generates these objects: I$$anonymous$$AGE Removing these components haven't change anything.

avatar image JuliuszK pranskevicius · Jan 12, 2017 at 12:57 PM 0
Share

I would suggest - create an empty scene and start adding assets one by one, so you can check the verts count reported by Unity against the expected one, counted manually. If there are any issues with any particular asset, you should spot them immediately.

avatar image pranskevicius JuliuszK · Jan 12, 2017 at 02:44 PM 0
Share

I'll try this, thanks.

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by JuliuszK · Jan 11, 2017 at 03:42 PM

What is misleading about these low-poly models is that they have sharp edges. This means that vertices have to be split, so they don't share normals. A smooth box has only 8 vertices, but a flat box has 24 (6 x 4). At least that's how people do it most of the time. If this is the reason of your high verts count, try thinking about using the flat shading solution instead. Look at this article: - maybe it will be of a help to you.

Comment
Add comment · Show 1 · 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 Bunny83 · Jan 12, 2017 at 04:43 PM 0
Share

Right, also the scene seems to be quite large with quite a lot objects in it. It's just simple math. For example if you look at the wireframe image one of these small bushes look like it can easily have about 50 verts. On the portion of the scene that we see there are at least 20 of them. So there are most likely about 100-200 (or even more) of these in the scene. That's 5k - 10k+ vertices.

The roof of one house is made up of about "6 steps" each side that means about 24 quads for the roof. Now if those quads use 2 shared vertices each the roof would have 24*4 == 96 vertices. If it doesn't use shared vertices the 24 quads would split into 48 seperate triangles so 48*3 == 144 vertices.

One tree has at least 60 triangles so about 180+ verts if you have 1000 trees in your scene those alone would be 180k verts. $$anonymous$$eep in $$anonymous$$d that 1000 sounds like a lot but isn't that much in a 2d space. If you fill a rectangular space with 25 x 40 trees that's already 1000 trees.

Due to the perspective the OP has choosen for the wireframe shot it's hard to tell how many objects there actually are. But the area behind the right house is almost completely black so there has to be quite a lot of objects. If we assume an average vert count of 150 per object we would have about 6k objects in the scene to get to 1$$anonymous$$.

In some edge-case scenarios even $$anonymous$$inecraft can easily have up to 25$$anonymous$$+ vertices. And that's only the visible terrain without any entities.

avatar image
1

Answer by Hoqq · Jan 12, 2017 at 06:11 PM

Realtime shadows at a minimum double your vert count, most likely more depending on how many lights/shadows you have and the shadow draw distance.

Also the point made about flat shading is very true. A flat-shaded box has many more vertices than a smooth shaded one in order to make edges look sharp.

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 pranskevicius · Jan 12, 2017 at 11:29 PM 0
Share

Thank you for your comment. I have only one directional light and I set shadow draw distance to 30. I'm now using occlusion culling which helps a little bit to lower vert count. Although, there are this one spot in the beginning where I see 1.2million verts and there is no reason for that, especially if im standing behind the building which should cover other objects.

avatar image Hoqq pranskevicius · Jan 12, 2017 at 11:36 PM 0
Share

OH, you also mentioned 3D text which might be the culprit. I've imported in 3D text from blender before and they usually have a high subdivision level to make them look rounded, so try disabling them.

avatar image pranskevicius Hoqq · Jan 13, 2017 at 12:07 AM 0
Share

Thanks, but I tried to delete all the text using GUI/3D text shader and it didn't help. So it must be something else!

avatar image
0

Answer by tanoshimi · Jan 13, 2017 at 10:34 AM

You said earlier that you only had one camera in the scene, and then posted this screenshot of your hierarchy:

Note that the verts/tris count in the Stats window shows the number of elements drawn, not the number in the scene. Assuming that at least some of those objects with "Camera" in their name have got active camera components attached, you're probably rendering the same verts/tris many, many times over.

Many of them camera objects seem duplicates anyway - what are they all meant to do?! Disable all cameras in the scene except one and I bet your stats will reduce to a fraction of their current levels.

Comment
Add comment · Show 1 · 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 pranskevicius · Jan 14, 2017 at 12:47 PM 0
Share

Thanks for your reply. I'm not using these cameras and I've no idea what they do. They appeared after I used water4simple object. And these cameras come up again if I try to delete them. If I remove water objects and delete these cameras not much changes. I turned off all image effects that I had added to my main camera object. I think verts number doesn't even reach 0.8million, so it's good.

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

10 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

Related Questions

Computer starts heating up when I enable my props 2 Answers

Average number of tris in tower defense? 0 Answers

Gtx 860m power in one scene 1 Answer

Render stats window data saved in a txt file. 1 Answer

Bunch of Cubes. How to reduce tris/verts? 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