Hello,
I have a complicated shape (that I don't wanna UV unwrap ) that I want to bring to Unity from Houdini. The geometry has Cd attribute and I need to get that to Unity. What's the best way to do it? I have tried exporting FBX with Cd as point attribute, Cd Primitive attribute, applying a material that uses Point color and exporting that to FBX. No luck so far.
Thanks in advance.
Vertex colors from Houdini to Unity
20957 17 5- Kumar murthy
- Member
- 12 posts
- Joined: Dec. 2013
- Offline
- twelveplusplus
- Member
- 194 posts
- Joined: Aug. 2011
- Offline
- Kumar murthy
- Member
- 12 posts
- Joined: Dec. 2013
- Offline
In http://www.sidefx.com/docs/houdini14.0/io/fbx [sidefx.com] it says that the vertex colors are supported to export. So I am pretty hopeful for some answers.
- twelveplusplus
- Member
- 194 posts
- Joined: Aug. 2011
- Offline
you know, i was thinking about it, and i think i actually did this one time. i just forgot. i think i exported the object as an OTL instead of an FBX.
then in unity i just baked out the object. the only annoying thing was that i had to use some wierd vertex shader thing in unity, and i couldn't use whatever shader i wanted. (i think).
i will have to go back and look at the project and make sure I'm telling you right. Also, it might be different now because that was a while ago.
12++
then in unity i just baked out the object. the only annoying thing was that i had to use some wierd vertex shader thing in unity, and i couldn't use whatever shader i wanted. (i think).
i will have to go back and look at the project and make sure I'm telling you right. Also, it might be different now because that was a while ago.
12++
- Lune Sparkle
- Member
- 40 posts
- Joined: Dec. 2014
- Offline
i think houdini exports vertex color with no problem, however in unity you need a shader that can read vertex color, the default shaders does not paint it.
http://answers.unity3d.com/questions/189584/how-to-get-vertex-color-in-a-cg-shader.html [answers.unity3d.com]
http://answers.unity3d.com/questions/189584/how-to-get-vertex-color-in-a-cg-shader.html [answers.unity3d.com]
- gasanoff
- Member
- 14 posts
- Joined: Nov. 2016
- Online
Is there a special Houdini shader for Unity that renders vertex colors?
I use Amplify Shader, it works perfectly fine with geometry exported from Max (Vertex Paint, channel_ID = 0)
But It does not work with Alembics exported from Houdini as Cd attribute is arbitrary (channel_ID = 1-2-3..N)
Yes, I can select a channel in 3ds max to render colors but not in Unity.
1. Is there a way to change the channel for imported ABC file in Unity?
2. Is there a correct way in Houdini to exporting Vertex Color to Unity (I can't find anything for months already)
3. Is there anything can be done on shader level? - like to select a channel_ID from the geo,
Amplify vertex color is RGBA only, no other settings available.
Thanks!
I use Amplify Shader, it works perfectly fine with geometry exported from Max (Vertex Paint, channel_ID = 0)
But It does not work with Alembics exported from Houdini as Cd attribute is arbitrary (channel_ID = 1-2-3..N)
Yes, I can select a channel in 3ds max to render colors but not in Unity.
1. Is there a way to change the channel for imported ABC file in Unity?
2. Is there a correct way in Houdini to exporting Vertex Color to Unity (I can't find anything for months already)
3. Is there anything can be done on shader level? - like to select a channel_ID from the geo,
Amplify vertex color is RGBA only, no other settings available.
Thanks!
- gasanoff
- Member
- 14 posts
- Joined: Nov. 2016
- Online
I've posted a git issue in Alembic for Unity repo,
https://github.com/unity3d-jp/AlembicForUnity/issues/210 [github.com]
the Author said it's definitely a Houdini alembic export issue.
so it is not #1_Unity_ALembic or #3_Shader_related issue
It all comes down to a proper Houdini export to Unity I assume.
It would be nice to know what export settings/ workflow to use in this case.
Thank you!
https://github.com/unity3d-jp/AlembicForUnity/issues/210 [github.com]
the Author said it's definitely a Houdini alembic export issue.
so it is not #1_Unity_ALembic or #3_Shader_related issue
It all comes down to a proper Houdini export to Unity I assume.
It would be nice to know what export settings/ workflow to use in this case.
Thank you!
- gasanoff
- Member
- 14 posts
- Joined: Nov. 2016
- Online
- mikelyndon-sesi
- Member
- 394 posts
- Joined: May 2017
- Offline
- gasanoff
- Member
- 14 posts
- Joined: Nov. 2016
- Online
Oh cool, thanks!
I'll try that one and pretty sure it will work!
but I'd like to export Alembic .abc format (as I can export mesh animations)
For some reason alembic vertex color does not work directly but via channel somehow,
maybe I need to attribute promote or remap?
here is what unity alembic developer says:
https://github.com/unity3d-jp/AlembicForUnity/issues/210#issuecomment-440846343 [github.com]
for some cases new Houdini game tools are super helpful,
like I can export small solid body simulation animations via vertex shader textures,
but it's pretty limited (I can not change vertex scale, just the position)
If you can help with the Alembic SOP setup - that would be super awesome, there are tons of settings for sure,
I'll try that one and pretty sure it will work!
but I'd like to export Alembic .abc format (as I can export mesh animations)
For some reason alembic vertex color does not work directly but via channel somehow,
maybe I need to attribute promote or remap?
here is what unity alembic developer says:
https://github.com/unity3d-jp/AlembicForUnity/issues/210#issuecomment-440846343 [github.com]
for some cases new Houdini game tools are super helpful,
like I can export small solid body simulation animations via vertex shader textures,
but it's pretty limited (I can not change vertex scale, just the position)
If you can help with the Alembic SOP setup - that would be super awesome, there are tons of settings for sure,
- gmc
- Member
- 6 posts
- Joined: Jan. 2015
- Offline
Hi everybody,
I am struggling with the same issue:
My vertex animations can be sent from Houdini to Unity via alembic, but I can't send the colors over.
Renaming the Cd attrib to “Color” or “rgba” did not help, either. FBX seems not to be an option, because it drops my point based animations (but keeps the colors).
I'd just like to hear if there is a already solution for this.
@gasanoff: Did you find anything appropriate?
Is there anything either on the Unity side or in Houdini that I could do to keep my point colors?
Any help on this would be greatly appreciated!
Thanks!
I am struggling with the same issue:
My vertex animations can be sent from Houdini to Unity via alembic, but I can't send the colors over.
Renaming the Cd attrib to “Color” or “rgba” did not help, either. FBX seems not to be an option, because it drops my point based animations (but keeps the colors).
I'd just like to hear if there is a already solution for this.
@gasanoff: Did you find anything appropriate?
Is there anything either on the Unity side or in Houdini that I could do to keep my point colors?
Any help on this would be greatly appreciated!
Thanks!
Edited by gmc - Jan. 16, 2019 12:23:22
- gasanoff
- Member
- 14 posts
- Joined: Nov. 2016
- Online
Gmc, nope - nothing so far
point animations for FBX requires custom unity assets as far as I know;
Alembic for unity developer said he probably (!) gonna update the plugin soon with houdini colors support;
Another option is to create a custom node for Shader graph or Amplify so you can select a color channel -
but none of them seems enthusiastic to do it.
I still hope Houdini community can help with exporting colors properly - they have gamedev tools, probably we should ask this team to help us, so we can use standard vertex color nodes in shaders.
point animations for FBX requires custom unity assets as far as I know;
Alembic for unity developer said he probably (!) gonna update the plugin soon with houdini colors support;
Another option is to create a custom node for Shader graph or Amplify so you can select a color channel -
but none of them seems enthusiastic to do it.
I still hope Houdini community can help with exporting colors properly - they have gamedev tools, probably we should ask this team to help us, so we can use standard vertex color nodes in shaders.
- gmc
- Member
- 6 posts
- Joined: Jan. 2015
- Offline
- mackerBaehr
- Member
- 86 posts
- Joined: Feb. 2014
- Offline
A potential clue for potential solving what should have been easy but unfortunately isn't.
While importing ABC's in Houdini I struggle sometimes with the fact that color and Alpha comes in as a 4-vector (RGBA). Houdini sees color as a 3-vector and Alpha as a separate float. For me I can't just re-pipe this, have to peel off channels and recombine them again. Perhaps the same is true for Unity. So in a way the RGBA from houdini might not be valid but should be temporary written out to custom channels.
Hope this makes sense, I will update if I find more answers.
While importing ABC's in Houdini I struggle sometimes with the fact that color and Alpha comes in as a 4-vector (RGBA). Houdini sees color as a 3-vector and Alpha as a separate float. For me I can't just re-pipe this, have to peel off channels and recombine them again. Perhaps the same is true for Unity. So in a way the RGBA from houdini might not be valid but should be temporary written out to custom channels.
Hope this makes sense, I will update if I find more answers.
- Len
- Member
- 133 posts
- Joined: July 2007
- Offline
Just ran into issues seeing basic Vertex Color exported from Houdini 17.5 into Unreal 4.22.
Discovered through trial and error to make it work:
1)You may need to triangulate your geo first with a Divide sop, otherwise it might not match engine and vertex indexes with be garbled.
2)Use Color sops set to Vertex, not primitive or point.
3)Use FBX export. OBJ doesn't work.
These results are for Unreal but may apply to Unity as well.
Good luck!
Discovered through trial and error to make it work:
1)You may need to triangulate your geo first with a Divide sop, otherwise it might not match engine and vertex indexes with be garbled.
2)Use Color sops set to Vertex, not primitive or point.
3)Use FBX export. OBJ doesn't work.
These results are for Unreal but may apply to Unity as well.
Good luck!
Edited by Len - June 5, 2019 13:43:21
- chekboom
- Member
- 29 posts
- Joined: March 2015
- Offline
- zeekindustries
- Member
- 9 posts
- Joined: May 2013
- Offline
Hey guys!
Coming from the same place, trying to write my vertex colors onto an ABC that I want to read in Unity. I can see that the latest version of the importer can read them, what I am not being able to do is to write the Vertex Colors on the ABC (can't read them even in Maya :c ). Tried already promoted Cd from Point to Vertex and added an Alpha vertex attr. No luck.
Can anyone share some insights on how or what options set on the Alembic ROP for this to work please?
I imported gassanof's alembic and the vertex colors come through with no problem, so I guess there's something I'm missing when writing those. No problem with FBX though, but ABC is really my only option right now for this.
Cheers everyone!
Coming from the same place, trying to write my vertex colors onto an ABC that I want to read in Unity. I can see that the latest version of the importer can read them, what I am not being able to do is to write the Vertex Colors on the ABC (can't read them even in Maya :c ). Tried already promoted Cd from Point to Vertex and added an Alpha vertex attr. No luck.
Can anyone share some insights on how or what options set on the Alembic ROP for this to work please?
I imported gassanof's alembic and the vertex colors come through with no problem, so I guess there's something I'm missing when writing those. No problem with FBX though, but ABC is really my only option right now for this.
Cheers everyone!
- zeekindustries
- Member
- 9 posts
- Joined: May 2013
- Offline
zeekindustries
Hey guys!
Coming from the same place, trying to write my vertex colors onto an ABC that I want to read in Unity. I can see that the latest version of the importer can read them, what I am not being able to do is to write the Vertex Colors on the ABC (can't read them even in Maya :c ). Tried already promoted Cd from Point to Vertex and added an Alpha vertex attr. No luck.
Can anyone share some insights on how or what options set on the Alembic ROP for this to work please?
I imported gassanof's alembic and the vertex colors come through with no problem, so I guess there's something I'm missing when writing those. No problem with FBX though, but ABC is really my only option right now for this.
Cheers everyone!
Hey everyone!
A happy update about this, if it comes handy to anyone. I found out that in order for the Alembic ROP to recognize and write properly the vertex color data the Cd attribute has to be explicitly created as a 3flt(Clr) type of attribute.
So what I did was declare it as such before adding any coloring operation, but it would be nice that those type of SOPs that have to do with modifying color would do it by default.
With that the Abc ROP will be happy and vertex color is written properly.
Cheers guys!
-
- Quick Links