Spamuel91 Posted December 14, 2018 Share Posted December 14, 2018 Hi guys, I'm trying to make custom colour attributes so that I can export various properties across to Maya. In the past to access this data in Maya via alembic I have had to make sure there is a vertex vector attribute with the channels being rgb(Cd.r, Cd.g, Cd.b). This is fine if I am just taking across just the standard colour, but ideally I would like to take across several custom colour attributes. So I have tried creating new attributes but they always seem to default to being in the format of customColour.0, customColour.1, customColour.2, even if I select the attribute type to be colour. I'm sure I'm probably missing something fairly obvious, but is there any way to change this format or create the attribute with rgb channels rather than 012? I hope all that makes sense let me know if any of it is unclear or if you need any other details and I'll get that to you as soon as I can. Thanks guys! Quote Link to comment Share on other sites More sharing options...
3dome Posted December 14, 2018 Share Posted December 14, 2018 (edited) 1) in houdini it doesnt matter if it's xyz, rgb, 012. Any vector component can be accessed with any of those conventions (attrib.x and attrib.r but attrib[0]) 2) use a attribcreate, set type to color and you get rgb in the spreadsheet instead of 012 Edited December 14, 2018 by 3dome 1 Quote Link to comment Share on other sites More sharing options...
toadstorm Posted December 14, 2018 Share Posted December 14, 2018 You can also use the VEX function setattribtypeinfo() to change the signature of a given attribute after the fact to things like "color", "normal", etc. 1 Quote Link to comment Share on other sites More sharing options...
Spamuel91 Posted December 18, 2018 Author Share Posted December 18, 2018 Thanks for the responses guys! Dominik, really appreciate the advice, I am aware that in houdini it doesn't really matter what format it is in as they are all vectors regardless, however importing these into Maya as an alembic seems to fail unless they are in the format rgb. I realised I was approaching the attribute create incorrectly, so instead of setting the type to vector, the correct approach as you said would be to leave the type as a float with the type qualifier set to color, then increase the size to 3. That all seems to work perfectly with that set up, so thanks for pointing me in the right direction. Henry, the setattribtypeinfo() type info also worked a treat for switching it once it had already been created, so thanks for that too! Quote Link to comment Share on other sites More sharing options...
Skybar Posted December 18, 2018 Share Posted December 18, 2018 (edited) You can also use Attribute Create SOP to edit. Set it to the same as the attribute you want to edit, un-tick "write values" and you can change the float type to color/vector etc. edit: Also it actually does matter for Houdini what type it is, sometimes. If you set it to "position", and then put down a Transform SOP and move the geo - you will notice the attribute will translate too. The same applies for "vector"/"normal" and rotations etc. Edited December 18, 2018 by Skybar 2 Quote Link to comment Share on other sites More sharing options...
3dome Posted December 18, 2018 Share Posted December 18, 2018 10 minutes ago, Skybar said: edit: Also it actually does matter for Houdini what type it is, sometimes. If you set it to "position", and then put down a Transform SOP and move the geo - you will notice the attribute will translate too. The same applies for "vector"/"normal" and rotations etc. that's of course true and an important thing to remember! Thanks for pointing it out. I was referring to accessing a certain component, maybe should have included the transformation behaviour for completeness Quote Link to comment Share on other sites More sharing options...
Spamuel91 Posted December 18, 2018 Author Share Posted December 18, 2018 (edited) 23 minutes ago, Skybar said: You can also use Attribute Create SOP to edit. Set it to the same as the attribute you want to edit, un-tick "write values" and you can change the float type to color/vector etc. edit: Also it actually does matter for Houdini what type it is, sometimes. If you set it to "position", and then put down a Transform SOP and move the geo - you will notice the attribute will translate too. The same applies for "vector"/"normal" and rotations etc. Brilliant! Thanks for such a thorough response David! Good point about the transform too. Edited December 18, 2018 by Spamuel91 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.