Alembic cached simulation

 
 
 
Posted by:asamiya83
Data created:11 September 2016

Hello, I'm trying to render some hair simulation done with nHair. So I have the cached curves in ABC format. These are the steps I've done so far.

- Import character scalp (alembic cache) and the simulation curves.

- Create Ornatrix hair from curves.

- Add the scalp geometry as distribution mesh and ground strands.

- I use UV or Random distribution.

But the hair don't follow the original alembic simulation. I also tried not to use the distribution mesh and select guides as hair in the distribution type. This makes the hair follow perfectly the cached simulation, but theres no hair distribution of course... so it only renders the viewport number of hairs.

I hope someone can help me with this issue. I'll keep trying, though.

Thank you for the description, we will investigate.

Marsel Khadiyev (Software Developer, EPHERE Inc.)

Hi asamiya83, can you please attach a scene here that reproduces this issue?

 

Thank you for your reply. Here is a maya scene with the ornatrix setup, a scalp for the hair distribution. And a cached simulation in ABC format. As you can see, there is an offset between the alembic curves and the hair. Thank you again!


Attached Files:

>issueOrnatrix_v01.ma (1222368 bytes), >simTest_ORX_dynamicCurves01.abc (16101773 bytes),

Thanks for the scene. It seems that the main problem is that your base mesh (RightSide) does not follow the hair splines. The guides are following the splines (that's why "guides as hairs" renders the hair at the position of splines) but the hairs stay planted on the mesh since guides (and curves) transforms are not actually animated, only the vertices are.

Thank you for looking at the scene. You are right! I tried different ways, but when I added a wrap deformer to the scalp from the character rig, the curves follow the movement correctly. Thanks again.

Hi, I encounter a new problem with the alembic workflow, maybe some one else have seen this. I imported the simulated cached curves into Maya, then apply a groom preset to the curves. Everything looks good but, the groom is intermolating the hairs between the curves, and these curves are moving so Ornatrix is interpolating the hairs constantly, creating new hairs in some frames, so the hair pops and changes.

Is there a way to make the hair interpolation static and keep it the same through the whole animation?

Hope someone can help. Thanks!

Hey asamiya83,

 

I use the same workflow, applying the groom to a set of curves that are simmed using maya hairsystem. Here are my steps.

Setup

Steps

 

  1. Take groom that is built using GuidesFromCurves

    1. Copy the curves group (oxCurves) that hold the curves that are driving the guides

    2. Copy the the scalp geo (used as AnimDrv for dynamic hair)

      1. Make sure that you clean up the geo.

  2. Buildy dynamic hairSystem

  3. Blend  oxCurves group to the OutCurves group

  4. Blend scalp to AnimDrv

  5. Done

Export/ import

 

After sim is complete

 

  1. Export the OutCurves of your sim (or what ever set of curves you have driving the hair) as an .abc to your publish location

  2. Export the shader

  3. Export the scalp as an .abc to your publish location

    1. Make sure that the scalp renderable option is unchecked so lighting does not get it in their renders.

  4. Select the top of the hair stack

    1. Click GenerateGroomFromSelected OrnaWorkflow_07.jpg

    2. Save groom to your desired location (prefer the same location you save out your publish)

    3. Before saving, make sure that remember root position is checked in the HairFromGuides node. This is very important and should be done in the groom stage.

  5. Done

 

Import for Lighting

 

  1. Reference the exported curves

  2. Reference the scalp

  3. Import the shader

  4. Select all of the curves and the click on Add hair to selectionOrnaWorkflow_08.jpg

    1. Point to the path where the saved our groom from CFX is located

  5. Reground the hair to the scalp

    1. You may need to turn off all of the nodes above the ground strands before regrounding. Then turn them back on.

  6. Done

 

You rinterpolation issue is probably due to the remember button in the HairFromGuides node. You need to check this off or the groom will recalc the root position every frame.

 

-James

 

 

You can also use the anim cache workflow but as of now, I am not able to get this to work with HairFromGuides. Still plugging away.