Page 1 of 1

Hair transparency issue?

Posted: Tue May 03, 2016 9:51 am
by Meganmi
This issue seems to happen a lot to models with multiple hair meshes that overlap each other, not sure if the issue is the model itself or something else. Hoping to forward my problem here to hopefully get some answers:

As you can see, I'm trying to port models from Quantum Break :oops: ;

Image

Re: Hair transparency issue?

Posted: Tue May 03, 2016 12:31 pm
by semory
yeah, it's been a problem forever. xnalara transparency is decal transparency, so reordering meshes may help. technical word for it is "order-independent transparency problem." don't think xnaaral can implement depth peeling but there's a more stochastic (but noisy) solution that could be implemented in xps.

to give you an idea how hard it is, one of the game devs of mad max said, "we solved the transparency problem by not using it." bungie too with destiny as well... hair will have strong aliasing.

Re: Hair transparency issue?

Posted: Tue May 03, 2016 11:06 pm
by Meganmi
Sorry if I'm being a n00b here, but does this mean I have to separate the hair meshes into different "groups" to fix this?

Re: Hair transparency issue?

Posted: Wed May 04, 2016 1:07 am
by Ems
Basically, yes. If the hair mesh structure allows it, try to split it into parts, layers, I'd call it.

XPS, as far as I understand, will load meshes in the exact order they stand in the .ascii/mesh file. Please note that at the export, be it by XPS or by Blender scripts, meshes will be rearranged in the order those scripts are programmed to do, alphabetically, not naturally.

So you need XPS to load those layers in correct order, from the most bottom one (closer to the scalp), to the outer ones, and for that you need correct naming before exporting from Blender/any tool you use, I usually go with something like "hair1a" for the lowest one, "hair1b" for next, "hair1c an so on. Since they all will have same render group number, they will be exported in correct order.

Let's say you have these groups:

41_hair
41_glasses
2_eye
25_fabric
7_lashes
24_clothes

Blender script or XPS export will arrange them like this:

2_
24_
25_
41_glasses
41_hair
7_ so the XPS will load them in this order. The lashes will be loaded after the hair and glasses, thus result in the same problem you have.

To arrange meshes then, you have to either name them properly before export, or use Zareef's tool to simply drag and drop meshes before importing to XPS, but for this tool, the .ascii must be perfectly correct, or it will shoot errors at you if it encounters even tiniest syntax error, or lack of data where it expects data to be. Or just cut and paste huge chunks of text in .ascii files in Notepad, which I don't recommend.

If you have few same render groups that use transparency, make sure the names of these groups are alphabetically correct before exporting to .ascii, like I mentioned at the beginning.
If you have few different render groups that use transparency, make sure they stand in the .ascii file in the order you want them to stand, beginning from the most hidden one, through the middle layers, to outer layers.

Hope that explains anything o,O

Edit 1: I personally don't use groups 40/41. there's something wrong with how the things look, but I can't define it so I can report in a way that could be understandable. It's just stuff... looks too plastic, and is constantly transparent where it shouldn't be.

Re: Hair transparency issue?

Posted: Sun Jul 03, 2016 6:19 am
by cobaltbluebengal
I dunno if it helps, but hair with Alpha Channels, I usually put the material as 2-Sided, and have the Occupancy a "Instance" copy from the Diffuse map. I then ensure that all the Alpha selections are ticked on the material.

Each group or selection will require it's own material


I've attached a picture of the settings :)

Hope it helps