Opacity map using glTF 2.0 material

Hey guys!
I’m trying to make sense of how to work with opacity maps using the latest glTF 2.0 Material and glTF 2.0 Display components in ShapeDiver 1.14.0. Are there any examples that demonstrates this?

I’ve understood that opacity maps isn’t a thing in glTF 2.0, but instead one should use the BaseColorTexture, the BaseColorFactor alpha channel and the AlphaMode, but I can’t get it to work.

Basically this is what I’m trying to achieve. The screenshot uses the old legacy components inspired by @edsahergom’s youtube video.

My attempt:


alpha-channel.gh (15.8 KB)

Any thoughts?
cc @snabela

Hi @emilpoulsen,

The video you refer to is using the legacy display and material components. Please find attached the Grasshopper file which works as you expect.
alpha-channel.gh (13.7 KB)

Thanks @edsahergom, appreciate it! But I’m looking to do the same with the new glTF 2.0 components (and not the legacy components) as described in the topic. Is there a way to do it?

@emilpoulsen This effect is not currently possible with the GLTF 2.0 as it cuts too much the texture. I have already reported the issue to the dev team.

Either way, I am attaching another Grasshopper file which shows how the correct set up is when using the GLTF 2.0 component. There were two main problems in the Grasshopper file you had:

  1. The image that was being used did not have an alpha channel specified. The GLTF 2.0 uses this alpha channel to defile the opacity.
  2. The mode that is required when using an image is MASK. Writing it in capital letter is also important.

alpha-channel.gh (786.3 KB)

@emilpoulsen There was a misunderstanding in the way I thought the modes work. If you change the model in the file I attached in the last comment to BLEND, then the effect you are looking for works!

1 Like

Exactly what I was looking for, thanks @edsahergom!