Monday, May 24, 2010

Scripting atom color changes as a function of velocity in Blender



Atom colors change as a function of their velocity using the basic how-hard-is-it-raining convention, slower is blue, white is pouring. RGB values for individual atoms were calculated from molecular dynamics data and imported as object color IPO curves. For this I expanded Miron's import IPO script to include three more curves, one for each RGB.

I plan to develop this more to represent temperatures.

Wednesday, May 19, 2010

Diamond Bearing



I obviously have a small glitch in importing these models from NE1 to Blender in that I lose a single atom. I bet it is either the first or last.

For a beautiful version of the same structure check out Euplotes'
He has lots of other good stuff too.

Sunday, May 9, 2010

Atomistic Large Bearing: dynamics performed in NanoEngineer-1, vizualized in Blender




The initial visualization of 550 frames, skipping two simulation steps at 50f/s, motion blur set 0.5 averaged over 5 frames. This took about 20 hours to render on a basic core 2 duo notebook.


9 frames, skipping 100 frames looped, motion blur set to 5 averaged over 16 frames. About 20 minutes per frame to render.

Wednesday, April 28, 2010

Atomistic Small Bearing: dynamics performed in NanoEngineer-1, visualized in Blender



The astute viewer will notice two things first:
1-I still can not frame a shot for shit.
2-The back side of the rotor is missing a hydrogen atom

Well, these are still more or less movies where I am more concerned with getting different things to work than I am with cinematography and such. Maybe next time I'll throw in some long parallel walls to frame the action. Also any long time readers of this site will know that I have had my problems with hydrogen in the past, but, all in all, things have come a long way from the last time I posted anything about the famous small bearing first proposed by K. Eric Drexler back in 94, I believe.

A little about how I did it:

NE1 will save simulations in two ways, either as a binary file (which I can't do much with right now expect turn into gibberish) and a series of POV-Ray files, one for each time step. So you are probably thinking "why not just stitch the povs together, adjust the lighting, camera, materials, whatever and call it a day?" I know POV-Ray is great, and I'm pretty sure it is all Pixar uses, but I'm just a gui type of guy I guess. So I have written a Frankenstein's Monster of a script that will read in a series of povs and create atom trajectory files, one for each atom. Normally it would then just be a matter of using Miron Cuperman's import_ipo_script to connect the atom trajectory files with a PDB model which NE1 exports and Miron has also provided a very fast importer for.

The only problem here is NE1 writes the atoms in a different order in povs and PDBs. It is very important that the right trajectory matches up with the right atom. So I added another section (subroutine?) to my script that will read in the first pov ray file and create a bona fide .xyz chemical format file. I went with the .xyz because it is the simplest format I know of. Then all you have to do is run it through Open Babel to convert it into a PDB file that has the same atom order as the pov files and can be imported into Blender. That's all there is to it.

I fully intend to clean it up, rewrite parts so they're not embarrassing (even for me) but if you can't wait, you can get a copy of my ne12blendXXX.py script. The XXX stands for a couple of things. Guess!

Friday, April 23, 2010

C60 and C240 collision at 10eV



Something a little more than just jiggling

This would not have been possible without the help of Miron Cuperman and his coding skills. Miron has written a nice python script to automate the process of importing csv data in Blender to animate objects. You can get a copy here

I will be the first to admit I am far from a Blender pro, but I hope to be able to show off some of the features that other visualizers don't have or do in a way I find cumbersome. This episode: Camera Tracking

More interesting stuff is on the way too.

MTF