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 SharpeDesigns · Dec 05, 2016 at 07:32 AM · optimizationstatic batchingvertex color

Possible to change vertex colors of static objects?

Hey all!

Currently in the process of optimizing a mobile project and realized that due to some of my visual tech, I haven't been making use of Unity's nifty batching features. A core aspect of the game involves dynamically changing the vertex colors on meshes near the player. Problem is, I don't seem to be able to modify vertex colors on objects marked batching static during play. Is there any way to accomplish this?

For reference, here is my scene setup:

alt text

I'm currently using a single material applied to everything in the environment (and an edge detection image effect on the camera) in case I have to use GPU Instancing. If batching isn't possible for what I'd like to do here, are there any other tricks I could use to reduce the draw calls?

This is all relatively new to me, so any advice would be greatly appreciated.

Thanks!

vertexcolors-test.png (207.8 kB)
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 SharpeDesigns · Dec 05, 2016 at 05:15 PM 0
Share

I've also been experimenting with manually calling this function:

 StaticBatchingUtility.Combine(EnvironmentParent);   

` But no luck. Is there anything else I could do to batch objects with interactive vertex colors?

1 Reply

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

Answer by Eric5h5 · Dec 05, 2016 at 05:31 PM

Static means "unchanging", so no, that's not possible. Dynamic batching is for objects that change, but it has restrictive limits on the number of vertex attributes that can be used in an object (otherwise the time spent batching exceeds the time you would save by having combined objects). Instanced objects also have to be identical.

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 SharpeDesigns · Dec 07, 2016 at 04:40 PM 0
Share

Ah, that's what I thought. Thanks! I'll shift focus to manually combining meshes then.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

What does the following mean? 1 Answer

Switching GameObject between static and non-static 2 Answers

Static batching and windzones - does wind count as moving the object? 0 Answers

Vertex Color Optimization 2 Answers

Can multiple meshes share vertex buffers? 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