Problems with lightmap coordinates


(palador) #1

Hi!

I’m currently trying to get into 3D-graphics programming and just have implemented a simple bsp-loader, which works well with “normal” lightmaps. Since yesterday, i try to use external lightmaps with higher resolution and thought it would be easy. I use the -external -lightmapsize 1024 switches, _lightmapscale=0.125 and load the lightmap from the tga files instead from the bsp-file. It works so far, but it seems that the lightmap uv’s are broken.

Here is a screenshot (with -border to see the red debugging borders around lightmaps):


Any idea how to fix it?

Here’s my build-script:

./q3map2_urt -game quake3 -fs_basepath "/home/palador/dev/boundless/" -fs_game data -meta $1
./q3map2_urt -game quake3 -fs_basepath "/home/palador/dev/boundless/" -fs_game data -vis -saveprt -fast $1
./q3map2_urt -v -game quake3 -fs_basepath "/home/palador/dev/boundless/" -fs_game data -light -border -fast -super 2 -external -lightmapsize 1024 -filter $1

(palador) #2

Ok, found the problem myself… had to modify the lightmap coordinates:
lm.y = 1 - lm.y


(Wulff03) #3

Very common errors you may encounter during lightmap process are light/shadow bleeds and seams. Knowing what causes them and how to fix these issues will make your models light and shadow better.

UDK Lightmapping Series:
UDK: Lightmap Basics and 18 Important Principles for Creating and Using Lightmaps
UDK: Lightmap UV Layout Techniques and How to Create a Second UV Channel in Maya
UDK: How to Fix Lightmap Light/Shadow Bleeding and Seams
UDK: Lightmap Resolution for Static Meshes and BSP
UDK: Lightmap Common Problems and Solutions

And get more informaion this site:http://www.worldofleveldesign.com/categories/udk/udk-lightmaps-05-common-problems-solutions.php