Hair transparency issue?

General discussion and questions about XNALara go here.

Moderators: ObscureMemories, Runa, Love2Raid

Post Reply
User avatar
Meganmi
Posts: 28
Joined: Sat Jun 13, 2015 10:33 am
Custom Rank: TTG Porter
Location: Australia
Contact:

Hair transparency issue?

Post 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
Image
User avatar
semory
Site Admin
Posts: 7755
Joined: Sat Aug 04, 2012 7:38 pm
Custom Rank: Kitty pu tu tu lay!
Location: Torrance, CA

Re: Hair transparency issue?

Post 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.
User avatar
Meganmi
Posts: 28
Joined: Sat Jun 13, 2015 10:33 am
Custom Rank: TTG Porter
Location: Australia
Contact:

Re: Hair transparency issue?

Post 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?
Image
User avatar
Ems
Porter
Posts: 172
Joined: Tue May 19, 2015 11:16 pm
Custom Rank: Stashing stuff I like.

Re: Hair transparency issue?

Post 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.
cobaltbluebengal
Posts: 14
Joined: Thu Jun 30, 2016 12:12 pm

Re: Hair transparency issue?

Post 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
You do not have the required permissions to view the files attached to this post.
Post Reply