Skip to content

Instantly share code, notes, and snippets.

View patricksnape's full-sized avatar

Patrick Snape patricksnape

View GitHub Profile
@patricksnape
patricksnape / unwrapped_texture.py
Created January 30, 2021 09:00
Create unwrapped UV texture
import menpo
import menpo3d
import numpy as np
template = menpo3d.io.import_builtin_asset.james_obj()
o_c_unwrap = menpo3d.unwrap.optimal_cylindrical_unwrap(template)
unwrapped_template = o_c_unwrap.apply(template)
u_t_aspect_ratio = np.divide(*unwrapped_template.range()[:2])