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. Dismiss Notice

SVG extruder

Discussion in 'Works In Progress - Archive' started by suribe, Jul 7, 2014.

  1. suribe

    suribe

    Joined:
    Mar 6, 2014
    Posts:
    10
    Hey,

    I'm doing a SVG path reader and extruder. It is very basic right now, and I'm thinking either releasing it as open source, or on the asset store (probably for free now).
    Is anybody interested in something like that?

    Right now, it reads an SVG and finds a Path, and it generates the mesh including side, bottom and top faces. It also generates a collider, but I'm not sure if it is working correctly. It features a custom editor, and draws the outline of the extruded mesh in the editor as Gizmos, so you can easily see how it will look.
    It also allows for inverting triangle orientation, so you could create rooms with it.




    Several things I would like to add:
    * Path selection (for SVG with multiple paths)
    * Paths with holes
    * Curves in paths (with controllable number of segments for recreating them)
    * Better triangulation (right now it is not very good, and it ends up having some degenerate triangles)
    * Multiple point extrude
    * Automatic update when modifying the extrude transform(s)



    Best,
     
  2. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    very interesting, could be a genuine use for this, but I think you need a bit more supporting geometry to get better normal values
     
  3. suribe

    suribe

    Joined:
    Mar 6, 2014
    Posts:
    10
    Hi!
    What do you mean with supporting geometry?
     
  4. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    I mean, that you are doing an extrusion which is great, but you need more mesh data to it. Like subdivision options. Like in the Y Axis you only have 1 face per segment. Look at Ring Loops and you will understand what I mean.
     
  5. suribe

    suribe

    Joined:
    Mar 6, 2014
    Posts:
    10
    Maybe something like this?

    (The artifacts in the nearest border are from the shadows, not from the mesh)
    I'm adding multiple levels. Right now, they are set up by hand using transforms, but I think you mean having them automatically generated. I could not find this Ring Loops that you mention, is it a plugin or a game?
     
  6. JohnRossitter

    JohnRossitter

    Joined:
    Dec 18, 2013
    Posts:
    1,027
    It's a concept.
    Ring Loops are used in 3D software like Maya to add additional mesh to a geometry.
    You can also reference Edge Loops
     
  7. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Looks good. You could also support 2d with it so you could use if for generating texture masks or even svg sprites as well as extrusion. Does it work at runtime so you can take advantage of the smaller storage space of svg ? For example making a circular mask would be far more efficient as an svg than storing it as a normal texture. You could then also vary the extrusion level at runtime.
     
  8. inertiadesigns

    inertiadesigns

    Joined:
    Oct 24, 2014
    Posts:
    14
    Hi i just found this thread... i would be very interested in this. We have some simple SVG shapes that we would like to extrude. When i say simple, i mean really simple. Did you finish the development?