Summary:
If you want to skip my introduction the short summary is that I have developed a robust Vector Graphics Package and a platform-independent Tile-Map Renderer and would like to know if there is enough interest in either to package them up for the asset store.
Introduction:
Hello my name is Mike Talbott. 3 years ago I left my career as an Architect(of Buildings) to become a Unity programmer and designer. As I have no formal computer programming degree, it is because of the amazing Unity community that I’ve been able to learn and succeed so quickly, so thank you all for that. At my company, Point Line Plane, I primarily have worked on interactive architectural visualizations for individual clients. However, I have come to love Unity so much that I have used it to create some applications that you would not think are well suited for development with Unity. The first of such atypical applications I have released is called Busit! for iOS and Android. Busit! is an easy to use bus navigation app for navigating any of the bus systems using the NextBus prediction system. It enables users to explore interactive transit maps, see real-time bus locations, and access next bus arrival times. In developing Busit! i had two major hurdles: 1. How to render the maps in a way that would be the same for Android, iOS and Windows Phone and 2. How to render the lines for the routes which for some agencies was in the 100s of thousands of points. In solving those hurdles I think I may have created some potential products that might be of interest to the community. Here’s a summary of what they can do:
LineWorks: Vector Graphics Package.
While I believe Vectrosity is a great, full-featured line renderer, I tried to get it to meet my requirements for months with no success. The problem was the large quantity of lines that I needed to render and the need to dynamically adjust the line width as the users zoomed in and out. My solution was to write my own line renderer that pushes some of the trigonometric calculations to the GPU in shaders. When I did this, the performance gains over Vectrosity were tremendous. Right now the feature set is similar to that of Vectrosity but If I was to release it for the asset store I was thinking of fleshing it out further to provide full vector graphics support with shapes, fills, some basic SVG import and export, and maybe some in-scene editing/creation tools. Would anyone be interested in that?
MapWorks: Tile-Map Renderer
To render the maps, I didn’t want to go through the trouble of trying to make MapKit on iPhone and Google Maps Android API to work within Unity so I decided the best choice was to write my own tile-map renderer and use Open Street Map tiles. There are a number of companies that can provide easy access to OSM tiles and can even let you create custom styles for the maps. I personally use MapBox. You could also create your own tile server using Till Mill or similar. My package allows for platform agnostic map rendering even in the editor with easy navigation, tile caching for quicker loading, and the ability to integrate 3D objects or anything Unity can do right into the maps environment. Would anyone be interested in that?
If you would like to see either in action, please download Busit! Thanks for your time and I hope to get to share these labors of love with the community some time soon.
I’m currently working on my own take on a vector graphics package (early days yet) and I think the Unity community could really benefit from more competition and innovation in this area.
If anything it will keep Eric on his toes and might even push RageSpline back into action.
I am moving forward with my vector package to be called “LineWorks”. It’s shaping up pretty well. Currently I’d describe it as Vectorsity meets Rage Spline with some cool gpu performance tricks. It offers both a simple code interface to create graphics at runtime and editor tools to creates then in the editor. Additionally, I’m currently working on support for svg importing. My goal is to support 80-90% of the svg spec.
I’ll share a demo as soon as I can (maybe a week or two)
Question: I am struggling with whether to build Lineworks within the new UI framework, use traditional mesh methods, or both. Currently LineWorks uses meshes. I am not using quads to create my meshes so this makes it difficult to integrate with the new UI as it only accepts quads at the moment. But it seems like an important goal since the ability to have a fully vector/svg-base UI would make a lot of people happy.
After some initial tests I have decided not to use it for now. I was turned off by quads only, and by the unreasonably low mesh size limit. There were some other reasons too but I forget off the top of my head.
FYI, I was aware of the vertices limit in the UI but as 4.6 Beta 21, the Release notes said,
“UI: Allow a canvas to have more than 64k verts by splitting generated mesh when required.”
so it looks like the vertex limit might be a thing of the past. although, I’m sure you get additional draw calls for additional meshes.
I voted. Also good news on the increased mesh limit.
Keep us posted on your progress. 80-90% of the svg spec is a huge goal - do you mean 90% of path path support, or will you be including svg filters, full blend modes, animations, etc?
maybe 80-90% is being overly optimistic. lets say 60-70% realistically. Right now my minimum viable product is all shape types, all relevant style properties, and transformations. All while remaining fully editable in Unity. things I probably won’t support in version 1 are text, filters, and blend modes as your suggested. Animations are a maybe. IMHO it would be pretty awesome if svg animations converted directly into animation controllers with everything properly hooked up.
I am also looking into adding some shader side anti-aliasing to provide smooth edges without turning up the project quality settings.
I’m not following the SVG model myself although I considered it. Hooking up the animations would be a great idea. I’m also leaving out text, but I’l like to get blend modes in if possible (although I don’t have unity pro yet).
I also went with a shader based edge AA (I’m a shader noob and this was my first foray into programming shaders) and it works well, although my implementation could use some polishing. I have only tested it on strokes though.
Anyway I’m walking a fairly tight line between threadjacking and encouraging so I’ll leave it there
To my mind most vector packages go wrong in that they assume you are going to use them to draw the sprites where as in most cases really you mainly want them to be able to import vector art from other packages like coreldraw or illustrator and just handle the rendering and conversion.
I would love a package that could take an svg and import it into unity to use as a resolution independent sprite2d for example.
I know there are issues with this in that some parts of the spec are harder to implement and often the vectors exported from these packages are very complexed and there for slow to generate at runtime as vectors in games. What I think would be best is if you made a tool that simplified the vectors imported or at least detailed a process of how to generate them ready for use from popular packages such as illustrator and coreldraw.
I’d love to know how Ubisoft managed to get running so well in something like rayman origins for example. That is the sort of package that Unity really needs.
@jeffweber I looked at the asset you linked to. I’m not sure what to make of it. It’s got a lot going on but after watching the 26 minute long video I don’t think I’m any closer to understanding what it actually does and how anyone would use it in their development.
@IanStanbridge that’s interesting to hear your take. Maybe I misunderstand but when I hear “sprite”, I think “texture”. I can see the value in rendering vector graphics into a sprite texture, however, I don’t think that will be the direction I’m going to take LineWorks. There are some assets out there that will render a SVG into a texture. This being one if them: SVGAssets | Sprite Management | Unity Asset Store That said, they are not directly resolution independent as you have to pick a resolution to render to but the resolution can be adjusted as long as you don’t mind re-rendering the texture. LineWorks will be creating the vector graphics with polygon meshes so they will be truly resolution independent. They can be used similarly to sprites but will not be actual sprite textures.
MapWorks - Map Renderer would be awesome, plus it will have LineWorks - Vector Grapics Renderer built-in as well
I’d love to have a Vector Tile Map Renderer that works across PC+Mobile :))
@amc18724 Thanks for your interest. I am working on the LineWorks package right now. I was slow to reply because I was hoping to show a video of my progress. Unfortunately, I’ll need just a little more time before it’s ready for a video.
Progress is flying now but stopped for awhile while I was working on a real job. My internal goal is to get it done before GDC (March 2). I’m close but I might be a little behind to make that deadline. The whole MeshRenderer vs. CanvasRenderer thing is still slowing me down. I want to support both but CanvasRenderer is missing some key features. UT has hinted that most of my problems with the CanvasRenderer will be improved in future releases but I don’t want to wait for that.
As for Waze, I’m not sure how they render their maps. All I can say is that if they are using a vector based tile server, then the tiles are probably coming into the device as either GeoJSON or protobuf data. Before I started developing LineWorks for the Asset store, my personal version of LineWorks could parse GeoJSON files. I will try to get this hooked up with my current version and I will look into protobuf.
For my MapWorks package, it should work with any tile server. Personally I have been using tiles for Mapbox.com in my transit app, Busit.
Anyway, I will work full speed towards making a rough video to show some of the features.