Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Videos

Downloads

  • Built_In_Attributes.pdf
  • Built_In_Attributes.pdf
  • Built_In_Attributes.pdf

Missing 1 full-res photo, 3 files, as this post has not yet been imported.

Content

EDIT: Aaand of course i forgot to attach the list of Houdini's built in attributes. Here it is.

We'll go over the basic data types we will be using when building VEX based setups. 

Also if you haven't heard of them yet - attributes allow you to attach arbitrary data to your geometry. A Point position is an attribute, as well as a point's number.

However you can also create custom attributes to drive your setup.

Or use special built-in attributes to control the functionality of some of Houdini's powerful nodes. Such as the Copy To Point SOP.

Files

Previews only

VEX 101 pt. 3: Basic Data Types & Accessing Attributes

Comments

arnaud giret

Hello Moritz, Really liked it. So floats can be integers as pscale can be equal to ptnum. But it stays as a float "by essence". So your Attributes list is essential but i didn't find it, may you please telling me where to find it ? thanks Moritz, ++

entagma

D'oh! Of course I forgot to attach it. Should be there now. As an attachement to this post. Sorry. Also a float stays a float. What Houdini internally does when you assign an integer to a float (as in the pscale = ptnum example) is that it casts the integer to a float, thus automatically converting for example a ptnum of 1 to a float value of 1.0. Cheers, Mo

ata mutahar

at 10:54 10:56 there is jump in the video not sure if this ok becouse i fell you are about to say something.

entagma

When I ramble on about how/where to find those attrib names? There is definitely an edit but nope, there was nothing to add :) Is there anything that you think remains unclear? Cheers, Mo

Anna Tronci

..This is the best way to explain the core of Houdini...Unparalleled!

Florian

Hi Moritz, one question came up as I was playing around with the Vex code to change to points of the grid orientation to get the rubber toy's copies to be randomized. I created an extra attribute (named 'Lookat¨') with a noise in a point vop to do so. Then in the wrangler I set the v¨@orient = v@Lookat;. This didn't work and after a quick look in the help I found out that I needed to get rid of the 'v' before the @orient or write p@orient instead. I've put that 'v' originally following your PDF. So my question is, where is that 'p' coming from and what does it refer to? thanks a lot! Cheerio

entagma

Hi Florian, orient does not store a lookat point. It stores the rotation of an individual copy as a quaternion (<a href="http://www.chrobotics.com/library/understanding-quaternions)" rel="nofollow noopener" target="_blank">http://www.chrobotics.com/library/understanding-quaternions)</a>which is stored as a vec4 (vector with 4 components) which is abbreviated with p@yourname. The advantag of quaternions over euler angles is that you do not run into what's called "gimbal lock" which ususally manifests in flipping copies. For a bit more on this I can highly recommend Toad's blog on these topics: <a href="http://www.toadstorm.com/blog/?p=493" rel="nofollow noopener" target="_blank">http://www.toadstorm.com/blog/?p=493</a>

Florian

Thanks for the quick reply - - my bad, I named wrongly my custom attribute 'Lookat', I wasn't looking for the point lookat at all. Thanks for the precision and the links, I'll check it out. Nice one!

jeremy jozwik

oooo, thanks for that pdf cheat sheet!

John Robson

Hey guys, for some reason I'm noticing that my custom pscale attribute is overwritten to 0 once it pipes into the copy sop, unless it's set to pack and instance. Curious if you've ever run into that.

John Robson

Seems like it's only a problem when defining pscale as ptnum that the copy to points sop kills it. Any other pscale attributes seem to pass through fine.

LDtt

Hi guys, why the Attribute Wrangle not work when i connect left branch of copy sop or below ?And why position of copy rubbertoys changed?

entagma

Hi Dope, for scaling (or translating, or orienting) the individual copies, the copy to points SOP onyl takes into account attributes of certain names that are written onto the template points - the points that are fed in through the SOP's right input. So there won't be any effect if you set a pscale attribute anywhere else. The position of the rubber toy changes as we scaled it down manually before feeding it into the copy to points sop and thus it's pivot is slightly offset in regard to its mesh, so when scaling the rubber toy it gets scaled with this offest pivot as center, thus it gets offset with increasing scale. More on all of this in upcoming tutorials. Cheers, Mo

LDtt

thank you so much !

James Cowen

thank you. this is such a great video. really helps explain vex coding in a simple manner for non-coders! :)

Sash

Could you please explain me, why the orientation of the rubbertoy copies are influenced by the add node? I don`'t understand why the rubbertoys are rotating 90 degrees when I bypass the add node... Thank you!

entagma

Hi Sascha, when using Copy to Points, Houdini tries to find any info regarding how to orient your copies. When you feed a standard grid into the copy-to-point-SOP, Houdini tries to infer the copies' direction by looking for a normal. In this case it finds the grid's intrinsic vertex normals (highlight the grid & switch normal display on in your viewport to make them visible) and orients the rubber toy accordingly. When you use the add-SOP to delete everything but the points, Houdini can't find any normals (there are no intrinsic point normals in this case) and thus doesn't orient the rubber toy. Cheers, Mo

EOB

Amazingly explained, love the pace of this series so much, no wasted time!

Draisey Digital

Very well done. I love the hint you dropped about using a line of VEX to accomplish the work of an entire Houdini node. That's a big performance savings and helps clean up the network.

Adam Priester

Hey, a bit late to the party. I can't access the Built In Attributes PDF, file not found. Is that still available somewhere? thanks

Hans Palacios

Thanks for the popular attributes PDF; it's a really helpful quick reference!

Ben Weaver

Hi guys, I'm really enjoying all of your tutorials. I have a question though when I update my f@pscale to equal i@ptnum. My rubber toy just duplicates 100 times in the same position whereas your rubber toy moves up. Am I doing something wrong?

entagma

Hi Ben, did you check you set up the rubber toy's transformations as we did? In our case it moves up as it doesn't sit at {0,0,0} and thus it's position in space gets scaled too. Cheers, Mo

Hussain Almossawi

Thanks this is super helpful, makes life much easier! 1 small question based off what you did at the end, why did the ( f@pscale = i@ptnum; ) also move the rubbertoy position up, shouldn't it just scale up while starting from its original point on the grid?

entagma

Hi Hussain, check the rubber toy's position in regards to world space center. In this case, the rubber toy is slightly offset to +Y, that's why when scaling it up, you get the impression of the geometry being moved upwards. Cheers, Mo