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 Herman-Tulleken · Dec 14, 2010 at 01:51 PM · androidrenderingoptimizationbackground

How do I draw a background image *fast* (on Android)?

In our Android game, drawing a full-screen background image causes a drop of about 10 FPS (from 30-50 to about 20-40 FPS) on the actual device (not on PC, where the game run around 70 FPS). [These are all measured in my own code, it's not the FPS reported by the stats tool].

I have tried various strategies, with the same result:

  • using a diffuse material on a built-in Unity plane and a custom generated plane
  • using SpriteManager
  • drastically reducing the texture size, with compression
  • multiple smaller planes that collectively fill the plane

and a few other (stupid) things as well. The texture is 512x512, but I have also tried 64x64 with the same result.

The frame rate drop is less severe for smaller planes, and for very small planes is insignificant, so it looks like it really is just the number of pixels that I draw that affect this.

So first, is this just the way it is, or am I doing something obvious wrong?

Second, is there anything I can do to get a background in without the drop in speed?

Comment
Add comment · Show 4
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 Justin Warner · Dec 14, 2010 at 02:51 PM 0
Share

I'd recommend keeping to the power of 2 so that it doesn't waste memory... But you probably already know that...

avatar image Herman-Tulleken · Dec 14, 2010 at 02:56 PM 0
Share

Thanks Justin. Yup, the texture is indeed a power of 2 :)

avatar image denewbie · Dec 14, 2010 at 04:13 PM 0
Share

based on what i know that kind of frame rate is expected of android

avatar image Herman-Tulleken · Dec 15, 2010 at 06:38 AM 0
Share

@denewbie Thanks. Do you know, though, whether drawing the image by itself should cause such a drop on the device?

2 Replies

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

Answer by Herman-Tulleken · Dec 21, 2010 at 03:00 PM

Well, we got the background rendering down from 10 FPS to 5 FPS by changing shaders to ones that ignore lighting. A rather obvious solution.

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 bererton · Sep 12, 2016 at 09:09 PM

We were also having this problem more recently on Android. In case anyone else finds this we found that having multiple "background elements" eg. a picture and then other images that change per level but are all effectively background elements that you can use a RenderTexture to "screenshot" a dynamically built background and then get rid of all the other background elements. The Rendertexture should (as above) have a shader that ignores lighting. Just make sure to test it on several test devices if you are doing mobile.

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.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Why does my game require so much rendering power? 1 Answer

Does anyone know what ExtractRenderNodeQueue does and why it is killing performance? 2 Answers

weird profiler result? 0 Answers

Question about Multithreaded rendering! 1 Answer

Is it possible to render in Unity without the editor/scene/player being visible? 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