Refraction Issue - Filter depth bias

Node-based Shader Editor

Refraction Issue - Filter depth bias

Postby gponzini » Sun Jul 15, 2018 8:54 am

I'm getting mad trying to obtain the depth bias filtering of Unreal through Amplify Shader.

The technique is described here https://developer.nvidia.com/gpugems/GP ... ter19.html

Basically, I'm creating a shockwave shader and the refraction show up everything in front, grabbing the screen.
I would need, as explained in gpugems, a technique for filtering the frontal object, as it is in Unreal.

Could you please help me through this? As it can be really good for many stuff being able to filter frontal object from refraction.

Thank you
gponzini
 
Posts: 5
Joined: Sun Jul 15, 2018 8:50 am

Re: Refraction Issue - Filter depth bias

Postby Ricardo Teixeira » Mon Jul 16, 2018 12:47 pm

gponzini wrote:I'm getting mad trying to obtain the depth bias filtering of Unreal through Amplify Shader.

The technique is described here https://developer.nvidia.com/gpugems/GP ... ter19.html

Basically, I'm creating a shockwave shader and the refraction show up everything in front, grabbing the screen.
I would need, as explained in gpugems, a technique for filtering the frontal object, as it is in Unreal.

Could you please help me through this? As it can be really good for many stuff being able to filter frontal object from refraction.

Thank you


Greetings,

I suppose you could use distance based masking but I'm not entirely sure what to recommend, it really depends on how you have it set up. Can you share your shader for further examination?

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Refraction Issue - Filter depth bias

Postby gponzini » Mon Jul 16, 2018 2:45 pm

Ricardo Teixeira wrote:
Greetings,

I suppose you could use distance based masking but I'm not entirely sure what to recommend, it really depends on how you have it set up. Can you share your shader for further examination?

Thanks!



If you can help me showing how to setup it I would be really thankful.

In Unreal you avoid the refraction of object in front of the refractive plane (the issue that is described into GPU Gems article). Here the setup both through unlit emission and through Normal and Refraction output combination, it's the same.

https://ibb.co/emDvuJ
https://ibb.co/gYtvuJ
https://ibb.co/d9BgZJ
gponzini
 
Posts: 5
Joined: Sun Jul 15, 2018 8:50 am

Re: Refraction Issue - Filter depth bias

Postby Ricardo Teixeira » Mon Jul 16, 2018 3:27 pm

gponzini wrote:
Ricardo Teixeira wrote:
Greetings,

I suppose you could use distance based masking but I'm not entirely sure what to recommend, it really depends on how you have it set up. Can you share your shader for further examination?

Thanks!



If you can help me showing how to setup it I would be really thankful.

In Unreal you avoid the refraction of object in front of the refractive plane (the issue that is described into GPU Gems article). Here the setup both through unlit emission and through Normal and Refraction output combination, it's the same.

https://ibb.co/emDvuJ
https://ibb.co/gYtvuJ
https://ibb.co/d9BgZJ


Hello,

You can try using the Distance Blend Shader Function included(search for it in the node list), or be sure to check the Snow Coverage Terrain sample for a more practical case.

The GPU Gems sample uses a custom mask to isolate specific objects, setting up something like this is beyond the scope of our editor. We actually use something along those lines in order to provide object isolation in Amplify Color, I recommend checking it out.

Let me know if you have any additional questions, we would be happy to elaborate.

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Refraction Issue - Filter depth bias

Postby gponzini » Mon Jul 16, 2018 6:53 pm

Ricardo Teixeira wrote:
gponzini wrote:
Ricardo Teixeira wrote:
Greetings,

I suppose you could use distance based masking but I'm not entirely sure what to recommend, it really depends on how you have it set up. Can you share your shader for further examination?

Thanks!



If you can help me showing how to setup it I would be really thankful.

In Unreal you avoid the refraction of object in front of the refractive plane (the issue that is described into GPU Gems article). Here the setup both through unlit emission and through Normal and Refraction output combination, it's the same.

https://ibb.co/emDvuJ
https://ibb.co/gYtvuJ
https://ibb.co/d9BgZJ


Hello,

You can try using the Distance Blend Shader Function included(search for it in the node list), or be sure to check the Snow Coverage Terrain sample for a more practical case.

The GPU Gems sample uses a custom mask to isolate specific objects, setting up something like this is beyond the scope of our editor. We actually use something along those lines in order to provide object isolation in Amplify Color, I recommend checking it out.

Let me know if you have any additional questions, we would be happy to elaborate.

Thanks!



Hi Ricardo, thank you for your suggestions! Could you give me a little bit more tips about using those nodes for clipping the object in front of the refraction? I don't mean to use exactly the same technique of GPU Gems, neither I don't know how Unreal do it by default, but I cannot figure out how to use those nodes for avoiding the object in front the refractive plane for being capture by Grab Screen Pos/Grab Screen Color nodes
gponzini
 
Posts: 5
Joined: Sun Jul 15, 2018 8:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 42 guests

cron