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 Slight0 · Oct 15, 2014 at 09:53 PM · meshprocedural meshdynamic mesh

What does mesh.MarkDynamic actually do? Documentation explains nothing.

I've searched around and could not find an explanation as to what MarkDynamic actually does. Just vague information on when to use it.

I need to know exactly what it does so I can best optimize mesh generation in my game.

What effects does this have on memory? Does it change how the mesh.vertices, mesh.uv, mesh.triangles, etc behave when being accessed?

What if I only update a mesh every minute or two and I generate and store the vertices in my own code instead of reading them from the mesh itself?

What does it do?

Comment
Add comment · Show 8
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 KpjComp · Oct 15, 2014 at 09:59 PM 0
Share

I believe it's for performance reasons. If an object is not dynamic Unity can do some caching, but caching can take resources and time, so every time you move something that is not dynamic would cause a performance hit. So for example, a building is not dynamic, but a flag blowing in the wind would be.

avatar image Slight0 · Oct 15, 2014 at 10:12 PM 0
Share

$$anonymous$$y goal is to make mesh generation go as fast as possible. I'm willing to sacrifice memory far more than cpu cycles. So I need to know exactly what $$anonymous$$arkDynamic does.

avatar image KpjComp · Oct 15, 2014 at 10:34 PM 0
Share

The documentation says -> Optimize mesh for frequent updates. What internally this does I'm not sure, it maybe disables mesh compression, or keeps the mesh data in internal memory ins$$anonymous$$d of gpu memory etc. One idea is just to knock up a simple demo that generates a big mesh with thousands of vertices / faces etc. And see what setting works best for mesh building.

avatar image Slight0 · Oct 15, 2014 at 10:51 PM 0
Share

Friend, perhaps your intentions are good, but you're not addressing my question at all. I don't need someone to read the documentation for me (as you can see by the title), and I don't need speculation either.

I need to know what is going on under the covers. What effects it has. Otherwise I and anyone using this function are just making wild assumptions.

avatar image Eric5h5 · Oct 16, 2014 at 02:24 AM 1
Share

I was unable to deter$$anonymous$$e, using the profiler and other benchmarking, that $$anonymous$$arkDynamic actually improves performance in any measurable way.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Owen-Reynolds · Oct 15, 2014 at 11:49 PM

Traditionally, poorly documented optimization switches often do nothing. Just forever un-implemented placeholders.

And until Unity allows direct creation of tri and quad strips (fully specify each tri? That's for zoo gorillas who can't paint,) I'm not expecting great things from the Mesh class.

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 Slight0 · Oct 16, 2014 at 02:06 AM 0
Share

Amen to that. What a massive waste of RA$$anonymous$$ and CPU cycles (spent copying) the triangle array is. The $$anonymous$$esh class seems ill-suited for scalable modification.

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

32 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Simple plane generation 1 Answer

Weird bounce on collision with perfectly aligned (generated) meshes for fast object 3 Answers

Can I Assign Different Material To Each Quad In A Mesh? 1 Answer

Lining up mesh edges for deformation 0 Answers

Editor lags when coming out of play mode...? 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