Drawing plugins now supported in r68

For discussion and help with the Construct 3 Plugin SDK

Post » Fri Nov 24, 2017 11:32 am

If the initial value is the only option, you can just do:

Code: Select all
new SDK.PluginProperty("color", "test-color", [1, 0, 0])
Scirra Founder
B
415
S
248
G
92
Posts: 25,284
Reputation: 200,952

Post » Sat Nov 25, 2017 4:07 am

Note: link-text needs to be added to https://www.construct.net/ca/make-games ... guage-file
ImageImageImage
B
72
S
22
G
290
Posts: 3,885
Reputation: 159,511

Post » Sat Nov 25, 2017 12:56 pm

Good catch, added it to that page.
Scirra Founder
B
415
S
248
G
92
Posts: 25,284
Reputation: 200,952

Post » Mon Nov 27, 2017 2:24 am

So the drawing migration went fairly smoothly. I still have outstanding effects issues, if I could direct you to this thread, the issue is still there. It's unclear if this is a migration issue, or a bug, so I haven't posted an official bug report.
https://www.scirra.com/forum/effect-migration-issues_t196579
Thanks.
ImageImageImage
B
72
S
22
G
290
Posts: 3,885
Reputation: 159,511

Post » Tue Dec 05, 2017 4:16 am

Has there been progress on supporting FFD/Mesh for the Spriter/Spine style plugins in the C3 Drawing SDK? Any comment on possible ETA?

I would like to use the FFD/Mesh animation directly, I am currently exporting a very large spritesheet to integrate into my game rather than using a plugin.

@ashley @badlogic @lucid
B
63
S
28
G
19
Posts: 186
Reputation: 14,584

Post » Tue Dec 05, 2017 6:27 am

@Mikal
The renderer in C3 is mostly the same as in C2. It's quad based, with some optimization for point rendering for particles.

Now, you can do mesh based stuff in spite of that. Basically it amounts to ending all rendering batches in the renderer and then using webgl directly. Just keep in mind any webgl state changes you do you have to revert back before Construct's renderer is to do something again. It may not be optimal, because it breaks batching, but it's still fast. Faster at the very least to just rendering a bunch of quads with the rendering api.

In my mind this update is mainly for being able to draw stuff in the editor. Then again I"m a bit out of touch with things.
B
101
S
39
G
134
Posts: 5,588
Reputation: 85,514

Post » Wed Dec 06, 2017 1:48 pm

You can render meshes using quads. It simply means you draw two adjacent triangles at a time. If there are an odd number of triangles, you can issue a single triangle by issuing a quad with two points at the same position, i.e. a triangle and a degenerate triangle. This isn't the fastest possible solution, but it's not bad, and more importantly it means you don't need to switch any of the WebGL state, which probably means it's a lot faster than trying to hack in a custom mesh renderer state.
Scirra Founder
B
415
S
248
G
92
Posts: 25,284
Reputation: 200,952

Post » Thu Dec 07, 2017 12:44 am

Ashley wrote:I really, really would so much prefer Spriter and Spine to not implement themselves as drawing plugins. This forces the plugin to reimplement a bunch of Construct features and actually limits other creative features too. For example:

- you can't add a WebGL shader to just one part of a skeletal animation if the plugin draws the whole thing, but you can if it just controls sprite objects (e.g. make just the head flash red if hit, etc)
- you can't test for collisions with just a segment of a skeletal animation if the plugin draws the whole thing, but you can if it just controls sprite objects
- a plugin which draws the whole animation probably has to reinvent a whole asset management pipeline, but if it just controls sprites it leverages our project-wide in-editor spritesheeting engine
- Construct's support for containers allows you to treat composite objects as if they were one instance in the events

Personally I am convinced that these plugins should not use the drawing APIs and should simply act as controllers for sprites. This makes it much more flexible for the user, and avoids clunky reinventions of existing parts of Construct. I discussed this at length with a Spine developer a while ago and I thought they agreed; one of the outcomes of that discussion was the decision provide a custom import process so they can conveniently generate all the necessary sprites on import, so I filed this issue as a TODO for that work. Perhaps not all the Spine developers are aware of this approach.

We could add the drawing APIs they want, but one of the reasons we're holding off is because those features don't work in the canvas2d renderer. From the user's point of view, this will manifest as the plugin randomly not working on a small percentage of devices. I intend to make the C3 runtime the point where we unilaterally drop the canvas2d renderer, at which point we can go to town with these kinds of features. However even then it has the drawbacks listed above, and the C3 runtime is still some way off.

Rather than adding new drawing APIs, I would much rather add any extra APIs to allow them to act as controllers, and have a good workflow for importing and updating. That's why I filed the custom importers TODO issue. I am totally willing to co-operate with any developers who want to take this approach and refine the SDK to make it work well. I can't force them to, and they might make drawing plugins anyway, but I hope at least one of them take me up on this offer!


Hello,

Dev of Creature here. Creature is a 100% mesh based 2D deformation animation tool so mesh deformation ( and in particular, high performance per frame mesh deformation ) is key to really leverage its power.

We also do fancier skeletal mesh deformation beyond simple Linear Blend Skinning to achieve high quality curves/effects.

Ideally ( just like in almost any other game rendering engine ), we should be able to provide a list of points, indices and uvs and get the resulting mesh rendered out. This is a pretty standard API for any basic rendering pipeline. Rendering triangles as degenerate quads is not ideal even if the performance seems to be acceptable for some situations. Creature excels at high resolution meshes so again, performance is important.

I really want to support Construct 3 but a lot of the limitations regarding the renderer and what is provided to render simple meshes is lacking. Please let me know what I am missing here in order to achieve the level of visual fidelity on Construct 3 for the Creature animation tool.

Thanks
B
8
S
3
Posts: 16
Reputation: 682

Post » Thu Dec 07, 2017 3:23 pm

We will probably add dedicated mesh rendering functions for the C3 runtime, but until then I'd rather avoid it as there's no equivalent for the canvas2d renderer with the C2 runtime. If you want to ignore canvas2d support, you can use the quad rendering approach as an interim solution.
Scirra Founder
B
415
S
248
G
92
Posts: 25,284
Reputation: 200,952

Post » Thu Jan 18, 2018 10:27 am

Any news about Spriter plugin for C3? :)
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
58
S
18
G
6
Posts: 762
Reputation: 9,615

Previous

Return to Plugin SDK

Who is online

Users browsing this forum: No registered users and 0 guests