Help! Lightmap size issue
by Peng Du · in Torque Game Engine · 03/26/2007 (10:51 pm) · 2 replies
Hi,
I followed these steps:
1. Set the worldspawn's light_geometry_scal to 8
2. Set the grid size to 1024
3. Make a 2048*2048*2048 cube, all point forced to grid
4. Save a .MAP
5. Convert to DIF
I got this message:
Light map too large: 258 * 258...
But I think 2048/8 should be exactly 256... and I then
1. Change the grid size to 128
2. Reduce the cube size in XY plane by 3*128, reduce in Z axis to 2*128
3. Convert to DIF
Then I got this:
Not a power of 2?
Why? All my cube vertex is forced to grid, and the grid size is always power of 2.
Then I,
1. Reduce the cube size in Y axis to 7*128
Converted without any issue.
I am so confused.
Any help will appreciated!
I followed these steps:
1. Set the worldspawn's light_geometry_scal to 8
2. Set the grid size to 1024
3. Make a 2048*2048*2048 cube, all point forced to grid
4. Save a .MAP
5. Convert to DIF
I got this message:
Light map too large: 258 * 258...
But I think 2048/8 should be exactly 256... and I then
1. Change the grid size to 128
2. Reduce the cube size in XY plane by 3*128, reduce in Z axis to 2*128
3. Convert to DIF
Then I got this:
Not a power of 2?
Why? All my cube vertex is forced to grid, and the grid size is always power of 2.
Then I,
1. Reduce the cube size in Y axis to 7*128
Converted without any issue.
I am so confused.
Any help will appreciated!
#2
04/01/2007 (7:09 pm)
Dif light maps have a several lexel border that reduces light mapping artifacts. The border increases the light map size slightly.
Torque Owner John Doppler Schiff
If you're using the version of Map2Dif(_plus) that came with TGE 1.5, the "not a power of 2" may be due to this bug mentioned in Joel's second post.
I'm afraid I don't have enough experience with how Map2Dif creates lightmaps, so I can't help you on the other issues; I just proceed under the assumption that the lightmap sizes are approximations, and subdivide my DIFs as needed. Trying to squeeze your lightmaps down to the last pixel is bound to be more trouble than it's worth, IMHO. =)
Also, watch out for increased relight times with smaller lightmap scaling. When I dropped my scaling down to 8, my mission relight times more than tripled. Ouch.