Export groomCache with groom_group_id

Questions related to integrating and using Yeti with Epic's Unreal Engine.
Post Reply
junghoon kang
Posts: 3
Joined: October 20th, 2021, 10:44 am

Export groomCache with groom_group_id

Post by junghoon kang »

I'm sick of working to export a Yeti simulated by the guide to the Unreal Engine 4.27 groom cache.

Is the "range" flag in the exportUnrealAbc command not implemented yet?

>>> cmds.pgYetiCommand(exportUnrealAbc="~/groomCache.abc", range=(1, 10), samples=1, filePerFrame=False)

As a result of testing with this code, only 1 frame is exported.

However

>>> cmds.pgYetiCommand(writeAlembic="~/groomCache.abc", range=(1, 10), samples=1, filePerFrame=False)

With this code, the import into Unreal as groomCache was successful.

The problem here is because the "groom_group_id" attribute is not sampled.
You will not be able to use multiple materials per part in Unreal Engine.

How can I export a groomCache with "groom_group_id" attribute for use in Unreal Engine?

junghoon kang
Posts: 3
Joined: October 20th, 2021, 10:44 am

Re: Export groomCache with groom_group_id

Post by junghoon kang »

It's a bit strange for me to answer my question, but I'd like to share what I found out of my testing today.

First, in the animated alembic file exported with the "writeAlembic" command, it was confirmed that the "groom_group_id" attribute and its value were saved without any problem.

My groom had 3 group ids:[0, 1, 2] , but the reason that Unreal Engine recognizes only one group id is because the data type of the "groom_group_id" property is different. The data type that Unreal Engine can read is "int32Array", but it is "floatArray" when exported with the "writeAlembic" command.

Therefore, the existing "groom_group_id" property was deleted and the data type was re-created as "int32Array".

As a result, Unreal Engine showed me 3 group ids. :shock:

I plan to process and export the groom cache in this way for the time being, but I hope that the range flag will be implemented in the "exportUnrealAbc" command to be able to export "groom cache" at once without such processing as soon as possible.

Pulling the cache file twice is not efficient...please help me! :roll:

User avatar
colin
Site Admin
Posts: 2233
Joined: December 15th, 2012, 10:11 am
Location: Ontario, Canada
Contact:

Re: Export groomCache with groom_group_id

Post by colin »

If you're using the -writeAlembic command you need to use the -asUnrealAbc to make sure the data types are correctly converted to the Epic Alembic spec, this was added in 4.0.4.

Prior to that you will need to use the Export Epic Unreal Abc menu item - if you're not exporting explicitly for the Epic spec then it will write it as a float as that is how it's stored internally.

https://support.peregrinelabs.com/suppo ... bic-Export

https://support.peregrinelabs.com/suppo ... bic-Export

junghoon kang
Posts: 3
Joined: October 20th, 2021, 10:44 am

Re: Export groomCache with groom_group_id

Post by junghoon kang »

colin wrote:
October 22nd, 2021, 7:42 am
If you're using the -writeAlembic command you need to use the -asUnrealAbc to make sure the data types are correctly converted to the Epic Alembic spec, this was added in 4.0.4.

Prior to that you will need to use the Export Epic Unreal Abc menu item - if you're not exporting explicitly for the Epic spec then it will write it as a float as that is how it's stored internally.

https://support.peregrinelabs.com/suppo ... bic-Export

https://support.peregrinelabs.com/suppo ... bic-Export
Colin! thank you. Thanks I solved it.
Verified that it works perfectly!!
I am currently working with Yeti 4.0.4 and Unreal Engine 4.27.
It is my mistake that I did not check the part you linked.
It's a shame, but I hope this article helps someone in a similar situation. :lol:

Blossom
Posts: 2
Joined: June 27th, 2018, 7:00 am

Re: Export groomCache with groom_group_id

Post by Blossom »

Hello,Export groomCache with groom_group_id,Please help me。

Post Reply