# Thread: Simple vector math is not simple

1. ## Simple vector math is not simple

Here is a simple node setup:

I think the math behind the setup supposed to be A-B+B=A, but the result don't return A to me.
What I did wrong?

2. Aren't vectors normalized after each operation? I could be very wrong here. Been a while.
What I mean is

a = 1,1,1
b = 1,0,0
a + b = 1, 0.5, 0.5

3. Originally Posted by Bytehawk
Aren't vectors normalized after each operation? I could be very wrong here. Been a while.
What I mean is

a = 1,1,1
b = 1,0,0
a + b = 1, 0.5, 0.5
Absolutely they are not.
Your's 1,0.5,0.5 is not normalized.
Normalized means sqrt(x^2 + y^2+z^2)=1
sqrt(1^2+0.5^2+0.5^2) = 1.224745

Mewnow, try Const > Vector instead to see what it'll give you, instead of MDD Cache..
MDD Cache node is not part of LW 2019. I don't have it.
So, contact author.

4. thanks for correcting me. I haven't done a lot of 3d stuff lately.

5. Maybe I didn't made it clearly, sorry.
I want to find out the differences of 2 mdd caches, do some stuff, and add it back to the original one.

@Sensei:
Yes, I try to math vector nodes, A(1 1 1) and B(1 0 0), so A-B = 0 1 1, next A-B+B=1 1 1.
And, I use DP Mdd Cache node, there is also MDD Displacement node in my LW11.6.3

EDIT: Maybe I should attach a simple scene file, sorry.
Here is my little scene file. math.zip

6. Originally Posted by mewnow
@Sensei:
Yes, I try to math vector nodes, A(1 1 1) and B(1 0 0), so A-B = 0 1 1, next A-B+B=1 1 1.
And, I use DP Mdd Cache node, there is also MDD Displacement node in my LW11.6.3
If it works with constant vectors, but not works with MDD cache, then problem is the most likely inside of MDD Cache...

7. Sensei: The native MDD Displacement node give me the same result, I have upload a simple scene file, maybe you have a look at it. Thanks.

8. What effect should I see?

There is pulsing ball no matter if I plug MDD Displacement directly or through sub+add network with uvball_stage1.mdd.
uvball_stage2.mdd it slightly moves in one direction.

Show me some screen-shot..

I tried ATM LW 2018.0.7.

ps. I see one MDD Displacement uses uvball_stage1.mdd and other one uvball_stage2.mdd.
Shouldn't we focus on A-B+B=A the first? And then go forward with 2 mdds files..

9. Sorry, not clearly everytime.
I want to find out the differences between stage1 and stage2(make some stuff with the differences), then add the differences back to stage1, so the finally result should be stage2.

I find out the differences by stage2.mdd - stage1.mdd, this works fine. But I use a "Add" node to add it back to stage1, don't get the stage2.

Edit: What screen-shot? Displacement node setup?

10. Change your MDD nodes to match by coords, not by nodes.

11. @RebelHill:
Yeah, it works.
I would like to use DP MDD Cache, but it don't have a match by coordinates option, if this can be solved?

12. Dont think so... you tried turning on the world coord option. Doubt it makes a difference, but you never know.

13. I think I found a workaround,
the issue is caused by the second evaluation of the same MDD Cache node,
one for Adding and then for Subsracting,
in this case the node editor seems to miss/decal point iteration (?),
so if you use a different MDD Cache for Adding and Substracting
using a copy of the node, this should work,
note that it shouldn't use more memory,
because it uses instance of the MDD file.

Denis.

'updated)
...To be clear, I noted this issue only in LW2015 and previous versions,
where this tip may help,
but no such issue in LW2018-2019,
because there's no more iteration, we can now
match the exact evaluated point.

14. ....and this is why I hate nodes and yet to embrace LW2019. Not one single Newtek tutorial to explain this sh*t!

15. Not sure why you think NT would have stuff explaining third party tools... but aside from that specific case, there's TONS of material covering nodes spread about, if not from NT, then from others.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•