Help with my plugin!

Post your work in progress addons and get feedback

Post » Mon Jul 11, 2016 6:03 pm

I making a new plugin. This plugin will get a sprite image with shader effects and set to another sprite image without a shader effects.
I dont know how to get the sprite image with shader effects in my plugin.
B
5
Posts: 7
Reputation: 239

Post » Mon Jul 11, 2016 6:31 pm

* moved to a more appropriate section.

This is where those who are capable of helping you usually reside. Hopefully, you'll get an answer from one of the plugin devs in due time.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
84
Posts: 5,388
Reputation: 58,458

Post » Mon Jul 11, 2016 7:31 pm

Look at the third party paster object, with it you can draw another object with an effect onto itself using the "paste object" action.

If you want to do it yourself you'll have to dig through C2's runtime source in the exporters directory and learn some webgl. The paster object works by having a texture that can be rendered to and then calling the drawgl() function of the object to draw. It becomes more complicated when drawing effects because the runtime wasn't designed to let effects be used by anything but itself. So you'll need to use the runtime as an example and make custom versions for your own use.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Mon Jul 11, 2016 8:08 pm

Message: thomazette can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
R0J0hound wrote:Look at the third party paster object, with it you can draw another object with an effect onto itself using the "paste object" action.

If you want to do it yourself you'll have to dig through C2's runtime source in the exporters directory and learn some webgl. The paster object works by having a texture that can be rendered to and then calling the drawgl() function of the object to draw. It becomes more complicated when drawing effects because the runtime wasn't designed to let effects be used by anything but itself. So you'll need to use the runtime as an example and make custom versions for your own use.


Well,i tried to use Paster, but i dont know if i make corretly. Take a look in these example: https://1drv.ms/u/s!AvYcN9vOqeUMhCawXsYpOo6yKBoi
I did not get it change de sprite color by the Paster.
B
5
Posts: 7
Reputation: 239

Post » Mon Jul 11, 2016 8:37 pm

It works but when you load a frame it replaces the frame that is shared between sprites so they all change.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Mon Jul 11, 2016 8:39 pm

R0J0hound wrote:It works but when you load a frame it replaces the frame that is shared between sprites so they all change.

It's can be resolved, with this the Paster?
B
5
Posts: 7
Reputation: 239

Post » Mon Jul 11, 2016 9:14 pm

Not really, the purpose of the paster object is to have something you can draw to. I guess you could use paster instances instead of sprites.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests