Profile Picture

Importing Alembic with Python?

Posted By animagic 5 Years Ago
You don't have permission to rate!
Author
Message
GOETZIWOOD STUDIOS
GOETZIWOOD STUDIOS
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 1.2K, Visits: 7.2K
@animagic
That's odd, in my case I don't need to enable Soft Physics during import.

@4u2ges
Yes, clearly in iClone, Alembic import is just used as point cache files for existing objects, a scene cannot be "reconstructed" from the Alembic file only.
If you load the same alembic file to the wrong object, there is an assertion error, so the file clearly has to match the original object found in iClone.

What I don't know yet is that if iClone will be able to correctly load and "re-associate" an Alembic file to an object that has been created externally (in the software that generated the Alembic file) and imported into iClone. The same process as for export with a *.fbx file + .abc but from an external 3d application.
If that works, it is an open door to many possibilities: imagine a mesh with hundreds of animated peoples imported into iClone. It would be quite light (compared to hundreds of Avatars..) because only a "static mesh" would be rendered (no bones/rigging/skinning/etc..) and animated through one Soft Cloth clip (which in this case would obviously contains the baked animation of the characters which in turn could include any Rigid or Soft Physics generated from the external 3d application.


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

Edited
5 Years Ago by GOETZIWOOD STUDIOS
animagic
animagic
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 15.7K, Visits: 30.5K
I decided to do one more test.

We've discovered so far that Alembic import seems to be limited to Soft Cloth. I tried this with a piece of clothing for a CC avatar, but as of now we don't seem to be able to affect a mesh object.

So instead I tried a prop with Soft Cloth properties, and that works. I tested with the Round Table Soft Cloth prop (Props/Physics Props/Softcloth Props/Roundtable).

I ran the Soft Cloth simulation with baking enables and then exported the Alembic file.

As before, when importing I needed to enable Soft Cloth physics for the cloth to be affected and then of course turn it off before playing back.

The test prop is 8192 triangles and you can only apply the Alembic file to the same kind of prop. I have not tried with an external prop of that size.



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

GOETZIWOOD STUDIOS
GOETZIWOOD STUDIOS
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 1.2K, Visits: 7.2K
animagic (12/16/2019)
../.. As before, when importing I needed to enable Soft Cloth physics for the cloth to be affected and then of course turn it off before playing back../..

You mean on the object itself or the global Soft Physic flag ?
On my side as long as the Prop has Soft Cloth enable it will successfully load the point cache. I don't need to turn it off.
The global flag must be turn off at all time though or else, obviously, a new simulation would override any existing clip in the timeline whenever a playback is played.



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

animagic
animagic
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 15.7K, Visits: 30.5K
I had forgotten about the global flag...Blush  I haven't used Soft Cloth in a while.

You're right, if the global flag is turned off then the Alembic clip will not be overwritten even if Soft Cloth is on on the object.


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

GOETZIWOOD STUDIOS
GOETZIWOOD STUDIOS
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 1.2K, Visits: 7.2K
Good news. It works:



It is a little crowd created in Houdini. I exported a simple *.obj file and the *.abc file containing the point cached animation.
I've loaded the *.obj file directly into iClone (File -> Import...), enabled Soft Cloth on it, disabled the Global Soft Cloth flag and then imported the Alembic file.
One important point is that iClone load alembic files to an object by materials name. Each material defines a group of vertices so it is important that the names of each group from the alembic file match the material names of the object in iClone.

This opens the door to many interesting things. I'm thinking about direct import of Marvelous Designer simulations through Alembic for instance w00t

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

Edited
5 Years Ago by GOETZIWOOD STUDIOS
MIDI3D
MIDI3D
Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 44, Visits: 2.5K
That's HUGE!  
I intentionally stayed on the sideline throughout the technical process of what you guys were figuring out, but I was frequently checking the post for new developments. With my limited grey matter in regards to python and whatever else you were doing, any contribution from me would have only been a distraction, and maybe a hindrance! What I can do is to be one of the 1st to congratulate you and to say THANKS! ...even if I can't benefit from this right away. You guys are super! I'm looking forward to learning what I have to know to take advantage of this!  Smile
animagic
animagic
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)Distinguished Member (32.5K reputation)

Group: Forum Members
Last Active: 3 hours ago
Posts: 15.7K, Visits: 30.5K
A special thanks to Guy for noticing the Alembic API function in the first place and then showing that it works with external files. 

I don't master Houdini at all, but I'm interested in learning it (it's on my to-do list). For me it would be great if we could import wave simulations for example.


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

GOETZIWOOD STUDIOS
GOETZIWOOD STUDIOS
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)Distinguished Member (8.8K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 1.2K, Visits: 7.2K
animagic (12/18/2019)
A special thanks to Guy for noticing the Alembic API function in the first place and then showing that it works with external files../..

Oh don't mention it, it's not like the LoadAlembic method was hidden or something, it's just there in plain sight and not even marked as "experimental", while the LoadObject (Props,..) is, which is kind of weird.

animagic (12/18/2019)
../.. I don't master Houdini at all, but I'm interested in learning it (it's on my to-do list). For me it would be great if we could import wave simulations for example.

Yes Houdini is quite a beast, it opens doors to things you couldn't imagine doing with any other 3d application. It is not the easiest one to learn though, but nothing is impossible, with time and efforts, elbow grease and patience, it is certainly possible. But this is the kind of software if you don't read that (f*cking) manual, you won't be able to "guess" how it works ^^.

Regarding wave simulations, you can already import those into iClone through displacement and normal maps (using the Tesselation and Displacement features in iClone). You can create the grid (Plane/Floor) directly into iClone, activate Tesselation and use displacement and normal maps from Houdini (or from any other wave simulation software for that matter). You won't get vector displacement though, only normals displacement but that should already work pretty well for most of the cases. But of course now we know we can also import already displaced animated grids too. That said I believe that for this specific effect (wave simulation), letting iClone handle the Tesselation and Displacement through the GPU should be much more efficient than importing massive displaced grids from Houdini.

That's why I thought about crowds, because this is something much more challenging to accomplish in iClone. Houdini can do amazing crowd simulation from low poly, low end game quality to high-end, state of the art, movie quality. The challenge is to import the result into iClone, and clearly, FBX is far from being the most efficient mean. But with Alembic, this is clearly easy and very efficient. In my example I don't have materials but it is just a matter of defining those in Houdini and then addressing those once in iClone to the original *.obj imported file. Once that's set you can then import any alembic file (matching the obj file that is). And all the characters in my exemple are the same one but that is just a detail, I could have different humans running among a horde of Tyrannosauruses, or a bunch of cars and trucks on a highway, that would be equally as easy to import and use in iClone. Could be a flock of spaceships, of birds, anything.. Could be an entire city destroyed by a nuclear blast, that would be as easy too.. A forest of animated trees..(so you can use your own trees and not only rely on speedtrees). etc..

One thing I am thinking about too, is to have actual hairs and hairs simulations (or fur) for hero characters. Of course a mesh of "true hairs" would be quite heavy from an iClone Avatar perspective, but it all depends on what we are after, if we need that kind of quality, there is no reason not to push iClone and our graphic card(s) that far.

And all this is valid not only from Houdini, but also from any 3d application, Blender, Lightwave, XSI, Maya, 3DS Max, C4D, Marvelous Designer, etc.. as long as they are able to export Alembic files.

And this is a feature available TODAY Smile

One just has to release a little plugin able to load those Alembic files on the MarketPlace or somewhere. I'll probably do that soon unless someone else does it first.

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

MIDI3D
MIDI3D
Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)Junior Member (194 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 44, Visits: 2.5K
I will frequently be checking this thread and the marketplace in hopes that you do! For me, this would be my last hurdle to fully embrace iClone as my main program instead of just a very, very nice plugin. Thanks for giving me something to look forward to, hopefully in the near future!  Smile
videodv
videodv
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)Distinguished Member (2.7K reputation)

Group: Forum Members
Last Active: Last Year
Posts: 342, Visits: 12.0K
Just a quick couple of tests using Cinema 4d

The first is the melt Deformer



The Second is the Twist Deformer



These are just quick test to get the workflow sorted.

Chris.



Reading This Topic