- Home /
Large scene with point lights
Hello,
I'm currently building a large scene in Unity that has a lot of point lights. Each room in the scene (~40 rooms) has 2 point lights and I am using deferred rendering (to enabled shadows so that light doesn't leak out of the room).
When using forward rendering my game runs at 60 fps, but when switching to deferred lighting it runs around 25-30 fps (because its calculating the soft shadows for the point lights I'm assuming).
How can I solve this problem while still preventing lights from leaking through walls?
Thanks!
Area lights? Have you light mapped the scene already?
No the scene is not lightmapped. I was trying to avoid lightmapping because of the lights being able to turn on and off. I think the only solution to turn lights off when lightmapping is to set the lightmapIndex of all renderers in that room to 255, correct? But what would happen to walls that receive light from two point lights, when I set the index of the wall to 255 would it start receiving realtime light ins$$anonymous$$d? Or would the entire wall be black even though one side still has a light turned on.
Oh boy, this is really not my area. From what I can tell, you need to use light probes (if they work the way I think they do in unity) so your lights can tell when they hit the wall. This way you would not need to use deferred rendering. Thats about the most I can do. Your right, by the way, in avoiding lightmapping when turning off light. It would create shadows with no visable source. Good luck!
Okay I'm still slightly confused. I think I get it, but how would I switch individual light probes to be on/off? I know I can switch individual renderers using renderer.lightmapIndex, but I'm unsure how to select which light probe is active.
http://www.youtube.com/watch?v=CuBf-2YRo9g
In the above video the guy seems to switch an individual light probe, however I have a feeling that he just baked the entire scene with 1 light changed and changes the lightmap at runtime.
Sorry thats, like I said, the best I can do. I recommend asking the member of the account how he did it. I will look into changing the lightmap at runtime though.
Answer by MonsterGamingHD · Apr 12, 2013 at 01:03 AM
Use the sample blob shadow that unity provides in the free version. You can use it for pro as well. Just type in the Project "Blob" A black circle should come up. Just drag it in there. Trust me, I have Unity Free, and I dont use it, but meh..
Your answer
Follow this Question
Related Questions
Turned on deferred lighting, no shadow 0 Answers
Problem with Point lights and defered lighting on walls 2 Answers
How to fix few shadows significantly lowering fps? 1 Answer
Deferred Rendering lighting bug. 0 Answers
Light artifacts 0 Answers