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 randytayler · Apr 21, 2015 at 02:25 PM · mobileproceduralframe rate

Yet Another Mobile Frame Rate Question - Procedural map generation

Forgive me for starting yet another thread on this. I've searched through the forums here and think I'm still missing something basic.

I'm building a first-person game for Android where you're in essence escaping a maze. At the start of the level, I create a maze - a simple one, really, with 25 "rooms" or "tiles", with around 48 vertices per room.

alt text

You can then use the gamepad controls to steer and look around, like in an FPS. But on my Galaxy S3, the frame drops to a crawl, sometimes as low as 2fps. Other times it hovers in the 20s; sometimes it spikes up to the 40s. I can't see any reason why, unless that's just the best my little phone can do.

The main game object of the maze is checked as static, and the prefabbed walls and floors are all checked as static as well. Not that I truly understand that; if I'm dynamically instantiating them, does it make any difference if they're marked as static?

I have 3 directional lights that are static and baked. I'm set to Continuous Baking. The scene has a Skybox, and there is some ambient environment lighting, but I've turned off Global Illumination in hopes to improve the frame rate. Still sometimes dropping to 4 or so fps.

My Camera is clipping at 20. Pretty dang modest, I thought.

alt text

Is this just the nature of the beast? Or should I be able to tweak something to get better performance? Does it have to do with procedurally generating the map instead of building levels beforehand?

Again, sorry if I missed something in the documentation or the forums. I'm loving Unity, but I've only got about a month or two in it so far.

example1.jpg (62.0 kB)
settings.jpg (128.8 kB)
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
Best Answer

Answer by Neamtzu · Apr 21, 2015 at 03:10 PM

Hi,

  1. If you have backed lights why do you keep the 3 directional lights in the scene?

  2. Try to combine textures in atlases.

  3. If you're using the same texture for 1 object, use the same material as well.

  4. Use textures in PVRTC_4Bits format.

  5. In quality settings change your current settings to Fast or Fastest, disable the shadows if you're using batched lights or reduce the shadow distance.

Here you ca find some more informations:

  1. Dynamic Batching

  2. Quality settings

  3. Optimizations tips

Comment
Add comment · Show 3 · 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 randytayler · Apr 21, 2015 at 03:33 PM 0
Share

Somehow I totally missed "quality settings" in my research. Thanks! I'm also disabling the directional lights since I have the ambien light. The game ain't pretty now, but hopefully it'll still be fun.

Thanks so much!

avatar image Neamtzu · Apr 21, 2015 at 03:43 PM 0
Share

You should bake the lights in lightmaps and then disable the lights. Unity should create a folder with you scene name where saves the lightmap textures. Here you can find the tutorial (it's for Unity 4.x, but you should be able to adapt it for Unity 5.x): http://docs.unity3d.com/410/Documentation/$$anonymous$$anual/Lightmapping.html

avatar image randytayler · Apr 21, 2015 at 05:22 PM 0
Share

The 3 directional lights are the only lights in the scene besides the ambient skybox light. If I take them out, it... huh, it looks pretty good. I'll try that and the other recommendations you made. Thanks!

avatar image
0

Answer by randytayler · Apr 24, 2015 at 06:07 PM

I found my real problem.

The "floor" objects I was generating had rigidbodies attached on accident, so the game was running afoul of massive amounts of physics. I took off the rigidbodies, and the frame rate jumped up to 40-60 fps. I'm very excited.

So, watch out for rigidbodies, everybody. :)

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Substance - Procedural Materials - runtime edit - mobile 1 Answer

Procedural Sword Fighting on a mobile device? 0 Answers

Distorting a plane? Best method? 0 Answers

IL2CPP Bug on android 0 Answers

No Procedural Terrain without lags? 2 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