Lightmapping problems
by Jaimi McEntire · in Torque Game Engine · 12/29/2005 (7:33 pm) · 3 replies
Torque's Lightmapping looks good until I start using maps that are a little more complicated. For these issues, I'm using the stock 1.4 demo, and map2dif_plus - but I also saw them under 1.3 and the regular map2dif. To illustrate the issue, I've included a couple of images (there is only simple texturing on the church - it's just a sample, I know it needs lots of work):
Image 1: The lighting on the church near the buttresses, and on the lower block that makes up the floor, appear to be filtering errors -- caused by the lighting information being packed too close, or incorrectly calculated.
Image 2: The lighting here is just plain wrong - Especially in the vestibule (the part in the back that is all lit up). What is common with these two errors are that they are made up of co-planar faces from multiple brushes.
This is the main problem i'm having with Torque right now, and I've also seen other people with this same issue. I've seen suggestions for work arounds (make your walls thicker, etc), but that sometimes works and sometimes doesn't.
I'd like to ask for help in solving this. If you've already found and fixed this, by all means, please share.
If no one has, then lets get together and fix it. I've written a light mapper before (for my old engine, using D3D), but I'm not up on OpenGL, and I'm not really familiar with the internals of torque itself -- Help would be appreciated.
Here are some things I'll initially be looking into:
1. Incorrect collision algorithm missing blocking faces?
2. Not enough space around the lightmaps to account for bilinear filtering?
3. Coplanar faces being merged incorrectly?
4. Too many lightmaps being forced into a single texture (overflow)?
Any ideas - or a complete fix - are welcome.
Image 1:

Image 2:

Image 1: The lighting on the church near the buttresses, and on the lower block that makes up the floor, appear to be filtering errors -- caused by the lighting information being packed too close, or incorrectly calculated.
Image 2: The lighting here is just plain wrong - Especially in the vestibule (the part in the back that is all lit up). What is common with these two errors are that they are made up of co-planar faces from multiple brushes.
This is the main problem i'm having with Torque right now, and I've also seen other people with this same issue. I've seen suggestions for work arounds (make your walls thicker, etc), but that sometimes works and sometimes doesn't.
I'd like to ask for help in solving this. If you've already found and fixed this, by all means, please share.
If no one has, then lets get together and fix it. I've written a light mapper before (for my old engine, using D3D), but I'm not up on OpenGL, and I'm not really familiar with the internals of torque itself -- Help would be appreciated.
Here are some things I'll initially be looking into:
1. Incorrect collision algorithm missing blocking faces?
2. Not enough space around the lightmaps to account for bilinear filtering?
3. Coplanar faces being merged incorrectly?
4. Too many lightmaps being forced into a single texture (overflow)?
Any ideas - or a complete fix - are welcome.
Image 1:

Image 2:

#2
For the next two images, I disable bilinear filtering and display only the lightmaps. As you can see in Image 3, the lightmaps are correct, and the errors are introduced by filtering. But if you look at the closeup of the buttress in image 4, you see that the lightmap is calculated incorrectly to begin with.
Image 3:

Image 4:
12/29/2005 (9:14 pm)
Yes, but unfortunately it doesn't solve all of the problems, and it does eat up a lot of texture ram. I'd like to fix the root cause of the problems.For the next two images, I disable bilinear filtering and display only the lightmaps. As you can see in Image 3, the lightmaps are correct, and the errors are introduced by filtering. But if you look at the closeup of the buttress in image 4, you see that the lightmap is calculated incorrectly to begin with.
Image 3:

Image 4:
#3
12/31/2005 (6:48 pm)
Hey Jaimi, have you checked out the lightmapping in John Kabus' Lighting Pack?
Associate David Montgomery-Blake
David MontgomeryBlake