Page 1 of 1

How can I distort the Mask using Depth Fade?

PostPosted: Wed Dec 26, 2018 3:27 am
by ikura
I am not very good at English. English is hard to read, I'm sorry.

I am using Amplify to create sea shaders.

Using Depth Fade Node, I created a beach in the sea.
This worked well.

In order to make it look more realistic, I wanted to wave it.
Image

I thought that it suffices to distort the Mask obtained by Depth Fade.
Depth Fade Node has Input Port "Vertex Position", and manual
"Allow the specification of a custom vertex position. Uses current vertex position if left unconnected."
It is written.

I thought that I could use this to distort the Mask.
But whatever I type in Vertex Position, the output of Depth Fade will not change.

How can I use Vertex Position of Depth Fade Node?
Also, is there a good way to distort the output of Depth Fade Node?

Thank you.

Re: How can I distort the Mask using Depth Fade?

PostPosted: Thu Dec 27, 2018 3:13 pm
by Ricardo Teixeira
ikura wrote:I am not very good at English. English is hard to read, I'm sorry.

I am using Amplify to create sea shaders.

Using Depth Fade Node, I created a beach in the sea.
This worked well.

In order to make it look more realistic, I wanted to wave it.
Image
I thought that it suffices to distort the Mask obtained by Depth Fade.
Depth Fade Node has Input Port "Vertex Position", and manual
"Allow the specification of a custom vertex position. Uses current vertex position if left unconnected."
It is written.
I thought that I could use this to distort the Mask.
But whatever I type in Vertex Position, the output of Depth Fade will not change.
How can I use Vertex Position of Depth Fade Node?
Also, is there a good way to distort the output of Depth Fade Node?
Thank you.



Greetings,

It really depends on how you have it set up, I don't think you can distort it via that input.

Can you share a sample shader for further examination?

Thanks!

Re: How can I distort the Mask using Depth Fade?

PostPosted: Fri Dec 28, 2018 5:39 am
by ikura
Thank you for reply. The sample is here.
 
shader
https://www.dropbox.com/s/m01jlw3s5ofxk ... hader?dl=0

All files including the scene
https://www.dropbox.com/s/q1elqs92kc0ib ... ckage?dl=0

Thank you.

Re: How can I distort the Mask using Depth Fade?

PostPosted: Wed Jan 02, 2019 3:49 pm
by Amplify_Borba
Thank you for taking the time to provide a sample.

The Depth Fade node can be used together with Vertex manipulation in order to achieve results similar to what you desire, although each will be responsible for its own thing. In other words, you won't be able to use the Depth Fade node to generate code in the Vertex Function.

I recommend that you examine our LowPolyWater sample, as it provides a good example for this type of effects, since it uses the Depth Fade node in its Emission calculation for the foam effect, while also doing Vertex manipulation for the waves. It's a good starting point that can be further adapted and tweaked to achieve different styles of water.

Re: How can I distort the Mask using Depth Fade?

PostPosted: Mon Jan 07, 2019 10:36 am
by ikura
Thank you for your reply.

I saw the LowPolyWater sample.
Certainly, we can achieve the purpose by making the vertices animate like a wave.

However, this time I am looking for ways other than vertex animation.
What is supposed is a method to distort the texture as shown below.

https://monosnap.com/image/UKdbUH07ByJa ... j0HweQ.png
Image

Is there a way to distort the mask that can be obtained with Depth Fade in the same way?

Thank you.

Re: How can I distort the Mask using Depth Fade?

PostPosted: Tue Jan 08, 2019 3:05 pm
by Amplify_Borba
Just to be clear, the wave effect on the mesh's surface must be achieved through Vertex Offset.

The Depth distortion effect, however, can be set up through the Depth Fade node by using its Vertex Position port, although we'll have to update the node itself to support this as it's not working as expected in the current ASE version.

You'll be able to set it up in the following way, as an example:

Image

In the place of the Noise Texture, you can pass the data for the distortion effect, and it will be present in the final result of the Depth Fade operation.

We hope to release the next build towards the end of the week, so stay tuned!

Re: How can I distort the Mask using Depth Fade?

PostPosted: Wed Jan 09, 2019 2:34 am
by ikura
I am deeply moved to respond quickly.
I am looking forward to the update!