Radiosity Normal Mapping for Irrlicht

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Radiosity Normal Mapping for Irrlicht

Post by The_Glitch »

Hello everyone I've been working on Directional Lightmaps for my environments. I've made the shaders after reading a lot on the web like Valve's Source paper on radiosity normal mapping. I think this could benefit a lot of users they won't to make there lighting for there scenes as complex as they can and then bake them into the lightmaps and still use bump mapping and specular lighting and
detail textures on there static meshes.


HDR rendering with my radiosity normal mapping. Simple creepy room I modeled in 3ds max.

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Last edited by The_Glitch on Mon Dec 14, 2015 10:36 pm, edited 13 times in total.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: Directional Lightmaps for Irrlicht

Post by christianclavet »

Nice, but how do create the SSBump image? So it's look like the normal map and lightmaps information is embedded inside a single picture? So you need to use the same UV channel?
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Directional Lightmaps for Irrlicht

Post by The_Glitch »

Marked this post as Deprecated

The updated solution now use's regular Normal maps not ssbump maps anymore.
Last edited by The_Glitch on Mon May 04, 2015 6:06 pm, edited 1 time in total.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Directional Lightmaps for Irrlicht

Post by hendu »

It's raining inside ;)

Also you might want to move the rain to after bloom.
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Directional Lightmaps for Irrlicht

Post by The_Glitch »

LOL I know I was testing simple rain and snow effects in Irrlicht. It's not bloom just simple glow, I could never get the bloom extraction shader to work.

Let me know If there's any questions about the DLM shader.
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Directional Lightmaps for Irrlicht

Post by The_Glitch »

Removed Deprecated picture.
Guess no one really cares for Directional LightMaps LOL
Last edited by The_Glitch on Tue May 05, 2015 1:02 pm, edited 1 time in total.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Directional Lightmaps for Irrlicht

Post by Mel »

Well, the directional lighmaps cover a gap that the conventional lightmap doesn't, that is what happens with the usage of normal maps with static lightmaps?. Lightmaps only offer a limited solution, i.e. they're only the light color, and don't take into account the direction, thus, specular highlights are impossible, save you use reflection maps. but the reflection maps have further troubles, they can be unrealistic, irrlicht doesn't support cubemaps, and they are tricky to use (you need worldspace normals for them). So, storing also the light direction on another map, helps to improve the lighting a lot, and that is what DLMs are, maps with the light direction stored, with regard to the tangent space of the texture used. So far, nothing you didn't know.

The only weak spot i see to them is this: a single pixel, after all, may only store a single direction, and adding the directions only lead to lighting artifacts. The engine Sauerbraten makes extensive usage of that technique and shows those issues.

To me, the directional lightmaps are already superated by the light prepass/deferred shading. They use less resources, simpler shaders and they offer much more features than any single lightmapping technique, being the most prominent of them the rendering of deferred shadowmaps. Efectively, per light, you can project the shadows (which can be precalculated, if we wanted them static) that a light would be casting, even on moving objects, and the cost of the render would only cover the unocluded areas the light is covering, being possible to render more lights, with their corresponding shadowmaps, and making the shadowmapping a problem per light, while achieving much better results (the lighting model is complete, and it only adds the final intensities) than any directional lighthmapping technique, but that is my opinion.

Of course, the DLM has that it works with older hardware and uses a simpler approach.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Directional Lightmaps for Irrlicht

Post by The_Glitch »

Yeah your right I don't think I'm at a level to try and Implement Deferred Rendering yet. Figured I would concur forward rendering first lol.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Directional Lightmaps for Irrlicht

Post by Mel »

Believe me, it is worth the effort of implementing a deferred renderer, and it is much simpler than it may look. It is tricky in some places and you have to antialias manually, but after, it is worth every bit of effort you put into it.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: Directional Lightmaps for Irrlicht

Post by christianclavet »

Hi, Mel. I can fake global illumination by pre-processing the lightmap in 3DS Max. If you don't use Lightmaps at all and use only a deferred renderer, how can you get a global illumination look in your scenes?

Image
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Directional Lightmaps for Irrlicht

Post by Mel »

Adding more lights and placing them in the right spots, have you ever heard of the term "fakeosity" ;)

Image

It is much more of an artistical resource than computational but when it is well used it produces almost the same results, and the lights still work on the dynamic objects, thus, it is even a more convenient solution than baking the lighting into a texture when you may have many lights available.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: Directional Lightmaps for Irrlicht

Post by christianclavet »

Interesting concept! Thanks Mel!
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Radiosity Normal Mapping for Irrlicht

Post by Asimov »

Hi The_Glitch,

Your levels are looking great. So when is Cortana making an appearance :D
I agree irrlicht could do with more normalmap support.

PS. Are you doing all this on your own?

PPS. LOL just noticed Master Chief in one of the shots.
The_Glitch
Competition winner
Posts: 523
Joined: Tue Jan 15, 2013 6:36 pm

Re: Radiosity Normal Mapping for Irrlicht

Post by The_Glitch »

It's not really only normal mapping it's basically a lighting solution for static geometry. And yeah I'm doing the work bye myself.
Yeah masterchief he's a work in progress as Irrlicht doesn't support cubemaps yet. So I have to come up with workarounds.
Asimov
Posts: 246
Joined: Thu Dec 04, 2014 7:41 pm
Contact:

Re: Radiosity Normal Mapping for Irrlicht

Post by Asimov »

Hi The_Glitch,

Stupid question but what is a cube map, in reference to your model?
I think Unity uses something like a cubemap to do fake reflections. Is this what you are referring to?
Post Reply