![]() Mechstorm's Complete Map Making Tutorial or MCM for Short. Covering Mechwarrior4, Mechwarrior4:BK and Mechwarrior4:Mercs. If you have any questions feel free to drop by our Mechstorm Editor/Scripting help Forum after you have registered on our forums. |
Shadows and Lighting.Introduction.This section deals with with shadows and lighting of your missions for Mechwarrior 4, BK and Mercs. MW4 and BK use the same system but Mercs requires a little extra effort. Most of this effort is wasted when server admins turn off fog, dont use night settings or weather. So before we begin let me hand you over to Giskard for a broadcast by the Fog on Party that will tell you what your missing. OH I am Giskard... better getting typing then :) Perfect Weather Warriors. Fog On party political broadcast :) Its worth noting that sniping only becomes a problem online because most server admins do not include night time, or rain or pee soup missions in their map cycle. So they encourage one type of game and thats the range game. They turn off pee soup, night missions, bad weather mission and this in turn helps kill the brawler & scouting game. So they are in effect saying players cannot play Mechwarrior 4 the way it was meant to be played. The reason is because some players turned up their contrast or turn off Fog during Mechwarrior 4s first year of release. Since then its rare to find any variation online. Though early on Dropship command released a wonderful set of NFO files that really made the standard maps look great. Because of the players that cheated in this fashion, server admins made a decision that has ruined the game for the rest of us and completely unballanced the game in the process by favouring ranged combat on every single map 24hours a day 7days a week. If you want to encourage different styles of play and avoid the above problems then this is where you fix it so players can enjoy your map in a wide variaty of ways. Usually we use night time to setup a different enviroment but try setting your day time lighting to something that looks more like Dawn or Dusk. Servers can avoid night time if the day time is bright but they cannot avoid Dawn game if thats the brightest your lighting gets. Everything else can be turned off except for this. So is the your one way of putting variaty back into online games and showing those Krakor Elite Perfect weather guys exactly how Mechwarrior 4 was meant to be played. Even if they still do not see your map in all its glory. As a map maker that has send days setting up the atmosphere on a map to achieve a glorious over all effect that will totally emerse the player in the game if its played with the settings I recommend. I really feel the player is being cheated by server admins who turn off my recommended settings and thus prevent this kind of emersion in a maps enviroment. So "Fog on because Fog off is Rude!" The way Mechwarrior is meant to be played..Oh yes! :) Mission Properties.In all versions of the editor for all MW4 games you must set the Ambient Light and Infinite Light on your map. However Mercs has a problem with Infinite light so it does not work quiet the same way you would expect and I believe if memory serves me correctly, BK it self somethings doesnt add Ambient Light to a mission, you occasionally have to add it your self using the process for adding special FXs to do so. I will assume you have both Ambient Light and Infinite Light in the mission properties of the map editor for this section of the tutorial.
Your first job is to set the colour of the Ambient Light and the Alignment & Colour of Infinite Light. Ambient Light light is for areas that do not get direct sun light but are still light up so it should be darker than Infinite light. Whilst your adjusting the lights in the editor you may want to OK the changes occasionally to see the mission and check if your lighting matches the direction of the sun or moon in your maps sky. Clicking on Infinite Light you will see Yaw, Pitch and Roll Options as well as X, Y, Z.boxes. You use these to set the direction of the sun light for Infinite Light and even effect the length of the shadows on your map. Shadows work within a certain limits, if you exceed those limits the shadow will appear to leave the mech it was attached too and walk off on its own when the mech moves. Try entering the direction/height/pitch and roll manually and then when done save your map, a file in contents will be updated when you do this.. Ee must edit to get lighting working on all versions of Mechwarrior 4. How you edit that file differs from MW4/BK and Mercs. For now though, experiment with Ambient Light and Infinite Light and get a feel for those features before moving on to the next section. Fixing the lighting Bug For MW4, BK and Mercs (Merc fix part1).Now you have edited the Ambient Light and Infinite Light in the mission editor and noticed some things just do not appear to work no matter what you do, you know know why this section is needed. There is a small bug somewhere that is messing you about. This bug gets worse with newer versions of Mechwarrior 4 so the process used to fix it changes or rather grows. MW4 and BK users need only follow the first part of this fix, Mercs users need to do both the first and second part. Mechwarrior 4, BK and Mercs Lighting Fix. Open up your Mechwarrior Mercenaries\Content\Missions folder (Replace Mercs with the game folder name of any version of Mechwarrior 4 you are using), you will see your own mission folder in there, open it up and load the yourmission.lights file and the yourmissionnight.lights into a text editor. Notice how the night lights only contain the Ambient settings. This is correct but the direction still needs setting manually to match tge moon so set the night lights direction too in here. Sometimes the moon is 180 degs off from the sun in the sky files but not always. You may get lucky and be able to set both files using the same values. In the lights file you should see. Notice how direction is set in Infinite light but not ambient light. Assuming you set infinite light to the direction of your sun in the mission editor you need only copy and paste the direction line from infinite light over the one used in ambient light and your done for Mechwarrior 4 and BK. For Mercs your half done. [ambient_light0000] [infinite_light0001] Fixing the lighting Bug For Mercs (Merc fix part2).Following directionly on from Part 1 we now enter the part that effects only MW4:Mercs. You need to add code below to your day and night light files. Please notice the Mapname = line (marked in bold) needs changing to match your maps path and name and the rawfile you are using needs adding. You can grab an example raw file by clicking on the link below for now but we will cover the creation of the raw file very soon. Example Raw file. Copy the raw file to your missions folder which is usually content\missions\yourmissionname\ Rename the raw file to match your maps name as I have for my Rivercanyon map below. [lookuplight] Now change the direction line to match the infinite light direction light as stated in the Fix part 1. Creating the Raw File.Further information supplied by HGB.LookupLight This process will help you create a RAW file and assemble lookup light capabilities for a MW4 map. 1.Identify the size of your map: Open the map, Click on the OVERVIEW WINDOW and then click ON the SHOW ZONE BOUNDS button (if its not already ON). The grid should reflect a 4x4, 3x3 2x2 or 1x1 matrix. *In the case of a 1x1 no grid will appear as the smallest grid is a 256x256 or 1x1. 2.Create a RAW graphic file based upon the size of the map: Using Photoshop or Paintshop Pro (or any graphic editor that has the ability to save an image as RAW file format) create a blank image. The size of the image should be 1024x1024 for a 4x4, 768x768 for a 3x3, 512x512 for a 2x2 map or 256x256 for a 1x1 map. The image mode should be Greyscale. Fill the image with BLACK color. Raw files when used as Lookuplights act as masks. Everything that is BLACK reduces or eliminates light being cast through it. White allows the light to shine through. To adjust the image to allow for light to pass through it, use a filter or white paint to brush in clouds across the image. If you were to look down on your map from above imagine placing a sheet of paper in front of you. Now everywhere you paint white imagine cutting out a small piece of paper in that same shape. Light will be masked for the sheet of paper except where its painted white. You can enhance shadowed areas of the terrain by using lookup light as well. If there was a mountain between you and the sun in the sky, light would not be cast in that area. That part of the sky should then be black. 3.When youre done painting, save the RAW file into your Content\Mission\<mapname>\ folder as <mapname>.RAW (where <mapname> represents the maps name, i.e. crossover.raw). Actually it can be named anything, but makes it easier to track if you decide to reuse it for another lookuplight file later.
Terrain Shadow MaskFor those that need a step by step explaination and more detail here is guide to creating a shadow mask on your maps. Avenger, famous for his highly detailed missions has this to say about the following guide. I have used it and i have used it a differnt way I.E.
when I created a map with no buildings(or with minimal buildings I could
just redo in the editor.) I would use my height map in bryce and create
a Shadow mask then paste it as a new layer over my color map and do
the multiply thing then run it in the creator. The description below is how to take an image from a finished
map and then through a list of tasks, essentially recreate a modified
height map. The modifications are the buildings and hilly terrain on
a map will allow you to create a MASK that can be applied
as a layer to your TERRAIN image to cast shadows based upon the buildings
placement and the angle of the light source of your sky cube (Sun/Moon) The game doesnt create those shadows on the ground. Theyre created and then applied to the terrain in the same fashion that you create layers for photos and then use different techniques to merge the layer in a transparent form. A second piece of the layer process also allows you to create a RAW file. Used in conjuction with lookup light, you get to enforce the effects of a building blotting out the sunlight on other structures and mechs that run in the path of the sun to behind a building or hill. This further supports the myth of a light source seeing CASTING a shadow because of the building. In reality, the light source only passes light in the areas of the RAW file that are WHITE. DARK areas of the RAW are blacked out. While the blackout is 2D based upon the map topology and buildings it helps create the atmosphere. 1 EXPORT the height map in MW4 editor. 2. Start Bryce up. Set your document to 1124 x 1124 size (1:1 ratio). 3. By clicking on the CONTROL (upper left hand corner below the nano/mini preview) select the TOP DOWN view. Note, the bottom view up is a dark grey while the Top down view is a light grey. 4. In the main window select the ground plane (grid) and then hit DELETE. 5. Click CREATE and then click on the TERRAIN Icon (green ground with a hill on it) 6. In the main window click on the A to alter this planes attributes. Set the size to 325 for X and Z and 80 for Y. Click on the check mark to apply the changes. 7. In the main menu click on the E for this plane to EDIT the terrain height map. 8. On the drawing pallete click on the icon represented by a square of 6x5 dots. Change the resolution to 1024 - Massive Resolution. 9. Select the PICTURE tab on the EDITING TOOLS window. Click on the LOAD feature for the two boxes to the left and select the image that you exported in step 1 for both windows. Click on apply in the EDITING TOOLS window. 10. Click on the checkmark below to finish your editing session. 11. Click on SKY AND FOG setting to bring up those settings and then click on the cloud and rainbow icon to bring up SKY LAB. 12. Deselect LINK SUN TO VIEW (lower right hand corner) 13. Set Azimuth to the location of your Sun (moon) (you did get a compass reading before doing this didn't you?) Click on the number thats there and enter the value you want. 14. Set Altitude to 45 degrees. (this is the setting I've found most useful, but you can vary it as required). Click on the number thats there and enter the value you want. 15. Click on the SOFT SHADOWS button to enable that feature, 16. Set shadow intensity to 50%. Vary this after you get a prelimiary render to see if you want shadows darker or lighter. 17. Click on the checkmark lower right hand corner to apply changes and to leave the skylab. 18. Click on the RENDER control (left side, sphere at the bottom of the V like set of spheres. While it's rendering make the whole image visible by clicking on the MINUS MAGNIFYING glass lower right hand corner. This will stop the rendering process but it helps to get an overview before proceeding with a full render. 19. Click on the RENDER control to resume the render. 20 When render is done, select the SAVE FILE AS option under the FILE pulldown. (the pulldown menu at the top autohides so move your cursor to the top left of your screen to reveal the pull down menus). 21. In Photoshop, you'll see that the image has a colored border. I use a magic wand to select the surrounding border, then the Select INVERSE command. I copy that selection and then create a new image and paste in the copied image. Using the IMAGE SIZE feature I then adjust the image to to size of the map. 512x512 for a 2x2, 768x768 for a 3x3 or 1024x1024 for a 4x4. 22. In order to apply the shadows to the terrain I open the original texture image and copy the shadows image we've created as a layer on top of the texture. The shadow layer will completely obliterate the image layer below, so we need to click on the shadow layer first (to set our editing focus to that layer) and then from the otions on that later select MULTIPLY feature. This now darkens and lightens areas of the texture and reveals shadows on the terrain that you generated. Change the transparency percentage to alter it layer effect. Your choice, but Ive found 75-85% works nicely. You can change the Brightness/Contrast on the shadow layer to get different applications for the texture. You can also modify the opacity of the shadow layer to alter it's multiply factor to the texture below. Special BRYCE NOTE: The default MATERIAL for terrains is a grey scale. If you want to have high contrast in the shadowmask you can alter the AMBIENCE level. To do that, follow step 7 as outlined above then CLICK on the M in the main window to bring up the MATERIAL used for the terrain plane. There is a slider called ambience. You can grab it by clicking on it and holding down the mouse and pulling/pushing the slider in or out. You can also type the value you want in by clicking on the assocated number. 0 ambience means there terrain in general will be darker. Higher ambience values will raise the ground values closer to white making only shadows visible. (high contrast). The kewl thing about this procedure is, you pick up the all buildings as well as terrain. Meaning, the closer you look at the image you'll see shadows cast in the file where building are set. It's a great enhancement for a few extra minutes of work.
|