Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
MapMagic World Generator
MapMagic World Generator
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 157
    • Issues 157
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Requirements
    • Requirements
    • List
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards
  • Denis Pahunov
  • MapMagic World GeneratorMapMagic World Generator
  • Wiki
    • Main
  • Settings

Last edited by Denis Pahunov Apr 12, 2020
Page history

Settings

Properties of the MapMagic object in scene. Set in Inspector window.

Settings_Main

Tiles

Here you can manage the terrains that are generated in editor (i.e. Pinned Tiles). To pin or remove tiles press the checkbutton, and then select the tile in scene. You can use the frame selection to pin/unpin multiple tiles at once.

Settings_Tiles

Tiles, as well as all other Unity gizmos, are not displayed and could not be modified when Gizmos are disabled in the scene view.

  • Pin New Tile: will create a new terrain tile at the selected position.
  • Pin As Draft: will create a tile with low-resolution (Draft) detail level only. This is useful to when forming the initial terrain shape, since draft are generated way faster and require less memory. When working with large terrains it would be handy to pin the large grid of Draft tiles or observing the whole terrain, and one or two full resolution tiles to work in detail.
  • Pin Existing Terrain: will convert already existing terrain to MapMagic tile. This will remove all the terrain information on it.
  • Select Preview: select the pinned tile that will be used to display the nodes preview in graph, in preview window, and to assign a special preview shader to terrain. When preview is not selected, the closest to the camera tile is used. You can select only one preview tile.
  • Unpin: unpins the tile and removes it's terrain.

Locks

Creates an area that is excluded from procedural generate. Could be useful for creating custom locations on pinned tiles. See Locks section for details.

Settings_Locks

Infinite Terrain

One of the main MapMagic features: when enabled, generates the new terrain tiles when the camera comes closer to them, and removes the tiles that are out of range. Every tile is unique, but based on the same creation principles. This way MapMagic creates an illusion that the terrain is infinite and doesn't repeat itself.

Infinite Terrain will generate low-resolution tiles (Drafts) first. Then it will create the main tiles only in a close range, leaving drafts in a background. This will help to save the memory and the compute time.

As long as the graph (and it's seed value) haven't changed will generate exactly the same tile every time player comes to it.

This feature works in playmode only, only the pinned tiles are available in editor.

Settings_InfiniteTerrain

  • Generate Infinite Terrain: enables/disables Infinite terrain feature.

  • Main Range: the distance of creating the Main (hi=res) chunks (in terrain tiles). Thus, if tile size is 1000 and Main Range is 2, it will create main tiles in 2000 units.

  • Drafts Range: the distance of creating Draft (low-res) chunks (in terrain tiles).

  • Hide Out of Range Chunks: when enabled, will hide pinned chunks when they are out of generate range. When disabled, pinned chunks will be always visible.

  • Generate Terrain Markers:

    By the default the main camera is used as a trigger object to generate new chunks. All the generate, remove and enable ranges are counted from the main camera, it is the main generate marker. You can add the other markers enabling Around objects tagged and selecting a proper tag from the field. This could be useful if you have several characters that could have a vast distance between them.

    Moreover, you can turn off using camera as a generate marker by disabling Around Main Camera - for example, if you camera moves between those characters quickly and you don't want to generate terrain while in motion.

Tile Settings

Settings shared between all the tiles of this MapMagic object.

Settings_TileSettings

  • Size: length (X axis) and width (Z axis) of a tile, in world units.

  • Main Resolution: the size of the output terrain heightmap, in pixels. For terrain layers the size is the same (minus one pixel).

  • Main Margins:

    Many MapMagic nodes, such as Blur, Erosion, Cavity and others require additional pixel information to work with. This way they generate incorrect results on the tile edges. To avoid this, MapMagic generates a map that slightly bigger then the tile itself, and cuts out edges.

    Main Margins value determines the number of additional pixels on each of the map size. Fore example, for an output resolution 513 and margins of 16 the final map size will be 513 + 16*2 = 545 (squared).

    You can try decreasing this value to speed up the generate process, but check the tile edges for artifacts.

  • Draft Resolution: the size of the draft heightmap, in pixels.

  • Draft Margins: extra pixels on the edges for draft tiles (see Main Margins for detail).

  • Use Draft Terrains in: enables/disables draft terrains for editor or playmode:

    • Editor: will disable generating draft tiles while generating main ones. Disable this if you don't like switching to drafts, or work with low resolutions / fast graphs that are applied nearly as fast as drafts.
    • Playmode: will disable creating draft terrains first for infinite terrains. All of the tiles will appear in full detail.

Outputs Settings

The data that is used by the graph outputs. Usually all of these values could be changed in graph in a corresponding output with the link icon (Linked). However, they could not be the part of the graph: The graph stores the information of how the tile is generated, while this data determines how the generated result is applied.

Settings_Outputs

  • Height Output: see Height Output for details.

  • Apply Type: determines the way the generated height map is applied to the terrain:

    • Set Heights: the simplest way, via SetHeights. Fast on low resolutions due to reduced overhead, but using it on big heightmaps can create a noticeable lag.

    • Set Heights Delay LOD: set heights in several frames via SetHeightsDelayLOD, and then applies LOD modification. Takes a bit more time than Set Heights, but since it's split in several frames the lag is not so noticable.

    • Texture To Heightmap: creates the raw texture data in a separate thread, creates a render texture in coroutine and uses SyncTexture to apply it. Asynchronous and fast, but does not work in Unity 2018.

  • Split Frame: number of pixels in stripe that are processed per frame in Set Heights Delay LOD (or send to texture in Texture To Heightmap). If resolution is 513, Split Frame of 129 means that terrain will be applied in 4 frames (four 129*513 stripes). Decreasing this value will make terrain apply smoother, but will increase the total apply time.

Terrain properties

Are equivalent to the settings used for each terrain in the standard terrain’s Settings tab. The only difference is that they are applied to all of the MapMagic terrains.

Settings_Terrain

  • Auto Connect: Connects Terrain LOD Levels so that the tiles are welded seamlesly on detail level switching. The number is the terrains Grouping ID.
  • Base Map Distance: The maximum distance at which terrain textures will be displayed at full resolution. Beyond this distance, a lower resolution composite image will be used for efficiency. Checkbox enables/disables the base map feature.
  • Draw Instanced: enables/disables instanced rendering.
  • Pixel Error: The accuracy of the mapping between the terrain maps (heightmap, textures, etc) and the generated terrain; higher values indicate lower accuracy but lower rendering overhead. Unlike the standard terrain setting you can set the value to 0 to force the terrain render full-resolution mesh.
  • Reflection Probes: Use this to set how Unity uses Reflection Probes on Terrain.
  • Material Template: Material to use for rendering Terrain.

Trees, Details and Grass Properties

Are equivalent to the settings used for each terrain in the standard terrain’s Settings tab. The only difference is that they are applied to all of the MapMagic terrains.

Settings_TreesDetailsGrass

  • Tree Distance: The distance (from camera) beyond which trees will be culled.

  • Billboard Start: The distance (from camera) at which 3D tree objects will be replaced by billboard images.

  • Fade length Distance over which trees will transition between 3D objects and billboards.

  • Max Full LOD Trees: The maximum number of visible trees that will be represented as solid 3D meshes. Beyond this limit, trees will be replaced with billboards.

  • Bake Light Probes For Trees: If this option is enabled, Unity will create internal Light Probes at the position of each tree and apply them to tree renderers for lighting. Otherwise trees are still affected by light probe groups.

  • Remove Light Probe Ringing: If you check this box, Unity removes visible overshooting, which often appears as ringing on GameObjects that are affected by intense lighting. This setting reduces contrast, and is dependent on Bake Light Probes for Trees.

  • Draw Detail: Check this box to draw grass and details.

  • Detail Distance: The distance (from camera) beyond which details will be culled.

  • Detail Density: The number of detail/grass objects in a given unit of area. The value can be set lower to reduce rendering overhead.

  • Wind Speed: The speed of the wind as it blows grass.

  • Wind Size: The size of the “ripples” on grassy areas as the wind blows over them.

  • Wind Bending: The degree to which grass objects are bent over by the wind.

  • Grass Tint Overall color tint applied to grass objects.

Multithreading

Multithreaded: when enabled, Map Magic generate works in a several separate threads. Turning this parameter off forces Map Magic to work in the main thread only using co-routines only (this could be useful for debugging of custom generators or for compatibility reasons).

Settings_Multithreading

  • Max Threads: the number of threads MapMagic uses to generate maps. The recommended value is number of current processor threads -1.
  • Auto Max Threads: sets the number of threads to processor thread count - 1. This way, on the different hardware the number of threads will be different. Auto mode works both in editor and in build.
  • Apply Time per Frame: Although generate happens in other threads, applying generated results to the terrain, the final stage, is done using co-routines. This value sets the maximum time spent per frame by co-routine in milliseconds. Increasing this value will shorten the overall apply time, but can create a noticeable lag. Note that in some cases co-routine could not be split in smaller parts, so setting this value to 1 will not help to avoid some profiler spikes.
  • Instant Generate: when this parameter is enabled there is no need to press the “Generate” button after changing any of the generator parameters: Map Magic triggers the change and forces generation automatically as you make changes to each node in the graph.
Clone repository
  • Batch
    • Biomes
    • Combined
    • Objects
    • Splines
    • temp
    • temp1
  • BiomesGenerators
    • BiomesSet
    • Description
    • Function
    • Whittaker
  • Brush
    • Resolution
  • Combine
    • Combined
    • temp
    • temp1
  • MM1
    • Creating a custom generator
View All Pages