How do I export the canvas with the effect applied?

Get help using Construct 2

Post » Sat Sep 10, 2016 6:50 pm

I have a canvas(plugin by rojohound) that export the content in a .png file with alpha.

If this object have any blend applied also export the result correctly.

But if the object have any other effect like the "tint" one to get things colored, in the export appear the sprite without the effect.

What's wrong? Or the effects applied on a sprite are not supported in canvas?

Edit: Well the blend effects like Destination TOp and other ones not works correclty either :(
Last edited by matriax on Sat Sep 10, 2016 7:24 pm, edited 1 time in total.
B
24
S
10
G
3
Posts: 553
Reputation: 4,483

Post » Sat Sep 10, 2016 7:10 pm

@matriax

If you mean the 'canvas plugin' by rojohound, I dont think it works with webgl...try using the paster plugin instead.
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Sat Sep 10, 2016 8:09 pm

Thanks @chrisbrobs , this paster works with effects... but not with blends(Additive,XOr,Source Atop..) like the Canvas plugin, that some ones export correctly and other not but at least the additive and the importants work.

So @R0J0hound the "blend mode" on sprites are not supported with paster?

Edit: I'm using NW.Js

And in paster the "set resolution" works correctly so now i guess i will can asjust to the window size. In canvas the "resize canvas" option, stretch all the draw when export :( .
B
24
S
10
G
3
Posts: 553
Reputation: 4,483

Post » Sat Sep 10, 2016 8:36 pm

As far as I know pasting stuff with blend modes to either canvas or paster works fine. With paster some of the blend modes have slightly different behavior with webgl on but this has to do with webgl and not the plugin.

You'll need to give examples of how it doesn't work since blend modes worked fine for both plugins all the times I've used them.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Sat Sep 10, 2016 8:57 pm

Hi @R0J0hound ! thanks for the fast reply!

Here is the event i'm using, is the same on canvas.
Image

With canvas plugin some ones worked but with paster none works using the same event.

Here is the program i'm doing, a 2d tool:
https://dl.dropboxusercontent.com/u/659 ... _p102.capx

The events is bookmarked, you can find in the "Global" event sheet, the last event, in group Paster inside the Options.
B
24
S
10
G
3
Posts: 553
Reputation: 4,483

Post » Sat Sep 10, 2016 10:47 pm

@matriax

What is the line- system...wait 0 seconds .. meant to do?
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Sun Sep 11, 2016 6:56 am

I don't have all those plugins so I can't open it. I made a test and everything seems to be working fine with the paster object from my end.

I added a sprite and a paster object to the layout. Then made an event:
start of layout:
--- paster: clear to (0,0,0,100)
--- paster: paste sprite
--- browser: invoke download of paster.imageUrl

That worked fine. Even when changing the sprite's blend mode to any of the others. The only exception is xor, which doesn't work with webgl, but that is C2 wide.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Sun Sep 11, 2016 8:36 am

@chrisbrobs Is to be sure the event will run at the last of the tick, to be sure all sprites are pastes, but seems there is no need.

@R0J0hound I found the problem. If the sprite have an effect, like "Tint" the Paster plugin export without blend. If i remove the effect tint all the blend works as you said.

Edit: The effect tint is added to the Sprite Family.
B
24
S
10
G
3
Posts: 553
Reputation: 4,483

Post » Sun Sep 11, 2016 7:34 pm

Ah, it's probably an issue with pasting with effects and blend modes then. I won't be fixing any part of the plugin that involves applying effects any time soon.

A possible solution could be to paste the object to another paster first, then apply a blendmode to that.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Sun Sep 11, 2016 7:47 pm

But if i create various sprites, each one with their effects and blend modes, that not works because only will apply one blend or type of effect to the entire paste composition, or i'm missing something? Also an object always have effects added but are disabled until the user will active one or other.

Other way can be find the code of each blend mode and create their effect, so only effects will be used. I tried to look in the folders but i can't find where they saved, the other are in the "effects" folders but the blend modes built-in i not saw anything.
B
24
S
10
G
3
Posts: 553
Reputation: 4,483

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 44 guests