Details:
- Project setup: see lecture slides or ask for assistance if you have any problems compiling and running the initial project code.
- Scene Design: You should first decide what the theme of your scene will be. All scenes must have a rolling hills (no really sharp inclines). For example you could have a scene with Stonehenge like ring structures, a desert with pyramids, the American plains with teepees, or a city scene with blocks of simple rectangular building. You can populate your scene with models that you load. These models should be generated with a modeler of your choice, that can save (export) *.fbx files, or direct x files (*.x). The direct x files should be triangulated and saved with material and normals. My advice is to keep it simple for the first project. If you use AC3D's File | export | Direct X, in the export dialog select "right handed coordinate system". Some of your models can be downloaded from the web (they must be scaled appropriately) You do not need a lot of models. Do not spend too much time on models and scene design. Free student versions of 3D Studio Max, Maya, and Blender exist. 2013 FBX converter will convert .x and .3ds models to .fbx files. A 14 day trial version of AC3D also may be downloaded, full versions are installed on the lab machines in JD 1618.
- Treasures: 4 or more modeled treasures scaled between 100 to 300 pixels in width, height, and depth. One treasure must be placed within the "barrier" walls close to the inside corner (vertex (447, 453) position (67050, 67950)) but not within any wall “brick” bounding sphere. AGMGSK is scaled so that 4 pixels = 1 inch. The spacing between vertices in your terrain will be 150 pixels. Thus your terrain will range from 0 to 76,800 in the X and Z dimensions. The origin of the scene will be the left, back, corner of your terrain when viewed from above (+Y). For each step (1) and Agent takes the step size is 10.
- Terrain: Once you have a theme you need to generate your terrain by modifying the TerrainMap.cs. You should use the Brownian-Motion terrain generation algorithm presented in lecture to create height values. You should have some nearly flat terrain the lower, "testing", quadrant of the scene (X and Z > 38,250). The area of the "walls" should be flat ("relatively flat"). Think about how your step and radius parameters affect the dispersion of height values.
- Color Table: You should design a color table that will map height values into colors. Since we are using textures to hold the height values that range from 0 to 255. For example, you could have a different color for every interval of 25 or 50 heights. For example, height values of 0 could be a "tan or sand like color", and 1 to 25 could be a tan-green, or perhaps a yellow-green, 26 – 50 could be a darker green, above 225 you might have white for snow. You should add some noise to your vertex color values.
- Smoothing: You should smooth your heightTexture and colorTexture. You can do this with a paint tool like paint.NET or Gimp to add Gaussian blur effect to your textures. This will make height and color transitions smoother. Put the heightTexture (png or xnb) and colorTexture (png or xnb) files in the appropriate Content directory of your P1 application (AGMGSK project) after smoothing.
- Terrain Surface: You need to modify the starter kit so that the player object and NPAgent object move better on top of the terrain. In the distribution Agents and Pack object3D's are set at the surface height of the minimum (X, Z) vertex for the surface they are on (“upper left corner of quad holding two surfaces”). Terrain following should be done by interpolating with the Vector3.Lerp(....) method. You must have an ‘L’ key toggle Lerp or default terrain following on/off. This way you (and I) can see/test the effect of Lerp.