Depth Pass

Your feedback is very important to us. We are listening.

Depth Pass

Postby benjaminF » Wed May 16, 2018 12:13 pm

Hi everyone,

I have a problem with my hologram shader. I would like to fix the depth transparency.
I should not be able to see the legs in the back, like this picture.
Image
Image
Image
I don't know if it's possible to you to help me but it was very nice.

Thanks a lot.
benjaminF
 
Posts: 4
Joined: Wed May 16, 2018 12:08 pm

Re: Depth Pass

Postby Amplify_Borba » Wed May 16, 2018 3:51 pm

Hello, thank you for getting in touch and for your support!

According to the screenshots that you've shared, it seems that you're using a very outdated version of ASE, please download the latest one through the Asset Store or via our download page.

As you may be aware, semitransparent shaders don't usually write into the depth buffer. Unfortunately, this can create draw order problems, especially with complex non-convex meshes. If you intend to overlap meshes like that, then using a shader that fills in the depth buffer before rendering transparency might be useful.

You can probably mitigate the issue by toggling the extra pass parameter.

ExtraDepthPass.jpg
ExtraDepthPass.jpg (14.32 KiB) Viewed 5946 times


Alternatively, this can be done by code by adding the following after "SubShader {"

Pass {
ZWrite On
ColorMask 0
}


Please let me know if this helps, if your require any additional assistance, please forward us a complete sample further examination on our side, either by attaching it to this post or through [email protected], thanks!
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
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Depth Pass

Postby benjaminF » Thu May 17, 2018 12:41 pm

Thank you for this answer it works very well, perhaps the update has been effective but it's great.

On the other hand if I can bother you again with another problem, when I superimpose two meshs it happens in front of each other like this gif

Image


Is it a question of render Queue ?

Thanks.


ps : Little question just for me :). How do you see what i use a very outdated version of ASE ?
benjaminF
 
Posts: 4
Joined: Wed May 16, 2018 12:08 pm

Re: Depth Pass

Postby Amplify_Borba » Thu May 17, 2018 1:38 pm

Transparent objects can be a bit problematic, although this may not necessarily be an ASE issue we would be happy to examine it on our side if you could send us a sample scene.

In your node parameters, there was no option to expose them ( the circles beside certain parameters, like in the screenshot I've sent ), which is why I could tell that you were several versions behind the latest build.
We release new builds weekly, sometimes more than once, so we advise users to update through our website frequently.
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
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Depth Pass

Postby Amplify_Borba » Thu May 17, 2018 4:34 pm

Thank you for sending a sample, upon further examination and according to the way you've set up your meshes, setting different Render Queues per material might help mitigate the situation, although it might not work for all cases.
For example, try setting a lower Render Queue value for the vest, and a higher one for the pants, so that the vest is rendered on top of them.

Removing the "cap" on the pants mesh might also help, since it shouldn't be visible either way.

Please let me know if this helps, thanks!
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
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Depth Pass

Postby benjaminF » Fri May 18, 2018 1:34 pm

It was an idea that I had explored to change the rendering tail of the different elements. But now the problem is for different objects with different angles.

Example:

Object A
subobject A1 with the render queue 3000
subobject A2 with the rendering queue 2999
subobject A3 with the rendering queue 2998

Object B
subobject B1 with the render queue 4000
subobject B2 with the rendering queue3999
subobject B3 with the rendering queue 3998


I wouldn't want to see object A through object B but it's impossible without changing the rendering queue to all B objects.
But if I did, through object A, I see object B.

Like the gif

Image

A possible method it's betwin postion mesh and camera
benjaminF
 
Posts: 4
Joined: Wed May 16, 2018 12:08 pm

Re: Depth Pass

Postby Amplify_Borba » Fri May 18, 2018 1:49 pm

Do you have a lot of variations? If not, using replacement models could perhaps simplify the setup, as it seems a bit tricky as it stands.

I would personally look into hiding specific parts of the mesh.
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
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Depth Pass

Postby benjaminF » Fri May 18, 2018 1:55 pm

Yes in the end, we will have a lot of variations. Different clothes will be created for these avatars.
benjaminF
 
Posts: 4
Joined: Wed May 16, 2018 12:08 pm

Re: Depth Pass

Postby Amplify_Borba » Mon May 21, 2018 10:37 am

It's a tricky setup, no doubt about it, Unity has always been a bit problematic with transparency.

I would recommend exploring other alternatives such as dividing the model or using replacement models since, unfortunately, I don't think that I can offer you a solution that would work with all possible cases.

Please don't hesitate to get back in touch if you come across any other issues or questions.
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
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests