Ultimate lighting solution?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Ultimate lighting solution?

Post by omaremad »

Allot of irrlichters are creating deffered renderers for easier lightmangement, I have an idea which would provide realtime radiosity utlising deffered lighting (no.. not post process ssao GI, that wastes fill rate and ignores off screen light bounces).

The requirements are the following:
-deffered rendering engine
-static mesh with lightmap coordinates(i.e: unique mapping of all the texels)
-CPU side calculation of light at "map sensors"

map sensors are points on the map where direct lighting is estimated with the cpu then a virtual light is sent to the defferd rendering system to bounce the light.

Image

So the render sequence would be
========CPU===========
///precalculation, create map sensors and find out surface diffuse colour at location

/////loop/////
calculate light intensity at each map sensor
multiply with precalculated surface diffuse
create deffered virtual lights
========GPU===========
render normal lights
render virtual lights

This technique is similar to the technique called "light splatting" except its not post process and thus takes into account off screen lightbounces.

Code that works out the sensor positions and surface colour is already part of my gpurad application, the diffrence is this maybe possible to do in realtime since its rendering in a deffered system rather than to a light map

Anyone intrested in doing this on their deffered engine? :lol:
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

You're crazy! .. jk carry on, carry on :P
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Post by 3DModelerMan »

Have you heard of deffered instant radiosity? That can be done at ~50fps.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

Whoa BlindSide who are you :P :lol:
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
ChaiRuiPeng
Posts: 363
Joined: Thu Dec 16, 2010 8:50 pm
Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..

Post by ChaiRuiPeng »

blindside i have heard so much about you :)
ent1ty wrote: success is a matter of concentration and desire
Butler Lampson wrote: all problems in Computer Science can be solved by another level of indirection
at a cost measure in computer resources ;)
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

Yes... doesn't brush his teeth, couldn't tell A from Z and.. impotent, they say :lol:
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
fmx

Post by fmx »

LOL, I'd show more respect to admins if I were you
...but still :lol:

@omaremad
interesting idea, so the light "map sensors" are supposed to be manually placed during environment/level creation, or are you suggesting procedural generation and placement of the sensors at load-time?
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

You can do even better. how this will work with heightmaps for realistic surfaces? i wanna see a screen shot where the lighted item is also heightmapped/normal mapped.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

fmx wrote:LOL, I'd show more respect to admins if I were you
...but still :lol:
I think that irrlicht devs are non-stupid people, who can see that I am joking :wink:

Anyway, i have though about this, and come up with a (perhaps even crazier) solution: global illumination as a post processing effect. You use pixel positions to calculate the distance between the current pixel and the surrounding ones and perhaps also normals in order to have lighted only the areas that a visible amount of reflected light hits. You could then stack this effect multiple times to have multiple passes. Crazy or not crazy? :)
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

The whole point is not to do it in post process... so you can take into account offscreen lighting.

I tried to work an example using sudis deffered system but it always seems to segfault even with his own example code :(, im also too lazy to make a whole new deffred system.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

Ah. I didn't know that GI is generally done as a post processing effect.

If you want, you can try it with my deferred thingy, but it's in alpha state. Supports all kinds of lights and basic post processing system https://bitbucket.org/entity/irrrenderer
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
Post Reply