The vector pipeline

108 views
Skip to first unread message

Kevin Newman

unread,
Sep 19, 2013, 9:32:32 AM9/19/13
to plays...@googlegroups.com
Hi,

I'm looking around at what's available (or what will be in a few months) and I'd really love to use PlayScript (and Xamarin) for some upcoming projects. The one thing I'm not sure of though is how to go about rendering vector art. I know on mobile it's better to prerender bitmaps, but I have a particular use case where I'd really like to ship vector art and render that at runtime just like Flash/AIR always has (of course caching that as bitmap textures, etc.).

Is there currently a solution for rendering vector (swf) content for use with PlayScript (and it's Stage3D implementation)?

I remember there was some other Zynga project that was supposed to help with this, but I can never find it.

Thanks,

Kevin N.

Angel Ernesto Anton Yebra

unread,
Sep 19, 2013, 2:15:26 PM9/19/13
to plays...@googlegroups.com
Hi Kevin,

I think you should explore the Starling forum. Maybe this can help you


Regards

Angel Anton 

Kevin Newman

unread,
Sep 19, 2013, 3:37:33 PM9/19/13
to plays...@googlegroups.com
That's a good idea, but since Starling is designed to run on Flash/AIR, I'm not sure they'll have the answer. What I'm looking for is a software based renderer for static SWF assets (because I think tessellated GPU rendering is ugly). Flash/AIR has that by default, so there's no reason they'd need to have something like that in AS3.

DMT looks exactly like the kind of pipeline I'm looking for (I'll be checking that out for sure), but I think it's using the built in CPU display list renderer in Flash to do its rasterizing. That's the part I'm asking about for use with PlayScript. Is there anything that can render Flash/SWF assets on Mono/PlayScript (other than a GPU rasterizer through Stage3D- I know those exist)?

Thanks,

Kevin N.

Ben Cooley

unread,
Sep 25, 2013, 5:25:00 PM9/25/13
to plays...@googlegroups.com
The Zynga project we mentioned was swf2ccb I think, which dumps swf files to either CCB, or to our own Zynga Starling asset format (json + texture atlases).

Vector is *hard*.  For true vector support you would likely need to go with something like Scaleform, which draws vector art using the GPU.  Scaleform wrote this GPU vector rendering engine over a few years, and it's unlikely that you would be able to duplicate it easily - likewise I don't think there are many other projects open or closed that do anything simlar, and non that I know of that use GPU to render SWF assets.  The problem with scaleform is that sometimes drawing vector art with CPU is faster, and sometimes (many times) is sloooower.  It depends on the actual vector art in question as to whether it's best to convert it to a texture or not before hand.

For games, the general rule has always been that vector art is best pre-converted to tetuxtures.  Not sure if this is 'objectively' supported by any tests anywhere, but since the tools and vector rendering GPU libraries are really not available, it's generally considered the path of least resistance.
Reply all
Reply to author
Forward
0 new messages