kubabuk Posted March 22, 2007 Share Posted March 22, 2007 Hey guys I've got following problem, maybe somebody could help me... During sweeping along quite complex curve, my profile tends to rotate slightly along sweeping axis. I attached a file with two cameras showing right and wrong position (dimond or polywireSOP like shape is the wrong one). The resampling the curve helps a little, but this is not the ideal solution because the memory limits run out pretty quickly and it doesn't work at all times. I came up to semi-solution by extracting each segment of the curve (kuba_curve_segmentationSOP) an sweep it individually - but that produces some overlaping issues where the curve bends. Fixing angle on the sweepSOP or moving pivot of the profile didn't solve the problem to me. Maybe somebody has faced similar problem, I would be really happy to see the solution for that. cheers kuba Sweep_rotation_issue.hip Quote Link to comment Share on other sites More sharing options...
old school Posted March 23, 2007 Share Posted March 23, 2007 Try blowing away your point normals. You may have to resort to using the second input of the sweep to orient your cross-sections. Quote Link to comment Share on other sites More sharing options...
edward Posted March 23, 2007 Share Posted March 23, 2007 Do you plan on skinning your sweep? If so, you might as well just jump to using the PolyWire SOP directly. Quote Link to comment Share on other sites More sharing options...
kubabuk Posted March 23, 2007 Author Share Posted March 23, 2007 Do you plan on skinning your sweep? If so, you might as well just jump to using the PolyWire SOP directly. Yup, polywire works fine but I do want to end up with square profile, whereas polywireSOP gives me a square profile, but rotated by 45 deg. (I called in my previous post diamond shape) Sounds simple to fix this rotation... no? cheers kuba Quote Link to comment Share on other sites More sharing options...
edward Posted March 24, 2007 Share Posted March 24, 2007 I think that to do a true box sweep in this situation, you need to proceed in a loop starting from point 0 onwards. So if we can cheat and allow the sweep to not actually be hollow, then it's really easy. boxsweep2.hipnc Quote Link to comment Share on other sites More sharing options...
edward Posted March 24, 2007 Share Posted March 24, 2007 I think that to do a true box sweep in this situation, you need to proceed in a loop starting from point 0 onwards. I woke up this morning and realized that this is easily done using the approach in my hip file above though if we turn off Rotate to Normal in the Copy SOP. Then we can build each segment exactly lik we want. Quote Link to comment Share on other sites More sharing options...
kubabuk Posted March 24, 2007 Author Share Posted March 24, 2007 That is really smart edward, thanks man!!! Is that right that copy stamp assigns to lineSOP the length equal of the distance between two neighbour points and that was done using length expression? - That means that I could store any values as normals and reuse them later. Do you think the same effect would be possible storing values, for example, within colour? (in the pointSOP) I don't quite get the idea of your last post - if you turn it off elements won't align with the template curve... once again, big thanks kuba Quote Link to comment Share on other sites More sharing options...
edward Posted March 25, 2007 Share Posted March 25, 2007 Is that right that copy stamp assigns to lineSOP the length equal of the distance between two neighbour points and that was done using length expression? - That means that I could store any values as normals and reuse them later. Do you think the same effect would be possible storing values, for example, within colour? (in the pointSOP) It's more than that. In the Copy SOP, look at the Stamp page that's where we set up the data to be passed to the left input. You can pass any values you want and those expressions are evaluated per point copy. I think there's some examples of stamping in the Copy SOP's helpcard. I just used normals because it was convenient. I don't quite get the idea of your last post - if you turn it off elements won't align with the template curve... Since we can pass all the information we want, we can do more than just pass the difference in successive point positions. We can also pass the _next_ difference in point positions. So this information can be used to construct each segment of the sweep exactly, without the need for the Copy SOP to do any rotation for us. I've attached my attempt at doing this. It was interesting. Note the comment in the copy1 SOP in this new file for how to test the setup. boxsweep3.hipnc Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 25, 2007 Share Posted March 25, 2007 (edited) Here's a way that doesn't use boxes just a profile and the copy sop, this way gives you only one profile at each corner like polywire but without the rotation (diamonds) problem of polywire. Sweep_box.hipnc Just realised that the first copy sop ( copy3 ) is set to stamp - this is a hang over from an early attempt and can be turned off as it has no effect. Edited March 25, 2007 by sibarrick Quote Link to comment Share on other sites More sharing options...
edward Posted March 25, 2007 Share Posted March 25, 2007 That's brilliant! I'm clearly outclassed. The only nitpick I can find are the tilted endpoints. I think this would make a good challenge to see who can do this in Houdini using the fewest number of nodes. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 25, 2007 Share Posted March 25, 2007 Well, I could add all the vector attributes in one vex sop, and do the "pick_best_skin" in another one, and the xform on the copied grid isn't really needed either as that can be done in the original grid sop. So I could in *theory* cut it down to 8 nodes..... or is that cheating? Or you could do it all in hdk and make it one node, but that really would be cheating. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 25, 2007 Share Posted March 25, 2007 (edited) Fixed the end points, but that required adding a few extra sops... Sweep_box2.hipnc This version generalises the "pick_best_skin" so it works with profiles with more than 4 points Sweep_box3.hipnc Edited March 25, 2007 by sibarrick Quote Link to comment Share on other sites More sharing options...
edward Posted March 26, 2007 Share Posted March 26, 2007 Well, I could add all the vector attributes in one vex sop, and do the "pick_best_skin" in another one, and the xform on the copied grid isn't really needed either as that can be done in the original grid sop.So I could in *theory* cut it down to 8 nodes..... or is that cheating? Or you could do it all in hdk and make it one node, but that really would be cheating. Heh, I had meant as in terms of complexity using Houdini. So taking your lead, I've simplified my construction. boxsweep4.hipnc Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 26, 2007 Share Posted March 26, 2007 Brilliant! that's pretty damn cunning, concider yourself untrumped. Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 26, 2007 Share Posted March 26, 2007 (edited) Ok, so with no thought to optimisation I have added loads of sops and now I can convert the whole thing to one nurbs surface... Sweep_box4.zip Or how about this for 15 nodes, no stamping.... Sweep_box5.hipnc Edited March 26, 2007 by sibarrick Quote Link to comment Share on other sites More sharing options...
kubabuk Posted March 26, 2007 Author Share Posted March 26, 2007 hey guys that is absolutely amazing - very cool, thanks hmmm edward, what is the adventage of this method (boxsweep3) comparing to the first one? I find the first one more self explenetory and simpler (well at least at this stage of learning H). If you don't use "rotate to template normals" does it speed up cooking of the network or is it just different approach? hey simon that looks awesome, one question though, could you briefly explain what does "detail" expression do in the if statment? Is the "pick best skinSOP" picking the gemoetry which has the smallest area? cheers kuba Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 26, 2007 Share Posted March 26, 2007 hey simon that looks awesome, one question though, could you briefly explain what does "detail" expression do in the if statment? Is the "pick best skinSOP" picking the gemoetry which has the smallest area? Well nearly, the "pick best skinSOP" picks the one with the smallest total perimeter for all the polys in the skin between any pair of profiles. I create the perimeter attribute as a primitive attribute first then bounce it up to a detail attribute by summing all the values for the polys in each skin. That gives me the total edge length for each attempt to do the best skin. The detail expression just lets me compare this final "size" metric for each potential version and pick the one that is the smallest. The detail expression itself is like the point or prim expression but is for reading detail attributes. Quote Link to comment Share on other sites More sharing options...
edward Posted March 26, 2007 Share Posted March 26, 2007 hmmm edward, what is the adventage of this method (boxsweep3) comparing to the first one? I find the first one more self explenetory and simpler (well at least at this stage of learning H). If you don't use "rotate to template normals" does it speed up cooking of the network or is it just different approach? boxsweep3 is a cheat because it's not hollow all the way through. Or how about this for 15 nodes, no stamping.... Well, I consider myself trumped for good now. 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.