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
0
Question by Bill · Feb 02, 2011 at 04:49 PM · meshperformanceintel

Mesh Performance Issues

We're finding that we are having performance issues when updating meshes during runtime on certain video cards. The particular problematic chip is an Intel HD integrated graphic card (http://www.intel.com/technology/graphics/intelhd.htm). Has anyone else ran into issues with this before?

While troubleshooting the issue we made a very simple example that seems to consistently reproduce the issue on the hardware. We are updating a mesh with 10 vertices once every second. Basically we are manipulating the position of the vertices to morph the objects shape. Additionally we are also adjusting the vertex color and UV coordinates every time we update the vertices.

Consistently we see stuttering when applying the new vertices. Additionally, if any sounds are playing they oddly become a beeping noise each time the hitch occurs. The problem does not seem to occur if we increase the amount of time between updates to around 20-30 seconds.

Is there any better way to optimize this in Unity for low end hardware? I assume this is also problematic for other Intel Integrated chipsets.

protected Vector3[] _vertices; protected int[] _tris; protected Vector2[] _uvs; protected Color[] _meshColors; protected Mesh _mesh; protected float _currentTime;

public void Start() { _currentTime = 0;

 _meshRenderer = (SkinnedMeshRenderer)GetComponent(typeof(SkinnedMeshRenderer));
 _mesh = _meshRenderer.sharedMesh;

 // Our current test is only 4 quads in a triangle strip with 10 vertices.   

 // Code removed for brevity.    
 // Initialize _tris,_uvs, _meshColors, and _vertices with data.

 _mesh.Clear();
 _mesh.vertices = _vertices;
 _mesh.uv = _uvs;
 _mesh.colors = _meshColors;
 _mesh.triangles = _tris;

 _mesh.RecalculateBounds();

}

public void Update() { _currentTime += Time.deltaTime;

 // Only update once a second
 if(_currentTime < 1.0f)
     return;

 _currentTime = 0;

 // Code removed for brevity.
 // Update _tris, _uvs, _meshColors, and _vertices data.

 // The hitch always occurs here 100% of the time.
 _mesh.vertices = _vertices;
 _mesh.uv = _uvs;
 _mesh.colors = _meshColors;
 _mesh.RecalculateBounds();

}

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
0

Answer by Jesse Anders · Feb 14, 2011 at 11:01 AM

It's been a while, so I don't know if you're still monitoring this thread, but I've also been running into some performance problems when updating meshes at run time on an Intel integrated card. (Or at least that seems to be the cause of the issues I'm seeing.) I was going to ask about it on the forums (and still may), but stumbled on this thread while looking for information.

I don't have an answer per se, but I thought I'd post just to confirm your observation. (Or at least possibly confirm it - again, I'm not completely sure what the cause of the problems I'm seeing is.)

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 Bill · Feb 15, 2011 at 03:35 PM 0
Share

No, we never found anything out. I narrowed the issue down to the performance issues where caused by the updating of the mesh object. If you set the data once, then the performance is not a problem. However, if you update the mesh frequently it is problematic. I tried various tests, and found that the performance would still hitch even if the mesh was updated every 15-30 seconds. The bigger issue I have is that I do not have this hardware in our office. Therefore, I had to do a special build of our game and then push it to our client to test and give feedback. It was quite slow and tedious.

avatar image beiers · Jun 16, 2011 at 03:50 PM 0
Share

@Bill I have been having serious issues with this as well. Did you ever figure it out?

avatar image Bill · Jun 16, 2011 at 04:22 PM 0
Share

Unfortunately we never figured out how to solve this. We ended up redesigning things to avoid having to do this. The issue seems specifically related to the chip set I mention. As I have not been able to reproduce it on any other machine.

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

2 People are following this question.

avatar image avatar image

Related Questions

View triangle count of a scene? 1 Answer

Mesh collider cost 1 Answer

Mesh.CombineMeshes does not work when mergeSubMeshes=false 2 Answers

Substract mesh from Skinned Mesh Renderer 0 Answers

Which is faster, Blendshapes or Non-Uniform Scaling? 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