How to Assign Position to a Group of Selected Points

   5607   5   2
User Avatar
Member
2056 posts
Joined: 9月 2015
Offline
Hello,

I've worked through the beginner tutorials and am now working through the Ari Danesh tutorials “First Steps”.

In the second video of that series he is working on modelling a tea candle holder.

A sphere is dropped down in scene and a side view is set.

To give the appearance of a flat bottom on the sphere the bottom two rows of points are selected and through scaling and translation are put roughly at the same level as the bottom third row of points.

I understand the point of the exercise is not to give “precise” object models but I was wondering how I might be able to place the points more precisely. I come from a SolidWorks background where I am used to designing objects with precise constraints. I understand the purpose of Houdini as a whole is a totally different application but nonetheless my curiosity has been perked in this tutorial.

So as an exercise and opportunity to explore Houdini a bit more I was wondering how I might be able to make that bottom perfectly flat, or rather getting the bottom two rows Y point value positions to match to the bottom of the third rows Y point positions; Within the existing model of this sphere, save building a model from scratch in a different way, or using other Poly Tools, etc.

I found that if I only select one row and through the use of spreadsheets compare the different y values a simple translation of the y axis will suffice from the subtraction of the two values.

But I can't do that with both rows selected at the same time.

The closest I've come to what I think might work is using a PointWrangle.

When I drop one down into my network and select my two rows of points and select that group in the Pointwrangle drop down menu and as expected the numbered points ( that I saw when working with spreadsheets ) get input into the textbox suggesting to me I am on track.

The wrangle also has setting for “Group Type” and “Runover” of which I set to “Points” assuming this is what it should be.

I also am assuming that in the Vex Code textbox is where I need to put the code for what I wish to accomplish.

But alas I have tried ( with my limited use of working with Houdini code ) entering different equations of which none have worked so far.

It would be much appreciated if anyone could offer insight on what code I could use, node type in network to utilize or combination of the two to manipulate specific selected points of an object.

Thank you

Attachments:
TeaCandleHolder_ari.jpg (111.4 KB)
TeaCandleHolder.jpg (144.4 KB)

User Avatar
Member
379 posts
Joined: 12月 2006
Offline
Not sure if this is what you wanted, but might help.

https://goo.gl/hEGvLZ [goo.gl]
User Avatar
Member
2056 posts
Joined: 9月 2015
Offline
Thanks for the link SreckoM,

That link has a permission requirement that I am waiting for access…will post if I get access and work with the info from there.
User Avatar
Member
379 posts
Joined: 12月 2006
Offline
Oops sorry about that. I gave you permission, plus this one should work for everyone.

https://drive.google.com/file/d/0Byw1djo6arb3UlY1NzJ5aFNiVEk/view?usp=sharing [drive.google.com]
User Avatar
Member
8668 posts
Joined: 7月 2007
Offline
so let's say you have point group of your 3 rows of points

then just put Point Wrangle
specify your group in Group parm
and use this snippet:
vector bbmin, bbmax;
getpointbbox(0, chs(“group”), bbmin, bbmax);
@P.y = bbmax.y;
it will get the maximum value of point bounding box, in this case the y value of topmost row of the group and sets Y value of every point in the group to the same value
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2056 posts
Joined: 9月 2015
Offline
Thank you very much SreckoM and tamte,

Both methods work great, will have to keep this little tut from you guys in my ‘learn’ folders for future reference.

For any other newbies reading through this post with interest, just a couple notes that might help you if you ran into any troubles like I did trying SreckoM and tamtes' suggestions:

for that google gif doc I downloaded a gif viewer that helps you stop to make sure you don't miss what's being done;

http://sourceforge.net/projects/gifviewer/?source=typ_redirect [sourceforge.net]

When following SreckoMs' gif I ran into problems when doing the TAB to bring up a point network node:

You have to have the mouse cursor in the scene window pane and not in the network window. Both ways will create a point node for you but the selected points will not get entered automatically in the Group textbox of the point node parameter window if you create a point node from the network pane.

Also, make sure you are in wireframe view and not any solid mode as doing so will only select the points that you can see and not also the ones behind them.

Thanks again guys for your help.
  • Quick Links