Animation Nodes vs Python Script

Guys, I have question, maybe somebody know answer. I’m not programmer so sorry if it is silly.

Is Animation Nodes faster than Python Scripts?

(I posted that oryginaly under LEGO Artwork topic, it was rather off-topic there :confused: )

Few days ago @Christopher_Baumeist shared on BA LEGO Artwork script.

I made lately similar exercise - geometrical pixelation based on image. No color changes, I animated shapes - Horse Loop. I made it using Animation Nodes. My grid was 60x40=2400 instances, and execution time about 80 seconds :confused: (my PC is not very fast, but every machine has some limits).

AN is written in Cython, and according to @Jacques_Lucke the main reason was overall efficiency. For some nodes 50 times faster, or more.

I made some tests trying translate that script to AN
Blender 2.8, Animation Nodes 2.1, windows 64 build from Cris Prenninger (thanks, man)

First try (only AN), using displace modifier to set vertex color: grid 17x17=289 bricks.
I used banaduck as image, blend file here: banaduck.blend (375.9 KB)


And there is my fastest settings, almost everything in AN, exept few lines I left in script linked to AN:
banaduck2.blend (325.4 KB)

I see clear script 100% execution time, pure AN 70% time, mix AN and script 50% time.

Is AN so much faster than python scripts, or I missed something?

1 Like