question

jbelchio avatar image
0 Likes"
jbelchio asked Julie Weller commented

Tote transparency

Hello,

I would like to use transparency with a tote container. When i apply the transparency property (alpha in the rgb propreties) the tote seems transparent in the model (i can see the combiner conveyor trough the tote) but i can't see the bootles trought the tote as you can see in the attached picture.

Do you have a solution?

tote_transparency.png

FlexSim 22.2.0
transparent shapes
tote-transparency.png (534.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Julie Weller avatar image Julie Weller commented ·

Hi @jbelchio, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
2 Likes"
Felix Möhlmann answered

In order for objects to be visible through a transparent object, the transparent object must be drawn before the others. Subnodes, it seems, are drawn before their container object (which makes sense if the tree is traversed recursively when rendering the model).

You can however use a trick: In the animations editor, add a 'dummy' tote as a component of the tote flowitem with exactly the same proportions. Remember to save the base position so the component will be resized together with the actual object.

capture1.png

Then hide the shape of the actual object by removing the path so only the component is rendered.

capture2.png

The 'dummy' component is stored in the tote's attribute tree and is drawn before the subnodes, thus allowing to see them through it.

capture3.png

This workaround does have the drawback that changing the color of the tote will not automatically change the color of the dummy component. You would have to recolor it separately (see code in the script console of the attached object for how to access it).

transparency_test_fm.fsm


capture1.png (63.6 KiB)
capture2.png (2.9 KiB)
capture3.png (142.6 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.