lisux Posted August 9, 2006 Share Posted August 9, 2006 Hi all. I want to make a VEX SOP that make the inverse of the Rotate to Normals option in the Copy SOP. So after the Copy (with Rotate to Normals enabled) I can transform every geometry point in the copied geo like if the Copy had disabled the Rotate to Normals option. I have tried several transformation methods but I heven't the correct result. Can anyone help me? Thanks Quote Link to comment Share on other sites More sharing options...
sibarrick Posted August 9, 2006 Share Posted August 9, 2006 Just to understand the problem a little more why does just leaving rotate to normal off not work? Quote Link to comment Share on other sites More sharing options...
lisux Posted August 10, 2006 Author Share Posted August 10, 2006 Just to understand the problem a little more why does just leaving rotate to normal off not work? Because I need the original geometry copied to the points in shading. I am using some 3d textures that have been created in world origin, using the fluffy clouds shaders, I want to use these to shade some spheres copied to a particle system. So prior to scan in the 3d texture I have to move the points to the origin, I have done this saving the particles position in an attribute and using this to move every point in the shader to their original position. But now the problem comes with rotation, the rotate to normal option is useful because it orient your spheres to the velocity (normal) direction of the particles, very useful to get a correct motion blur, but again, if the copy SOP rotates the incoming geometry to orient it to the template point normal, I need to do the oposite in shading to get the original geometry. I have saved the normals of the particles in an attribute to use it in the shader. My problem is how to get the invert transformation made by Copy SOP when you enable the Rotate to Normal option, with this I can move points to their original position and viceversa. So to conclude, I am rendering geometry copied to a particle system, but every piece of geometry copied to the particles are shaded like if it hasn't been copied to a particle, are shaded in the world origin like it have been just created, so I invert the transformation made by the copy SOP to shade my geometry. Hope now it is a little more clear. Quote Link to comment Share on other sites More sharing options...
ptakun Posted September 5, 2006 Share Posted September 5, 2006 Hey Lisux! look at this example: rotate_normal.hipnc is that what you meant? Cheers!! Quote Link to comment Share on other sites More sharing options...
sibarrick Posted September 5, 2006 Share Posted September 5, 2006 Won't using a rest position attribute get you to the same place? Quote Link to comment Share on other sites More sharing options...
lisux Posted September 6, 2006 Author Share Posted September 6, 2006 Hey Lisux!look at this example: rotate_normal.hipnc is that what you meant? Cheers!! Yes ptakun, thanks for your example. And yes Simon maybe the use of the rest attribute is easier than this, I always forget that the rest attribute is there 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.