Load an oxDNA trajectory into Blender as animation keyframes. The instanced version is much faster for large structures
- Inside Blender, open the "Scripting" workspace, then select open the traj2InstancedBlender.py as a text file. Make sure the path is pointing at your trajectory and topology files.
- Run the python script (Alt p) (you can check the progress if you launched blender from a terminal)
- When finished, the trajectory is loaded as keyframes in blender, with all the elements as points.
- Next, create a new object to represent each element, for example an icosphere.
- Open
Geometry Nodes
and setup the instancing:- With your object selected, click new to create input and output nodes.
- Click
Add
,Instances
, and add anInstance on Points
node, connecting input to output - Click
Add
,Input
, and add anObject Info
node, connecting the icosphere geometry to the instance - If you need to scale the instances, click
Add
,Input
, and add aValue
node.
Load an oxDNA trajectory into Blender as animation keyframes
- Export glTF file from oxView
- Import glTF file into Blender 2.8, save blender file in the same directory as your trajectory
- Inside Blender, open the "Scripting" workspace, then select open the traj2blender.py as a text file. Make sure the path is pointing at your trajectory file.
- Run the python script (Alt p) (you can check the progress if you launched blender from a terminal)
- When finished, the trajectory is loaded as keyframes in blender and you can simply start rendering an animation.
Check out https://www.youtube.com/watch?v=nkKSbeOm0N8 to learn how to position camera, set materials etc.