Alembic MDD Import


https://forum.reallusion.com/Topic331361.aspx
Print Topic | Close Window

By will2power71 - 7 Years Ago
We have the export feature, but I wish to add the ability to IMPORT Alembic files. I'm a DAZ user and what I like to do right now involves blocking out motions and refining them in iClone and then taking them back into DAZ studio to render them. This allows me to take advantage of the greater detail and all the Joint Control Morphs of the DAZ figures that make them amazing to work with. The problem is --I don't really want to render them in DAZ but I want the detail and there's no other way to get all that detail into iClone other than an alembic or MDD import. with the PBR render, I would rather render in iClone. Please give us the ability to import Alembic and/or MDD animations in iClone. It would be a great way to take full advantage of the great features of BOTH platforms. This would open up new possibilities with other systems like Realflow. Or you could do physics stuff like buildings collapsing in another application and then bring it into iClone.

I have included this feature request in the feedback tracker. You can view it here.
By animagic - 7 Years Ago
+1

I also would like to see Alembic import. For me it would be to be able to use simulations such as those from Houdini, which are great for real waves and many others.
By paulg625 - 7 Years Ago
I would also like to see this feature. I have Cronosculpt which allows real-time corrections of animation sequences. It's great for correcting animation issues such as poke through during a soft-cloth animation, making a quicker workflow then repeatedly trying to adjust settings in an animation over and over because an outfit keeps going where you don't want it to during an extreme movement. I was able to export Alembic from IClone correct it in Cronosculpt but without being able to import Sad I couldn't go any further. So please consider adding Import of Alembic.
By Ascensi - 4 Years Ago
Hoping for this in iClone 8! Many have been asking for better performance to allow bigger projects and this would require some sort of smart caching and various methods of Culling and potentially texture packing that could be turned on or off to make changes.

I think Alembic support would be great although the new Zbrush 2021 came out with MDD support! and although I'd love to have alembic, MDD might come first because not everyone has access to the big programs that can generate advanced water sim.
If Reallusion could support both then they will be opening the flood gates for a bigger market - once the performance optimizations have been implemented. 

Final word - if they add Goz to iClone they can almost instantly create collisions and bake the dynamics then reimport with MDD.
By DISfxs - 4 Years Ago
I agree. It would be great to have Alembic Import for soft cloth simulations from Marvelous designer as well. Thanks for this post.
By 4u2ges - 4 Years Ago
boygenious (10/9/2020)
I agree. It would be great to have Alembic Import for soft cloth simulations from Marvelous designer as well. Thanks for this post.


But this is already possible. Just an extra step for importing garments separately from alembic: https://forum.reallusion.com/FindPost451054.aspx
It is just someone who is proficient with MD should make a tutorial. I am not an MD pro, but I was able to pull this through easily:

https://forum.reallusion.com/uploads/images/8cf1fe5b-b8bf-469b-90e6-91a0.jpg

https://forum.reallusion.com/uploads/images/9c9d1e64-a020-4357-bc80-45a8.jpg


https://forum.reallusion.com/uploads/images/329e0375-38d4-4265-b13c-c295.jpg

By DISfxs - 4 Years Ago
Thank you for this reply. I will give it a tray and be sure to do a tutorial as well.
By magikshow - 4 Years Ago
HOW DID YOU DO THAT? teach me!!!!!!!
By animagic - 4 Years Ago
I believe Alembic import for clothing is part of the planned iClone improvements.
By 4u2ges - 4 Years Ago
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.
By richleslie - 4 Years Ago
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
By 4u2ges - 4 Years Ago
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...
By 4u2ges - 4 Years Ago
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



By richleslie - 3 Years Ago
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. 
By 4u2ges - 3 Years Ago

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
By richleslie - 3 Years Ago
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.