Attribute Create
Visit the Node Bible
Attribute Create
If you're new to Houdini, then you'll certainly want to learn all about attributes because they are responsible for controlling the behavior of anything in your scene! This includes other nodes, solvers, shaders, lights, render settings, and more. In your head, picture attributes as pieces of data that get attached to the points, primitives (which are usually polygon faces), vertices, or the entire node stream itself if you choose "detail." In addition to this node, it's also common practice to add attributes using vex in wrangles. Either way works in most circumstances.
Also keep in mind that the Attribute Create node has many advanced/misc. options. If you get lost or confused with what some of these settings are trying to do - don't worry about it. I've marked the Advanced/misc. options below to warn you about them. 95% of the time, you don't need to worry about the advanced/misc. sections in this node, so don't let them stress you out.
If you're new to understanding attributes, first understand what "Types" are referring to - (ex: "float," "integer," "vector," "string," etc...) Here is a useful guide to what those terms mean.
Float = A number which is allowed to have a decimal value (ex: 39.8, -1473.2, 0.3)
Integer = A number which is not allowed to have a decimal value (ex: 3, 4, -1, 39)
Vector = A collection of three values (often used to describe position and color). (ex: {2,3,2}, {23.38,4.3,301.0})
** Keep in mind that if something is a "Float Vector" or an "Integer Vector" that it is describing whether the numbers within the collection of three values are floats or integers.
String = Anything that uses letters instead of numbers. (ex: "Foo," "Le'goo", "$HIP/myPath/")
Array (Advanced/misc.) = Arrays are basically a collection of values (not limited to 3 like vectors) and are often used to store data while running for-loops over things. With arrays you cannot specify defaults or alter their values. The Size field also refers to tuple size, so a size of 3 means an array of vector 3s, not an array 3 floats long. An example of an array is if you wanted to store a collection of color values. These color values are vectors (a collection of three values), and in the array you are collecting multiple vectors in one place.
Dictionary (Advanced/misc.) = "Since Houdini 18.5, SOP geometry supports dictionary attributes, an attribute type where each element (point, vertex, primitive/face, or the whole geometry/detail) can store a set of key/value pairs.
For more information about attributes, geometry components, and the like, visit this link:
https://www.sidefx.com/docs/houdini/model/attributes.html
Main Parameters:
Group:
-- This allows you to only apply that attribute to certain points, primitives, or vertices of your mesh.
Encode Invalid Attribute Names: (Misc. Advanced Parm)
-- When naming attributes, it's possible to enter invalid characters that mess it up. According to the docs, "Valid attribute names contain only letters, numbers or underscore (_), and must not start with a number." So, with this un-checked, the create attribute node will create a warning telling you all about it. It will also try to replace the invalid characters with underscores.
If you check this box on, then Houdini will do this cool thing where it encodes the attribute name. This means that it stores and displays the original name, but internally, it uses a different name so that Houdini doesn't have problems with calculating invalid names.
As an example, if I try to create an attribute called 698-foo and check on the "Encode Invalid Attribute Names," it will create an attribute called 698-foo and internally use something named "xn__698-foo_" In order to restore the original name, you'll need to decode the attribute. See the examples below:
Number of Attributes:
- How many attributes would you like to create?
Names:
Name:
-- This specifies the name of the attribute. The name is then associated with a value described below.
Existing Name:
-- Trying to name this attribute the same thing as an existing attribute? Well this dropdown tells the Attribute Create node how to deal with that situation.
* Use the Better Type, Size, and Precision
** In practice, you probably don't need to mess with this parameter, but here's what it means... You might be wondering, "what makes an attribute type, size, or precision 'better?'" Well, the more complicated version of something is considered to be the "better" version. As an example, integers can't have decimal values, but floats can. So if you had an existing float attribute called "foo" with a value of 3.23 and the attribute create wants to make an integer attribute called "foo" as well with a value of 4, then the float "foo" would win because it's considered the "better" version. Strings and numeric values are considered incompatible and so the requested type prevails in that situation.
* Generate error on mis-matched attribute:
** An error will be generated and the existing attribute, and its values will be left as-is.
* Generate warning on mis-matched attribute:
** The existing attribute definition will not be changed, but its values will be overwritten if Write Values is enabled.
* Replace existing attribute:
** The existing attribute definition will be replaced completely by the new definition.
Local Variables:
--------------
Jeff from SideFX has a great video detailing what Local Variables are. Check it out right here:
--------------
Local Variable: (Advanced/Misc./Outdated)
-- Let's say that you want to create your own local variable based on the attribute value that's specified in this node. You can do so here. So, as an example, you can create $FOO by typing in "FOO" within the Local Variable parameter. If you leave this blank, then it will simply take the attribute name and you can access it by using all capital letters along with the $ sign.
* This local variable is mapped by creating a detail attribute called 'varmap'
* NOTE: Using local variables for nodes further along the chain is becoming depreciated and may not work on every node. If you want to use $FOO on a poly-extrude node (as an example), then you will not return the correct values. In general, it's advised to avoid this particular local variable and, instead, use attributes @foo instead of local variables $FOO when trying to access values.
For more information, visit this forum post which offers a great comparison between attributes vs. variables:
https://www.sidefx.com/forum/topic/11090/
Attribute Data/Values:
Class:
-- Would you like the attributes to be associated with points, prims, vertices, or the node stream with 'detail?' For more information about this, please visit https://www.sidefx.com/docs/houdini/model/attributes.html
Save to Info Block: (Advanced/Misc.)
-- It's possible to save out detail attribute information towards the beginning of the .bgeo file as metadata. If you check this on, that's exactly what will happen when you cache out your data. The reason why this is nice is because it allows you to load this attribute data WITHOUT loading the geometry. This is possible by using the file sop along with the "Load" parameter set to "Info."
Type:
-- See above in the Summary section
Type Qualifier (next to Type): (Advanced/Misc.)
-- In most situations, you will not need to concern yourself with this parameter. "Qualifiers" act as an additional category that's universally understood by Houdini. According to the user docs...
* Guess from name = If the name is N, the qualifier will be "Normal". If the name is Cd, the qualifier will be "Color". If the name is v or up, the qualifier will be "Vector". Otherwise, the qualifier will be "None".
* None = No special treatment
* Position = This attribute is a geometric point. Houdini will transform the attribute as a position.
* Vector = Houdini will transform the attribute as a vector.
* Normal = Houdini will transform the attribute as a normal.
* Color = The attribute is a color
* Quaternion = Houdini will transform the attribute as a quaternion
Precision (Advanced/Misc.)
-- When values are calculated, the computer is allowed to think of a certain range of values depending on the bit selected. Lower bit = less memory to express that attribute which = smaller cache files sizes = faster to read caches. The Houdini user docs actually has a pretty great explanation of this, so check out this link for more info:
https://www.sidefx.com/docs/houdini/nodes/sop/attribcast.html
This can make a pretty substantial impact on the size of your cache files and ought to be considered when optimizing your scene.
Size:
-- The "Size" can turn an attribute into a collection a values. As an example, a "vector" is a collection of 3 values. If I set the Type to Float and the "Size" to 3, then that is the same thing as saying that it's a "vector" and shows up in the geometry spreadsheet as the same thing. The reason why "Vector" has a special category is just because it's so common. To see this clearly, visit the geometry spreadsheet and adjust the "Size" parameter.
Default:
-- Lets say that you decide to use the "Group" parameter at the very top of the node settings and select something. The things included in the group will get the "Value" that you list below. Everything that's not selected by the group will get the "Default" that you specify here.
Write Values:
-- Toggles the Value section below
Allow Local Variables:
-- See the Variables section above
Value:
-- See the Default section above.
Featured links
About Mentorship Calls
To book a call, just visit https://www.cgforge.com/book-consultation
Study Plan Call
Look at the welcome email for further instructions on how to schedule a call if you are a Premium Subscriber.
Premium Member Discord
Unlike the standard discord server, the Premium Member server receives faster replies, feedback on projects outside CG Forge courses, and exclusive discounts on mentorship calls that aren't offered anywhere else.
Houdini Education License
In summary, the educational license of Houdini acts much like Houdini Indie - but at a discounted price. The main difference between Indie and Education is that this version of Houdini cannot be used for commercial projects. It's great, however, for learning and preparing a demo reel without the limitations of Houdini Apprentice.
Unlock Everything
Unlike workshops or individual courses, CG Forge offers an ecosystem of resources that help you forge your skills.
Redshift Discount
https://www.maxon.net/redshift
Aug 28th, 2024 Changelog
General Changes:
• New, simplified website design is now live!
◦ All new particle banner is featured on the home and after login pages
◦ The after-login page now features courses that are sorted by ones that you have recently watched. This makes it easier to continue watching whatever you’ve been working on without scrolling through all the courses to find what you’re looking for.
◦ There is also a new “resources” section that can be found beneath the “Browse Courses” on the after-login page. This makes it easier to bring up the Node Bible, the “Tips + Tricks,” or Weekly wrangle in a new tab
◦ “CG Forge Academy” has been replaced with a “Mentorship Calls” at the top menu (see below for more details)
◦ The resources dropdown now features “Tips + Tricks” (see below for details)
◦ Certification requirements have been slightly re-written to be easier to understand
◦ Subscriptions have been re-designed from the ground up (see below for details)
Subscription Changes:
• Subscriptions have changed to include a "Basic Subscription" and a "Premium Subscription" option. The Basic Subscription renews monthly, and the “Premium Subscription” renews every 4 months. Yearly subscriptions have been removed.
◦ These changes only affect new subscribers. Existing subscribers will not see anything change with their auto-renewal amount.
◦ 10% off a Redshift yearly subscription is now included with the Premium Subscription. (If you are currently a 4 or 12 month subscriber, then just email support@cgforge.com for this)
◦ A new “Study Plan” call has been added to the Premium Subscription. (If you are currently a 4 or 12 month subscriber, then just email support@cgforge.com for this)
◦ A Houdini education license is now available for “Premium” subscribers. (If you are currently a 4 or 12 month subscriber, then just email support@cgforge.com for this)
◦ For more information, visit the subscriptions page.
• CG Forge Academy has been redesigned to be easier to use.
◦ 45 minute calls have been removed. Existing coupons are still valid and can be used towards 90 minute sessions for the amount listed on each coupon.
◦ 8 week mentorships have been removed - Instead, you can book as many 90 minute calls as you’d like.
◦ Free onboarding calls have been removed - Instead, premium subscribers now receive a complimentary “Study Plan Call” that establishes a personalized curriculum moving forward.
◦ The “CG Forge Academy” top menu is now replaced with “Mentorship Calls” and only allows for booking 90 minute calls.
All new “Tips and Tricks” resource page:
• “Tips and Tricks” is now a resource page that holds all quick tips, Houdini update videos, and other miscellaneous videos in one place. If you’re looking for “Quicktips Season One and Two” or "Houdini 19 Updates" they have now migrated over to the “Tips and Tricks” resource section.
Discord changes:
• The CG Forge Discord channel will now be divided into two categories: “Basic Members” and “Premium Members.” The premium member channel will be invite-only to premium subscribers or those who are currently enrolled in a 4 or 12 month subscription. If you eligible to join the premium discord channel, email support@cgforge.com for an invitation.
◦ Basic Discord members will no longer receive support for projects that are outside the topic of CG Forge courses.
◦ Premium Discord members will receive support for projects outside of CG Forge content
◦ Premium members will receive discounts on mentorship calls, and basic members will not.
◦ Premium members will have their questions / posts answered before basic members
◦ Early access to courses will now be exclusively provided to premium members via the discord channel.
If you have any further questions about these changes, feel free to email support@cgforge.com
Cheers,
- Tyler