Profile Picture

Importing Alembic with Python?

Posted By animagic Last Year
You don't have permission to rate!
Author
Message
animagic
animagic
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 12.3K, Visits: 21.5K
This is a request for clarification regarding an Alembic import function that seems to be part of the API.

RLPy.RFileIO.LoadAlembicFile(spObject, strFilePath, eUpAxis)

My question is what spObject should be set to and what the result of the function is.



https://forum.reallusion.com/uploads/images/1a09220f-ab50-42ac-ad1a-33ec.pnghttps://forum.reallusion.com/Uploads/Images/d14339d0-cd32-4b35-88f9-40a0.png


animagic
animagic
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 12.3K, Visits: 21.5K
The documentation is minimal, but spObject is called the target object and must be defined.

To test I created an Alembic file of Gwyn dancing. As I exported an avatar, i figured the target must be an avatar to, so I used the same one.

The assumption is correct and the file does import, but the result is kind of strange. Part of the character is animated and part stays in place:

https://forum.reallusion.com/uploads/images/afe29447-de20-4a43-9b54-eb12.jpg

Obviously, there must be a correct way to do this. What is important is that a point cache can be imported into iClone, so RL may have plans for it somewhere.

EDIT: Also, the animation is only shown when the playhead is moved along the timeline. The animation does not play back.


https://forum.reallusion.com/uploads/images/1a09220f-ab50-42ac-ad1a-33ec.pnghttps://forum.reallusion.com/Uploads/Images/d14339d0-cd32-4b35-88f9-40a0.png


Edited
Last Year by animagic
MIDI3D
MIDI3D
Posted Last Year
View Quick Profile
New Member

New Member (99 reputation)New Member (99 reputation)New Member (99 reputation)New Member (99 reputation)New Member (99 reputation)New Member (99 reputation)New Member (99 reputation)New Member (99 reputation)New Member (99 reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 20, Visits: 818
I agree! It seems like Reallusion does have plans for it to have even gone this far in the development process. iClone 8.0? Smile Who knows. (Maybe Peter would be my guess)
This is great news for me to see that you got this far. As you already know, if Alembic import is developed to its full potential in iClone, my little Marvelous Designer issue will be a very small thing to celebrate. In the larger scope of things, we could benefit from Houdini, Maya, 3DS Max , and even Blender or any other program that exports Alembic files as either geometry or particles. Right now, I'm having a blast with the seamless back and forth between C4D and Blender. It's nice to have the ability to at least export Alembic files from both iClone and Daz, but it would be much, much better if we could import as well. Especially in iClone! Thanks animagic for including me on your progress!
GOETZIWOOD STUDIOS
GOETZIWOOD STUDIOS
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 1.2K, Visits: 7.1K
@animagic
Perhaps it should be loaded into a new spObject that you create from code and add to the scene ?

--
guy rabiller | GOETZIWOOD STUDIOS
"N.O.E." (Nations Of Earth) Sci-Fi TV Show, Showrunner.

GOETZIWOOD STUDIOS
GOETZIWOOD STUDIOS
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 1.2K, Visits: 7.1K
In fact I think you should not even try to reload an alembic file as an "Avatar".
That make sense because now the Avatar has been "baked" as a static geometry plus animated points cached information.
There is no bones nor rigging involved anymore at this point.
That's may be why you get theses artefacts, the static mesh is being "re-skinned" or something.

--
guy rabiller | GOETZIWOOD STUDIOS
"N.O.E." (Nations Of Earth) Sci-Fi TV Show, Showrunner.

animagic
animagic
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 12.3K, Visits: 21.5K
I was surprised myself that the function required a target because as you say all the data is already in the Alembic file. That's why I hope someone knowledgeable from RL will see this and pinch in.

I think I have had beginners luck with this one, because I haven't had any success with other imports...Crying


https://forum.reallusion.com/uploads/images/1a09220f-ab50-42ac-ad1a-33ec.pnghttps://forum.reallusion.com/Uploads/Images/d14339d0-cd32-4b35-88f9-40a0.png


GOETZIWOOD STUDIOS
GOETZIWOOD STUDIOS
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)Distinguished Member (6.1K reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 1.2K, Visits: 7.1K
animagic (12/15/2019)
I was surprised myself that the function required a target because as you say all the data is already in the Alembic file. That's why I hope someone knowledgeable from RL will see this and pinch in.
I think I have had beginners luck with this one, because I haven't had any success with other imports...Crying

I've just tried myself and while the alembic files load without error, whatever the spObject given, I get no animation at all.
The first time you tried and you got the animation, was it not because you didn't removed the Animation from the Avatar itself before loading back the alembic file ?

--
guy rabiller | GOETZIWOOD STUDIOS
"N.O.E." (Nations Of Earth) Sci-Fi TV Show, Showrunner.

animagic
animagic
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 12.3K, Visits: 21.5K
GOETZIWOOD STUDIOS (12/15/2019)
 The first time you tried and you got the animation, was it not because you didn't removed the Animation from the Avatar itself before loading back the alembic file ?

I checked, and I had indeed removed all animation.

However, I discovered something interesting: the Soft Cloth animation of the clothing is implemented by the Alembic file (it names the file). So maybe it only imports Soft Cloth?

BTW, I was wrong about it not playing back. It is important to disable any Soft Cloth animation otherwise it will just be overwritten.


https://forum.reallusion.com/uploads/images/1a09220f-ab50-42ac-ad1a-33ec.pnghttps://forum.reallusion.com/Uploads/Images/d14339d0-cd32-4b35-88f9-40a0.png


4u2ges
4u2ges
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)Distinguished Member (7.4K reputation)

Group: Forum Members
Last Active: 4 days ago
Posts: 2.3K, Visits: 8.2K
I checked, and I had indeed removed all animation.


But did you bake soft cloth before exporting?
And then did you remove soft cloth clip before importing as well (I know you said you removed a motion animation already)?

I cannot import anything either.

This: "Import the alembic file from the given file into the current scene." does not make sense to me at all.
And then the object. What kind of object is required?

As I expect it to work, a new object should be created for each mesh in the alembic file
(or combine those meshes internally in iClone and present as a single object).

Don't understand how it is associated with existed object, if we plan to import something from outside of iClone.





animagic
animagic
Posted Last Year
View Quick Profile
Distinguished Member

Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)Distinguished Member (21.9K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 12.3K, Visits: 21.5K
4u2ges (12/16/2019)
I checked, and I had indeed removed all animation.


But did you bake soft cloth before exporting?
And then did you remove soft cloth clip before importing as well (I know you said you removed a motion animation already)?

Yes and yes.

I found out further that in order for the Alembic file to catch on, Soft Physics must be enabled during import and then turned off after import, obviously.

I think we may conclude that this is "experimental".  Tongue



https://forum.reallusion.com/uploads/images/1a09220f-ab50-42ac-ad1a-33ec.pnghttps://forum.reallusion.com/Uploads/Images/d14339d0-cd32-4b35-88f9-40a0.png





Reading This Topic