Jump to content

a question for making custom normal on Point


Recommended Posts

Guide Tangent Space didn't compute vectors that necessary looking down, which IMO contradicts with "make N which is head to down along edges". If you won't be happy with GTS output on the real geometry: at first, decide the unique characteristic the target vector will have. Does it points to point's neighbour with least/largest ptnum? Does it points along edge closest to {0, -1, 0} direction? The idea behind choosing one edge over another. That will be a big part of the answer.

Edited by f1480187
Link to comment
Share on other sites

Yes. you're right f1480187.

When I applied it to my real geometry, it was not correct.

So, I just tried to use Sort node.

I sorted points using 'Along Vector' {0, -1, 0}, then I made normal with vop ; I used subtract between position of ptnum and ptnum-1.

It's not exactly correct, but it is pretty close to what I want, cuz I just needed velocity for popnet.


Thank you for your advised f1480187!! :D:D:D

Link to comment
Share on other sites

Here the snippet which allow to select such down edge more reliably. It works better than height sorting method in cases, where short edges with better "down ratio" may have greater Y than long edges.

// Point wrangle.

int nbs[] = neighbours(0, @ptnum);

// Find edge best aligned with negative Y.
float dots[];
foreach (int nb; nbs)
    vector pos = point(0, "P", nb);
    vector dir = normalize(pos - @P);
    append(dots, dot(dir, {0, -1, 0}));
int best_nb = nbs[find(dots, max(dots))];
vector best_edge = point(0, "P", best_nb) - @P;

v@dir = normalize(best_edge);




  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...