How to create light maps at runtime?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
TimVasko
Posts: 9
Joined: Thu Jun 26, 2008 7:25 pm
Location: Maryland, US

Post by TimVasko »

If you want something high quality, try spherical harmonics lighting. C++ source code may be found on paul's projects (google). Up to you to implement it into irrlicht. Not completely runtime, but if you get the proper calculations you'll be straight.

Don't bother buying source code to irrEdit for lightmap generation, its a useful algorithm, but inapplicable at runtime at acceptable speeds. Someone clever suggested use of shadow maps. That may work a lot better, but quality is questionable.

Consider looking into spherical harmonics lighting.
---------
I'm on your side.
---------
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

...I've heard about xeffects, but what is giles?

christianclavet, thanks for your advice and techniques, I'll take them into account. I will also have a thought on the technique you last mention... I was surely mistaken when I wrote that ambient occlusion is not a good solution for what I want. Can it generate sharp, direct shadows from point light sources?
- Gile[s] is an external Lightmapper application.

- You could generate sharp shadows with stencil shadows solution. They are good for that. But you will have to use also the ambient occlusion to have this "radiosity" realistic look. If you're not using ambient occlusion, you would have nice shadows, but your world will look flat and unrealistic.

Personnaly I use Gile[s] to create my IRRlicht level and "bake" shadows in Lightmaps (Could be also done freely with IRRedit). But since your scene is generated directly inside the computer, you have to look on real-time solutions. You could also check the trick from Halifax that could be great.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I made this tutorial for these kinds of games:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=29105
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply