1
$\begingroup$

I am trying to create a reveal animation by using a linear fallof. To do so, I've instanced little cubes on the faces of my shoe model and have created two vectors : A-B between the empty A and empty B, and A-point between the empty A and any given instanced cube.

I am now trying to calculate the dot product between those two vectors to influence the scale of my instances, but the result of that dot product seems to be zero since the cubes disappear when I plug the multiply node into the scale.

Here are some pictures to illustrate my setup and the node tree.

My node tree

The vector setup

I am grateful for your help,

Here is the .blend file:

Clément

$\endgroup$
5
  • 1
    $\begingroup$ to attract move (and lazy people like me) i would recommend including the blend file...so i would have checked it out with blend file - but sorry, i am too lazy to rebuild everything manually. It is not a must - it is my personal recommendation. $\endgroup$
    – Chris
    Commented May 1, 2023 at 5:26
  • $\begingroup$ Thank you for your suggestion, I will be adding the blend file as an answer to my topic. It's my first time posting so I'm still learning :) $\endgroup$ Commented May 1, 2023 at 6:11
  • $\begingroup$ Hi, clemunchkin .. welcome! Thanks for the file. It would still help this question greatly if you could describe the final effect you are hoping to achieve with A,B, and the dot-product $\endgroup$
    – Robin Betts
    Commented May 1, 2023 at 7:11
  • $\begingroup$ please update you questions based on the answers that was given. the answer answers you problem, so you should change your question. $\endgroup$
    – shmuel
    Commented May 8, 2023 at 18:56
  • $\begingroup$ you should normalize the vector going into the bottom of the dot_product currently (which is the vector from A to B) $\endgroup$
    – shmuel
    Commented May 8, 2023 at 18:59

1 Answer 1

0
$\begingroup$

You should probably capture your attributes on the instance domain instead of the point domain.

$\endgroup$
2
  • 1
    $\begingroup$ Thank you for your answer! This definitely improved things as my instances are not scaled to zero anymore. However this generates a linear fallof on each side of AB rather than along AB. It's like it's taking the distance from AB rather than the distance from A to calculate the weight. What could be causing this in my node tree? $\endgroup$ Commented May 1, 2023 at 6:10
  • $\begingroup$ @clemunchkin this is because it gives a negative value in the opposite direction as the vector, so infact it isn't a falloff in both directions rather a falloff in the correct direction except it is also negative and your instances are being inverted in the opposite direction. to fix it clamp it not to be negative by adding a minimum math node set to 0 after the dot_product. $\endgroup$
    – shmuel
    Commented May 8, 2023 at 19:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .