Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Generating Complex Terrains for Unity3D

Visit the original blog post at http://fragileearthstudios.com/2012/09/15/generating-complex-terrains/ for additional information and sample files. Forget what you know about editing terrains. Unlike the terrain editor in Unity that functions like a paint program, World Machine (and programs like it) operate on a procedural level. A World Machine world file is not the terrain, but the steps that creates the terrain. This is the source of both its power and its complexity. This presentation covers the process on how to use World Machine in conjunction with Unity3D to generate realistic looking terrains for your scene.

  • Identifiez-vous pour voir les commentaires

Generating Complex Terrains for Unity3D

  1. 1. Generating Complex Terrains for Unity3D Eric Hackathorn 9/10/2012 Terrain by Vincent Ferrand
  2. 2. Preparation Download material from the classroom web site You should be done with this!
  3. 3. The World Machine Device Program Variables InputsWorld Machine operates Outputson a procedural level. AWorld Machine world fileis not the terrain, but thesteps that creates theterrain. Input Mask http://world-machine.com/learn.php
  4. 4. Overall Device Structure
  5. 5. Terrain Generation Overview
  6. 6. PerlinPerlin Noise works by layering the output ofseveral sets of noise together. These layers arecalled octaves. The multiple octaves arecombined together in a variety of ways tocreate the final result.
  7. 7. Radial GradientThe Radial Gradientgenerator createsshapes that are allcentered around onepoint in space. (Ex:spherical, gaussian,diamond, square,cone.)
  8. 8. CombinerThe combiner combinestwo separate terrainsinto one. There are avariety of differentmethods that can beused to combine theterrains -- each will givea different effect.
  9. 9. LayoutA layout generator interacts with thelayout view to provide a home for a setof shapes you can use to define terrainshapes, create masks, add roads, andmore.
  10. 10. ErosionThe erosion filter simulates the work of thousands ormillions of years of weathering and erosion by rain,flowing water and mass movement. It is anexceptionally useful tool to add detail and realism tohuman-created terrains. There are a large number ofparameters in the Erosion device and each parametercan interact with the others to create to a uniqueeffect.
  11. 11. Terrain Height Map
  12. 12. Bitmap Generation Overview
  13. 13. Select SlopeThe slope selector is used tocreate a mask that highlightsareas of the terrain that havea particular slope. The outputwill be full strength (white) inthose sloped areas and zerostrength (black) outside of it.
  14. 14. Select ConvexityThe convexity selector discovers areas of theinput terrain that are either highly exposed(convex) or recessed (concave). Convex areasare white (one), while concave areas are black(zero). Neutral areas that are neither will beneutral grey. This device can be very useful fortexturing to either to help shadow recessedcracks in the terrain, or to bring out ridges andother areas that are highly exposed.
  15. 15. Select HeightThe height selector is used tocreate a mask that highlightsa certain height range of theinput terrain. The output willbe full strength (white) in thatrange area and zero strength(black) outside of it.
  16. 16. Probability FilterThe probability filter treats the input map as aprobability density function, and creates amask that randomly scatters dots according tothat density function. It is intended to beuseful for object placement maps.
  17. 17. Channel Combiner The channel combiner recombines three individual height fields into a bitmap typically using the red, blue, and green channels.
  18. 18. Splat Map Terrain Distribution Maps Grass Distribution Tree Distribution
  19. 19. Output File Overview
  20. 20. File TypesThe file output device saves the fully built The bitmap output allows you to export aheight field to disk. Only the height field bitmap data type to a file. You may exportinformation is saved -- any color-height to either 8 or 16bit per channel colormapping applied in World Machine is for formats.illustration only, and is lost.
  21. 21. Import into UnityHeight Map Splat Map Grass Map Tree MapOne small last part…
  22. 22. Height Map
  23. 23. Scene SetupThe terrain paint tool is The tree placement tool is The grass and detailexpecting four textures for expecting three prefabs for placement tool isthe R, G, B, and Alpha the R, G, and B channels of expecting six grass orchannels of the splat map. the tree distribution map. detail meshes for the R, G, and B channels of the grass distribution maps.
  24. 24. Terrain ScriptDrag the appropriate textures into the splat map, tree distribution, and grass/detaildistribution settings in “Julien’s Terrain Tools” and hit apply.
  25. 25. Questions?Eric Hackathorneric@fragileearthstudios.com