Search Unity

Question How to create a 2d map from a scene.

Discussion in 'World Building' started by Grant151, Aug 24, 2021.

  1. Grant151

    Grant151

    Joined:
    Sep 12, 2013
    Posts:
    65
    This is general questions, so I am looking for overall suggestions of how to implement it.

    I have an open world game, and I want to add simple map UI (not minimap) - top-down view of the whole open-world scene. I know this is possible by creating an orthographic camera to render the map, so I have some questions:
    1. With a dedicated orthographic camera, how can I output a "stylized map"? So instead rendering whatever there is, I want to output a paper-like style map. (something like this)
      1. I am using a terrain with grass, sand, rocks, etc, so ideally I want those materials to be represented by different shaders / colors on the map.
    2. Is there a better method of achieving a map?

    P.S. I really don't want to draw a map separately (i.e. in photoshop) since my world is not final, and will be changing a lot. I'd like to get something that I can setup once and it will dynamically show the latest scene
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    You could transiently replace materials with unique solid unlit color material on all the renderers of your scene you want to feed into your map, snapshot that from the overhead ortho camera, then use that color keyed image as a splatmap image to blend between different textures to get the full map stylized look you want.

    That map you showed has all the hallmarks of an artist's touch however, with pleasantly scattered mountains and whatnot, so the technique I list above might be best to get you a snapshot near the end of your project that you can then touch up.