[EFFECT] Depthdisplace (with demo capx)

Share your Construct 2 effect files

Post » Sun Feb 21, 2016 8:13 pm

Distortion/displacement effect using a depth map.

Modification of the original CC effect by david clarke.

Parameters-

XdisplaceAmount: amount of displacement horizontally.
YdisplaceAmount: amount of displacement vertically.
intensity: increases the displacement intensity.


diffuse image = samplerBack
depthmap image = samplerFront

Screenshot-
example1- sprite and horizontal-gradient depthmap resulting in a skewed effect.
example2- Photo and depthMap resulting in a 3d effect.(similar to Google camera/Depthy)

Image

fx and xml files-

https://dl.dropboxusercontent.com/u/22173473/DepthdisplaceEffect.rar
-----------------------------------------------
Added 23/Feb/2016

Demo capx for above image-
https://dl.dropboxusercontent.com/u/22173473/DISPDEMO1.capx
B
21
S
5
G
8
Posts: 1,215
Reputation: 7,834

Post » Mon Oct 09, 2017 8:26 am

Can we get a fixed link for this? I could very much use this.
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,679

Post » Sat Oct 14, 2017 1:00 pm

B
80
S
29
G
166
Posts: 234
Reputation: 89,119

Post » Wed Oct 18, 2017 10:12 pm

@totoe, thanks a lot for sharing this, though sadly the displacement doesn't work the way I was hoping. I had hoped that someone had made an effect similar to parallax displacement, but it doesn't appear as if it's been done at all yet, which makes me think I'm gonna have to shell out some cash to make it happen.
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,679

Post » Wed Oct 18, 2017 10:21 pm

@KTML5 there are a few members that could deliver but without a visual blueprint, i cant imagine it.
maybe put up a demo, a gif or a video to show what you need and request something unique.
B
80
S
29
G
166
Posts: 234
Reputation: 89,119

Post » Thu Oct 19, 2017 12:55 am

@totoe, I just need this http://apoorvaj.io/exploring-bump-mapping-with-webgl.html in a form usable in C2. I took the fragment shader and repurposed in C2, but have ran into a problem that in Chrome and Edge states is that there is "no precision specified for float", but when I specify the precision is simply states that type is a syntax error. I really don't understand what's going on.

If you know a thing or two about these things can you help me here? The page I linked has the fragment shader, all I did was replace the tex_diffuse and tex_depth variables with SamplerBack and SamplerFront respectively.
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,679

Post » Thu Oct 19, 2017 1:11 am

@KTML5 sorry i cant help you. maybe @Gigatron
B
80
S
29
G
166
Posts: 234
Reputation: 89,119

Post » Thu Oct 19, 2017 1:29 am

@totoe, ah that's quite alright, thanks for the help you've given me! :)
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,679

Post » Thu Oct 19, 2017 5:31 am

@KTML5
The shader code above use vertex shader , so we can not use vertex shader in C2 but just only Quad;
in this case fragment shader is not help; however you can try to find similar in shadertoy.com
and then i can try to convert to C2...

Regards
B
69
S
24
G
29
Posts: 829
Reputation: 22,751

Post » Fri Oct 20, 2017 9:33 am

@Gigatron, thanks for your time! Yeah, I actually modified this depth effect to modify X and Y shift amount based on the distance from the center of the screen, and then used the stepping that that parallax shader I linked used to make all the pixels line up correctly, and it's all working.

Yeah, the way I was going to about it is going to sound stupid to anyone that knows anything about GLSL, I was just trying to hack the displacement to do what I'd just stated above. It doesn't make much sense not to just use this Depth Map effect and extend it though.

Regardless, I'll be uploading this new effect here soon.
ImageImage
B
49
S
15
G
2
Posts: 270
Reputation: 6,679


Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests