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 ArmarageX · Apr 01, 2013 at 06:55 AM · iosmaterialoptimisation

Mesh Swap vs Run-time Material Change..

Helloz

Im working on an IOS game, and wanted to ask about optimisation.

The Simple scenario is:

I have many Red textured balls (Prefabs) and when i tap one, that one turns into a Yellow textured ball.

I know of 4 options to do this:

1) Material Changing via Renderer.material

2) Instancing a new Yellow Mesh, and change the mesh

3) 2 Objects parented an empty game object... Hide one, show the other..

4) An object with 2 UV sets? And just switch UV mapping coordinates... (have only read about it)

Question: Would like to ask if anyone knows what would be the FASTEST processing/ least memorage method of implementing this mechanic for mobile. Or what is your preferred way of doing it ..?

Thanks!!!!

Comment
Add comment · Show 2
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 Shankar · Apr 01, 2013 at 08:45 AM 0
Share

material changing via randerer.materail is easy and fast i think so. But i also worked on that. In before versions it is working fine but in latest free versions it's not. Only in the inspector view it is changing. not in the game view.

I think u can get 30days trail for ios also.

meshes and renders are same i think show.

avatar image ArmarageX · Apr 07, 2013 at 02:12 AM 0
Share

Thanks Shankar....Ya my 30 days have been used up already :(

Though I've read somewhere that its best not to Swap $$anonymous$$aterials too much during runtime. I definitely prefer it though, since its much easier to implement.

1 Reply

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

Answer by Fattie · Apr 09, 2013 at 07:59 AM

FWIW

solution (3) is the totally ordinary solution you would see in millions of video game projects.

performance concerns are totally irrelevant here. to be honest (just as a scientific question) I doubt there'd even be an answer to "what is more performant" -- they all use "no" horsepower and it would depend entirely on the game you are doing, the particular details. other issues like culling, phsyics etc. would utterly, utterly swamp the trivial performance issues involved.

(If you are doing some sort of UNUSUAL PROJECT -- ie you 'forgot to mention" you have 18 million balls, or 82,000 colors, or you must change colors every millionth of a second, or whatever ... then that is a separate specific question.)

Honestly the answer is just "3 .. get on with it". It's that simple. Performance is totally irrelevant in this question on mobile.

Suggest you CLOSE OUT (tick any answer) this question and move on to a new specific questions if you have one

Comment
Add comment · Show 2 · 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 ArmarageX · Apr 09, 2013 at 08:30 AM 0
Share

Sorry... i didn't know. I was concerned that it may cause a moment of choke, combining with everything else that's happening. (Didnt mention its for Ipad 1 / 3Gs.. every 1 extra FPS counts... >.<)

I've read at random posts not to Instance stuff too much, or not even to use $$anonymous$$aterial change, yet i see some others do it. Just needed a solid confirmation on what i need to do. Thanks for taking the time to answer.

avatar image Fattie · Apr 09, 2013 at 09:06 AM 0
Share

you should post a new, more specific question, like "performance of instancing a new mesh" Good luck!

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

12 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

Related Questions

How to force a texture to be included in an iOS Project? 1 Answer

Unwanted rendering on top of all objects!? 0 Answers

Material doesn't have a color property '_Color' 4 Answers

Glass material or shader for mobile? iOS Android 1 Answer

Standard shader strange reflection artefacts 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