Curves From Strands - how to use the resulting Spline with standard c4d hair object to drive it's guides animation?

 
 
 
Posted by:poetic
Data created:12 June 2020

Hello,

first of all, the Hair from Mesh Strips feature is amazing. I've been converting mesh hair into splines for years manually, and to see the plugin handle even the most complex polygonal models in seconds feels AMAZING. Well done ephere!

I want to use the 'Curves From Strands' (Linear) generated live Spline to animated a standard c4d hair object's guides, by feeding it into the c4d Hair object Guides Link field. Cinema allows me to drag and drop the 'Curves From Strands' operator into the Guides Input field, but no guides are generated.

How do I set this up? 

All I was able to do, is to add the 'Curves From Strands' Operator and click 'Export Spline', and it generates a correct Spline object, that I can use with the c4d Hair object and drag and drop it inot the Guides Input fields and the guides are generated. But I have to manually click 'Export Spline' each frame of the animation, as naturally the exported Spline object is not being updated. 

Can I use a work around, and somehow get a regual c4d Spline object, that is being driven by the 'Curves From Strands' Operator?

Can I somehow use the 'Curves From Strands' Operator to drive guides of a standard c4d hair object?

I'm using Cinema R21.207 and Ornatrix v1.0.7.23889 on Windows 10 64-bit.

Thank you.

P.S.: As a last resort option: is there a way to call the Export Spline command from a c4d script, so I can automated the per-frame spline generation?

Hello,

At the moment the exported curves are independent of the main hair object. Give me a few hours to investigate this and see if there is a workaround that we can use. 

Jeordanis Figuereo (Product Designer. EPHERE Inc.)

Hello,

thank you for your swift reply. 

One workaround I'm exploring is the special orantrix alembic file format: File > Export > Orantrix Alembic (.abc). Let's say it exports a file called OrnAlembHair.abc. When I import such file into say Blender it brings over the animated curves, so that's good. But when I opened the generated OrnAlembHair.abc back in Cinema, it's reinterpreted as an Ornatrix object with baked operators (which makes sense, and I see the utlility in that).

So I have the option to export in ornatrix alembic, and import into Blender as curves. I didn't yet successfully figure out the last step: what format and settings to use in Blender to export the curves and import back into Cinema as Splines. 

Ideally there would be a checkbox in the Ornatrix Alembic Export dialog, that would let me switch on and off, If I want to export the hair as the current Ornatrix baked information, or if I want to export the hair as Cinema 4d Splines. Then on File > Open it would interpret the data accordingly.

Ok, so I found the workaround, if anyone is interested:

1) export scene with File > Export > Ortantrix Alembic (I used Cinema R20)

2) open the exported file, with ANOTHER installation of Cinema 4D, that does not have Orantrix plugin installed (I used Cinema R21)

It opens the spline as an alembic object:

- you have to click on 'Make Editable'

- then add a Point Cache tag, and Store and Calculate the animation

- then you can right click the object and use Show Tracks, (I use View > Automode and drag and drop the object into the Track View), Function > Bake objects and make sure PLA is checked

- this produces a Spline animated at PLA level, that can be used to drive a Hair object (drag and drop into Guides Link, select Spline Guides and make sure to uncheck Hair Dynamics)

 

If it's not too much troubkle, I would appreciate if the team at Ephere could comment, if there is not a way how to achieve this with a single instalation of Cinema 4D. Thank you.