Tobacco mosaic virus

http://i1032.photobucket.com/albums/a407/jonathanngsj/th_pdbparticlestest.png

Test run of my first python script. It imports pdb files and represents atoms as particles generated from vertices. The idea is to be able to render ridiculous quantities of atoms on the screen at once.

To make this image I imported the file for a single coat protein subunit of tobacco mosaic virus and applied an array modifier to replicate it 240 times.

Unfortunately I notice a few instances of z-fighting in this picture. Very strange as the total particle count equals the total mesh vertex count exactly.

Ambient occlusion 0.4 default settings

Atoms on scene: 306960

Verts: 50 million
Faces: 100 million
Peak mem usage: 630M
Res: 3840 x 2160

Render time: 3:40.36

Luckily it seems that the ray tracer optimizations work properly.

this looks cool man. makes me think about this giant atomic size world

Hey, looks really cool!

I did some research involving DEM (Discrete Element Method) particle simulation with ~100,000 particles a year ago. I wrote a python script that read the particle position data from a file (per frame of animation) and created duplicate spheres at these locations.

The script worked fine for a smaller number of particles, but was very slow for 100k and did not load all the frames. I also ran into memory issues. As it was a year ago, I don’t remember the details of how I created the objects, but I’m wondering if there was a better way to do it. Would you be willing to share your python script with me so I could see how you created particles (objects)?

Thanks!

I’d like to share, although I’m not quite finished with it yet. Still haven’t managed to get the script to import the file specified multimers yet.

I see that only .blend files are accepted for attachments. I hope you’re okay with that.

Attachments

import_pdb_particles.blend (432 KB)

Hey, thanks a lot! I think this will help.

No problem that you’re not finished. I of course don’t need your specific implementation, just need to see if I’m creating a large number of objects efficiently. Although I also wonder if some of the inefficiency was due to how I created the IPO curves (now F-curves).

Thanks again! I’ll let you know how it goes (but may not work on it immediately).