Building Fences for FS2002 and FS2004
 


Gate Base -->

Right click this link and "Save Link Target As" for the tga formated image

Gate Alpha -->
 


Panel Base -->

Right click this link and "Save Link Target As" for the tga formated image

Panel Alpha -->


The images above are in png format and look alike, but they are actually slightly different. Right click and save these and you can convert them to bmp files then combined them to make the finished image file in DXTbmp by opening the "Normal" base bmp and then "Import the Alpha Channel" bmp OR simply get the TGAs which already have them combined from the links.


First I open Max and save my project to a new file. I open the Material Editor AND the Material Navigator. Since I have two images I am going to be working with, one for the main panels and the other for the gates, I made a new multi-material. So in the Material Editor, click on New and select Multi-Material. I made the main material name "fence".

I named each Sub-Material with the ds_ prefix so that Makemdl.exe will make the polys that these materials are applied to double sided. I checked the 2-sided box... this has nothing to do with the sim but works for Max. Next I designated the texture images to use. I am using the tga formated images here so I can have transparancy in Max. Once the Diffuse Color texture is selected and named, click and drag the Diffuse Color button down to the Opacity button and when prompted, select INSTANCE. Again, this has nothing to do with the sim but for Max and will only work with image file formats that Max deals with and have an alpha channel. Why INSTANCE instead of COPY? Two reasons, if you change the Diffuse Color map, the Opacity map is automatically changed too and INSTANCE uses less memory as the image file is only loaded once instead of twice as in COPY.

Once you have setup both the Sub-Material we are done with this part of the project so you can minimize the Material Editor and Navigator.


Now to give myself something to work around, I have XRef'd another scene. This is nice as it doesn't make the XRef an actual part of my project, saving memory and once I am done I can remove the XRef. XRef'd scenes can not be modified or even selected. Think of it as a 3d rendering to your vieworts.

Now I add a simple plane object with 1 length and 1 width segment and move and size it the way I want it. Taking in to consideration that the image of the fence panel represents a 4 ft. section of fence that is just under 3 ft. tall, this plane is 20 ft. wide and 3 ft. tall.

I have converted the plane to an editable mesh and gone back to the Material Editor and Applied the material to the plane. Don't be supprised if the plane looks like it disappears... it is just a result of the Opacity as we have not setup the mapping yet. So with the Plane01 object selected and in Poly subobject mode, select the poly. Leave it selected and from the Modifier List select the UVW Mapping modifier. Highlight the Gizmo and working in the Front Viewport click on the View Align and Fit buttons under Alignment. Remember, ALWAYS have the current Viewport active that is most perpendicular to the object when you use View Align and Fit. You could set the U Tile to 5.000 here if you want and quit and collapse the stack, but I'll show you another way to tile that works better for me.

 

Go back to the Modifier List and add an Unwrap UVW modifier. Click on the Edit button. Besure the panel map it showing.


Select ALL of the handles and in the W box type in 0.000.

Select the two handles on the BOTTOM and type in 0.000 in the V box.

Select the two handle on the TOP and type 1.000 in the V box.

Select the two handles on the LEFT and type in 0.000 in the U box.

Select the two handles on the RIGHT and in the U box type in 5.000.


Remember: U is horizontal, V is verticle. If you select two handles along the same edge and the box is blank, it means that pair of handles are not perfectly in alignment for that plane and are not square with eachother. Learning how to tile this way can eliminate some fuzzies that sometime occur and aligns things squarely to the texture image.

Now, if my section of fence were say 8 ft. long, I would have entered 2.000 in for the U value for the right handles. 2.000 x 4 ft. = 8 ft. If the section was 13 ft. long I would have entered in 3.250 because 3.250 x 4 ft. = 13 ft. See??? It is all proportions/percentages. The same applies to verticle tiling, only you change the V value for the TOP two handles.


This is how my fence looks now in Max and is very close to how it will look in the sim.

Collapse the stack and now would probably be a good time to SAVE your work.


Now build and place another plane for the gate. It is 3 ft. in length and 4 ft. wide.

From the Material Editor, apply the fence material to this plane. In the Modifier panel, convert to an editable mesh and in Poly sub-object select the poly and set its Material ID to 2. UV Map and Unwrap just like was done for the first section, only this time the U value is 1.000 for the right handles because the texture represents a 4 ft. wide gate.


This is how things look now. Keep building and texturing sections till you have all the fence you need. Once you have all your sections built, you can Attach them all together to make one object and weld the points as necessary.

As you become more proficiant you will find quicker ways to build the mesh for the fence and do the mapping. For example: clone the first panel and rotate it 90 degrees and butt its end up to the first panels end making a right angle in the top view. 2.5d vertex snap works great for this. In point mode, move two of the end points opposit the corner joint to change the length then just add a Unwap UVW modifier to adjust the tile value for the change in length and collapse the stack when finished. If you need to make a section to plug a specific hole and it is not at an angle perpendicular to a viewport, use the Tape Tool to get the length for your tile value. It is also a good idea to get used to aligning an objects pivot to keep things uniform. I do this with every object once it is finished and apply an Xform Reset, then collapse its stack.

Note! Uncollapsed modifier stacks eat memory and make Max run slower.


All that is left is to make the actual texture file for the sim. This should be in DXT1 with Alpha format. Use either ImageTool or DXTbmp for this and save them in your texture directory for your scenery.