Depth Mask shader in Amplify Shader tool?

Hello, i have come to a halt when it comes to making VFX and i really want to expand my knowledge, i recently stumbled upon this video

https://www.youtube.com/watch?v=URj0ps0OSJA

The references and everything was to a great help at first, but i really dont know how to get it to work, i just return to the starting point cause i cant figure things out. Ive tried for weeks now but ive come here to seek for guidance and help!

Can anyone help me with this? All i really want is a working depth mask function, everything else i can do myself!

Thank you all so much for reading!

1 Like

Hi!
if you want more references here is one ive made too:

things can go through too as you can see in one of the replies:

You will need more than one thing and i totally recommend to watch this video in order to understand it well if not interested in colliding you can skip that part:

Have a good develop and post the result here :stuck_out_tongue: !!

oh my goodness i cant believe the amount of help you have sent my way. I just recently got sick but i will keep that promise and update with what i come up with!

Again, thank you so much!

Here is a quick one i just did!

im actually super excited now! I can now explore a whole new world with shaders!

Thank you again so so much! And to everyone else that has inspired me!

Does anyone know the same tutorial but for unreal? I’m also now struggling with this stuff. Thanks!

Well to achieve the effect you will have to make the shader in code, thats what i did, it took time but instead of doing it node based i wrote the code myself!

You can find the code needed here! https://www.youtube.com/watch?v=cHhxs12ZfSQ

1 Like

I can’t code, unfortunately. I guess this effect will be mystery for me.

Dont use unreal too much, but i think this could help you:

GL

Hey vaxkun, do you have any way to create those 3d cracks!?, ive tried looking and theres nothing online and im not good at creating meshes and / or UV mapping them… Any help?

Took the crack image .ai (illustrator) in order to have the strokes, then i import it into 3ds max to have this:


Then converting it to a editable poly we will have it “plane”


Then select all its edges and with shift pressed, move it upwards to have the “Walls”

For final touch, the UVS:

At my case because ive made a shader to effect the glow, and it have a “color fade” in Y axis on UVs i want to place the floor down the UVS, and then the walls up


In order to have those 2 parts, cut the walls from the floor and cut the walls in the half.

(Obvously there are so much vertex in this example so dont go crazy on that xd)

Then export it and add it to unity

3 Likes

omg this has been a huge help! i will make sure to make this as soon as i can!

Hello Vaxkun, ive made some progress, since i have the mask shader to hide the ground, im puzzeled cause i dont know why it doesnt show the 2nd crack


Aka, i put a normal slightly bigger mesh over it but it wont show!

Hello again, the resolution i found was to give the crack a plane and put the mask under it, but for some reason, if i put another cube inside of the depth mask it renders over it. Still trying to figure this out!

Obviously for that to be effective on everywhere, you need a quad/plane/Euclidean surface with the mask, and the crack mesh. each one with its respective shader:

En eventually add other things in it but that things must have the “other” shader

2 Likes

oo i see, is it normal for the mask shader to glitch when ur further away? it pops in and out for me, this is the shader code

Shader “Masked/Mask” {

SubShader {
	Tags { "RenderType"="Geometry-1" }
	ColorMask 0
	ZWrite On
	
	
	Pass{}

	
	
}

}

idk why it keeps glitching. sorry for all the questions, im not the best at writing shaders im more of a node based guy im so sorry

i wanted to see if it would glitch with a cube under it / blended with the top layer cuz i already had made that top part for the crack

then this happened

Ive made that on shader forge xD

EDIT to your second reply:
that shouldnt be happening so there may be something with the shader

oh my god thank you so much ill try to look into wtf is wrong with this! And as soon as i get the problem fixed ill start working on the cosmetics and keep you updated!

Here’s how something like this effect can be made in unreal

3 Likes