lightmap issues

Ask questions, discuss ideas, get answers

lightmap issues

Postby takiwa » Tue Jul 24, 2018 3:58 pm

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
takiwa
 
Posts: 121
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: lightmap issues

Postby duffman » Wed Aug 01, 2018 10:38 am

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: 37
Joined: Tue Apr 15, 2014 8:02 am

Re: lightmap issues

Postby duffman » Wed Aug 01, 2018 10:54 am

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)
duffman
 
Posts: 37
Joined: Tue Apr 15, 2014 8:02 am

Re: lightmap issues

Postby takiwa » Fri Aug 03, 2018 4:39 am

thanks for the help, i will check that now :)
Image
takiwa
 
Posts: 121
Joined: Mon Dec 30, 2013 4:29 pm
Location: The Great State of Georgia

Re: lightmap issues

Postby Classical Modder » Sun Aug 05, 2018 9:49 pm

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
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 417
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada


Return to 1942 Modding Discussion

Who is online

Users browsing this forum: No registered users and 23 guests