remove atoms from rendering

32 views
Skip to first unread message

Yun Liu

unread,
Aug 22, 2023, 5:07:51 AM8/22/23
to Beautiful Atoms
I'm new to Beautiful Atoms and thanks for building such a nice piece of visualization code.

I want to visualize some isosurfaces from (0,0,1) perspective, but some atoms are blocking the view. Is there a way to remove the atoms, say that have z>0.5, from the rendering process, without having to modify the input structure?

Thanks. 

Xing Wang

unread,
Aug 23, 2023, 2:24:53 AM8/23/23
to Beautiful Atoms
Hi, 
You can hide an atom by setting the `show` value.

In the Blender Python console,

# positions[:, 2] is the z coordinate
# atoms is the name of your batoms object.
atoms[atoms.positions[:, 2]>0.5].show=False

Best,
Xing

Yun Liu

unread,
Aug 26, 2023, 4:36:21 AM8/26/23
to Beautiful Atoms
Thanks. It worked like a charm!
Reply all
Reply to author
Forward
0 new messages