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
    • Matrixgenerators
  • Blend

Last edited by Denis Pahunov Mar 08, 2020
Page history

Blend

Blend

Blends two or more maps together using the specified blend algorithm. This generator acts quite similar to the layer blending mode in Photoshop or other graphics editor. Think of the most bottom “Base” map input as a background layer, and the layers above are the blending layers.

Use cases:

MaskGrass

Green grass mask texture multiplied with the random noise mask

Properties:

Each layer (except the Base one) has the algorithm and opacity properties.

  • Algorithm - determines how exactly the layers are blended
  • Opacity - the blending layer opaqueness factor. If the value is 0 the blending result is not visible.

Here are the algorithms the blend generator offers:

  • Mix: simply blends two maps using the opacity value Algorithm’s formula is { return b };
  • Add: adds the Blend layer to the Base layer, i.e. the sum of the layers { a+b; }
  • Subtract: subtracts the Blend layer from Base layer { a-b; }
  • Multiply: multiplies the two layers. Note that since input values in most cases are less than 1, the multiplied value would be lesser than any of the input ones. { a*b; }
  • Divide: the opposite of Multiply. The result can often exceed 1, so use it with care. { a/b; }
  • Difference: the delta value between two layers { Mathf.Abs(a-b); }
  • Min: the minimum value between both layers. { Mathf.Min(a,b); }
  • Max: the maximum value between both layers. Try experimenting with Min and Max blend algorithms as they can bring clean and useful results { Mathf.Max(a,b); }
  • Overlay: this effect is often used to process images but the feasibility of using it for blending height or splat maps is questionable.
    if (a > 0.5f) return 1 - 2*(1-a)(1-b);
    else return 2
    a*b;

Algorithm examples for the graph scheme:

Scheme

Algoritm Algorithm: Mix, Add, Subtract, Multiply, Difference, Min, Max

In current case base layer (voronoi) opacity is always 1, and the algorithm is always additive. Blend mode is changed for Noise only. In Mix mode opacity is set to 0.5

Most common blend algorithms for masks are Add and Multiply.

Add will blend two masks in "OR" mode, combining their allowed zones

While applying map with Multiply will blend it in "AND" mode, combining their restricted zones

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