BradyAJohnston / MolecularNodes

Toolbox for molecular animations in Blender, powered by Geometry Nodes.
https://bradyajohnston.github.io/MolecularNodes/
MIT License
835 stars 81 forks source link

Ribbon style settings for DNA #424

Open satary opened 5 months ago

satary commented 5 months ago

Hello, Brady! I am struggling with the DNA visualization. I would like to only show the DNA trace (without bases, or show them as sticks), but the ribbon style always contains bases. If I use a backbone selection, the bases are still shown, though seriously distorted (see figure, looks like they are drawn from some backbone atom to the coordinate zero).

image

Is there any way to disable bases drawing/changing base shape?

BradyAJohnston commented 5 months ago

Thanks for reporting this. I haven't implemented any kind of check for if the base atoms actually exist, so while it's getting the backbone and creating the ribbon, it is instancing the bases but when trying to decide on their rotations it fails and rotates to the (0, 0, 0) world origin. It makes sense that if you select just backbone that it should only display the backbone ribbon, and something that I'll implement going forward.

On the Style Ribbon node, you can press Tab to go inside the node. If you connect the Ribbon Curve output from the .MN_utils_style_ribbon_nucleicto the Group Output. That will expose the curve that is generated for your own usage.

CleanShot 2024-01-30 at 11 18 46@2x

Ctrl + Tab to exit the node, and use that curve to generate your own ribbon.

CleanShot 2024-01-30 at 11 20 34@2x

Hopefully this works for what you are after, and I will make this simpler going forward.

satary commented 5 months ago

Wow! That's cool, thanks for the advice! image