Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBX Output Script (Blender) #5

Merged
merged 5 commits into from Jun 17, 2021
Merged

FBX Output Script (Blender) #5

merged 5 commits into from Jun 17, 2021

Conversation

huh8686
Copy link
Contributor

@huh8686 huh8686 commented Jun 16, 2021

This script allows to export neural-blend-shapes file (.fbx, .glb)

To get neural-blendshapes model , just simply run
blender -b -P nbs_fbx_output.py -- --input ../demo --output ../demo/output.fbx

To get envelop-only model , just simply run
blender -b -P nbs_fbx_output.py -- --input ../demo --output ../demo/output.fbx --envelope_only 1

#Required
Input direcotry is the directory where the ouputs are generated from 'demo.py'

'T-pose.obj', 'skeleton.bvh' , 'weight.npy' and 'basis.npy' , 'coff.npy' should exist in input directory (e.g. ../demo)
If 'basis.npy' , 'coff.npy' don't exist , envelope-only model will be exported.

'basis.npy' and 'coff.npy' (that is required to get neural-blend-shape model) can be achieved from params called basis_full, coff respectively in ./architecture/blend_shapes.py

e.g. I simply add this code in the forward function in ./architecture/blend_shapes.py

import numpy as np
np_basis = basis_full.detach().cpu().numpy()
np_coff = coff.detach().cpu().numpy()
np.save('./demo/basis.npy',np_basis)
np.save('./demo/coff.npy',np_coff)

@PeizhuoLi PeizhuoLi merged commit 77b7008 into PeizhuoLi:main Jun 17, 2021
@huh8686 huh8686 deleted the develop branch June 17, 2021 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants