Page 1 of 1

Double-Sided + Transparent artifacts

PostPosted: Mon Jan 01, 2018 7:51 pm
by DuvE
Hi, I decided to make some spherical distortion shader for my ForceField VFX. And I need it to be double-sided. But there are some weird artifacts appears, is it possible to somehow fix them and make valid double-sided + distortion shader?

Here is a short video of an issue: https://youtu.be/pv6npfwwObo
Node tree of case shader: http://prntscr.com/huuzhb

Here is how my shader looks without distortion: https://prnt.sc/huuzp4
It's working without artifacts because there are not so many areas with positive opacity.
And it's node tree: https://prnt.sc/huv25q


Some people are managed to do something similar:

- https://www.youtube.com/watch?v=wbL2FCxlCe4
- https://www.youtube.com/watch?v=qtnGUbSfsHE
- https://www.youtube.com/watch?v=g_AFR1JWvmA

Re: Double-Sided + Transparent artifacts

PostPosted: Tue Jan 02, 2018 10:14 am
by Amplify_Borba
Hello Duve, thank you for getting in touch!

Would it be possible for you to export your shader with the issue present, including material and textures, via Unity and send it over to [email protected] so that we can debug it on our side?

Even though we can replicate the same shader network on our side, it's always preferred to use the same data as the user, not to mention that it greatly speeds up the debug process while also enabling us to quickly pinpoint if there were any ASE related errors identifiable only by examining the code generated.

It would also greatly speed up our resolve, thanks for understanding!

Re: Double-Sided + Transparent artifacts

PostPosted: Tue Jan 02, 2018 5:43 pm
by DuvE
Here the unity package: https://drive.google.com/file/d/1Qwn1rJ ... sp=sharing

I've also sent it to support email.

Re: Double-Sided + Transparent artifacts

PostPosted: Thu Jan 04, 2018 5:08 pm
by Amplify_RnD_Rick
Hey DuvE,

We truly apologize for the delay on providing you support.

It's quite tricky to remove these artifacts on the current ASE version. They appear as a result of sorting issues where some back faces are rendered after the front faces.

You can play around with the Switch by Face and Face nodes to minimize the artifacts as these nodes indicate whether you are rendering front or back faces but two separate passes should be used, one for rendering front faces and another one for back faces, for this to be correctly dealt with.

Unfortunately we are still unable to create multi-passes with ASE but is a feature we want to have down the line.
Until then we'll try to figure out a temporary solution and let you know as soon as we have any news.

Re: Double-Sided + Transparent artifacts

PostPosted: Thu Jul 05, 2018 9:19 am
by DuvE
Hi, sorry for posting after 5 months. But still, I want to ask if new versions of ASE have a solution to fix this problem properly? Multipass or something else.

Re: Double-Sided + Transparent artifacts

PostPosted: Thu Jul 05, 2018 1:11 pm
by Amplify_Borba
Hello, no problem at all!

We've already implemented multi-pass through our custom shader template system, so now you're able to create custom shaders that accommodate for situations where the Standard Surface shader might limit you.

Here's a sample of a multi-pass distortion template that we've prepared for your convenience:

MultiPassDistortionSample.zip
(391.26 KiB) Downloaded 469 times


Image

You may use it as a starting point to create your own effect.

Please let me know if this helps, thanks!