• 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
2
Question by RElam · Jan 29, 2010 at 11:37 PM · graphicsoptimization

Scale, the performance killer

I can't figure a way around the speed issues from using scale on normal rendering, but will DrawMesh or DrawMeshNow bypass MeshRender.ComputeScaledMesh?

Comment
Add comment · Show 1
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 Seth Illgard · Feb 04, 2010 at 03:32 AM 0
Share

Sex helps cure cancer! Now that I got your attention.... Haha, nice question title :)

2 Replies

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

Answer by jonas-echterhoff · Feb 01, 2010 at 11:29 AM

From quickly looking at the code, it appears that DrawMeshNow will indeed bypass ComputeScaledMesh, so it should be faster. But it also means that some shader calculations will no longer be valid, and you may end up with wrong lighting for your meshes. Whether or not that is an issue, depends on the shaders you use, so, your milage may vary.

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 RElam 1 · Feb 04, 2010 at 02:32 AM

Thanks Jonas, it's nice to finally get an answer on this issue. Yea, I'm not thrilled about having to do this, but it seems a requirement to be able to scale objects. Is there any word on if a fix for the scaling issue in the next build? I'd really rather not implement this fix if the engine bugfix is around the corner.

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 Seth Illgard · Feb 04, 2010 at 03:31 AM 0
Share

Please do not use answers to comment. That's what comments are for! :)

avatar image jonas-echterhoff ♦♦ · Feb 04, 2010 at 10:34 AM 0
Share

I cannot promise anything about a fix at this point. We are indeed working on removing the performance hit for uniformly scaled meshes (i.e. x, y and z scale are the same), but it is not yet clear when this will ship.

avatar image RElam 1 · Feb 04, 2010 at 10:58 PM 0
Share

Ok, thanks again. I think I'll go ahead and implement the fix. So if I do material.SetPass would my animated material/shader values be set properly, or do you think these would be set properly anyway? In this case, I can afford to lose lighting, but I am animating other properties that would be kinda annoying to have to do another way.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Is it possible to calculate batch count of each material ? 0 Answers

Can we create our "own" terrain "engine" on Unity ? 2 Answers

How many polygons can 2MB of video memory hold? 1 Answer

Best way to smash a Cube made out of 100x100x100 cubes. 2 Answers

Does Unity Do "Portals"? (Not the Valve Game) 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