logix1390 Posted April 3, 2017 Share Posted April 3, 2017 Hello again, So I have come across an issue. It is probably better to just explain with pictures... <a href="http://s480.photobucket.com/user/vaz13/media/Picture_2_wrong_Normal_zpszysblp9h.jpg.html" target="_blank"><img src="http://i480.photobucket.com/albums/rr169/vaz13/Picture_2_wrong_Normal_zpszysblp9h.jpg" border="0" alt=" photo Picture_2_wrong_Normal_zpszysblp9h.jpg"/></a> <a href="http://s480.photobucket.com/user/vaz13/media/Picture_3_correct_Normals_zpsbdmo3vo1.jpg.html" target="_blank"><img src="http://i480.photobucket.com/albums/rr169/vaz13/Picture_3_correct_Normals_zpsbdmo3vo1.jpg" border="0" alt=" photo Picture_3_correct_Normals_zpsbdmo3vo1.jpg"/></a> Basically I am making a procedural house. I am at a part where I am making the wooden pillars on the inside walls. I have an outline of my house where I resample each line and copy the pillars onto them. However , the problem is the orientation of each pillar. Since my house is an irregular shape, when I try to orient and scale them inwards toward the center , each pillar scales incorrectly on some sides of the house. I put an expression so that the normals face towards the center, but the way I have my house setup, the center is at the origin grid and not the origin of the house. It's a bit tricky to explain, I have attached my scene file for anyone who wants to take a look. Orienting_Pillars_along_normals.hip Quote Link to comment Share on other sites More sharing options...
logix1390 Posted April 3, 2017 Author Share Posted April 3, 2017 Looks like my pictures didn't get embedded properly. I will attach them as a file. Quote Link to comment Share on other sites More sharing options...
Noobini Posted April 3, 2017 Share Posted April 3, 2017 just a noob having a go...so I read up on various posts...found that you can just rename the tangent from Polyframe (from tangent u to N)...but I thought..why not do it from the Resample...my attribvop is hardcoded with Y as the up vector...so might not be ideal...maybe a pro could point the way... TIA Curve_Normals.hipnc Quote Link to comment Share on other sites More sharing options...
f1480187 Posted April 3, 2017 Share Posted April 3, 2017 It can be computed by PolyFrame. You need proper geometry for it. The shape in scene has overlapped primitives, which does not deleted automatically when you fuse points. You need to use Clean node to fix overlaps. Then you can use Join node and create single primitive from the thing. After proper fusing, you can add PolyFrame and everything will work. Turn on point and primitive numbers and normals to see what's going on: Orienting_Pillars_along_normals_fix.hipnc It's better to make proper input from the beginning, by doing something like this: polyframe_pillars.hipnc Quote Link to comment Share on other sites More sharing options...
logix1390 Posted April 3, 2017 Author Share Posted April 3, 2017 Thank you for the replies. This put me on the right path. I needed to find the cross product of the poly frame normal you guys showed me, and an up vector on Y axis. I then changed the new vector to N and I got the direction i was looking for. Thank you for all the help guys ! 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.