Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
HDRI or Image based lighting #45742
05/17/05 10:02
05/17/05 10:02
Joined: Mar 2005
Posts: 18
V
voodoofactory1 Offline OP
Newbie
voodoofactory1  Offline OP
Newbie
V

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
A
angel1 Offline
Junior Member
angel1  Offline
Junior Member
A

Joined: Sep 2004
Posts: 64
Very,very good idea...

Re: HDRI lighting [Re: angel1] #45744
05/17/05 11:22
05/17/05 11:22
Joined: Mar 2005
Posts: 18
V
voodoofactory1 Offline OP
Newbie
voodoofactory1  Offline OP
Newbie
V

Joined: Mar 2005
Posts: 18
Now we just need some people who can code... Matt, Ventilator, Steempipe, Ello..? Anyone? I mean common', how awesome would it be to have HDRI in 3DGS? It'd put it on the same page as the highend next-gen engines (well not really, but it'd still be an awesome feature).

Re: HDRI lighting [Re: voodoofactory1] #45745
05/17/05 14:20
05/17/05 14:20
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
HDR lighting is not yet possible in A6, because it requires floating point textures. I suppose you could fake it, but what's the point?

Re: HDRI lighting [Re: Matt_Aufderheide] #45746
05/17/05 15:27
05/17/05 15:27
Joined: Mar 2005
Posts: 18
V
voodoofactory1 Offline OP
Newbie
voodoofactory1  Offline OP
Newbie
V

Joined: Mar 2005
Posts: 18
For the same reason people use environment cube reflection mapping: If you can't have the real thing, go for the second best. Also, I would imagine that this method wouldn't require too much coding.
I've just now came up with an even easier way to do it, and all I would need is the ability to use the alpha channel of the environment cube map. Sounds like a small alteration of the environment cube reflection shader, but as said before, I don't know much about shader programming.

Re: HDRI lighting [Re: voodoofactory1] #45747
05/17/05 19:26
05/17/05 19:26
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
Can you explain this concept more clearly? I'm having trouble understanding exactly what using this 'environent map' ill accomplish.

Re: HDRI lighting [Re: Matt_Aufderheide] #45748
05/17/05 20:22
05/17/05 20:22
Joined: Jun 2004
Posts: 241
muralist Offline
Member
muralist  Offline
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
V
voodoofactory1 Offline OP
Newbie
voodoofactory1  Offline OP
Newbie
V

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
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

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.

Re: HDRI lighting [Re: Matt_Aufderheide] #45751
05/18/05 09:00
05/18/05 09:00
Joined: Mar 2005
Posts: 18
V
voodoofactory1 Offline OP
Newbie
voodoofactory1  Offline OP
Newbie
V

Joined: Mar 2005
Posts: 18
I'm aware that this is not true high dynamic range lighting. Basically it's just image based lighting. It doesn't have a high colour range, but with the method discribed it would be dynamic. And ofcourse you couldn't light an entire game this way(well you could, but why would you), but I think dynamic objects such as the player could be lit very well by image based lighting(let's call it that). It seems they're using this in the Source Engine as well, which does a pretty nice job(I know, don't compare engines).
Specular effects could be made by upping the brightness and contrast of the cubemap, either statically in photoshop or dynamically in the engine. But I don't know how good that effect would be. A screen glow would definitely help.

Basically it would make for a very good GI-like look, comparable to the standard Brazil render in Max, or Final Gather in Maya.

Btw. are you interested in developing such a shader or..?

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1