Search Unity

What is the best approach to render lines over a mesh?

Discussion in 'General Graphics' started by ssarratea, Feb 1, 2022.

  1. ssarratea

    ssarratea

    Joined:
    Dec 28, 2021
    Posts:
    5
    Hi, I was trying to recreate some Three.js projects into Unity as a training exercise.

    Basically: https://github.com/spite/THREE.MeshLine

    My first aproach was using particles (VFX) with trails on a SDF surface, but I gues there might me another approach:
    - thought on Vertex Shaders
    - some scripting to render multiple lines with LineRenderer

    Look forward to receiving advices/documentation/projects examples. Thanks!
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,435
    ssarratea likes this.
  3. scrawk

    scrawk

    Joined:
    Nov 22, 2012
    Posts:
    804
    They look like they have a bit of thickness to them.

    I would just do that by converting the line into a Unity mesh. They could be done as a strip of triangles or a cylinder tube.

    From the look of the image they might be tubes with a flat shader.
     
    ssarratea likes this.