Apply/lock hair particles after hair dynamics simulation?

I have a mesh with a hair particle system. I then enable “Hair Dynamics” and let the animation run for 20 frames. My question is, can I “apply” the position after 20 frames as a new default position? I.e. something similar to the “Apply” button for a cloth modifier. TIA

1 Like

somewhere is an ‘apply physics’ button. I think it is over on the tool shelf. I think it will work, just remember to remove the cloth modifier, or whatever settings are enabling the physics, or it will just restart from that position. I think it will work for hair, but don’t quote me on that.

Are you talking about the “Apply Transformation” button in the physics tab under the tool shelf? That’s the only one I could find that’s similar to what you describe. Unfortunately it doesn’t work.

I also can’t figure this out. It’s a pretty huge feature to simply not be there. Any else have any ideas? Thanks!

I just ran into the same problem. How to apply physics to the hair, and still be able to enter particle edit to finish grooming?

So has Blender changed since last answer on this thread? I’m also trying to figure out how I could use dynamics to model hair and then start detail editing from there.

Hello fellow Blenderites. Unfortunatly unlike the cloth simulation there’s no way to apply particle hair simulation. The closes thing to that would be running your simulation & then converting the particles into a mesh. I’ve been hoping that they’d change this even going as far as to suggest it on Blender Today & other Youtube channels. Let’s keep our fingers crossed for 2.8. Peace.

I wrote a python script, but is not working in 2.8.
I can get the hair strands points… blender don’t refresh it!

Any updates on this query with 2.8 or 2.9? I am using 2.83 and still can’t find anywhere to save the hair particles after simulation. Seems like an obvious feature for physics sims and is available for cloth…

I wish this was a feature. I’ve been trying to figure this out for a while now.

I came across this thread from a Google search, since I had the exact same problem. I was disappointed to learn there seems to be no build-in feature in Blender for this.
Anyway, some more searching and coding later, I made a script to apply hair dynamics to the static hair particles. I thought I leave it here for others to find/use. It is certainly far from perfect or even optimized, but I hope it helps.

import bpy

# How to use:
# 1. edit hair system (important, move at least one hair, at least a bit to initiate hair editing)
# 2. run hair dynamics
# 3. move to frame where dynamics should be applied
# 4. run script
# 5. if happy, delete cache
# 6. keep editing hair

# get the depsgraph and the evaluated object   
deps_graph = bpy.context.evaluated_depsgraph_get()
evaluated_object = bpy.context.object.evaluated_get(deps_graph)
# assume context object has a particle system (warning, no check), use active
particle_system = evaluated_object.particle_systems.active

# Variable to hold hair-verticies-coordinats
hairs = []

# At current frame
# For each particle (hair)
#   For each vertex
#     Store XYZ coordinates
for p in particle_system.particles:
    hair = []
    for v in p.hair_keys:
        hair.append([v.co[0], v.co[1], v.co[2]])
    hairs.append(hair)

# Deactivate hair dynamics
particle_system.use_hair_dynamics = False

# On static hair system
# For each particle (hair)
#   For each vertex
#     Overwrite XYZ coordinates
for p,hair in zip(particle_system.particles,hairs):
    for v,h in zip(p.hair_keys,hair):
        #print(v.co, h)
        v.co[0] = h[0]
        v.co[1] = h[1]
        v.co[2] = h[2]
        #print(v.co, h)

# Update view and UI
bpy.context.scene.frame_set(bpy.context.scene.frame_current)

11 Likes

Awesome … Mentioned https://blender.stackexchange.com/questions/205531/ … Now how get this feature into trunk (official build release as operator) :wink:

1 Like

Thanks so much! This totally saved me :slight_smile:

1 Like

Can we make this as add-on In blender :thinking: :wink:

1 Like

It is like magic :star_struck: :bulb: Thank you so much

Thanks, works perfect in blender 3.0.

1 Like

Thanks a lot for the code @heveti

To make things easier, I did a panel with this code, its available at

3 Likes

I signed up just to thank you. WORKED OK IN 3.2

1 Like

Thanks a lot to all of you, I’m happy I could help you :slight_smile: