[effect] Stone

Share your Construct 2 effect files

Post » Wed Apr 06, 2016 10:29 pm

newt wrote:Needs something with exaggerated specular highlights.
Something like Photoshop's "Plastic Wrap" effect.
Would be a nice shader all on its own.

@newt

Ok , can you try this shader please ?

http://gigatron3k.free.fr/html5/C2/FX/plastic.rar

Regards
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
60
S
20
G
29
Posts: 815
Reputation: 22,068

Post » Thu Apr 07, 2016 12:06 am

The locations seem different in the preview than they do on the editor.
https://drive.google.com/file/d/0BzCTu6 ... sp=sharing
Otherwise, yep that's the effect.
A lot of interesting things to do with it. heh
Image ImageImage
B
168
S
50
G
169
Posts: 8,281
Reputation: 108,191

Post » Thu Apr 07, 2016 2:07 am

Gigatron wrote:@Wenutz
@ultrafop

Yes this shader draw stones; this mean math calculation drop some fps, but running 60fps on my computer -ati gfxcard.
... however try and play with the released version, it's a bit faster now..


Hey there @gigatron

I tested it and the performance is definitely much better. However, if there are more than 9 or 10 stones on screen, my fps drops from 60 to somewhere around 49. I'm running it on a nvidia GTX 560 with an old i7 and 6 gigs of ram.
B
59
S
35
G
23
Posts: 341
Reputation: 17,032

Post » Thu Apr 07, 2016 1:39 pm

ultrafop wrote:
Gigatron wrote:@Wenutz
@ultrafop

Yes this shader draw stones; this mean math calculation drop some fps, but running 60fps on my computer -ati gfxcard.
... however try and play with the released version, it's a bit faster now..


Hey there @gigatron

I tested it and the performance is definitely much better. However, if there are more than 9 or 10 stones on screen, my fps drops from 60 to somewhere around 49. I'm running it on a nvidia GTX 560 with an old i7 and 6 gigs of ram.

@ultrafop
For maximum speed on C2 side , try to make little sprite like 32*32 or 64*64 block and use scale on events.
With this way you can show more stones on screen but with low quality.
In this example i have removed, starfield, explosion fx , and reduced stone sprite to 8x8. Then
if i use random scale like 0.1+random(0.5) .. it's working well.
http://gigatron3k.free.fr/html5/C2/FX/stone

Regards
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
60
S
20
G
29
Posts: 815
Reputation: 22,068

Post » Thu Apr 07, 2016 6:59 pm

Gigatron wrote:
ultrafop wrote:
Gigatron wrote:@Wenutz
@ultrafop

Yes this shader draw stones; this mean math calculation drop some fps, but running 60fps on my computer -ati gfxcard.
... however try and play with the released version, it's a bit faster now..


Hey there @gigatron

I tested it and the performance is definitely much better. However, if there are more than 9 or 10 stones on screen, my fps drops from 60 to somewhere around 49. I'm running it on a nvidia GTX 560 with an old i7 and 6 gigs of ram.

@ultrafop
For maximum speed on C2 side , try to make little sprite like 32*32 or 64*64 block and use scale on events.
With this way you can show more stones on screen but with low quality.
In this example i have removed, starfield, explosion fx , and reduced stone sprite to 8x8. Then
if i use random scale like 0.1+random(0.5) .. it's working well.
http://gigatron3k.free.fr/html5/C2/FX/stone

Regards


Hey thanks, that really helped. I still saw a bit of a slowdown at one point when a bunch of large ones randomly culminated but with some tweaking I'm sure it can be workable. Thanks for the time and the cool effect!

The link for the download doesn't seem to be working for me though.
B
59
S
35
G
23
Posts: 341
Reputation: 17,032

Post » Thu Apr 07, 2016 8:34 pm

It works but, still slow down I have notice frame rate 48
B
249
S
39
G
15
Posts: 1,952
Reputation: 40,579

Post » Fri Apr 08, 2016 4:42 am

@ultrafop

The link for the download doesn't seem to be working for me though.

Right : http://gigatron3k.free.fr/html5/C2/FX/stone.rar
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
60
S
20
G
29
Posts: 815
Reputation: 22,068

Post » Fri Apr 08, 2016 5:30 pm

Thanks :)

I'm tinkering now. I can get the stones to show up but I'm having trouble getting them to rotate. Maybe I'm misunderstanding the "speed" and rotation parameters? I've tried setting it to something like 100 speed and 100 x rotation but when I run it the stone doesn't rotate. Should I be setting up an action that changes the rotation parameter ever X seconds to get that effect?
B
59
S
35
G
23
Posts: 341
Reputation: 17,032

Post » Fri Apr 08, 2016 5:56 pm

ultrafop wrote:Thanks :)

@ultrafop

I'm tinkering now. I can get the stones to show up but I'm having trouble getting them to rotate. Maybe I'm misunderstanding the "speed" and rotation parameters? I've tried setting it to something like 100 speed and 100 x rotation but when I run it the stone doesn't rotate. Should I be setting up an action that changes the rotation parameter ever X seconds to get that effect?


Absolutely... for example all params are static this mean no rotations no movement.
For rotation add global variable like rot=0;
and then
every thick add 1 to rot variable.

every thick set fx parameter 1 to rot/2; this will rotate X
every thick set fx parameter 2 to rot/5; this will rotate Y

I you need help i can send .capx.

Regards
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
60
S
20
G
29
Posts: 815
Reputation: 22,068

Post » Fri Apr 08, 2016 5:57 pm

Ooooh, Okay, I'll continue tinkering. Thanks so much for the effect and your quick replies :).

Also, who does that song in your demo? I like it.

EDIT:
Possible bug? The X rotation seems to go on forever but once the Y rotation hits a certain value it stops rotating (I'd estimate Y rotation = 200)
https://www.dropbox.com/s/zdmsaghiqx2iq ... .capx?dl=0
B
59
S
35
G
23
Posts: 341
Reputation: 17,032

PreviousNext

Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests