Whilst testing out the lighting system of the MM and how it all works in the game I discovered a semi-major problem with almost all of the games map models (and probably all of the vehicles and infantry as well but I haven't had a chance to test them out yet). It also applies to some of the new work done by great modders like SAF_Biffa and through no fault of their own.
In essence the engine supports positional lighting effects. You can take a given map and change the sun's position and diffuse and ambient light and get a whole new look to the same map. That's cool.
The problem is that unless the object has had its normals defined correctly in the .X file, then lighting system won't work. Now somehow Ben got this right for his models, however virtually all of the shipped models and so far all of Biffas models have had their normals "zeroed out" and so don't work for different lighting conditions. I include a SS below to show you what I mean. I have set the light source to be directly under the map (ie midnight) and the ambient + diffuse colors to black. This means that the map objects should be black. I went and fixed up the orchard trees as they were broken, but you can see the other stock trees are still being illuminated as well as Biffa's models.
I suspect what has happened is that the export normals option was turned OFF during export. Unlike other DX engines the PCK engine doesn't recalc model normals at load time so if the object has had its normals zeroed out then it won't get fixed by the engine.
The good news is that it is a straightforward fix.
What you need to do is to start MS3D. DirectX import the broken normal X file (the MS3D DX importer recalcs normals for you). Then rexport the new model via the DX JT exporter under the same name. Make sure the "exclude normals" option is cleared in the export dialog. That will fix the problem.
The only issue now is that someone will have to go through all the game models are re-import/export them again. I wonder who that would be?
I must say it really is worth it to get a much better lighting effect.
Now I don't know for sure but this same problem may effect some of the vehicles/men in the game as well.
If you want to test out your model to see if it is lighting compatibale just make a quick map in the MM, place your objects and then vary the light conditions. Your model should change lighting as appropriate.
Regards
S.
