• 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 Reverend-Speed · Mar 04, 2013 at 08:39 PM · tilelevelsmodulesmodular

Will the hidden faces of tile meshes unduly affect performance?

I kinda know this is a silly question, but if someone could answer this definitively it would set my mind at ease.

Say I've built a lot of floor tiles from cubes, with six sides (which saves time and adds detail when those tiles reach the side of, say, a platform ).

Assuming all the tiles are sharing the same material (and assuming I use this material in many other places if possible) and if most of the time the only side of this tile that's seen is the top face, would this be a horrifically wasteful way to build levels?

Follow-up question: ...and if this isn't how a Unity game similar to Lara Croft and the Guardian of Light (http://www.miikahweb.com/en/games/demos/lara-croft-and-the-guardian-of-light/media) would be built, are there any suggestions for better practices?

(Aside from building the whole thing in Max/Maya/Blender as that's horrifically inefficient... Also, let's pretend the awesome ProBuilder doesn't exist for this question).

What are the best practices for building a tile-based action game?

Many thanks,

--Rev

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 hoy_smallfry · Mar 05, 2013 at 01:48 AM 1
Share

Are these tile object stationary or will they be moving? If they were completely stationary, I would try to combine the meshes, possibly using a script like the one in this forum thread:

http://forum.unity3d.com/threads/37721-Combine-Children-Extented-%28sources-to-share%29

Also, if you look closely, it doesn't look like the stones in those pictures are separate meshes. $$anonymous$$ost likely they have one large floor piece that is using a wrapping texture. $$anonymous$$ost small details in games are pulled off with normal mapping: http://en.wikipedia.org/wiki/Normal_mapping

avatar image Reverend-Speed · Aug 03, 2013 at 07:56 PM 0
Share

Thanks for the details! I'm familiar with normal mapping and I think these tiles are using the technique, but I'd be surprised if the levels weren't made out of modules. No way are they plugging together individual stones, though. =)

$$anonymous$$any thanks for the link to the script...! --Rev

1 Reply

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

Answer by baha · May 04, 2013 at 08:34 PM

They do affect performance, if there is a face that won't be visible to the camera then it should not exist and even if you combined meshes they will still be an extra cost if they are not visible and will not be visible and maybe they will lead to flickering depending on the shaders, renderer and camera settings.

checkout this out to learn more http://docs.unity3d.com/Documentation/Manual/OptimizingGraphicsPerformance.html

If you consider only the vertex count which will be 24 for the 6 faces versus 4 for only one face (it will be 24 since each face will have 4 vertices due to the 90 degree angle and normal calculation and not 8 vertices in total) which means 6 times more costly than a quad even if you combined them plus you shouldn't always combine everything) "bad practice" since this will force the camera to draw all the geometry if no occlusion culling is used and which means more cost per frame than what is needed so optimization should be also done wisely.

this is one of the things we considered when we designed GameDraw, we developed something that works to make your model efficient but yet easy to use, there are tools that allow you to create geometry in a similar way to GameDraw but unfortunately they don't take care of extra vertices and faces and most likely you will be left with a lot of extra load so I do recommend you read the optimization tips above plus you don't need to always combine and merge meshes unless the things you combine will be visible to the camera at the same time combining the whole scene to 1 drawcall means that the whole scene will be drawn all the time which means more overhead in that drawcall, keep the drawcall count low but don't over reduce it as you don't want objects not visible to the camera be considered in that draw call the same goes to materials as well.

I will be more than glad to write a blog post about it if you like :)

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 Reverend-Speed · Aug 03, 2013 at 07:58 PM 0
Share

Excellent answer and a very, very late thank you! Somehow I've missed that this question had replies until now.

I'll read through the docs again - thanks for the re$$anonymous$$der. =)

A blog post on this WOULD be interesting, but as $$anonymous$$or request, please break your paragraphs up a little more for ease of reading. =P

Thanks again! --Rev

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

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

Getting information from Tracker music 0 Answers

Best way to repeatedly tile small sprite? Sprite Manager? 2 Answers

Tile in Unity or Maya ? 1 Answer

Tiled textures become pixelated on android 0 Answers

Sprite tiling and offset? 3 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