Jump to content

Making instances respecting the point geometry normals?


Recommended Posts

Do you have any other attributes overriding your N?

Specifically orient or up could change the alignment of the instances.

This is the order of preference:

orient -> up -> N -> V

Did you create the normals with a sop or inside a vopsop? Make sure your N is a vector not a float[3]. You can check this in a spreadsheet and see if your data is N[1],N[2],N[3] (this is the float[3] representation) or Nx, Ny, Nz (this is the vector representation).

Also make sure your normals are not zero.

Link to comment
Share on other sites

Peter is absolutely spot on of course.

One thing to add though. Not sure I'm completely right (please correct me if it's wrong) but I think the orient attribute is a quaternion, so the first 3 components are the axis and the last should be the angle. That could be confusing otherwise.

Link to comment
Share on other sites

"orient" is a quaternion - and yes, the axis is first, then the angle.

I think the only difference with "rot" is the order of operations. I think orient happens first, then scale and translate and then rotate:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=6679&highlight=copy+sop

in regards to the scale:

you should be able to use both the pscale (float) attribute as well as the scale (float[3]) attribute

-> haven't tested this, but should work - otherwise there are other ways around it with delayed loads and instancepoint() expression:

http://www.peterclaes.be/blog/?p=34 (hip files at the bottom)

(in the same way you use the attributes with the copy sop .. that's why it is a good idea to prototype point-based instancing with the copy sop - and far fewer template points).

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