2 registered members (7th_zorro, dr_panther),
724
guests, and 3
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
HDRI or Image based lighting
#45742
05/17/05 10:02
05/17/05 10:02
|
Joined: Mar 2005
Posts: 18
voodoofactory1
OP
Newbie
|
OP
Newbie
Joined: Mar 2005
Posts: 18
|
Hi all,
I just finished wathching the PS3 presentation and I'm truly impressed. I was a bit dissapointed by the new generation when I first saw all the xbox 360 stuff, but the PS3 gave me new hope. Anyways, it seems that HDRI lighting is becoming very important in the coming generation of computer games. Rightfully so, I might add, because HDRI is one of the best and 'cheapest' lighting methods I can think of. The ps3 presentation made me remember an idea I had some time ago. I don't know how real HDRI could be implemented in 3DGS(I know how HDRI works, but only in render engines), but I do have an idea for a sort of fake HDRI, that should be relatively easy to implement in 3DGS.
My idea was to convert a HDRI map to a standard six panel cube HDRI map. You could also use 3DGS to make that cube map, by making a standard cubemap(the 6x 90 degrees screenshots technique) and then bring it in photoshop to make it useable as a HDRI map. (If we're going to develop this type of HDRI for 3DGS, I'll make a short tutorial for making the map.) So, when you've got your HDRI cube map ready, you'd have code the shader. Basically it could work as a normal environment reflection shader(as in the wiki and templates) with a couple of alterations. Instead of simply blending the two textures(skin and reflection) the normal way, it should be blended like using the 'soft light' blend option in photoshop. All colours under RGB 128,128,128 should should darken the skin and all above should lighten. Furthermore, the colour of the 'reflection map' should be multiplied with the colour of the skin.
This is the basic principle that should work for a lot of situations. There are two things that could be added: - the glow shader(from the shader forum) using Matt's renderview Dll. A soft bloom would help the effect tremendously. - Realtime environment mapping, also using Matt's renderview Dll and the realtime environment mapping script made by... Matt, Ventilator or Steempipe? This way you could have realtime HDRI.
Were you to add these last two effects to the shader, you would have a true HDRI lighting system. I do think it would make the effect a bit heavy to handle, but on the other hand, you could remove dynamic lights(just use shadowmaps) and you don't need to use it on all entities(for example, you could just use it for the player).
I'm posting this idea, because I think it could be a great shader and a great addition to 3DGS, and I myself have no experience whatsoever with shaderprogramming.
So what do you think?
BTW. I'm not really a 'guest'. I have been working with 3DGS for four years now, I just lost all my login info.
Last edited by voodoofactory1; 05/18/05 09:26.
|
|
|
Re: HDRI lighting
[Re: voodoofactory1]
#45743
05/17/05 11:08
05/17/05 11:08
|
Joined: Sep 2004
Posts: 64
angel1
Junior Member
|
Junior Member
Joined: Sep 2004
Posts: 64
|
|
|
|
Re: HDRI lighting
[Re: Matt_Aufderheide]
#45748
05/17/05 20:22
05/17/05 20:22
|
Joined: Jun 2004
Posts: 241
muralist
Member
|
Member
Joined: Jun 2004
Posts: 241
|
HDRI has a much broader range of lighting values so the solution you described would fake it for a nice image-based lighting, but not be true HDRI lighting. See http://debevec.org
|
|
|
Re: HDRI lighting
[Re: muralist]
#45749
05/18/05 08:18
05/18/05 08:18
|
Joined: Mar 2005
Posts: 18
voodoofactory1
OP
Newbie
|
OP
Newbie
Joined: Mar 2005
Posts: 18
|
Ah, great to see there is some interest. First off, I'll try to explain the idea I had a bit better. I wanted to start with a model with a skin containing an alpha channel. The alpha channel determine how 'reflective' each part of the model would be(Just as you would do with normal environment cube reflection mapping). Then you'd have the cube map, which would also have to contain an alpha channel. This alpha channel would determine the intensity of the reflection. For example the brighter the light in the cube map, the more opaq(or white) that part of the alpha channel would be. So the alpha channel in the models texture would determine how much CAN be reflected and the alpha channel in the cube map would determine WHAT and HOW MUCH would be reflected. This is all just me thinking as low tech as possible. But while I was surfing a couple of other forums I came across a thread discussing whether or not KillZone 2 could really be rendered by the PS3. One of the people trying to prove it could, came with this link: http://www.ati.com/developer/shaderx/ShaderX_DiffuseCubeMapping.pdf For what I can gather this would be even easier and even better than my technique. There's a link to a demo which uses this method and it looks pretty good. Furthermore they say that there's virtually no performance impact.
|
|
|
Re: HDRI lighting
[Re: voodoofactory1]
#45750
05/18/05 08:41
05/18/05 08:41
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
I have read this article, and this doesnt appear to be related to high dynamic range illumination, and seem to be a cheap global illumination, but i cant imagine that the lights could be easily accumulated using the current shader or redner to target features. In reality, how often do you really need more than 3 or 4 lights at a time? in that case, you can handle each light in a normal per-pixel fashion. The point of HDR is that by using floating point textures, you can have arbitrary brightness effects, which take the place of lens flare/bloom, etc, for a more realistic approximation of biological vision. I suppose this method could be used to good effect in certain circumstances, but i cant imagine an entire game lit this way all the time. Also, i dont see how this lighting method can achieve a blinn/phong specular reflection.
|
|
|
|