x


Problem with beast lightmap vs realtime lightning

Hello,

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.

Thanks!

Peter Klooster

more ▼

asked Oct 04, 2011 at 01:33 PM

CrashKonijn gravatar image

CrashKonijn
1 3 2 2

you using Unity Pro? If so, then dual lightmaps might be a solution for you!

Oct 04, 2011 at 01:34 PM syclamoth

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.

http://www.geomerics.com/

http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/

Oct 04, 2011 at 02:28 PM asafsitner

Well, you need Unity Pro to use deferred rendering, anyway.

Oct 04, 2011 at 02:42 PM syclamoth

Yes, yes you do. You also need Unity Pro to use external libraries.

Oct 04, 2011 at 02:45 PM asafsitner

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

Oct 04, 2011 at 03:35 PM CrashKonijn
show all comments (comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x504
x171
x87
x46

asked: Oct 04, 2011 at 01:33 PM

Seen: 2017 times

Last Updated: Oct 07, 2011 at 09:07 AM