lightmap issues

Ask questions, discuss ideas, get answers
Post Reply
takiwa
Posts: 134
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

lightmap issues

Post by takiwa »

after I render object lightmaps, all my objects are a blueish-green ingame. I remember having this problem once before, YEARS ago, but can't remember what the solution was...anyone know?

a copy of my objectslightmaps.con...

Code: Select all

raytracer.init
raytracer.ambientIntensity 0.05
raytracer.blockSize 16
raytracer.sampleOffset 0.05

rem *** 1 == Trace only the nearest 256x256 meter patch.
rem *** 0 == Trace all patches.
raytracer.OnlyNearest 0

rem *** < 0, trace all pixels
rem *** Else, number of meters from moving free camera to trace the shadows. Preview tool.
raytracer.shadowsNearCamera -10.0

raytracer.light.create
raytracer.light.direction -0.49327/0.319733/0.828004
raytracer.light.selfshadowing 1
raytracer.light.objectShadows 0
raytracer.light.shadowIntensity 1
raytracer.light.intensity 0.35
raytracer.light.softness 1.0
raytracer.light.fov 130
raytracer.light.viewDistance 200

raytracer.light.create
rem **** Should be sun direction ***
raytracer.light.direction -0.49327/0.319733/0.828004
raytracer.light.selfshadowing 1
raytracer.light.objectShadows 1
raytracer.light.shadowIntensity 1
raytracer.light.intensity 0.4
raytracer.light.softness 0.2
raytracer.light.fov 8
raytracer.light.viewDistance 500


raytracer.addIgnoreObject terrain
raytracer.addIgnoreObject track
Image
duffman
Posts: 55
Joined: Tue Apr 15, 2014 8:02 am

Re: lightmap issues

Post by duffman »

Have a look in:
C:\Program Files\EA GAMES\Battlefield 1942\bf1942\levels\YOUR_AWESOME_MAP\ObjectLightMaps\

Find the file:
Palette.pal

Download PalEdit to open the palette file and check the colormap/palette, it is applied to all the TGA files during game-time!
When using Battlecraft to generate lightmaps it tends to over write the template palette file when saving.
BF1942 loads this palette file and "applies" it to all lightmaps if they are 256 colors.

http://www.headsoft.com.au/index.php?ca ... &page=home

If you converted the TGA files to DDS, or used other image converters to post-process your files (irfanview etc) they might
have messed up the colormaps/palette in the TGA files. If PalEdit shows the correct colors then use Irfanview to open one
of the lightmap TGA files and do: Image -> Palette -> Edit Palette and check the colors. If you got more than 256 colors, or
cant "view" the palette then you are gone need to regenerate the lightmaps or dig up the originals.
duffman
Posts: 55
Joined: Tue Apr 15, 2014 8:02 am

Re: lightmap issues

Post by duffman »

Almost forgot, there is a configuration option somewhere I think you can specify what
files to load as defaults if the game engine cant find the lightmaps. More of a development
tool to help you identify objects that is missing lightmaps or have been moved since
the lightmaps was generate.

Cant remember the config options, but by default it will look for these files here (in your RFA):

bf1942/levels/YOUR_AWESOME_MAP/
/Textures/defaulttextures.dds
/Textures/terraindefault.dds

What ever color(s) these files have is "applied" to an object that is missing its lightmap!
(which could explain that some of your models had crazy colors)
takiwa
Posts: 134
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: lightmap issues

Post by takiwa »

thanks for the help, i will check that now :)
Image
Diamondback
Posts: 589
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada
Contact:

Re: lightmap issues

Post by Diamondback »

duffman wrote:Have a look in:
C:\Program Files\EA GAMES\Battlefield 1942\bf1942\levels\YOUR_AWESOME_MAP\ObjectLightMaps\

Find the file:
Palette.pal

Download PalEdit to open the palette file and check the colormap/palette, it is applied to all the TGA files during game-time!
When using Battlecraft to generate lightmaps it tends to over write the template palette file when saving.
BF1942 loads this palette file and "applies" it to all lightmaps if they are 256 colors.

http://www.headsoft.com.au/index.php?ca ... &page=home

If you converted the TGA files to DDS, or used other image converters to post-process your files (irfanview etc) they might
have messed up the colormaps/palette in the TGA files. If PalEdit shows the correct colors then use Irfanview to open one
of the lightmap TGA files and do: Image -> Palette -> Edit Palette and check the colors. If you got more than 256 colors, or
cant "view" the palette then you are gone need to regenerate the lightmaps or dig up the originals.
Seems like a nice program to use, thanks for posting. Fook could you perhaps add this program to the Tools thread please?

Thanks
See my Strasbourg map project here.
Post Reply