Categories
3d

Termite – a vector renderer for stage3d (and possibly other targets)

Hey!

Just a quick post to introduce Termite. It has been in the making for a long time and shelved for the best part of it.
That said I think I am at a stage now where I think it could be used to create a basic game to test out its capabilities.
For those who don’t know, it is a library that takes content generated in Adobe Flash or Animate and converts it into a GPU friendly format for rendering with stage3d. (I have also done a test in Unity that worked well). It enables developers to render their vector content from the ide on desktop and devices with much higher performance than the traditional cpu renderer.

There are still a number of things I have not yet implemented but plan to and as the video below shows, it has the basics covered!

Here is a quick demo I put together, all the graphics are resolution independent and can be viewed crisply at any zoom.
(Best viewed in fullscreen at maximum quality but still doesn’t do it true justice)

Download slightly better quality here: download

Screenshot of the source fla:
from_this

I am thinking I might try to partner up with a game developer or studio to get funding for the last bits of development in exchange for support with the library but am still not 100% on a course of action there.

It works well and performance is good on modern devices too, the above demo runs at 60 fps on my test devices and there is still room for improvement.

I will post more information about features and limitations over the coming weeks and look forward to where the library goes.

bwhiting

15 replies on “Termite – a vector renderer for stage3d (and possibly other targets)”

Yes it should be able to run alongside starling to a degree. I envisage people might use starling/feathers for a game wrapper i.e. ui and then the termite renderer for the game content.

Amazing! Will this work with WebGL? WebGL will open up such a wide variety of use cases and give this such a great amount of reach. From what I have seen of Flash animation conversion tools targeting Unity is that the Unity community at large doesn’t really embrace these tools. There are a range of tools that Unity devs prefer and Flash based tooling is quite a niche thing. However Adobe Air developers, and (ex Flash) HTML/JS developers, are dying for a tool like this for WebGL. For web there is NOTHING like your vector renderer for web, and with the wide variety of screen resolution and the reach of web based technologies it is the platform that needs a tool like this the most. Your technology can fill a massive gaping hole that the death of Flash in the browser has left. Agencies working with big brands would be absolutely dying to once again have a Flash based animation workflow for interactive content on the web, as the production costs of this type of content has blown out massively with the demise of Flash Player.

A question, could your rendering engine also render mixed raster and vector content. If you had animated raster graphics on the timeline can they also be rendered?

Ben.

this is amazing.

It’s great that you found time to continue working on this project + it looks great and you’ve got animation ???!!!

here are the horrible questions I’d like to ask :

1. libtess or your own code? runtime or exporting custom file format that’s then read?

2. curves by shader or cutting them down to segments ? (looks like the latter in the pigs eyes but not sure)

3. Overdraw performance issues. I have not gone far enough to think about this but I went to a conference last year where someone was presenting a game that was done in vectors but ran with geometry like that, the overdraw performance issue was apparently adressed using an unused z buffer I guess (???) but I’m curious about this.

4. I was working on a .swf + .fla parser that would export things to a single file… and then a lib would create Starling meshes in Starling, or the same in Unity. obviously never had time to work on this more. But do you think it’s a good idea to have a way to export raw tesselated data to it can be re-used in different ways — or displayed/played in a different engine?

5. Have you got a twitter account or something – I’m not great at following blogs though I will definitely check that “notify me of new posts” box 🙂

@jack yes you can mix raster graphics too including bitmaps + bitmap fills for your shapes. It comes at a slight cost though of changing textures, you could use a texture atlas but it would be hard to predict what items get draw together. Still if they were small images that could all fix into one or two textures it would be less of an issue . Also with regards to webgl yes it could be rendered there too I think but you can already publish to webgl from adobe animate so that won’t be my immediate focus.

@gsynuh

1. libtess2 port yes, although other algorithms could be utilized. The swf is converted to a custom format as a pre-process as it can take time for large/complex scenes.. but it is also possible to do it at runtime too.

2. Curves in demo are using shader but tessellation is also another option that can be chosen. The pigs eyes are just not all made of curves and have some flat segments is all 🙂

3. Depending on the geometry and skill of the artists there can indeed be some overdraw or not that much. I think performance is acceptable at the moment stress test

4. yes I think being able to use the data from the flash ide is a great idea, hence me doing what I did!

5. I do have a twitter account but I don’t use it (@_bwhiting) perhaps I should.

More details are coming soon but yes a binary file is created that can be embedded or loaded and runtime and rendered.

What happened to Termite? Can it be used with Kha? I would be curious to see a repository I have experimented with rendering a simple FXG file.

Leave a Reply to bwhiting Cancel reply

Your email address will not be published. Required fields are marked *