简体   繁体   中英

Reading data from 3d models with python

I want to extract the vertices and faces (as lists of vertices) from a 3d model. The format of the 3d model doesn't matter as long as it's generatable in Maya.

I would like to do this in Python. Are there any libraries, file types, etc. that you would recommend?

I'm pretty sure Maya exports in OBJ file format, which is very heavily documented and implemented. Python's cgkit implements an OBJ parser, which you can find here: http://cgkit.sourceforge.net/doc2/objmtl.html

Edit: Actually, cgkit can read a lot more formats from Maya than just OBJ. I searched for OBJ since I knew it was ubiquitous.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM