Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How to create a procedural mesh of tunnels

Discussion in 'Getting Started' started by canxerian_, Jun 7, 2022.

  1. canxerian_

    canxerian_

    Joined:
    Jan 29, 2016
    Posts:
    17
    I'd like to create tubular tunnels with cross sections, how would I go about doing so?
     
  2. AntonioNoack

    AntonioNoack

    Joined:
    Mar 26, 2020
    Posts:
    7
    A general solution, that you might like for its simplicity, would use signed distance fields/functions and marching cubes / dual contouring. It comes at the cost of non-ideal meshes and performance, but might be fine.

    The solution you probably expected, an explicit formula:
    Think about the most symmetric solution, and how to generate a single petal.
    Then mirror/deform and merge them.
     
    canxerian_ likes this.