Get groom points position at each frame

Hello everyone,

I am curious if there is a way in c++ or blueprint (even in python) if we can get the strands positions (each point) of a groom actor when the game is running (and the simulation enabled).

I started to explore the Niagara solver used to simulate the physics, there is maybe something to do with it when exporting the emitter data.

In blueprint it doesn’t seems to be possible, and in c++ maybe i can get the strands points with something like this ? : UDynamicMeshComponent | Unreal Engine Documentation

Bonus question, if possible I would like to only get the guide curve points.

Thanks !

I extend the AGroomActor class in c++ and I’m able to access the FHairStrandsDeformedResource | Unreal Engine Documentation. I’m trying to get the bulk data from it but it show me an permission error when I try to print the value and the engine crash :

I’m really not sure this is the easiest way to do it if anyone as an idea ?

Thank you !

hope I’m not too late in answering XD.
If you just want the position of the points on the guides, Niagara can do that for you.

Please add the “Export Particle Data to Blueprint” function to the Particle Updates section of the Emmiter for Niagara System for your groom, and refer to the post about “Niagara and Blueprint Communication” to send the result back to the Blueprint, after which you can use or save it in any way you want.

Note that what points you get depend on how you set up your guides (e.g. number of guides, number of particles on the guides for physics simulation)

I’m doing the same thing, but unfortunately I don’t seem to have access to valid vertex data after deformation. I got a series of FRDGPooledBuffers, but I don’t know how to parse them. And I’m more worried about the possibility that DeformedResources are only valid after applying the MeshDeformer?