Hi, i decided to make “fake” shadows (for performance and project need), basically planes with transparent materials. For this to work, I need to change the alphaMode of the exported material instances from 2 (default) to 4. I assume that the result is like a “multiply” blending mode. This works fine, but I need to change this in the Babylon file. Is there a better way to do this? Or could you consider adding parameters on materials for blending mode?
For my very specific need, I just want to set the alphaMode to 4 instead of 2 for a material to avoid editing the babylon file after export. I could be wrong but I think this could be translated as putting a material in “multiply” blend mode.
If you are willing to do that, maybe it is a good idea for the user community to add other blend modes to materials as well (“screen”, “overlay” and some others blend modes), if it’s possible of course.
Switch alphaMode to 4 on babylon file material instance is the same to set these parameters on babylon sandbox inspector (Alpha – less than 1, Transparency mode to “Alpha blend” and Alpha mode to “Multiply”) :
Hi @MackeyK24
I’ve been struggling with the different rendering modes for the alpha (cutout, fade, transparent).
Fade and transparent get mixed up (one item passing over the other in a strange fashion)
Cutout works properly, but it’s cutout, which I don’t want.
I succeed to get the desired result by exporting in cutout and changing this our code: mat.useAlphaFromDiffuseTexture = true.
How can I achieve this / good result, directly from the toolkit ?