Unexpected Display Effect

Hi,
There’s a transparent shell in the model.

What I expected is through the transparent shell I can see the detail behind the shell.
Like this:

I found a function named “setTransparencyMode” seems helpful, so I called .view.setTransparencyMode(Communicator.TransparencyMode.Unsorted)
then the model looks chaotic on depth:

How to fix it, am I using a wrong function?

Thanks.

Hello @820110017,

The function setTransparencyMode selects the blending algorithm. Now, the following functions can be used to set the opacity/transparency value on the node:

Based on your screenshots, it looks like you are setting the opacity to zero — which is fully transparent. As such, on fully transparent nodes, no blending will occur. You can try setting the opacity value to, say somewhere in the middle, such as 0.4 to 0.6, and then fine-tune it from there.

Thanks,
Tino

Hi,
The transparency value is 24/255, not fullly transparent.
The default value of transparency mode is “Communicator.TransparencyMode.SingleLayer”.

This scs file is build by myself based on sc_store samples. I created a mesh and insert it into model, then call model.GenerateSCSFile.

I wonder if I can make the transparent shell show as I expected(I can see the detail behind the shell.) by changing some attribute or options when I create the scs file.

Thanks.

It sounds like you are setting transparency directly in the mesh. A value of 24/255 is normalized to < 0.1 which is transparent enough that blending will be quite minimal or even undiscernible. I suspect the reason that you are able to “see through” the model is that background faces are oriented in the opposite direction and thus being culled. You can try setting View.setBackfacesVisible to true to address this.

If you want to achieve the same transparency rendering and blending between different nodes of a model, as shown in the pic you uploaded:

…our recommendation would be to not author transparency in the mesh as this is too granular. It would be better to set transparency at a higher level (such as in the View object) using the functions I previously referenced.

Thanks,
Tino

1 Like

Hi,

“It sounds like you are setting transparency directly in the mesh.”

Yes, I did it directly.

I tried setBackfacesVisible to true, but seems not work.
How can I send my scs file to you?

Thanks.

I sent you a file request to your email address — you should be receiving it shortly . Please check your spam folder just in case it was flagged though.

SCS file sent, Thanks!