oldiesgoodies Posted December 27, 2010 Share Posted December 27, 2010 Hi I am rendering a scene where I am instancing some geometry over a point instance object(it only has points). Everything seems to work fine, except making instanced objects to respect the geometry point normals. My point object has normals. Any suggestions? thanks Quote Link to comment Share on other sites More sharing options...
pclaes Posted December 29, 2010 Share Posted December 29, 2010 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. Quote Link to comment Share on other sites More sharing options...
Macha Posted December 29, 2010 Share Posted December 29, 2010 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. Quote Link to comment Share on other sites More sharing options...
oldiesgoodies Posted December 29, 2010 Author Share Posted December 29, 2010 Hi Thanks for the help. I will check out my scene to see what is going on. I have one more question regarding render tiem instances. HOw can I randomize the scale of the instances? Quote Link to comment Share on other sites More sharing options...
pclaes Posted December 29, 2010 Share Posted December 29, 2010 "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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.