enzym Posted June 7, 2008 Share Posted June 7, 2008 Hi guys, this is my first post, great forum! 1) Basically I am in need to get points normal to always face a camera (specified: cam1, cam2, etc). Is there node or script to do such thing? Expression, maybe? 2) After I get the normal to face camera, I am also thinking to rotate each one of the facing point to rotate randomly. Please give me some guidance or hints. Thanks! - enzym Quote Link to comment Share on other sites More sharing options...
junaid Posted June 7, 2008 Share Posted June 7, 2008 Hi enzym, here i have made your point normal facing towards camera. and i tried random rotaion, but for some reason the random rotation is not working. didn't spend that much time for random rotation, i am sure you can make the random roation work. sorry for random rotation bcoz i have to work for my crappy essay as an university assignment. Cheers Junaid point_normals.hip Quote Link to comment Share on other sites More sharing options...
enzym Posted June 7, 2008 Author Share Posted June 7, 2008 Hi Junaid, Thanks! It works great. One note, I saw there is a yellow border around Point SOP though, it gives a little warning saying "the two sources have unmatched geometry. What causes this? Is this ok? Do you think Facet SOP will help? I like this `hack`, sort of what I had something like this in mind but didn't think of using object merge (clever!). Do you think there is another way? But I will use this for now, thanks again! - Jim Quote Link to comment Share on other sites More sharing options...
petz Posted June 7, 2008 Share Posted June 7, 2008 as allways there are a lof of possibilities in houdini. attached is another one. petz point_normals1.hip Quote Link to comment Share on other sites More sharing options...
enzym Posted June 7, 2008 Author Share Posted June 7, 2008 Hi Junaid, just to add on `why random rotation does not work`; that is because you use $CY in random function expression. It is not a $CY, but $PT because you are not using `copies`, but you use `points` from template object. There is only 1 copy by default I am sure you know this too. Also, with the warning message, I think to keep clean, we probably gotta delete some unnecessary attribute/values. Sometimes I see this `vertex` and `points`both available at the same time. Thanks again for this normal transfer hack! * If I found another way I will let you know or maybe someone here can add some info? If using particle, from documentation, there is already attribute to do so. - Jim Quote Link to comment Share on other sites More sharing options...
junaid Posted June 7, 2008 Share Posted June 7, 2008 Hi enzym, yeah i am sure particle will have geater control, but again the questions is what exactly you want to create. yeah let me know if you find some other way and about random rotaion it should be posible through stamp funtion i guess. Cheers, Junaid. Quote Link to comment Share on other sites More sharing options...
kovir Posted December 10, 2018 Share Posted December 10, 2018 Hi, based on import camera vector to the add node, you can use wrangle with a few strokes First input - your points, second - add node. vector cam = point(1, "P", 0); @N = cam - @P; @N = normalize(@N); Regards, Aleksandr. 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.