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 

Lightmapping artifacts ("features" of the techniqu

 
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  
Author Message
Paul-Jan
Site Admin


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

PostPosted: Thu Dec 09, 2004 1:44 pm    Post subject: Lightmapping artifacts ("features" of the techniqu Reply with quote

I am posting this not only as an answer to a question, but also as a reference for everyone that works with the DeleD Lightmapper.

In some other thread, not too long ago, Vampyre Dark posted a screenshot similar to the one below (you might notice how I removed most of the vases so that I didn't have to get coffee everytime I gave the lightmapper a testrun Razz). Notice the black line of shadow along the skirtig (baseboard). Also notice how the black line discontinues underneath the window.



Unfortunately, this is not a bug in the lightmapper, but simply a shortcoming of the techniques used. The skirting casts a shadow on the back wall, and because of the low resolution of the lightmap, the shadow texel (one pixel on the lightmap) is actually bigger than the skirting. What you see is the edge of that texel.

Now why doesn't that happen on the wall below the window? Because that polygon is smaller, so the corresponding lightmap is smaller, so the shadow texel stays below the skirting. As a prove, here is the same screenshot, but now with the skirting removed:



Although rendering lightmaps at a higher (and dynamic) resolution makes this problem less pronounced, it won't go away completely. The only real solution is to adept your geometry. Don't stack your geometry, only model the faces that are actually visible. If you would remove the part of the wall that is hidden behind the skirting, the artifact would disappear.
Back to top
View user's profile Send private message Visit poster's website
Daaark
DeleD PRO user


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

PostPosted: Thu Dec 09, 2004 2:13 pm    Post subject: Reply with quote

Okay, question.

I would usually deleted all the unseen faces in my scenes. But when I made that, I left all the wall peices as boxes, because I figured I needed something to block the light from the outside.

In other lightmappers I have used, if the otherside of the wall wasn't there, the light would have shined right through. The 1 side of the wall wouldn't block it, because the normal was facing the other way. Is this the case with deled? If I had deled all the other faces of the wall, would it shine through the back?

The size of the faces was also never an issue, because they would be sliced to fit.

It would be nice to know all the little 'rules' of the Deled lightmapper. Nothing complex. Maybe just a list of do's and don'ts.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
granada
Team member


Joined: 07 Aug 2004
Posts: 1955
Location: England

PostPosted: Thu Dec 09, 2004 2:30 pm    Post subject: Reply with quote

Quote:
It would be nice to know all the little 'rules' of the Deled lightmapper. Nothing complex. Maybe just a list of do's and don'ts


Posting a few rules is a good idea i think Very Happy

dave
_________________
AMD Phenom(tm)IIx6 1090t Processor 3.20 GHS
8.00 GB memory
Windows 7 64 bit
Nvida Geforce GTX 580
Back to top
View user's profile Send private message Visit poster's website
khris
Member


Joined: 08 Aug 2004
Posts: 55
Location: norwich, england

PostPosted: Thu Dec 09, 2004 6:10 pm    Post subject: Reply with quote

Vampyre_Dark wrote:
if the otherside of the wall wasn't there, the light would have shined right through. The 1 side of the wall wouldn't block it, because the normal was facing the other way. Is this the case with deled? If I had deled all the other faces of the wall, would it shine through the back?


My answer to that is yes, i lightmapped one of my level and cutting down on polys i merely modelled the (inside facing) polys that the player would only see. Lightmapping caused the light to stream right through wall and so there was sunlight where there should be dark building. Also if I used 1 large poly as a floor, if any part of it was normally exposed outside then the lightmap would "follow it" right into the building as if the building was not there.

Guess it jus means i gotta work on making proper walls lol. I do kno wot u mean tho, its good to kno all the little rules.

Hope that helps anyway

khris
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


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

PostPosted: Thu Dec 09, 2004 8:33 pm    Post subject: Reply with quote

The 'rules' is exactly why I started this thread, as issues come up I'll post things here. I actually don't know of any other rules atm, so that's why there is only one Smile

Don't get me wrong, you were right to include the outside facing polygons as well, because the DeleD lightmapper (don't shoot me on this one, I changed it a few times during development and I am rather sleepy at the moment) also does 'culling' intersection tests, as they are called.

In the example above however, you have _4_ layers of geometry instead of two. I'll try to explain things below using curley braces (yeah like that will make things any clearer Very Happy):

Code:

{ }         < -- wall
{ }         < -- wall
{ }{ }     < -- wall, skirting


The pointy part of the curley brace is the way the polygon is facing. The shadow from the fourth poly brace in the bottom hits the second one (which is a hidden face). Row The "correct" way of doing this is:

Code:

{ }       < -- wall
{ }_     < -- wall
{    }    < -- wall, skirting


If this doesn't make any sense I'll try to whip up a proper line-drawing in the morning Wink
Back to top
View user's profile Send private message Visit poster's website
khris
Member


Joined: 08 Aug 2004
Posts: 55
Location: norwich, england

PostPosted: Thu Dec 09, 2004 10:45 pm    Post subject: Reply with quote

yeh i kno what u mean PJ. just model all extruding surfaces like skirting boards or any object that overlaps another as a nice, easy to handle poly, instead of being lazy and jus sticking another cube over the front of the wall for example. im tired too so sorry if the interpretation sucks a little. maybe ur line drawings will help explain it better lol.

khris
Back to top
View user's profile Send private message Visit poster's website
Daaark
DeleD PRO user


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

PostPosted: Fri Dec 10, 2004 5:27 am    Post subject: Reply with quote

Paul-Jan wrote:
The 'rules' is exactly why I started this thread, as issues come up I'll post things here. I actually don't know of any other rules atm, so that's why there is only one Smile
If this doesn't make any sense I'll try to whip up a proper line-drawing in the morning Wink


I've understood that since it was brought up. Makes perfect sense to me. I

've seen another issue in a new map, but it will be awhile before I have any screenshots of that. It was an outdoor, walk-in tomb, with the sun setting behind it, and there was a huge patch used as a landscape with the vertices pulled up randomly to make a crappy terrain. Smile There was like straight line artifacts on it.

I think I know what caused it. Just want to be sure. Smile I guess it's one of the problems of using a point light as the sun.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Paul-Jan
Site Admin


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

PostPosted: Fri Dec 10, 2004 3:24 pm    Post subject: Reply with quote

*lol* I know you guys pretty much understand these kinda problems, I am trying to create a reference here for people that don't.

@Vampyre, if you find the time to create a screenshot and all, could you post it outside this thread? Because if it is the problem I think it is, it is a 'bug' (at least, an artifact that I believe might be fixable), and I want to reserve this thread for things that are problems that can not be solved in the code, so have to be taken into account by the modeller. But by all means, do POST the problem, I need all the problem-cases I can get my hands on.
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


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

PostPosted: Sun Dec 12, 2004 10:29 am    Post subject: Reply with quote

Another feature/shortcoming of the lightmapping technique you might want to take into account while modelling:

A the moment, DeleD doesn't support 'normal groups', and lightmapping doesn't support normal smoothing. This makes the lightmapping ok for indoor scenes (you don't want light to be smoothed around the corners of a wall), but could be kinda bad for landscapes or curved surfaces. The light would change abrubtly from one face to the next.

This features will surely be added to the lightmapper at some point in the future, but I am not quite sure how the smoothing groups should be controlled by the user. Maybe it would even be enough to assume normals should always be smoothed, unless an angle is < 100 degrees or something.
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