For some reason Vertex Color is not working with Opacity on the default Physical and Phong Materials. This used to work fine on older versions of the engine. The Vertex Color is picked up no problem on the Diffuse. I have tried different channels and blend types to no avail.
I change my local engine a little bit to override vertex alpha by random values in 0…255 range and that made it to render with alpha holes as expected. It seems perhaps either fbx does not contain any alpha in vertices (all 255), or our fbx converter to json (and glb) does not extract it. @slimbuck will investigate that part.
This may or may not help, but I opened an old project (circa 2017) that I was using vertex color with alpha and that was not displaying correctly, in this instance it was not a new FBX, nor did re-upload the FBX to update the json model.
Are you sure this FBX has alpha in the vertex colour data? I imported the FBX into maya and don’t see any alpha on the vertex colours (though this could be a maya issue).
Perhaps the older version used one of the r,g,b channels for alpha instead? Could you give me access to the old project that definitely worked?
You got me thinking about my process here so I went back to Max, checked the vertex color channel and switched this to Alpha instead of RGB, after re-importing this works correctly. So my guess is in older versions of the engine I could use the RGB channels (in my earlier project I used R). Is this the correct behaviour?
Oh I see, you were attempting to use per-vertex r, g or b channel to drive alpha but that wasn’t working. This is definitely a bug and we’ll look into it thanks to your github issue.
The entity model named "ALPHA-TransferData-after-BAKE-TO-VERTEX"
contains a fbx model that I exported from Blender that uses vertex information to decide on the opacity when rendering in CYCLES (raytracing for Blender). So I know the information is in the object, but PlayCanvas doesn’t seem to render the vertex information in it’s opacity settings. Take a look at the project below:
That’s good, though avoid posting double posts about the same subject.
The github repo I’ve posted above gets direct attention from the engine developers, and it already contains an issue about the bug you’ve encountered. You can try posting there as well, it may help resolve the bug faster.