Dave Fothergill
March 9, 2015 12:50:42
how do I access attributes sored on points in a bgeo?
I read the bgeo cache into the Houdini engine, and can render these particles in Arnold. Standard attributes for color / velocity etc. render fine, but how do I pick up arbitrary point attributes stored in the begeo to use in my Arnold shader. I know what attributes are in the bgeo files, but they don't seem to be available in maya? I put the name into an arnold user data node, but they don't have any effect.
awong
March 9, 2015 15:29:13
The non-standard attributes aren't being outputted at the moment. How does Arnold expect to find the arbitrary attributes? Would they simply be dynamic attributes on the shape nodes?
Arbitrary point attributes do get outputted for particles though, since Maya natively supports arbitrary per-particle attributes.
Dave Fothergill
March 10, 2015 06:02:22
Hi,
on a particle shape, yes all the extra attributes could be stored as dynamic attributes. When using Arnold, the particle shape has a field to type in what attributes you want to export to Arnold. These can then be picked up in shading networks using the aiUserDataColor/Float/Vector shading nodes.
Mesh shapes are different and don't hold point data like Houdini, but can hold multiple colorSets which would be required to hold velocity data for motion blur, and other color data such as opacity or temperature for example.
thanks.
awong
March 10, 2015 10:30:14
For particles, you need to create a dynamic attribute (with the corresponding point attribute name) on the particle node. Then, the data from the custom point attribute will be available in that dynamic attribute. See the attached Maya scene.
Note that when you hit “sync”, the nodes below the asset are re-created. So you'd have to manually re-create the dynamic attribute too.
Dave Fothergill
March 11, 2015 14:28:31
HI,
this is good, and makes sense, however it would be better if all possible attributes in a particle bgeo are added as dynamic attributes to the maya particle shape by the Houdini engine when you press sync. I cant see any reason why you wouldn't want this, as you should only be exporting from Houdini the attributes that you will need.
Thanks,
Dave.
awong
March 11, 2015 14:56:21
I agree. And this should be fairly straightforward to do for particles. Let me look into this.
awong
March 30, 2015 17:41:11
I just made the changes to automatically create the particle attributes according to what are being outputted from the asset's geometries. Note that Maya's particles only support float and vector per-particle attributes. This means only float and vector (or float3) attributes can be outputted as per-particle attributes. This means that only tuple size of 1 and 3 can be outputted. String and int type attributes also can't be outputted.
grayOlorin
March 31, 2015 09:32:52
omg…! is that what this is?
• Maya: Added support for outputting extra geometry attributes into Maya mesh and particle nodes.
does that mean that I can also output arbitrary attributes to any geometry? (i.e. a point attribute called foo will come through in maya somehow? )
awong
March 31, 2015 10:28:54
Yup, attributes on meshes will also be outputted! This includes detail, prim, point, and vertex attributes. They will be created as dynamic attributes on the mesh node or particle node. The Maya dynamic attributes will be named exactly as the Houdini geometry attributes coming out of the asset.
Prim, point, and vertex attributes are always array type attributes on the shape nodes. When creating arrays, since the only tuple size that Maya supports is vector (i.e. float3), attributes will simply comes in as a flat array. Vector (float3) attributes is the only exception, and they will come in as a vector array.
Detail attributes get a bit more interesting. Maya supports a few tuple sizes, such as int 2 and float 3. So detail attributes could actually come in as simple value types. Since the Maya attributes use the exact name as the Houdini geometry attributes, if an attribute of the same name already exist on the shape node, then those attributes will be used. This basically means you could control certain shape (mesh/particle) node attributes using detail attributes!
awong
March 31, 2015 10:29:54
I just realized there's a bug in outputting string attributes… :? Looking into fixing that.
grayOlorin
March 31, 2015 10:59:33
man… this is super awesome.. you just gave me a drop dead reason to get latest
grayOlorin
April 30, 2015 16:38:58
hey Andrew, thank you again for implementing this! I am quite enjoying it
one thing that I was wondering is, I see the new extra attributes in the attribute editor of the shape node, but for some reason, I could not find them in the connection editor.. it is not a huge deal as I was able to find the appropriate plugs in the HoudiniAsset node, but I am wondering whether those extra attributes should be in the connection editor?
so also, for example, if I wanted to getAttr on those dynamic attributes, how would I call them? (is it getAttr meshShape.myAttrName?)
thank you!
awong
April 30, 2015 17:19:16
They should show up in the connection editor. I see them in my connection editor. The connection editor does have some options to filter out attributes. Maybe the attributes are just being filtered out?