Getting vertex position of skeletal mesh
alinamuneer opened this issue · 2 comments
alinamuneer commented
- Operating System: linux
- UE4 Version: UE4.21.2
- UnrealCV Version: latest
- Client (python2, 3 or matlab): python3
- Problem Description:
I would like to get the vertex positions of my cloth mesh that is moving with wind continuously, while I save the image of that instance of the scene respectively.
zfw1226 commented
The command vget /object/{obj_name}/vertices
in the latest branch 4.27-stable
may meet your requirement. For your convenience, the following is an example function to process the string return into a list:
def get_vertex_locations(obj):
res = client.request(f'vget /object/{obj}/vertices')
lines = res.split('\n')
lines = [line.strip() for line in lines]
vertex_locations = [list(map(float, line.split())) for line in lines]
return vertex_locations