1
$\begingroup$

In my blend file here, I'm trying to write a shader that uses a gradient to mix between transparency and the surface material.
So far, I've managed that. But when transparent, the object shows black faces in some areas, and only from certain angles.

It is important to note that these are not gradually black, or grey, faces. They are jet black and unshaded. This model was ripped via RenderDoc and was imported as a CSV.

Removing doubles does work, but it massively deteriorates my mesh, so unless I can select doubles, it's not an option.
It's nothing to do with the shaders themselves - setting the mesh to be exclusively a transparent shader still shows it. Flipping/Recalculating normals has absolutely no effect.
Clearing custom split normal data does not have any effect.

I can only conclude that it's an issue with Z-Fighting.
Can anyone tell me how to absolve this? Or at least how to circumvent this and use a different method for gradually revealing / masking an object?

$\endgroup$
0
$\begingroup$

It's really easy to solve. There are just not enough transparency bounces in your settings.

Just crank up the max. number of Transparency Bounces to say 18 and the problem is gone. EDIT: 18 works for this view. From an other viewing angle you probably need a lot more. This might result in bad render times...

The problem occurs at places, where the ray has to bounce more. Because the max. number of bounces is to low, it draws an black pixel.

enter image description here

Transparency set to 18 or higher solves the issue enter image description here

$\endgroup$
  • $\begingroup$ Haha, thankyou! That makes a lot of sense, although with 100% transparency that shouldn't have appeared, but it would when it was transitioning so nevertheless, thanks! $\endgroup$ – Local Crab Enthusiast Feb 2 '16 at 23:01
  • $\begingroup$ That happens also with 100% transparency, because it is still an physical object. And every ray has to pass it and this counts as an bounce. You can easyily test that yourself. Create a thin plane, use an array, apply a pure transparent material and position the camera in front and then lower the number of max. bounces for transparency: One plane after the other will become black. $\endgroup$ – maegmaeg Feb 2 '16 at 23:12
  • $\begingroup$ Is there a way to default otherwise untraced faces to transparent? $\endgroup$ – Local Crab Enthusiast Feb 4 '16 at 9:37
  • $\begingroup$ In your question lies your answer: It will not work, because they are traced. They are visible to the camera... $\endgroup$ – maegmaeg Feb 4 '16 at 9:45
  • $\begingroup$ What do you wanz to achieve? A stealth effect like klingon ships have in Star Trek? If yes, to do it in post using render layers and passes will be more effective... $\endgroup$ – maegmaeg Feb 4 '16 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.