Profile Picture

Alembic MDD Import

Posted By will2power71 8 Years Ago
You don't have permission to rate!
1
2

Author
Message
richleslie
richleslie
Posted 4 Years Ago
View Quick Profile
New Member

New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 9, Visits: 262
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.
4u2ges
4u2ges
Posted 4 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)

Group: Forum Members
Last Active: 10 hours ago
Posts: 5.3K, Visits: 16.6K

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



richleslie
richleslie
Posted 4 Years Ago
View Quick Profile
New Member

New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 9, Visits: 262
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 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)

Group: Forum Members
Last Active: 10 hours ago
Posts: 5.3K, Visits: 16.6K
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







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

Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)

Group: Forum Members
Last Active: 10 hours ago
Posts: 5.3K, Visits: 16.6K
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...




richleslie
richleslie
Posted 5 Years Ago
View Quick Profile
New Member

New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)New Member (48 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 9, Visits: 262
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 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)Distinguished Member (22.3K reputation)

Group: Forum Members
Last Active: 10 hours ago
Posts: 5.3K, Visits: 16.6K
boygenious promised to make a tutorial... :Whistling:

As I said, I am not an MD pro and not in a position to teach or make a tutorial.
I went through the routine once from start to finish to prove the concept.
I also know a few people who successfully completed their import projects.

If you're proficient with MD, it is fairly easy to bring MD cloth simulation into iClone.

Just steps:

1. Complete character animation in iClone. Because cloth physics would be involved (regardless iClone or MD), animation must start with T-pose, or A-Pose.
And there must a smooth transition for couple of seconds between initial pose and actual animation. Again, animation must be finalized.
2. Export animated character from iClone to FBX and import into MD (after character export from iClone, that character animation in iClone cannot be further tweaked).
3. Apply/fit garment, tweak physics, run and record simulation.
4. Export garment as OBJ from initial pose in MD
5. Import into iClone and attach to character as an accessory (to RL_BoneRoot)
6. Export simulation as Alembic from MD and import to iClone with Python script. Basic principals for importing is described/shown here: https://forum.reallusion.com/FindPost451054.aspx

Note: Import/Export settings in/out of MD, as well as Physics setup and simulation inside MD I have figured out by experimenting.

When Alembic simulation import would be standard in iClone, it would somehow consolidate steps 5 and 6 into a single step, which is very basic routine once you figure it.
The rest would be the same.
To me though, the most challenging were steps 3 and 4.




animagic
animagic
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)Distinguished Member (33.4K reputation)

Group: Forum Members
Last Active: 2 Weeks Ago
Posts: 15.8K, Visits: 31.3K
I believe Alembic import for clothing is part of the planned iClone improvements.


https://forum.reallusion.com/uploads/images/436b0ffd-1242-44d6-a876-d631.jpg

magikshow
magikshow
Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (130 reputation)Junior Member (130 reputation)Junior Member (130 reputation)Junior Member (130 reputation)Junior Member (130 reputation)Junior Member (130 reputation)Junior Member (130 reputation)Junior Member (130 reputation)Junior Member (130 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 12, Visits: 1.0K
HOW DID YOU DO THAT? teach me!!!!!!!
DISfxs
DISfxs
Posted 5 Years Ago
View Quick Profile
New Member

New Member (84 reputation)New Member (84 reputation)New Member (84 reputation)New Member (84 reputation)New Member (84 reputation)New Member (84 reputation)New Member (84 reputation)New Member (84 reputation)New Member (84 reputation)

Group: Forum Members
Last Active: 2 Years Ago
Posts: 10, Visits: 224
Thank you for this reply. I will give it a tray and be sure to do a tutorial as well.

1
2



Reading This Topic