Scalable Vector Shapes 2D - Evolving Roadmap

Thanks! I just entered the grease pencil chat (apparently during a live meeting haha). I asked to get in touch in order to try some collaboration about a more direct way of synchronizing.

They will probably mention gLTF as well, I guess. Let’s see where it goes.

2 Likes

Abit of follow up from the grease pencil team on this:

I don’t know how building blender plugins works, but I guess you can build great stuff without knowing the ins and outs of gLTF … Is that an open exchange format then? Do you have a link to the official specs?

3 Likes

Read the Blender glTF page first.
There is a short overview about Extensions and 3rd party Extensions

with links to example Extensions.

The official specification is by the Khronos Group:
https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html

That’s a lot of documentation.
Maybe the Blender docu is enough for the task. The Extensions in Blender can be developed with Python.
Maybe take a look at the “Blender-To-Godot Curve Tool” in the Godot Asset Store. The curve Extension should be python and the source readable,

EDIT:
Every stroke in Grease Pencil can have a material, that could be exported like for an 3D object in glTF. That would be so much better than with SVGs. Way more possibilities. I agree, that SVGs itself could be interesting also, but limited. IMHO you would have to develop some logic to calculate the keyframes or delta yourself, and detect what is similar between the frames, to avoid the brute force one scene per animation frame. That’s the biggest limit in (animated) SVG, that every frame is independent and you have only the timestamps (as far as I understand it right now).

Yes, my thought as well, just array swapping may work fine too. It would be very tightly coupled to the grease pencil export any which way in any case, so might as well key frame the points array of polygons. Calculating and resolving deltas would be slower at runtime than loading arrays in memory, I’m guessing.

I’m not inclined to optimize prematurely.

That is not flexible at all of course, but if it gives you scalable animations it is a bonus.

I don’t know how much overhead a scene with just polygons causes over only arrays in some custom resource, though. Would it really matter all that much?

As far as materials go, that is beyond my expertise at the moment (I get albedo. :grin:)

1 Like

If you are more comfortable with the SVG solution (at first :wink: ), go with it. You’ll get faster results to play with.

1 Like

I think if/once they have a glTF export you would just use the Godot importer for 3D, right? Or am I missing something obvious?

Right, but you could interpret the data as 2D.
You’ll need the import script in godot, too, to read and interpret the extension data. Same as the developer of the “Blender-To-Godot Curve Tool” did. The base for the glTF solution is done by them. Maybe colab with the developer of the addon, or talk to them what their experience with the extension is and what they think about your idea.

1 Like

Meanwhile…

On the evolving roadmap, work on in editor drawing and animating continues.

Released today: Multi-Point Edit

New in release 3.6.0: select and edit multiple points and use temporary pivots.

I continued to animate the trunk of Ellie de Olifant, famous from Dutch TV, who is the creation of Ellen Langendam.

Ellie is a brilliant elephant who comes up with novel plans to make sure anyone can play along, however unlikely.

Disclaimer

I make an effort to keep Scalable Vector Shapes 2D fully GPT-free and Claudeless. If want to chip or chime in, without support of any of these technologies? Try it out and raise bugs/issues on the github page.

Want to learn more? Join the discord server: https://discord.gg/CDdkVvT2Ff

3 Likes

I studied the sample svg file. It looks like the shapes in each frame have a deterministic ID and are polygons built up from a deterministic number of points.

So I could try and make a very hard coded implementation that sets keyframes on the points array of each shape… This is almost reverse engineering of course. It’d probably also mean comparing and updating styles, etcetera.

3 Likes

:+1:
Much appreciated.

3 Likes

Claudeless is my little wordplay on the old ‘serverless’ misnomer (via ‘cloudless’ of course).

2 Likes

Perfect. :wink:

2 Likes

The more I think about your project, the more I realize how important it could be in the next months. It has immense potential.
With the upcoming trace renderer in 4.8 as the first lookout to the coming line renderer, it’s the perfect moment to jump onto it, and to base your development on that concept and help to build a cool line renderer base. With the target to render grease pencil in Godot, with animations and materials etc. The possibilities are endless. But it will not work with the SVG route, IMHO it would has to be based on glTF.
And as stated, extra kudos that it would be hand crafted.

2 Likes

That looks like great advice, but I do not know whether I’ll make that kind of timeline. I have to stay true to what I set out to do:

  • have joy in what I do
  • try to spread joy in with what I do
  • meet like-minded people from all over the world

However much I would like to be a great success, or grab a great opportunity like this, I am not really very resilient to stress and deadlines.

The reason I have managed to be productive with something is joy.

That being said, after I round up the open epics I have now, top of my list will be learning just enough about glTF, materials and line renderers..

3 Likes

No pressure, please.

I have started a project for myself to have a PoC for my claims.
Strictly following your spirit, not one token was spend.

My concept so far.
"
Blender Grease Pencil in Godot

This project is a prove of concept to transfer Grease Pencil from Blender to Godot.

Grease Pencil is a tool to draw vector graphics in Blender. renevanderark on the Godot forum is developing a 2D shape renderer, the open question is how to transfer Grease Pencil data from Blender to Godot.

This project is a PoC following the discussion on the Godot forum:

The concept is based on the project “Scalable Vector Shapes 2D” by renevanderark to render vector graphics in Godot.
License: MIT

For exporting curves from Blender and importing them in Godot the workflow is based on the Godot addon “Blender-To-Godot Curve Tool” by coded-eye on Godot Asset store.
License: MIT

The PoC should show a workflow to accomplish to display Grease Pencil art from Blender in Godot.
Grease Pencil are 3D curves in Blender with parameter like pressure (line width). All parameters can be animated and strokes can have materials.
Blender offers tools to convert Grease Pencil to (animated) SVGs with every frame distinct elements (Flipbook).
The PoC should show that the more flexible way to convert the data is via glTF.
GlTF doesn’t support curves by default. To transfer curves as an glTF, an glTF extension would be required. There is an addon by coded-eye to use glTF extensions to include curves to glTF exports in Blender. The addon provides an import GDScript to import the curve data.

Open questions:

  • What data is already supported by the “Blender-To-Godot Curve Tool”?
  • What is the state of the Godot Line Renderer? (analyse the new trace renderer in 4.8, based on a new line renderer)
  • What is the expected 2D data structure for “Scalable Vector Shapes 2D” that could be extracted from glTF curve data?
  • How to handle edge cases, grease pencil will not always be planar?
  • What are the pros/cons with glTF to (animated) SVGs?

"
will provide my results to you.

1 Like

Hi @conz3d , I think it’s great that you’re so inspired.

Someone on my discord has encoured me to get in touch with the grease pencil team via their official blender.org chat channel (for which you do need an account)

A specialist on the gLTF format joined that chat channel today offering to answer questions. If you’re serious about this, I think you should (no pressure) get in touch:

2 Likes

By any chance “Julien Duroure”? That would be the jack pot.

1 Like

Yes, that’s what the handle says.

He is the main maintainer of the glTF importer/exporter in Blender.
On Mastodon:
@julienduroure@mastodon.art

Well, in the chat I mentioned our conversation here on the forum, but it may be a bit of a long read by now for someone who may be very busy.

I think they’re enthused enough to want to make some time to spar about your idea, but you may have to join the chat they are on..

Looking up the link..

There is a thread made by hissatsuclaw in which we discuss possibilities of importing their svg animation. There I try to quote your suggestions as best I can, but it’d be better if you explain your thinking and see if we can come to some aligned experiment.

I can help turn it into a mature solution later but have little time to really do research and experiment.

1 Like