Official BF Editor Forums

# Advanced Lightmapping Tutorial (using 3dsmax)

## Recommended Posts

Yes, its a 4km, no its not near the map edges and yes I rendered both sky and sun..

• Replies 181
• Created

#### Popular Days

try LMing something in the middle of the map.

I did...

##### Share on other sites

Check the sun direction? If I remember correctly, it's the opposite of the normal sun direction (so copying and pasting it will make the black lightmaps). Try flipping the direction anyway, it's worth a shot.

##### Share on other sites

Check the sun direction? If I remember correctly, it's the opposite of the normal sun direction (so copying and pasting it will make the black lightmaps). Try flipping the direction anyway, it's worth a shot.

Could be the problem but only if the sun was setup incorrectly in the BF2 Editor.

Outlawz try increasing "Hotspot/Beam" value in the Directional Parameters to at least 40960.0 if not more and then try LMing something in the middle of your map again.

##### Share on other sites

I increased the hotspot value, did nothing, though an object in the very middle of the map LMd ok this time, but rest are still fudged up, only thing that changed is that they come out all blue instead of black :/

I tried moving the sunlight further away, didn't help.

edit: bah I think i had mention this, but there is something wrong with the particular object I'm LMing in 3ds.

I LM'd several next to it and they came out fine, there's nothing wrong with my settings, its the frigging object.

edit2: I unwrapped UVs on channel 9, flattened them and collapsed the modifier, then LMd that object again, LM came out fine.

edit3: Lm came out fine when I took a peek at it in photoshop, but came up screwed up in editor when I loaded the map to check it. Also LMing all lod0s to check how Lms would come out for all the objects resulted in random LMs again, some screwed up and some working and most not showing up in editor.

Edited by Outlawz
##### Share on other sites

• 2 weeks later...

Well I managed to lightmap the previous map in question just fine, it's one particular object that drives me insane, it's lightmap textures are completely blue, the object is dark with no sun on it in editor and completely screwed up in-game.

And it kinda looks like it's loading an atlas for its lightmaps, since I recognize lightmaps belonging to other objects on the same map

##### Share on other sites

• 3 weeks later...

I get this when trying to load static objects in Max 2010.

Does anybody know of a way to get it to work in MAX 10?

##### Share on other sites

Import the statics, terrain etc with max9 and then save the scene and open it with max10, although there are still some problems with LMing with max 10 like it not saving the LMs to the correct file names etc.

##### Share on other sites

Roger Rhino mate.

It's working in 9. But does anyone else get this pop up during importing?

Question

Really Cancel

Yes - No

As long as you click No it carries on working, just seems odd, and I can't walk away leave to it importing because of it popping up. lol

Also even when I do a Sun run or Sky run the file is still suffixed with ~point.tga in the temp folder. Am I doing something wrong?

------ Edit -------

StaticObjects.con format

run /objects/staticobjects/_middle-east/city/uniqueobjects/div_citybrdgsloop/div_citybrdgsloop.con

rem *** div_citybrdgsloop ***
Object.create div_citybrdgsloop
Object.absolutePosition -553.987/38.222/-313.334
Object.layer 1
Object.setLightSourceMask 6

OvergrowthCollision.con format

Object.create me_palmtree01
Object.absoluteTransformation [-0.712074/0/-0.702104/0][0/1/0/0][0.702104/0/-0.712074/0][-976.827/29.9183/-442.177/1]
Object.isOvergrowth 1

In OvergrowthCollision.con there is neither the run command nor the correct format for the plug-in to import with. So as I tried, selecting that file will not import overgrowth. I tried adding them to StaticObjects.con but as I suspected they are still in the wrong format and do not import.

Anyone know how to get the overgrowth imported properly without manually reformatting every entry in OvergrowthCollision.con?

Edited by Mavrik347
##### Share on other sites

• 3 months later...

My sun is to close to ground (probably 4km map issue) and some objects is invisible. I know, i can move sun, but it can change angle of light. What i have to do?)

##### Share on other sites

you set the sun in the editor, place camera where you want it then light settin/sun/set sun from camera..

Mavrik347, theres easy way to import the overgrowth yea... think rhino has a tut somewhere on pr forums... but basicly all you have to do is place 1 of each trees used as statics, then select them all, then select all same type button, then in options with all selected tick is savable, think thats how it goes.. not opened bfed in awhile

Edited by Bensta
##### Share on other sites

you set the sun in the editor, place camera where you want it then light settin/sun/set sun from camera..

outlaw, theres easy way to import the overgrowth yea... think rhino has a tut somewhere on pr forums... but basicly all you have to do is place 1 of each trees used as statics, then select them all, then select all same type button, then in options with all selected tick is savable, think thats how it goes.. not opened bfed in awhile

i set sun in editor, you can see it in screenshot. i try set sun from camera and to camera.

and this is not a vegitation, this is static objects. i cant see some objects in max...

##### Share on other sites

always when i trying to render sun light (advanced ray traced) i see error message,

if i choose ray traced - it's just dont work.

And point light dont work. red channel unseen in game...

Edited by Unmanned
##### Share on other sites

• 1 year later...

I get this when trying to load static objects in Max 2010.

Does anybody know of a way to get it to work in MAX 10?

I'm trying to lightmap in 3DSMax 6 (demo) and I'm having the same problem as well...

##### Share on other sites

I'm trying to lightmap in 3DSMax 6 (demo) and I'm having the same problem as well...

There are two differnt versions of the Poe Tools, one for max 6~8 and one for max 9. Make sure you have installed the correct version.

http://www.bfeditor....opic=10199&st=0

Also, there are know problems with using the tools with demo/cracked/incomplete versions of max so that could be causing your problem.

Edited by Coronaextra
##### Share on other sites

There are two differnt versions of the Poe Tools, one for max 6~8 and one for max 9. Make sure you have installed the correct version.

I reinstalled the 6-8 version. I still get the message.

Also, there are know problems with using the tools with demo/cracked/incomplete versions of max so that could be causing your problem.

Nooo!

OK, I was hoping that it would work with a demo version (which AFAIK is the complete version with an expiration date), as I don't think I'd need 30 days to shadow my map. Also, much to my chagrin, there doesn't seem to be any reliable place I can purchase earlier versions of the work - I did the "buy" option of the 3DS Max demo, and all it did was send me to Autodesk's site, where the only thing that seems to be available is 3DS Max 2012. And I'm out of college, so I don't think the student option is the answer (even if they still have versions the tools will work with.) What am I to do?

##### Share on other sites

OK, I was hoping that it would work with a demo version (which AFAIK is the complete version with an expiration date), as I don't think I'd need 30 days to shadow my map. Also, much to my chagrin, there doesn't seem to be any reliable place I can purchase earlier versions of the work - I did the "buy" option of the 3DS Max demo, and all it did was send me to Autodesk's site, where the only thing that seems to be available is 3DS Max 2012. And I'm out of college, so I don't think the student option is the answer (even if they still have versions the tools will work with.) What am I to do?

Well, I don't know if that is the problem or not, but you can always try a different version of max. Here is a link to the TRIAL versions (nothing illegal here). I got my version of Max 9 Demo here and I know the Poe 2 tools will work with it.

http://files.modacit...oftware/3dsmax/

And FYI, you dont have to be a student to get the student versions of Autodesk software. All I did was register in their forums and start downloading. However, Max 10~12 wont work with the bf2 tools. :-(

Edited by Coronaextra
##### Share on other sites

OK, I managed to get the trial version of 3DS Max 9, downloaded the appropriate PoE tools, and have attempted to get things to work. I've got two StaticObject files - one in which I converted all the overgrowth into statics (so that they can cast shadows in the lightmap) and an ordinary one without all those. I did manage to get 52 object lightmap TGAs in the temp folder, but have been unable to get them merged, or get them converted into DDS (I think that's the format.)

In the conversion step, the tutorial said to make a batch file (if you can't find the one he mentioned) and I did that using the exact same code he stated (converting the paths, of course, to my files and such). Was there more to the batch file, and the section mentioned just a few lines?

I also wonder if it has anything to do with this message I get when I start up the program:

DLL <:\Program Files\Autodesk\3dsMax 9\stdplugs\DxPlugins\DxDDS.bmi> failed to initialize.
Error code: 998 - Invalid access to memory location.

Could someone please help me here? I've only got 25 days left in the trial version, and the map is long overdue...

##### Share on other sites

The max 9 error is because you need to install the service packs so it can read DDS files. I dont think it has anything to do with the batch file problem because it doesnt use any of those files.

As for the batch file error, double check file paths and for typos. Look in the tools folder and confirm that the files used in the batch program are there and everything installed correctly. Also, run the file as administrator if you are using Vista or Win 7. Here is my batch, edited for my file paths. Yours should look similar.

@echo off
"C:/Program Files (x86)/Autodesk/3ds Max 9/scripts/bf2/bin/release/mergeTgaColors.exe" "C:/Users/Mike/Desktop/TEMP/" "C:/Users/Mike/Desktop/TEMP/merged/"
echo .
echo .
"C:\Program Files (x86)\Autodesk\3ds Max 9\scripts\bf2\bin\extern\nvdxt.exe" -file "C:\Users\Mike\Desktop\TEMP\merged\*.tga" -dxt1a -outdir "C:\Users\Mike\Desktop\Output"



##### Share on other sites

• 2 weeks later...

OK, all the necessary TGA files (at least I think - sun and sky (I had no point lights) should be all that's necessary, right?) have been created. It's just my temp file that seems to not work! I've looked at the text, and I have no idea why it's not right. I've called it "convert.bat," and it's in my temp folder. Should I call it something else and/or put it in another location, and if so, what and where?

##### Share on other sites

I could be wrong about this, but I'm pretty sure that you need to generate the point light textures even if you dont have any point lights. I dont think that MergeTGAColors.exe will work properly without them becuase it wont know what to put in the red channel.

Also, you can add a pause statement at the end of the batch file so you can see if it prints an error message.

@echo off
"C:/Program Files (x86)/Autodesk/3ds Max 9/scripts/bf2/bin/release/mergeTgaColors.exe" "C:/Users/Mike/Desktop/TEMP/" "C:/Users/Mike/Desktop/TEMP/merged/"
echo .
echo .
"C:\Program Files (x86)\Autodesk\3ds Max 9\scripts\bf2\bin\extern\nvdxt.exe" -file "C:\Users\Mike\Desktop\TEMP\merged\*.tga" -dxt1a -outdir "C:\Users\Mike\Desktop\Output"
pause

Edited by Coronaextra
##### Share on other sites

OK, I ran the point light textures, and now the .bat files successfully merged everything into the colorful files in the "merged" folder.

However, there's nothing in the Output folder! What do I need to do in order to get DDS files for the editor?

##### Share on other sites

Naa you dont need to run point light pass, but wount hurt

To create the .dds files you need to run the .bat file as said before. create you own or alter the one that should be in the tool files. make sure all paths are correct to your computer.

##### Share on other sites

However, there's nothing in the Output folder! What do I need to do in order to get DDS files for the editor?

Put the pause statement in the batch, it will tell whats wrong!

Naa you dont need to run point light pass, but wount hurt

Just tested it and you're right. It generates the missing information as black pixels. I always ran that pass anyway just in case.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×