Jump to content

How To Copy Normal(s) From A Primitive To A Point.


Recommended Posts

Hi,

I have a moving curve.

post-1724-1185410501_thumb.jpg

I group the final primitive of that curve.

post-1724-1185410505_thumb.jpg

I delete the rest and so I get a moving Primitive.

It has a very beautiful normal.

post-1724-1185410509_thumb.jpg

I then place a point in the center of this primitive with the Point SOP.

and the following expressions:

point poisition X = prim("../end_primitive", $PT, "P", 0)

point poisition Y = prim("../end_primitive", $PT, "P", 1)

point poisition Z = prim("../end_primitive", $PT, "P", 2)

So the point moves together with the primitve.

post-1724-1185410514_thumb.jpg

But is it possible to copy the Normal information of that Primitive to the Point?

I tried AttributeCopy, AttributeTransfer non of them worked.

Probably I am not doing the right thing to make them work.

Any ideas?

Thanks.

Link to comment
Share on other sites

I think you can also just grab the intrinsic N primitive attribute using the prim() expression. eg.

prim("/obj/model/mygeo", 0, "N", 0)
prim("/obj/model/mygeo", 0, "N", 1)
prim("/obj/model/mygeo", 0, "N", 2)

(for primitive 0 of /obj/model/mygeo)

Link to comment
Share on other sites

Thanks,

I did not try AttributePromote, I never manage to get those advanced SOPs working. They always complain

about something...

So I went the expression way:

prim("/obj/model/mygeo", 0, "N", 0)

prim("/obj/model/mygeo", 0, "N", 1)

prim("/obj/model/mygeo", 0, "N", 2)

solution. And It worked! Thanks! :)

NormaFromPrimToPoint3.hip

Edited by Symbolic
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...