Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by wesleywh · Jul 19, 2018 at 02:34 AM · lightingrenderingoptimizationprofilerlightmapping

Looking For Tips On Optimizing Camera Rendering To Increase Framerate

I am trying to get a better frame rate for my scene.

So a little background...

I have been working on this area for a bit now and I really haven't gotten this where I like it. I am trying to optimize this area to run at minimun 30 fps or above. So far its really just 22+. According to the profiler it looks like my lighting is killing me, no surprise there since I have a lot of lights in this scene.

When I try to lightmap my scene just the floors take like 15 minutes. Each wall I add after that adds an additional 5 minutes. So one tiny room would take me 2+ hours. That's crazy to me.

The other issue I have is cloth physics which tends to take up a lot of time.


Here are the things I have done to try and get a better frame rate.

  • Everything in my area is using LOD's

  • All of my lights are set to "baked" or "mixed" with light probe groups

  • Everything is using either the standard shader or specular shader with Rendering Mode set to "Opaque"

  • I have bake Occlusion Culling

  • Everything in my scene is set to static (Is there something else I need to do for static batching?)


Not sure what else I can actually do. Any suggestions of things I haven't done yet?

Here is a picture of my profiler window and a picture of the scene that I am trying to render.


alt text


alt text

profiler.jpg (105.7 kB)
scene.jpg (176.9 kB)
Comment
Add comment · Show 8
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 wesleywh · Jul 19, 2018 at 10:57 PM 0
Share

I just came across this comment on reddit:

https://www.reddit.com/r/Unity3D/comments/6ymanz/is_the_lighting_system_in_unity_garbage_or_is_it/

Where he mentions a few tips on lighting. I did them and it reduced by currently 30+ $$anonymous$$ bake time to 3 $$anonymous$$utes. I will play around with it some more to get some hopefully better results.

A few things I did

  • Change Lightmap resolution from 40 (default) to 15

  • Turn off Realtime Global Illu$$anonymous$$ation

  • Change Indirect Samples from 500 (default) to 100

avatar image NoDumbQuestion · Jul 20, 2018 at 02:01 AM 0
Share

Also you are using real-time shadow (I know you cook shadow but it still use real-time anyway).

You can bake shadow inside shader and texture. And only use real-time shadow for player.

avatar image wesleywh NoDumbQuestion · Jul 20, 2018 at 02:15 AM 0
Share

I didn't realize that. Is there a link or something helpful to $$anonymous$$ch me a little more about baking shadows into textures and shaders? I thought all that shadow information is baked when I click "Generate Lighting" in the lighting window.

avatar image NoDumbQuestion wesleywh · Jul 20, 2018 at 02:29 AM 0
Share

https://docs.unity3d.com/$$anonymous$$anual/Light$$anonymous$$ode-$$anonymous$$ixed-Shadowmask.html

I think the problem with you is that you set up the scene wrong. It somehow make EveryObject cast shadow and receive shadow for both bake and real-time one. It might be Unity Bugs. You shouldn't have that much shadow compute(Check GPU profiler. It never show by default).

Like very big object like room should not cast shadow. Only receive. Small object should never receive shadow or cast(some surface shader can fake shadow based on light direction)

avatar image wesleywh NoDumbQuestion · Jul 20, 2018 at 02:49 AM 0
Share

$$anonymous$$y wall and pillar prefabs mesh renderer was set to cast shadows as on. I will update that and start going through my scene and start tweaking these other items as well. That's very helpful I actually didn't think about that.

Thanks for the link. You have really helped me out here. So according to that link that is what I am actually already doing. I have gone to my lighting window and set it to "Shadowmask". Almost everything in my scene is set to static as well (saves me a bunch with batching as well, yay!).

So far with everything I am getting closer to 60 fps, some areas still 45 fps, many others are hovering around 55 fps.

$$anonymous$$aybe with a bit more lightmapping and removing these shadow casters (like you said) I can push it over the 60 mark! :D

avatar image wesleywh NoDumbQuestion · Jul 20, 2018 at 02:56 AM 0
Share

I just barely started removing shadow casters and I am already seeing a significant improvement. $$anonymous$$y 45 fps area just got bumped to 50 - 52 fps.

Show more comments

1 Reply

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

Answer by wesleywh · Jul 20, 2018 at 03:34 AM

Thanks @NoDumbQuestion ! He pointed out that I had a ton of shadow casters. I didn't think about it until he pointed it out to me. I switched a few of my prefabs to not cast shadow but only receive and bam! Jumped right up for me. I will have to continue to go through my scene and remove un-needed shadow casters and do as much lightmapping as I can.

I was able to get my frame rate to be consistently 60 fps or above! In the end it had zero effect on how my scene looked it just performed a ton better.alt text

alt text


With a bit more work on fixing cloth physics, baking, and removing shadow caster I can push this well above 60.


scene.jpg (146.1 kB)
profiler.jpg (60.8 kB)
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

160 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image 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

Draw Calls are still HIGH? 0 Answers

Dark dots on Progressive lightbake... 0 Answers

How to hide light from second camera 0 Answers

Physics and Rendering Optimization Issues 0 Answers

,DoRenderLoop_Internal() - How would you optimize this for Android and Iphone? 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