Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bump-map aware Lightmapper?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition
View previous topic :: View next topic  

Lightmapper which casts shadows on bump maps?
Useful
50%
 50%  [ 3 ]
Why not
16%
 16%  [ 1 ]
Totally useless
33%
 33%  [ 2 ]
Total Votes : 6

Author Message
HardTop
Member


Joined: 10 Feb 2006
Posts: 15
Location: Belgium

PostPosted: Thu Jun 22, 2006 11:19 am    Post subject: Bump-map aware Lightmapper? Reply with quote

Hi folks,

I'm just thinking something that could be really useful:
As you can see it in the User Projects section of the forum (topic HT3D), I'm developing a 3D engine, featuring bump-mapping. The issue I have is that when I generate lightmaps on these bump-mapped textures, the lightmapper doesn't of course cast shadows on the bumps. Do you people think it could be useful/quick to develop enough to provide us with that feature in a future version of DeleD (be it PRO) ?

Thanks for your attention

Laurent AKA HardTop
_________________
Sailing on the seven seas the
day tripper diem's ready
Jack the Ripper Owens Wilson
Phillips and my supper's ready
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Thu Jun 22, 2006 11:36 am    Post subject: Reply with quote

Bump mapping is a real time effect, the whole illusion only works when you view it from the right angle, to bake this in would kill the illusion. Confused Also it's a per texel thing, and the lightmaps are not 1:1 with the texels in the bump maps most of the time.

Just a thought.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
HardTop
Member


Joined: 10 Feb 2006
Posts: 15
Location: Belgium

PostPosted: Thu Jun 22, 2006 1:13 pm    Post subject: Reply with quote

I'd say that Parallax mapping is view dependent, whereas bump mapping is light dependent.
We can consider the lightmapping source as a static light which projects shadows on the bumps, regardless the viewing angle

As for the ratio, i'd say it depends on the UV coordinates

HT
_________________
Sailing on the seven seas the
day tripper diem's ready
Jack the Ripper Owens Wilson
Phillips and my supper's ready
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Thu Jun 22, 2006 1:19 pm    Post subject: Reply with quote

I think the biggest problem is that not only the lumels aren't 1:1 with the texels from the bump/normal map, they are usually a _lot_ bigger (unless you are generating lightmaps at an insane resolution). Bumpmaps are used to add extra detail at exactly that fine grained level where lightmaps are just a blur.
Back to top
View user's profile Send private message Visit poster's website
Sindwiller
DeleD PRO user


Joined: 25 May 2005
Posts: 331
Location: Zürich. Switzerland

PostPosted: Thu Jun 22, 2006 3:49 pm    Post subject: Reply with quote

Well, i think you mean Horizon Mapping (Lightmaps/Shadow Maps generated using Bumpmaps). I readed somewhere an article about it... a, here:

http://www.delphi3d.net/articles/viewarticle.php?article=bumpmapping.htm

(Part 5.2)

Wfr, Sindwiller
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Thu Jun 22, 2006 7:53 pm    Post subject: Reply with quote

I don't think at this point in time DeleD should be calculating Horizon maps. Horizon maps are directly derived from the underlying bump map (i.e. they are not based on the geometry or the lights)... oh, did I mention that DeleD is not even bump map aware yet?

Then again, I don't really think horizon maps are what Hardtop had in mind. They are not exactly a common technique in game engines.
Back to top
View user's profile Send private message Visit poster's website
HardTop
Member


Joined: 10 Feb 2006
Posts: 15
Location: Belgium

PostPosted: Thu Jun 22, 2006 9:36 pm    Post subject: Reply with quote

Yeah, horizons maps are used to generate real-time, self-casting shadows with bump maps. What I'd like to see here is the same as in a 3D engine: a lightmapper which uses the normals stored in a bump map to generate extra light detail on a surface.

The purpose is to be able to use no extra OpenGL light to see the bump effect. At this time, I see the bumps only when the flashlight is on. If I switch off the OpenGL light, I still see the lightmapped geometry, but the bump effect disappears, of course.

HT
_________________
Sailing on the seven seas the
day tripper diem's ready
Jack the Ripper Owens Wilson
Phillips and my supper's ready
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Sindwiller
DeleD PRO user


Joined: 25 May 2005
Posts: 331
Location: Zürich. Switzerland

PostPosted: Fri Jun 23, 2006 10:19 am    Post subject: Reply with quote

Well, "normal" Bumpmapping is crap (correct me when im wrong^^). It is pure Texture-Blending, no per-pixel lighting there. I would prefer either normal mapping or parallax/parallax occlusion mapping. They maybe cost more performance but have more effect than Dot3(right?) Bumpmapping.

Wfr, Sindwiller
Back to top
View user's profile Send private message
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Fri Jun 23, 2006 5:53 pm    Post subject: Reply with quote

Hardtop: like posted above, on an average surface the bumpmap is at a way way higher resolution than the lightmap. Remember the lightmap is not per-pixel, far from it. The resolution is closer to 1 lumel every 16 texels (as a very rough average). This means your bumpmap will only result in approximately correct lighting if it is very very low-resolution... in which case you wouldn't be using a bumpmap in the first place.

If you know any existing implementations of the technique you propose, please point me towards them. Perhaps there are simple ways to overcome the resolution-issue, but at the moment I don't see how.

That said, we might actually implement this behaviour in the future, but only after DeleD has full integrated normalmap support... at the moment, DeleD doesn't understand the concept of normal maps at all, so adding support for it to the lightmapper is simply not an option.
Back to top
View user's profile Send private message Visit poster's website
HardTop
Member


Joined: 10 Feb 2006
Posts: 15
Location: Belgium

PostPosted: Fri Jun 23, 2006 8:40 pm    Post subject: Reply with quote

to Sindwiller: what I mean is normal mapping: a normal map storing normals XYZ into RGB values

to PJ: I understand what you mean. Each lumel is way lower resolution than each "bumpxel" Smile The lightmapper is currently not per-pixel. I understand it's not an option, and I don't know how to overcome this issue. It was just a thought Smile thanks anyway for giving feedback folks! Keep up the good work!

HT, a happy DeleD PRO user
_________________
Sailing on the seven seas the
day tripper diem's ready
Jack the Ripper Owens Wilson
Phillips and my supper's ready
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Fri Jun 23, 2006 8:46 pm    Post subject: Reply with quote

HardTop wrote:
to Sindwiller: what I mean is normal mapping: a normal map storing normals XYZ into RGB values

to PJ: I understand what you mean. Each lumel is way lower resolution than each "bumpxel" Smile The lightmapper is currently not per-pixel. I understand it's not an option, and I don't know how to overcome this issue. It was just a thought Smile thanks anyway for giving feedback folks! Keep up the good work!

HT, a happy DeleD PRO user


Why not a shader that takes the lumel as the light value and modifies it by the normal in the normal map layer? You get the best of both worlds. (I don't do shaders, and I'm not the guy to get talking about that low level stuff, but sounds like it might work?)

I remember they did something like that in the Buffy Game on xbox and it looked really nice. The lightmaps were just the standard low res ones, but the bricks were bumpy underneath it, and other objects had highlights on them too as if lit in realtime...
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Twixn
DeleD PRO user


Joined: 01 Dec 2005
Posts: 136
Location: Melbourne Australia

PostPosted: Sat Jun 24, 2006 11:28 am    Post subject: Reply with quote

IMO the only way to combine bump mapping and lightmapping
nicely is to remove the NdotL calculation from the lightmapper
in DeleD, and use only the distance attenuation and shadows
from the lightmap, while shifting the NdotL calculation
to the realtime shader.

Otherwise Using bumpmapping and lightmapping would cause
the NdotL calculation do be done twice, causing the scene
to be inconsistantly darker than it should be.

Although I think Vampyre_Dark said the same thing. Razz

-Twixn-
_________________
Failure is not an option!....It comes bundled with the software.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Sun Jun 25, 2006 3:03 pm    Post subject: Reply with quote

Jokingly: I think DeleD versions before 1.2 didn't do NdotL at all, so you could trying reverting that that. Laughing

But on a serious note, good point. It would mean that even light with a negative NdotL would still affect the surface in the lightmap, right? (as the lokal bumpmap angle could be a lot different)

If we'd make an option like that available through the interface at some point in time, what would it be called? "Light angle falloff' disabled/enabled?

Sounds a bit arcane for a material setting. And it's very technical, because in the eyes of an artist it's just the setting that makes 'the lighting look all wrong' (until you do the post-processing stage).

Once DeleD gets full support for bump/normalmapping, this setting would be implicit. I wonder if it's something worth having before that time.

It depends a bit on feasible it would be to cover up the 'double-fallen-offiness' (lol) of the scene for someone doing bumpmapping (like hardtop and team).
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum