The Events3D Module

Modules to handle supported 3D file formats.

Project Name: MakeHuman

Product Home Page: http://www.makehuman.org/

Code Home Page: https://bitbucket.org/MakeHuman/makehuman/

Authors: Manuel Bastioni, Marc Flerackers

Copyright(c): MakeHuman Team 2001-2015

Licensing: AGPL3 (http://www.makehuman.org/doc/node/the_makehuman_application.html)

This file is part of MakeHuman (www.makehuman.org).

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Coding Standards: See http://www.makehuman.org/node/165

Abstract

../images/files_data.png

This Module handles the 3D file formats supported by MakeHuman. It is planned that this module will implement a range of functions to handle most common 3D file formats in the future. The functions within this module should all follow a standard pattern designed to facilitate the implementation of new interfaces.

This module will include functions to:

  • Transpose imported 3D data into a standard internal format for each of the 3D file formats supported by the MakeHuman import functions.
  • Generate 3D data structures that correspond to 3D file formats supported by the makeHuman export function.
  • Provide generic transformation utilities such as the dataTo3Dobject() function which takes an object defined in the standard internal format and makes it visible to the user.

The image on the right shows the general schema for implementing new MakeHuman importers. The wavefrontToData_simple() function below can be used as a template for developing new functions.

Each importer function must return the 3d data in a standard format (a list [verts,vertsSharedFaces,vertsUV,faceGroups,faceGroupsNames] ). The dataTo3Dobject() function can then be used to convert it into an object that is visible to the user through the GUI.

files3d.loadMesh(path, loadColors=1, maxFaces=None, obj=None)[source]

This function loads the specified mesh object into internal MakeHuman data structures, and returns it. The loaded file should be in Wavefront OBJ format.

path:
String. The file system path to the file containing the object to load.

Note: loadColors is currently unused

maxFaces:
uint Number of faces per vertex (pole), None for default (min 4)
files3d.loadTextMesh(obj, path)[source]

Parse and load a Wavefront OBJ file as mesh.

Table Of Contents

Previous topic

The Export Module

Next topic

The Geometry3D Module