Jump to content

Help with understanding Houdini workflow with Grasshopper examples


notintricate

Recommended Posts

Hi!

I'm trying to get into Houdini procedural pipeline, and as you may admit, the learning curve is a bit steep for novices. Hope that you can help me to break the ice.

 

I came from Grasshopper for Rhino and I'd like to ask questions based on examples of a workflow I'm used to.

 

So here is the first example:

TyLK0q0.jpg

 

Is there any way to see data structure like It's seen here in Houdini?

 

Im doing copy spheres over the grid, but the data behind is total black box. I don't know what order is there etc (except point indicies displayed in viewport)

post-15099-0-62056100-1448270800_thumb.j

 

So, how can I access data structure in a handy way like in my example?

 

Second example:

Vz87Kdw.jpg

 

As you see, it's very simple to see and manipulate data, but I have my mind twisted with Houdini approach. How to understand it and get the same level of transparency of data-manipulation?

 

I tried to make a stamp expression to drive spheres radius, but it's more "let me guess!" than "ok, I understand what I'm doing"

so what I did was make sphere size variable in stamp inputs with value $PT/10 and placed it in size parameter of sphere node with stamp expression (stamp("../copy1","sphereSize",0))

And obviously it's not that intuitive. How to get what $PT returns? What else can I use inside values inside copy Stamps? Is there any way to make the process more transparent? I lurked through the documentation, but didn't find clear explanations of this topic.

post-15099-0-28007100-1448271814_thumb.j

 

So How should I drive each row with desired value for spheres scale?

 

 

The last example is this one:

gNygYtX.jpg

 

 

As you can see, here I generate a series of numbers based on point list length and plug them into sphere radius parameter. The base points of spheres now have flat data structure, so no more rows. Data matches as it is, each value is applied to each sphere.

 

How can I reproduce this in Houdini?

How to generate series of numbers? (start, step, count)  How to generate ranges of numbers? (domain (from 1 to 20), divisions)

 

 

But the main question is still, how to make the workflow that transparent? How to see what happens to data, how to manipulate it in that flexible way (sliders, output panels, etc)?

I cannot believe that there are no options to make the process clear and intuitive, I believe that I'm a total noob and need your help! :)

 

Thank you in advance!

Edited by notintricate
Link to comment
Share on other sites

Here is my attempt and interpreting your problem. In this example I have setup an AttributeWrangle with some code that manually adds a radius value to each point on the grid using some logic. I don't know Grasshopper but the idea is that the AttributeWrangle is the place were you put code or manually define values that you are calling a list.

 

When working with attributes and the Copy SOP you don't need to define variables, just list the attributes without the @ symbol in the Attributes Stamp field. This makes them available as a variable in a stamp expression.

 

stamp("../copy1","my_radius",0)

 

You can view the attributes of a selected object in numeric form using the Geometry Spreadsheet view. In the image I have highlighted the attribute my_radius in gold.

post-12295-0-18592500-1448290345_thumb.j

ap_grasshopper_spheres.hipnc

Edited by Atom
  • Like 1
Link to comment
Share on other sites

Thank you for your hint. will take closer look at AttributeWrangle. Still it looks that your example isn't that adaptive. If you increase grid resolution, the logic will fail to work, since ranges are hardcoded.

As I see it's the way Houdini operates on grids. It doesn't provide us "tree" structure like grasshopper does, where each row is a list of points, and the grid itself is list of lists. So you can't just apply a value to a specific row. Ok. I got it.

 

Unfortunately plugging a few nodes in GH still seems to me to be quite more efficient way to handle this kind of basic procedural modeling stuff. I'll keep diggin into Houdini though, it's really powerfull, despite it's sophisticated approach.

Link to comment
Share on other sites

Thank you for your hint. will take closer look at AttributeWrangle. Still it looks that your example isn't that adaptive. If you increase grid resolution, the logic will fail to work, since ranges are hardcoded.

As I see it's the way Houdini operates on grids. It doesn't provide us "tree" structure like grasshopper does, where each row is a list of points, and the grid itself is list of lists. So you can't just apply a value to a specific row. Ok. I got it.

 

Unfortunately plugging a few nodes in GH still seems to me to be quite more efficient way to handle this kind of basic procedural modeling stuff. I'll keep diggin into Houdini though, it's really powerfull, despite it's sophisticated approach.

 

In this example Houdini doesn't provide you with row and column numbers of a point. You'll find Houdini to often be more DIY, but everything you've mentioned is easy to do. Remember, Houdini will typically run operations over all points as if they were a flat array, rather than per row or column or whatever. So, it's up to you to sort your data and fit your operations to it. 

When working with a parametric primitive like a grid, it's trivial to figure out the row and column of a point. You can display point numbers if it'll help you figure out the row and column order. Since you know the number of rows and columns and the point indices, you could do the math yourself in a wrangle SOP and store row and col into per-point attributes.

Or, you could use the UV texture node, set to rows and columns mode (writing to points). Now each point has a UV (and W) value that represents the normalised row/column. If you don't want the value normalised, simply scale the UV by row and column count (-1).

There are always many ways to accomplish the same task in Houdini, with the wrangle nodes being the jack of all trades! Houdini makes very few assumptions about your data, leaving you to choose the most appropriate tools for the task at hand.

At this point you'll have either a hand-made attribute or a uv attribute that you can make use of with the copy SOP and staming. It's just a matter of scaling the radius values by the row/columns that you've generated.

Edited by CiaranM
Link to comment
Share on other sites

It could be more adaptive, I didn't notice that as a criteria in your post.

 

For instance instead of using constants in the wrangle I could have just fetched rows or columns directly from the grid node above the wrangle. With the wrangle you can reach outside of the context you are currently in and access data throughout the system.

`chs("../grid1/rows")`

It is kind of waste of time to want program A to be more like program B. Just use whatever program fits the job.

Edited by Atom
Link to comment
Share on other sites

It is kind of waste of time to want program A to be more like program B. Just use whatever program fits the job.

 

This is an important point - coming from another procedural modeling environment, you need to be flexible and realize that in most cases there probably will not be exact ready-made analogues for the workflows that you are accustomed to. What you are experiencing right now is the very typical frustration that comes from knowing exactly what you want to do in your head but not being able to translate that into Houdini. With that in mind, the best thing to do is simply spend as much time as possible in Houdini, becoming accustomed to its toolset and focusing especially on VOPs / VEX and attributes, which are the real keys to building the kind of lower-level functionality that you looking for. 

 

Here's a little hint: When scaling geometry attached to a Copy SOP, I really prefer to just add the 'pscale' or 'scale' attribute on my template points and not mess around with stamps. The difference between the two is that 'pscale' is a uniform scale while 'scale' gives you the individual xyz components.

 

I've attached a scene that demonstrates one way you might solve the problem in your second example. I've demonstrated a couple different common workflows in Houdini - using a Point Wrangle to add the pscale attribute and an Attribute VOP to modify pscale by a custom parameter. This video provides a good overview of Wrangles if you haven't used them much yet. 

row_scale.hiplc

Edited by jrockstad
Link to comment
Share on other sites

If you don't mind, I'll keep asking questions in this thread.

 

  • How can I create simple number parameter (float, int, whatever) to use it later in other inputs?

Perfect, if this number can be in some form of a tweakable parameter like slider in Grasshopper, or just a simple number input form.

 

q25O5WL.png

 

 

I'd like to use this created number as second input for a multiply node inside AttributeVOP

 

h73aGol.png

 

  • The second question is how can I see output values as list from a specific output?

For example I'd like to know what values are output from the dist1 of voronoise.

 

Something like I have here in this panel:

i4feHPQ.png

 

P.S.: is there any way to create series of numbers or ranges of numbers like in example above?

Edited by notintricate
Link to comment
Share on other sites

you can use "parameter" to create parameters inside vops and "bind exports" to export values. You will find them in the 'geometry spreadsheet'.

 

you can also save a lot of time by watching those introductory tutorials:

http://www.sidefx.com/index.php?option=com_content&task=blogcategory&id=202&Itemid=361

 

Russian:

 

or maybe these:

Edited by konstantin magnus
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...