Jump to content

Normalize A Normal In Vop


sanostol

Recommended Posts

This time I tried vop. I want to normalize point normals.

the network is easy, a global variable node is connected with N to a normalize node, that leads to the output N. but this gives me following error message:

what I'm doing wrong here, what is so special with normalize, multiply constant for example does work like expected

martin

post-1071-1163361589_thumb.jpg

Link to comment
Share on other sites

Hi,

Do I have to declare a variable when using vops, I thought the global variable node does all. If I have to do it in vop, how can I ?

The other thing is that it does work with other operations, like multiplication.

martin

Have you declared that variable, nvec?

i.e.

vector nvec = normalize(N);

Link to comment
Share on other sites

This time I tried vop. I want to normalize point normals.

the network is easy, a global variable node is connected with N to a normalize node, that leads to the output N. but this gives me following error message:

what I'm doing wrong here, what is so special with normalize, multiply constant for example does work like expected

martin

Are you calling your function "normalize"?

If so, don't: you'd be calling your function from inside the function itself, which would explain the recursive error message... VEX does not support recursion (neither does any other shading language I know).

If this is the case, rename your function.

Failing that, post a simplified version of the problem so people have a chance to diagnose it.

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.

Guest
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...