0
$\begingroup$

I have been stuck with this issue for some time. I use an object as hair that I export from blender into Clo to render.

Basically, the object has parts of its texture that is transparent and I can't seem to make it stay transparent while rendering (with cycles in blender or in Clo3d)but it works fine with Eeve. In Clo3d, the parts that are supposed to be transparent just take the color of the background.

I am thinking that this has to do with me applying the texture wrong but I am very confused about what to do, does anyone have any idea on how to fix it?

I've used this technique for years without any issue but I've recently updated my Mac & Clo in itself so I am wondering if it can explain the issue. I also have it with other hairstyles/Objects with transparency textures.

I've attached images of the renders in Cycles & in Clo and the PNG texture in itself.

Please lmk if you know a way!

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

$\endgroup$
9
  • $\begingroup$ This appears to be about Clo, and not Blender. $\endgroup$
    – TheLabCat
    Commented Sep 12, 2022 at 4:38
  • $\begingroup$ It's about both because I export it from blender & I also wanna render it with Cycles $\endgroup$
    – Killua
    Commented Sep 12, 2022 at 10:09
  • $\begingroup$ If the texture contains a correct alpha channel, then all you need is to plug that texture's alpha channel to the principled shader's alpha input. No need fo the transparent and mix shader nodes. (Beaides, you are just making everything transparent, not just the parts of textures without akpha). Maybe check your texture's alpha channel. Also, make sure your mesh's normals are all facing one direction. $\endgroup$
    – Lauloque
    Commented Sep 12, 2022 at 15:51
  • $\begingroup$ Thank you @L0Lock for your answer! I tried just connecting the Alpha channel to the shader but the transparent parts stay half visible. Do you know how I can make sure that my texture's alpha is ok? And what do you mean by facing one direction? $\endgroup$
    – Killua
    Commented Sep 12, 2022 at 21:17
  • $\begingroup$ Maybe try to share your bkend file with us so we can check ourselves, upload it there and give us the link here. $\endgroup$
    – Lauloque
    Commented Sep 14, 2022 at 6:31

1 Answer 1

0
$\begingroup$

I couldn't see the dark spots visible in your first screenshot:

dark spots

But I found some issues in your setup that might be the cause - and that also make other visual glitches in other places. So let's fix what I found and hopefully it will be enough.

Beforehand, I highly recommend using the Node Wrangler addon. You can enable it by going to Edit menu > Preferences > Addons tab > search for "wrangler and check on the Node Wrangler addon. You can unfold it to see a list of what it can do, but basically it adds a lot of useful keyboard shortcuts to manage nodes quickly.


Duplicated Geometry

When looking at your third screenshot, we could see some weird geometrical dark spots on your render:

dark spots again

This is known as "Z fighting", when pieces of geometry are so close from each other that the render engine struggles to decide which one to draw in front of the other.

In fact, this is even more visible if you enable the Face Orientation overlay:

face orientation overlay

When trying to select an island of mesh with L and moving it away, we can see that the mesh is actually duplicated, but each "duplicate" has its faces oriented the opposite way:

dupli faces

This is due to a change in Cycles introduced in Blender 3.1 for better render performances: Release Notes/3.1/Cycles/Ray Tracing Precision - Blender Developer Wiki

There can still be artifacts with rendering overlapping geometry, in some cases more severe than before. Such overlapping geometry should be removed, or have a small distance added in between.

Probably the easier solution is to delete the duplicated. We could do it in a revertible way, in case you need these duplicated faces later.

In any case, a simple and quick solution to this issue would be to add a Weld modifier:

weld modifier

If you don't need these duplicated meshes at all, you can apply this modifier by hovering it with your cursor and pressing ⎈ CtrlA, then you can go in Edit mode, hover the parts that are facing red to the outside, press L to select them, and hit ⇧ ShiftN to invert them. It's not absolutely needed, but it can avoid issues sometimes.

I suspect this duplicated mesh was done because some render engines (especially game engines) don't render the backfaces, so the mesh was duplicated and inverted to be able to show up on both sides. Now, it's a good solution, but many game engines have options to enable the backface rendering, and neither Eevee nor Cycles cull the backfaces, so if you don't plan on using this model on a render engine that can't render backfaces, you don't need these duplicated meshes.

Cycles render setting

If we replace your shader by a transparent shader, this is what Cycles will produce:

render setting issue

Because Cycles works by sending rays that bounce around the scene to determine the pixels color, but can't wait an infinite amount of time for each ray to complete its course, the amount of bounds are limited on a per-type basis.

Transparency bounds are limited to 8 by default. Since your hair is basically a bunch of planes with some transparency, you can sometimes have rays that need to go through way more than 8 layers of meshes to calculate a proper transparency.

The black area here seem to be the root of the flower, so probably most of the black spots are hard to see in the first place with the real shader. But just to be sure, we could set the max transparency bounce to 20, that seems to work fine at most angles:

max bounces fix

Shader fixes

As it stands out now, you have two issues with your shader: it's semi transparent, and its Eevee alpha setting is not the best one around.

Unless you want to be able to see your character's bald skull bellow their hair, you should really remove that mix shader and plug your Principled shader output to your material surface:

transparency fix

Then, if you want to use Eevee, you might have noticed this on the edges of your hair:

alpha issue

This is because you set your material to use the Alpha Clip Blending Mode.

But you should probably use Alpha Hashed instead (don't forget to set it up for the Shadow Mode as well). Result:

alpha fix


Final result

final

$\endgroup$
2
  • $\begingroup$ Wow, thank you so much for taking the time to explain with so many details, the issue is fixed thanks to you! I am really thankful for your help hahaha low-key saved my life ;) Please let me know if you ever need anything!! $\endgroup$
    – Killua
    Commented Sep 16, 2022 at 13:54
  • $\begingroup$ Glad I could help! You can upvote my answer and accept it as solution (๑•̀ㅂ•́)و✧ $\endgroup$
    – Lauloque
    Commented Sep 16, 2022 at 14:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .