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.
particle attributes
9492 12 2- Dave Fothergill
- Member
- 3 posts
- Joined: May 2014
- Offline
- awong
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
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.
Arbitrary point attributes do get outputted for particles though, since Maya natively supports arbitrary per-particle attributes.
Andrew / アンドリュー
- Dave Fothergill
- Member
- 3 posts
- Joined: May 2014
- Offline
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.
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
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
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.
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.
Andrew / アンドリュー
- Dave Fothergill
- Member
- 3 posts
- Joined: May 2014
- Offline
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.
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
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
- awong
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
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.
Andrew / アンドリュー
- grayOlorin
- Member
- 1799 posts
- Joined: Oct. 2010
- Offline
- awong
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
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!
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!
Edited by - March 31, 2015 11:03:10
Andrew / アンドリュー
- awong
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
- grayOlorin
- Member
- 1799 posts
- Joined: Oct. 2010
- Offline
- grayOlorin
- Member
- 1799 posts
- Joined: Oct. 2010
- Offline
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!
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!
-G
- awong
- Member
- 818 posts
- Joined: Sept. 2013
- Offline
-
- Quick Links