3D Model Course Designing Tutorial Part 2

 

Step 8. Define the Areas.

Our course hole consists of a number of areas. e.g. Fairway, green, bunkers, ponds etc. These areas have to be defined before you can assign textures to them.

In MilkShape this process is a rather tedious task because you have to select and move each area border polygon seperately. However, this method gives you a lot of control. Individual polygon vertices can be moved and the polygon count for the area - or parts of the area -  can be defined to suit the terrain complexity.

Fig(6)

The above screen shot shows a section of a pond that is in the process of being defined.   

What we're having to do is to strategically move the terrain mesh polygon vertices so that the poylgons follow the area outline ( or pond outline here).

                                                      After moving the vertices the associated polygons are stretched or compressed to fit the area.

After this has been done - for all areas - we can assign them to individual groups and then assign material textures (Grass, Sand, Water ...etc) to them.

It would be nice to have a tool that allows us to draw a smooth outline around the pond and then just press a Fill with Polygons button. Unfortunately such a magic button doesn't exist yet in MilkShape ( or for that matter in any other tool I've tried. Worldbuilder comes close but when you export the model. the area polygons are snapped back to the grid. You can only view the smooth area outlines when rendered directly in WorldBuilder itself which takes a long time. And Vue 5 doesn't even offer Areas. Professional tools like 3dStudio Max and Maya offer this feature but they are $3000 plus tools.

To move the vertices you have to first select a vertice and then move it. Sounds obvious I know but in MilkShape selecting and moving are two different tool modes which have to be selected before hand. Fortunately there is a so called AutoTool that does this mode switching for you).

Before we start you may want to maximize the TopView window (which is where we will be doing all the work) by clicking in the window and then pressing the space key on your keyboard. 

Refer to fig(6) above, and check the AutoTool check box. 

Uncheck the Ignore BackFaces check box. Important otherwise selection and moving is very slow.(God knows what is going on in the back ground with this feature on but whatever it is, it sure takes a long time ).

Press the Select button in the Tools area and then the Vertices button in the Select Options area.

Select a Vetex. (That's the polygon intersecting point you want to move)

Press the Move button in the Tools area.

Move the vertex to the area outine.

After moving you should see that you are back in Select mode. This is the AutoTool feature working. It will always toggle between select and move which is a great time saver. (Switch this off if you only want to stay in move or select mode after each click).

There will probably be many area borders that will require more polygons in order to define the outline smoothly. (ie in a sharper curve as above).

In this case we can strategically create more polygons where needed with the MilkShape Vertex Divide edges tool.

In order to do this, select 2 vetices on the outline where you need more resolution. (remember to switch off the Auto Tool before hand).

To select 2 or more vertices hold the Shift key down while clicking. Make sure the Select and Vertex button is pressed in the Model tab window.

Press ctrl P or select the Vertex pull down menu and select Divide Edge. Now we have 2 polygons where there was only 1 before which you can now move into place. You can carry on doing this untill you have enough polygons to produce a smooth surface border outline.

Carry on moving and adding vertices until you have either completly outined the surface area (or at least a reasonably large section of it.)

Note: When moving vertices like this you have to be careful you don't pull them apart and thus create gaps. You can check this by right clicking in the window and selecting Smooth or Flat shaded. If there is a gap you will see it in this rendering mode. In which case you will have to move the vertices back to fill the area again. 

Step 9. Assign surface textures.

Now the fun part.

Having moved and shaped the polygons to outline the surface, we can now group them and assign a texture to them.

To Group the polygons in a surface area you must first select them. 

Go into Select Mode from the Model tab window again but this time press the Face button from the Select Options. Switch off the Auto tool and make sure the Wireframe mode is activated in the window properties (Right click in the view window).

You can mouse drag an area of polygons or select individual polygons while holding the shift key down. Carry on doing this untill all the polygons are selected (shown in Red). If you accidentely select a wrong triangle then go to the Edit drop down menu and select Undo. You might also find it easier to select just a part of the area and group the rest later.

Change to the Groups tab window and press the Regroup button. When you do this polygons are removed from the main group and regrouped into a new group. The Group list will should now contain 2 groups with default names ("Regroup01" etc).

You can rename groups be selecting them in the Groups list window. entering a new name in the name edit box and pressing the Rename button.

In this case we will rename the "Regroup01" into "Pond1".

You'll notice that the <No Material> text shown. This text will show the material texture we assign to the group later.

You can experiment with the Select button to see which areas are assigned to the particular group. Make sure the Group to which you want to assign a texture to is selected before moving on to the texture (or material) assigning window.

Now switch to the Materials tab window.

Press the New button to create a new Material. The name "Material01" will appear in the materials list box.

Now we assign a textrure to the Material. Press the first <none> button to open the textures file box.

Navigate to the GGS textures default folder "courses/textures" and select the texture you want to assign. (In this case Water.bmp)

You can rename the Material name to whatever ever you like too by entering the new name in the edit box and pressing the Rename button.

Now press the Assign button to assign the Material to the Group.

Now we need to map the material to the model. In MilkShape this is done with the Texture Coordinate Editor located in the Windows pull down menu.

Open this window and select the Group area from the Groups combo box (Pond1 here). We always map textures to the top of the model, so select Top from the Combo box and press the Remap button. You should now see the eintire group within the texture.

Close the Texture Coordinate Editor and you're done.

To see the texture in the area, select the Textured property in the model view window properties box for any of the view windows.

Here the pond and the low banking has been grouped and have had textures assigned to them.

If after assigning the texture you see gaps in the group but when flipping the model over, you see those missing on the underside then these polyogon faces have got reversed.

To correct this proceed as follows:

  1. Choose the Selection tool and set it to Face mode. Make sure that the Ignore Backfaces is selected.

  2. Now use the Selection tool to select all the faces by dragging the the selection box around them.

  3. Now choose Edit, Hide Selection. All of the correctly oriented faces will vanish, leaving behind only the ones facing the wrong way.

  4. To fix the problem, unhide all the hidden faces, clear the Ignore Backfaces check box and select all the faces again. This will select all the correct and incorrect faces.

  5. Then choose Face, Reverse Vertex Order from the top menu bar. This will make the good ones bad, and the bad ones good.

  6. Now deselect everything by clicking the Select tool in an open area, and set the Ignore Backfaces check box again.

  7. Drag select over all the faces one more time. Now only the faces that were originally incorect will be selected.

  8. Choose Face, Reverse Vertex Order with those faces selected.

  9. Then, for one finale time, clear the Ignore Backfaces check box. select all the faces, and click Revese Vertex Order. This should flip all faces back to the correct orientation.

 

Also at times, after selecting the Textured property,  you will see that some triangles didn't get textured. This is because the triangles didn't assigned to the group. And that didn't happen because they weren't selected properly when creating the group. Sometimes it's difficult to actually see if a triangle within a host of other triangles is actually selected because the edges of neighbouring triangles are also red. You'll only see this after the Texture mapping. 

No problem though because we can select and regroup as many time as we want.

To do this, first deselect all (ctrl/shift/A) and set the Wireframe property in the top view window.

In the Model tools tab, go into Select mode and switch off the Auto tool. Select Faces in the Select options

Go into the Groups tool (Group tab)  select the Group (ie Pond1) and press the Select button. Now hold down the shift key and additionally select the unassigned triangle(s) with the mouse and then press the Regroup button.

Unfortunately the group name gets replaced with a default name so you'll have to rename it. You can do this at any other time though.

Carry on checking the group assignment by switching back to Textured mode and repeating the above Select and Regroup steps untill all triangles have neen correctly assigned and textured.

Sometimes you may also find that polygons are welded together or they overlap after moving causing problems. In such cases it can be easier to delete the polygon faces and make new ones. You can add new faces after deleting old one with the Face mode in the Models tab. In this mode you have to select 3 vertices in an anticlockwise sequence. 

 

Continue on with tutorial part 3 ...