cristobalvila Posted January 24, 2015 Share Posted January 24, 2015 (edited) Hi guys, We can use $PCT in the Sweep Scale parameter and will get a linear scale from 0-1 along the backbone. That is great and fast! But, why using 1-$PCT does not give us a precise result? As you can see on attached image, both extremes on right sweep are bigger than on left one. It's obvious on the thin end, but also occurs on thicker one… $PCT gives us an 0.0 ... 0.25 ... 0.75 ... 1.0 scale 1-$PCT should give 1.0 ... 0.75 ... 0.25 ... 0.0 scale, right? The same problem occurs when using a ramp: chramp("profile", $PCT, 0) It works perfectly fine at first stage, but if you change your first ramp point control from 0 to 1 and last one from 1 to 0 it clearly appears that the thin extreme is NOT zero size… (?) Maybe I'm misunderstanding something obvious? THANKS for your feedback! NOTE: these alternatives works perfect… $PT*(1/($NPT-1)) 1 - ($PT*(1/($NPT-1))) chramp("profile", $PT / ($NPT - 1), 0) …but it really intrigues me that the more simple $PCT has this problem. Edited February 9, 2015 by cristobalvila Quote Link to comment Share on other sites More sharing options...
pbarua Posted January 24, 2015 Share Posted January 24, 2015 Which build of Houdini are you using? Works fine for me. Quote Link to comment Share on other sites More sharing options...
cristobalvila Posted January 24, 2015 Author Share Posted January 24, 2015 (edited) It occurs both with 13.0.582 and 14.0.201.13 Attached is the scene corresponding to screenshot (v13). sweep_invert_PCT.hipnc.zip Edited January 24, 2015 by cristobalvila Quote Link to comment Share on other sites More sharing options...
pbarua Posted January 24, 2015 Share Posted January 24, 2015 (edited) It's because you don't have enough points on backbone curve. I just resampled it and it works fine. sweep_invert_PCT.hipnc Edited January 24, 2015 by Pradeep Barua 1 Quote Link to comment Share on other sites More sharing options...
cristobalvila Posted January 24, 2015 Author Share Posted January 24, 2015 Aha! Yes, you are right, it gives a nice result once you resample the NURBS! However it seems a “curious” thing to me that, even without resampling, it works fine in one direction ($PCT) and “not so fine” in the opposite (1-$PCT). Something related with NURBS interpolation or something… I suppose… In the other hand, without resampling, it works fine using $PT*(1/($NPT-1)) and 1-($PT*(1/($NPT-1))) Big thanks for your help, Pradeep! Quote Link to comment Share on other sites More sharing options...
Netvudu Posted January 24, 2015 Share Posted January 24, 2015 Cristobal, as part of your Houdini Borg-like assimilation ( ) I think you might want to take a look at this version I just did on your scene. This allows for fine control on the width even if the sweep node would normally wouldn´t allow a given variable. This trick using the point expression is handy to circumvent "limitations" on a given tool. Maybe you already know this, but when I discovered this myself it was a big "a-ha!" moment for me. sweep_invert_PCT_VOPforTheWin.hipnc 1 Quote Link to comment Share on other sites More sharing options...
cristobalvila Posted January 24, 2015 Author Share Posted January 24, 2015 (edited) Damm! Thank you so much for this alternate version, Netvudu! I think that I follow the net (more or less), although that green operators… ufff, I need to learn some more basic things before completely understand. Specially that expression in the Atribute VOP: vcc -q $VOP_INCLUDEPATH -o $VOP_OBJECTFILE -e $VOP_ERRORFILE $VOP_SOURCEFILE Of course, I will save your example as gold for further reference and study! Step by step… ----- A different issue: trying to open your file in Houdini 13 I received lot of warnings, and then I saw I can open in 14… Is there some way to save this 14 scene to open with 13? (it occurs that even if I instaled the new 14, it doesn't run fine on my system… and I plan to continue learning for some months on 13, until I acquire a brand new machine…) Thanks again for your great help, guys! Edited January 24, 2015 by cristobalvila Quote Link to comment Share on other sites More sharing options...
Netvudu Posted January 25, 2015 Share Posted January 25, 2015 I did save this from Houdini 14 (I work in H14 Indie) so it´s expectable to receive some warnings from H13. Regarding that expression in the Point VOP, don´t worry about it. This expression appears by default with the node. It´s a default expression to check for paths and errors while compiling VEX on the fly for the VOP node. What´s important in that file is the use of custom attribute to control a parameter with a ramp, and the use of the point expression in the sweep node to check any attribute value at any other point in the network. 1 Quote Link to comment Share on other sites More sharing options...
cristobalvila Posted January 26, 2015 Author Share Posted January 26, 2015 Thanks again for your clarifications, Netvudu! Really appreciate your help 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.