Game Development Community

Atlas2 lightmap help

by David Wilmot · in Torque Game Engine Advanced · 10/14/2007 (12:42 am) · 3 replies

Hi all i'd love some help from someone with a bigger brain then mine which at this point is not hard,

i'm using the *atlas bumpmapping normal mapping parrallex*.

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=13582


which is perfect for what i need and i might ad looks great my problem is the lightmap i want to use the lightmap made by TGEA but its in .atlas file format,

Q1, is there a way i can convert the .atlas lightmap or export it to .jpg or .png

Q2, whats the register details so i can edit the shader to use the already loaded lightmap?



i just got my head around the shaders i might have a brain if this ever gets done lol.

#1
10/17/2007 (8:59 pm)
Anyone pleaseeeeeeeeeeeeeeeeeeeeeeee ? lol
#2
10/18/2007 (5:57 am)
For Q1 : The lightmaps in the .atlas file is actually an unaltered .jpg just stored in the TOC of the atlas file.
Look at the source code for the atlasGenerateTextureTOCFromLargeJPEG or atlasGenerateTextureTOCFromTiles console functions. It is pretty simple to extract the images.

Can't help on Q2.
#3
10/18/2007 (10:00 am)
Hi Bill,

Thanks for your help i went for a look and just tried


atlasConvertTextureTOC("terrain_water_demo/atlas2_LM.atlas", "terrain_water_demo/np.jpg", 0);


i worked out, it was a resource i'm using is braking the lightmap up .atlas can just be renamed and open as .jpg lol ohh well you get that


Thanks for your halp.