This has been happening forever in STD materials, but now that I am really playing with PBR, I have come to a conclusion that alpha in textures is not really working well for me.
I have a number of meshes, shown here in Blender 2.80, in solid mode.
@JCPalmer : Did you try setting the “Transparency Mode” to “Alpha blend” ? See image below. the MH hairbrow file mapped onto a plane , exported and viewed in Sandbox against a white background. Without the change the transparency was very blotchy.
@gryff, thanks. This ties into an earlier question when I was trying to even get export working at all without clipping for textures with alpha.
PBRMATERIAL_ALPHATEST got me the same as STD materials. I now want better. Think I am going to have to go through a 4 modes. I seem to remember PBRMATERIAL_ALPHABLEND did not work right. Think because the exporter is setting everything the same.
May need to add a custom property to the materials section of the exporter to allow setting the transparency mode, or set the material._alphaCutOff, in which case you are screwed in the .babylon exporter cause it is not serialized.
@sebavan, is there a reason alphaCutOff is protected & not serializable?
It actually is, here is the definition:
/**
* Defines the alpha limits in alpha test mode.
*/ @serialize() @expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")
public alphaCutOff = 0.4;
Ok, I tried setting everything to PBRMATERIAL_ALPHABLEND, and it looked great at certain angles, BUT you sometimes get clipping at other angles & distances.
.
Everything set to PBRMATERIAL_ALPHATESTANDBLEND looked better than PBRMATERIAL_ALPHATEST, but not as good as PBRMATERIAL_ALPHABLEND. It also had the clipping problem.
Setting the body to PBRMATERIAL_OPAQUE and the hair materials to PBRMATERIAL_ALPHABLEND (below) looked fantastic & no clipping ever. I had avoiding eyelashes on male meshes, because it looked like a mascara screw up, but will have to revisit this soon.
Think I am going to make 2 additional custom exporter properties for both the transparency mode & and cutoff. Defaults will be PBRMATERIAL_OPAQUE & 0.4, respectively. Do not really need cutoff for my needs for MH, but am not doing this a third time. Will not show up in the .babylon exporter right now. Am busy coordinating multiple Blender addins & working my own work flow. Soonish.
Just checking, are there equivalents for STD materials, @sebavan ?