Giter VIP home page Giter VIP logo

traj2blender's Introduction

traj2blender

Load an oxDNA trajectory into Blender as animation keyframes. The instanced version is much faster for large structures

traj2InstancedBlender.py

  1. 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.
  2. Run the python script (Alt p) (you can check the progress if you launched blender from a terminal)
  3. When finished, the trajectory is loaded as keyframes in blender, with all the elements as points.
  4. Next, create a new object to represent each element, for example an icosphere.
  5. Open Geometry Nodes and setup the instancing:
    1. With your object selected, click new to create input and output nodes.
    2. Click Add, Instances, and add an Instance on Points node, connecting input to output
    3. Click Add, Input, and add an Object Info node, connecting the icosphere geometry to the instance
    4. If you need to scale the instances, click Add, Input, and add a Value node.

traj2blender.py

Load an oxDNA trajectory into Blender as animation keyframes

  1. Export glTF file from oxView
  2. Import glTF file into Blender 2.8, save blender file in the same directory as your trajectory
  3. 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.
  4. Run the python script (Alt p) (you can check the progress if you launched blender from a terminal)
  5. 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.

traj2blender's People

Contributors

akodiat avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.