I'm currently working on a game for school and I'm having some problems with the lightning of our game. The idea of the game is that you play inside of a maze inside a sphere and the style is based on avatar (the awsome movie, not the last airbender). The surounding is dark and the scene is lightend by a lot of glowing plants. Since you play inside of a sphere it's always posible to see almost all the lights in the scene in 1 shot (or at least lots of them).
Now comes the problem; I tried to test it if it just was posible to render all the lights realtime (I knew it would not be possible to render that many lights but unity is awsome so I tried (: ).
The first solution i'd think of is to bake all the lights in beast lightmap and then make all the lights only react to the character. This way I could just turn off al the lights and then when the character comes close to a light I would turn it on and you would see the light of the plant effect on the character. No problem so far, the problem comes with the lights (the light that the character caries and lights of spells) that also should effect on the walls. This would only be possible if I could turn of a lightmap of a wall but I can't get that to work... (If one of you knows how to do this it would fix my problem)
The seccond thing I could think of is using deferred lightning. In principle this would fix my problem I had at first; When a light is far away it would be a lightmap and when I get close the lights become realtime lights in witch the light of the plants shine on the character/wall and the light of the character also reacts on the wall.
Now I got a new problem; The area it renders in realtime is an area around the camera. When I would cast a spell to the other side of the level I would not bee able to that light having any effect on the other side of the level. This is also a problem when you bring in another point of our game: splitscreen multiplayer. Each camera renders realtime within an area of its own position. This is especialy ugly when 2 players come close to eachother. You would see the lights on eachother jump on and of. A solution to this would bee if I coulds specify sertain area's that should be rendered in realtime instead of just the area around each camera.
I hope I was able to explain my problem to you and that someone knows a solution.
you using Unity Pro? If so, then dual lightmaps might be a solution for you!
Or Unity 3.5 with Lightprobes.
Or just deferred rendering, as it should be able to handle a couple hundred lights (do watch for shadows though, they're getting real expensive real quick. Especially soft shadows). Combine that with Occlusion Culling and you should be good to go.
Alternatively, you could develop real-time lighting system or use an existing one like Geomerics's Enlighten or Intel's Embree.
Well, you need Unity Pro to use deferred rendering, anyway.
Yes, yes you do. You also need Unity Pro to use external libraries.
Thanks for your answers!
Yes I am in fact using unity pro.
@ syclamoth I'm not really seeing how dual lightmaps would help me, I still would have the problem that there would not be any realtime lightning besides the area close to each camera. (right?)
@ Asafsitner Lightprobes actually looks like what I need but there isn't any release date for unity 3.5 and the roadmap doesn't mean its defenitly in the next release. I still have 4 for weeks before it needs to be finished so I can't wait for unity 3.5
"Please note that the features in this roadmap are not commitments! They may or may not end up in a final release. If a feature isn’t ready in time it will not be included in the release."
As I explained I already tried deferred rendering and my brand new 15" mb pro gets an enormous fps drop If i go past 400 lights.. The goal is to let it work on an white mb from 2008 so just using deferred rendering isn't going to work.
(I just saw I anounced deferred rendering as deferred lightning in my question)
And I gues writing my own lightning system isn't going to work for me ether...
I hope one of you has another idea to help me out as long as lightprobes are not yet available
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users post good questions and use the site effectively we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
4 People are following this question.
Lightmap and Realtime shadows: Different colored shadows
Mobile BEAST lightmapping shader/lighting question
Beast Lightmap + Fake specuar / shininess
How can I increase the Texture Size of the Lightmaps created with Beast?
Beast Lightmapping - No shadows when doing "Bake Selected"