• 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 Bezzy · Nov 02, 2011 at 08:05 PM · iosmeshprocedural mesh

SpriteSheet/Mesh Hybrid to reduce overdraw on iOS?

Is this a mad idea?

We are currently sitting on a lot of sprite content, and need to convert these for use on iOS. The sprites will very likely overlap, causing a lot of overdraw. The sprites themselves don't have any half-transparency. They're pure cutouts.

Would it be overkill to write a system to triangulate the sprite sheet into more of a "mesh sheet"? Would the gains in rendering each sprite opaque be worth it?

We have an idea of how to do it, technically. Just wondering if it's worth the performance? Anyone know or do I have to do a mockup for some tests?

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by dannyskim · Nov 07, 2011 at 10:37 PM

I'm not sure if you have seen, but there is a SpriteManager script available on the UnifyCommunity sounds like it does exactly what you want.

"To address this, my SpriteManager class builds a single mesh containing the sprite "quads" to be displayed, and then "manually" transforms the vertices of these quads at runtime to create the appearance of multiple, independently moving objects - all in a single draw call!"

http://www.unifycommunity.com/wiki/index.php?title=SpriteManager

You may also want to look at the the improved version, SpriteManager2 which has editor extensions and is much easier to use, both authored by anbsoft.com

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 Bezzy · Jan 04, 2012 at 03:22 PM 0
Share

Thanks, but this still requires an alpha transparency shader. We have a lot of overlapping alpha sprites, which (I'm thinking/hoping/wondering) could be displayed more efficiently on iOS if they were all opaque cutouts.

avatar image dannyskim · Jan 07, 2012 at 12:42 AM 0
Share

You are right about the opaque cutouts. $$anonymous$$y latest project which uses a lot of full screen alpha blending and a lot of alpha blended objects has reduced performance on even the iphone 4 dramatically due to overdraw.

I have since then moved to opaque cutouts, which of course is a pain, but upped my performance dramatically.

avatar image
0

Answer by goodhustle · Feb 23, 2013 at 06:38 AM

I've seen this done in 2DToolkit. IIRC it allows you to specify a cutout size, and it will cut out alpha blocks from the fully transparent areas of your sprites.

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

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

GPU performance with tris and verts 1 Answer

Mesh Collider Edge Position. 0 Answers

Sphere made of cubes algorithm 3 Answers

Mesh disappears iOS 1 Answer

Splitting vertices in a mesh specifically a plane 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges