Page 1 of 1

lightmap issues

Posted: Tue Jul 24, 2018 3:58 pm
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

Re: lightmap issues

Posted: Wed Aug 01, 2018 10:38 am
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.

Re: lightmap issues

Posted: Wed Aug 01, 2018 10:54 am
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)

Re: lightmap issues

Posted: Fri Aug 03, 2018 4:39 am
by takiwa
thanks for the help, i will check that now :)

Re: lightmap issues

Posted: Sun Aug 05, 2018 9:49 pm
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