[effect] Relief Map

Share your Construct 2 effect files

Post » Mon Jul 04, 2016 7:15 pm

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
57
S
20
G
29
Posts: 804
Reputation: 21,969

Post » Tue Jul 05, 2016 4:57 pm

This looks amazing. If it's flexble enough, it could be used to create faux-3d environments...
Can I make feature requests? :D

Here goes:

What if the .fx worked like this:

Image

And the following parameters were available to the user:

Number Of Slices - the number of vertical slices
Parallax Effect - the strength of the slice parallaxing
Max Height - The maximum "height" of the effect
Invert Height - inverts the height layer - in the image, the smallest slice would end up at the bottom and the largest on top.
Height Offset - lets the user "sink" the slices into the screen
Bottom Color - solid color to fake depth shading
Bottom Color Intensity - max intensity of the solid color
^
In the image, suppose the bottom color is Black and the intensity is 1
That means that the bottom slices color is fully black, the middle slice is a 50% mix of the sprite color and black and the top slice has 0% black mixed in.
If the intensity was 0.5, then the bottom slice would be 50% mix of black and sprite colors, middle slice would be a 25% mix and top slice would only be the sprite colors.

Top Color
Top Color Intensity
^
same as the Bottom Color/Intensity, but appied from the top down.

Sorry for the wall of text - I have no idea how feasible this is or if this is the direction you want to take the effect in. The potential of this effect is amazing - and I'm extremely excited about it.

Thanks for looking.
B
8
S
2
G
2
Posts: 85
Reputation: 1,218

Post » Wed Jul 06, 2016 8:37 am

Actually, I don't think sampling colors from the background would be a good idea... I was thinking about using the Alpha Channel to store the "height". That way, if the sprite image is saved with straight alpha, the color information would be preserved in the transparent areas.

Alpha of 0.0 would be a special case, where the "slice" would not be drawn at all - I noticed your demo only has what looks like 1-bit transparency.

This would make the whole setup more flexible - what do you think?
B
8
S
2
G
2
Posts: 85
Reputation: 1,218

Post » Wed Jul 13, 2016 9:54 am

Can't wait for this! :D
B
28
S
8
G
7
Posts: 643
Reputation: 6,457


Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests