Profile Picture

Alembic MDD Import

Posted By will2power71 7 Years Ago
You don't have permission to rate!
Author
Message
richleslie
richleslie
Posted 4 Years Ago
View Quick Profile
New Member

New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 9, Visits: 184
Hi.
Is there a specific requirement to the format of Alembic or OBJ export from MD? From my debugging the Python script is doing something, but it is not completing successfully. I've tried a number of different combinations, but even with just a simple sewing loop of fabric, I am unable to get the animation back into iClone.

Thanks
4u2ges
4u2ges
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)

Group: Forum Members
Last Active: 6 hours ago
Posts: 5.0K, Visits: 15.9K
richleslie (12/29/2020)
Hi.
Is there a specific requirement to the format of Alembic or OBJ export from MD? From my debugging the Python script is doing something, but it is not completing successfully. I've tried a number of different combinations, but even with just a simple sewing loop of fabric, I am unable to get the animation back into iClone.

Thanks

Yeah, I mentioned 3 and 4 (as well as 6 - alembic export part) were quite challenging.
And I do not remember settings I picked at all. I got to go through it again to recall how I did it. Maybe in coming days I'll spare some time...




4u2ges
4u2ges
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)

Group: Forum Members
Last Active: 6 hours ago
Posts: 5.0K, Visits: 15.9K
There it is.. Not a tutorial, but rather my workflow.
Here is a script again:

import RLPy
file_path = "PATH TO ALEMBIC FILE"
object = RLPy.RScene.FindObject( RLPy.EObjectType_Prop, "Prop_Name" )
RLPy.RFileIO.LoadAlembicFile(object, file_path, RLPy.ECoordinateAxis_Y)

Note: Mesh name in the alembic file and the Mesh name of the prop it would be applied to should be the same.
Prop_Name (and I think mesh names as well) are case sensitive.

For better viewing experience I've fast-forwarded simulations in MD







Edited
2 Years Ago by 4u2ges
richleslie
richleslie
Posted 3 Years Ago
View Quick Profile
New Member

New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 9, Visits: 184
Perfect. Thanks. I am not sure what I wasn't doing right, but I am able to complete the pipeline now.

But I have been trying to understand why it wasn't working. prior. One thing is the inclusion of the weight map when asked. I noticed early that you can just select the cloth option a second time and it will not be asked for maps to be added, Without these being created, the Alembic file won't load. I have also noticed it will stop working and iClone needs to be restarted. Though I did have one garment I was testing with that didn't require this step (never asked for them) and it worked fine.

The other issue seems to be with the complexity of the costume being simulated in MD. For certain garments I am constantly getting C++ runtime Library errors for the RLPhysicsSoftRecordControl.cpp file (Assertion failed! - Line 
293).  Though I am yet to understand why some work and some don't. 

Last issue I see is with frame rates. I understand that iClone runs at 60fps and MD (by default) is at 30fps. But it seems that changing the step time in MD to be 60fps doesn't create a 60fps Alembic export. This mismatch of fps looks bad when previewing in iClone, especially with tight-fitting clothes, but works fine when rendered out at 30fps. 
4u2ges
4u2ges
Posted 3 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)Distinguished Member (20.7K reputation)

Group: Forum Members
Last Active: 6 hours ago
Posts: 5.0K, Visits: 15.9K

Glad it helped you. Now to the problems you have had. I had the same.

Regarding weight maps. I've leaned to have them regardless. And it all depend on materials construction. For a garments with a single material, there is actually no need for the map and iClone would not even ask you to provide one.
For garments with 2 or more materials, some fake map is a must, otherwise iClone would crash as you've learned. I did not test too many garments, so there you have your chance to play with it. Better yet wait till official alembic import support, which is coming to iClone soon.

Regarding FPS. It is actually 60 FPS if you look at my workflow. I do *fake* it though. Yes, MD imports at 30 FPS. Then I stretch timeline x2, then (important!) export from MD as 30 FPS (not 60).
So when I import Alembic, my soft cloth track is twice as long as the original animation. Then I *compress* the track and make it even with animation. Now I have 60 FPS.
I did scroll the scrabber by frame and cloth changes at every single frame, meaning it is actually 60 FPS and there should not be any discrepancy with MD. At least I have not noticed any in my tests.

One more thing to remember. iClone timeline starts at frame 1. MD at frame 0. In the video workflow, I have compressed soft cloth track to the same frame as in MD  - 580. But it's actually should have been 581 for complete accuracy. Whistling

Update: The latest related to alembic import FPS: https://forum.reallusion.com/478218/Alembic-ImportExport-MD-to-iClone-FPS-30-or-60--and-more?PageIndex=1



Edited
3 Years Ago by 4u2ges
richleslie
richleslie
Posted 3 Years Ago
View Quick Profile
New Member

New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 9, Visits: 184
The frame rate is one thing I am experiencing differently. My sequence imports as the right length just playing every other frame. The final render is fine. The 60fps came in shorter and I had to lengthen that, Maybe the start frame was the issue for this, though it seemed to be more out of sync timewise rather than just with the start frame. 

I have been playing more and complex clothes just crash iClone. Even just saving the file after import often crashes. I will keep playing with it but looking forward to having it properly integrated into the workflow. As part of this workflow, it would be great if the export from iClone would not export any non-visible elements, rather than just hidden elements on the Avatar, so hair, boots, accessories etc., are not transferred to MD.



Reading This Topic