Boule de globes oculaires avec copie et primitives emballées

 


Chose stupide amusante à essayer. Tout d’abord, je fais un seul œil, j’en fais une primitive emballée (donc houdini le traite comme un point unique plutôt que comme un maillage poly complet). Ensuite, il y a un réseau vop point désordonné pour faire quelques choses:


  • Create a transform matrix that points each eyeball away from the origin (ie, along its normal if it had one)
  • Create another transform matrix driven by noise to do a skittish eye dart/saccade
  • Create a third transform matrix that makes all eyes look down the z-axis
  • Convert all matricies to quaternions, easier to manipulate that way
  • Add the normal-orient and the random-orient so that the eyes are all randomly darting roughly around their origin
  • Have another noise curve driven by time that does a random pulse between 0 and 1
  • Use that to quickly blend between the random-along-normal rotation and the look-down-z rotation
  • Use a few fit-range nodes driven by each eye's z-coordinate so that rather than all eyes switching at the same time, it goes in a wave from back to front
  • Take the final rotation, convert back to matrix, and push into the intrinsic 'transform' attribute


While the matrix->quaternion->matrix->intrinsic-transform trick is clever, I realized after the fact I didn't need it. I could have just pushed an orient and up value onto the points before the copy, same result with less hassle. Oh well. Still, handy to know how to manipulate packed primtives.




0 Commentaires