Preparing your map within 3dMax

Ask questions, discuss ideas, get answers
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Preparing your map within 3dMax

Post by fo0k »

Apache.. ;)

I have some experience working with maps within 3Dmax for custom terrain objects.. and have on occasions managed to import static placements etc.. however, the scales of everything usually get fo0ked up and I have never been sure of the best lighting settings etc if I import the light positions too etc..

Basically I wonder if you could share a step by step tutorial on how to get everything in max ready for lighting etc? I'm presuming you have now done this 100's of times :)
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Preparing your map within 3dMax

Post by Apache Thunder »

I found the easiest way is to import all the meshes you need in one scene at 0.1 meters scale, then save as a max file. Then change the scale to 1.0 and reopen the max file. When it asks you if you want to adopt file scale or rescale, choose the rescale option and save the resulting max file again. Then they should be the correct size when put into a map. (using the replace option in Max). The same can be done with the map it self in case the rexman script you use to set up the objects for lightmapping gives them the wrong scale position settings in the element name for each object. (the element name gives the object each the position settings needed for the file name of each eventual tga file) So if you get a mismatch in scale, you can rescale either your map or your object's collection max file to correct it.

Also recently I found that LightingMap is the best element type to use for objects. To avoid unlit surfaces from being to dark, simply add a "Skylight" to your scene and adjust it's color setting. for my night maps, they used 38/38/38 RGB value for the skylight. ;)

For day maps the sun intensity for the light source should be 0.6 and shadow intensity 0.8. However for night maps you would use lower settings. Moon light intensity is usually 0.2 or less and shadow intensity is at 1.0. ;)

As for other lightsources, it's up to you how far you want them to light things. The street lights in my BFH night maps for example use the Far Attenuation setting of 1.0 - 15 (1.0 start value and 15 for the end value) and their intensity is usually set to 0.8 with a 1.0 shadow intensity. Only do this for lightsources that will be inside a mesh like that.

Oh and when you clone a light source, it's better to use the "instance" option when copying them. That way you can create "groups" of lightsources. Each group would share the same setting, so you would only have to adjust one of them to apply a change to all of them. It's easier and faster then full on copy where you have to go to each light source and change their settings. ;)

If you put a lightsource inside a mesh like a street lamp, it's best to add the streetlamps to the exclusion list by finding the exclude button under the general settions section of your lightsource(s). Then add them and set to exclude them for shadow casting.

EDIT:

Here's a max scene of Riverside Rush Nights. This max file should work in Max 7 or newer. It reflects my latest method of doing night maps. ;) Note the lack of a moon light source since this map had clouds and rain weather fx on it. So it was not necessary to have a moon light. :P

NightMapExample.rar

Also note if you want things like trees and things with alpha to cast correct shadows, you must have their material set to Standard and have the Diffuse and Opaque bitmap channel set up correctly. (they are both usually set to the same texture). I have mentioned this in one of your other threads I do believe. ;)

Aside from those, it's generally not important that you have textures working in your max scene except maybe for the terrain if you decide to make those as CompleteMap instead of LightingMap (which would save you the hassle of having to merge them with the non shadow color maps with the game engine)
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Preparing your map within 3dMax

Post by fo0k »

MUCH appreciated. I shall be reviewing this again shortly.. currently tweaking some vehicles :)
Sgt.Killboy
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Preparing your map within 3dMax

Post by Sgt.Killboy »

Hey guys! (fOok and A.T.)

Would you mind to share your experience with me? Talking bout the lighting stuff. I got 3DsMax eperience and what it needs to get it done, i would just like to know how to...well...import a map into 3Ds Max (i edited terrain in 3Ds using a plane and the displace modifier before) with all its statics and then fake GI or more then just one lighsource. I would pretty much like to know this, since i'd like to use it in EoD.

I'm using Max 8 and I couldn't open the file you posted.

I know it's always a pain in the butt, to explain how things work, but hey...I will share my knowledge too, and maybe we will have more BF1942 for 10 years!

:D
My anger management class pi**e* me off.
Image
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Preparing your map within 3dMax

Post by fo0k »

first off, you need the maxscript (BF 3DS Max Script by (Rexman's tools) to import heightmap, sun placement, water, statics etc etc. you can find it here: http://bfmods.com/viewtopic.php?f=21&t=114

Place that in your scripts folder and then run from within max. You should have your full map extracted to a folder when using this as it will look for your terrain.con / skyandsun.con etc
you can use the script to import static placements as boxes. then you will need to create a separate max file containing all the mesh for your level (not positioned.. just at their centre of origin) so that you can do a 'replace' operation in max to replace the boxes with actual mesh. you need to import the meshs at 10% scale (using the 2.75 MDT) so they will be the correct scale on the imported heightmap. Also, avoid optimising the heightmap on import as it will deviate from the actual heightmap in game


That's the very basics of getting the scene together for lighting etc.
Sgt.Killboy
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Preparing your map within 3dMax

Post by Sgt.Killboy »

Oh Wow!

I was just asking myself, where I did ask that question. *lol*

That doesn't sound too hard, but very resource consuming. And will i be able to generate lightmaps for multiple lightsources then? Since i saw it on some pics...not sure if it was apache thunder who posted them...from that Battlefield heroes mod wich looked very decent, but that was fpr BF2 was it?

Anyways. Thanks a lot so far!
My anger management class pi**e* me off.
Image
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Preparing your map within 3dMax

Post by Apache Thunder »

Doing lightmaps for BF2 in max is a bit more complicated but is similar to how it's down for BF1942.

And yes most of the night maps I have posted pictures of and/or videos of are from BF1942 and is the result of lightmapping in 3DSMax.

This map is the prime example of what you can do with 3DSMax:

ImageImageImage
I have cameras in your head!
Sgt.Killboy
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Preparing your map within 3dMax

Post by Sgt.Killboy »

Freaking awesome...I mean both...the rexman tools and the Heroes port. Unfortunately I can't enjoy YouTube Vids, cause i run a UMTS webstick with low bandwith...but i watched the first few seconds. Looking great.
My anger management class pi**e* me off.
Image
Sgt.Killboy
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Preparing your map within 3dMax

Post by Sgt.Killboy »

Somehow i was having a lot of issues using the rexman tools in Max8 (maybe i've put them in the wrong directory...didn't have the time to figure that out, yet).

Well after i found the plugin "autorun" at startup, forceing me to close 10 windows it worked almost perfectly. The units scaleing, like Apache described, it works fine. after palying around a bit, i had some terrain specific costum made "undergrowth". When trying to export it, either Max dropped error messages or BF42 crashed while using the objects ingame.

:o :evil: :oops:

Lucky me saved a max file with the content, so I went to uninstall the tools and export the costum undergrowth once again. Now everything worked fine for me.

Great tool anyways. Gona test the lightmapping thing in a few days i guess.

Would it be possible to force BF42 to add secondary light sources probably by code? Would look kinda odd, if you got a fire burning, thats lightmapping, but all the players shadows show in the wrong direction.

:D
My anger management class pi**e* me off.
Image
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Preparing your map within 3dMax

Post by Apache Thunder »

Dynamic Shadows are determined where the sun direction is set to, and BF1942 has no capability to alter it based on any lightsources as it also has no means of dynamic lighting either. As for when soldiers are brighted from being in light and dark from being in shadow, that's controlled by the lightmapshadowbits file and the process of creating one for a map lightmapped in 3DS Max is a bit complicated.

I generally generate a second set of shadow maps for the terrain using the shadow maps element type. Then I convert then to black and white and use them as the _lgt files when merging them to the terrain textures via the game engine. I use separate solid color texture for the terrain textures for the merger process as it improves the contrast between the shadow and non shadow areas and results in a better lsb file.
ImageImageImage
I have cameras in your head!
Post Reply