How to get Object Speed / Velocity as Node info. (Cycles)

hey guys. new to blender but having lots of fun learning.
so here is the setup ,i have a cube that has a materiel set and rigid body physics (cube). then i use the array modifier to make a grid of said cubes 50x50 . then seperate each cube in edit mode. then realign origins to center of mass.

then i create another mesh as a sphere set as rigid body “sphere”, passive with animation enabled. then i key frame the sphere to move thru the grid of cubes. simple!

now here is the problem I wanted to color ramp the cubes relative to there speed after the collision.
but having a hard time using the nodes editor, ive tried using the object info node but no luck. . any help would be greatly appreciated.
thanks guys :smiley:

any help guys. still struggling with this problem scene.
im sure there’s a way to complete it tho.
any help would be GREAT.