Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Advice on building a quad-based level construction set

Discussion in 'Editor & General Support' started by kurai, Mar 22, 2015.

  1. kurai

    kurai

    Joined:
    Jan 9, 2012
    Posts:
    118
    Hello there,
    I'm currently starting a new project. It should be a FPsomething based on neon effects and retro-style pixel art. Just to give you a small idea about what I'm trying to do, here's a pic of the effect:


    Since I would like to keep everything as light and clean as possible I decided to have the various tiles in a single map. Each tile is 8x8 pixels on a 128x128 pixels texture. I figured that at some point I would like to have some sort of editor helping me to build levels (basically a way to change/rotate the uv so each quad composing the level can show exactly the tile I want to). The 3D elements are just quads. Here is an example of the map:



    In order to keep draw calls at a minimum I thought that I have to move UV coordinates in quads rather than working on the offset/tiling, because that way I would have ended up with a lot of different materials.

    Now my problem is how exactly to proceed. I think I have to generate a new quad mesh for each UV coordinates group. It would lead me to a lot of different models, and I'm asking myself if this is too much or not the right way to do it. I'm even wondering if it's worth to have a single texture (I guess so, for draw calls) or if there is a better way to proceed.

    Could you give me some advice on how move from this point? Eventually I'd like to have a system allowing me to:

    1. Use one material per colour, by moving UV mapping to show the exact tile I need.
    2. Animate the UV maps so I can do simple 2 frames animations by switching tile. (It should also be possible to change tile at runtime upon certain events).
    3. Have some sort of automapping feature (so it just generates quads only where it needs them).

    Thanks in advance!
     
  2. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    It's probably not what you mean, but...
    I recall the http://forum.unity3d.com/threads/core-framework-with-100-mobile-ready-shaders-released.161695/ package having a UV mapping system for garbage-free on-screen counters (it pretty much iterated really quickly over lists IIRC). Whilst this may not give you your answer - it gives you a demo to ogle at least. maybe some ideas on your UV work. The author is having a tough time atm so don't expect immediate responses, he is working on U5 support, which he has in beta. Sorry I don't have a direct answer. The CORE framework was pretty much always my fallback for such work since it allows for some extension of it's internal types. Whether or not it will suit your game - I do not know.
     
  3. kurai

    kurai

    Joined:
    Jan 9, 2012
    Posts:
    118
    Yeah, it's not directly related (plus, I would like to find a way myself instead buying something) but the shaders are interesting and something I would like to check at some point. Thanks anyway, everything helps at this stage :)