![]() If doTransform is set to true, the model is transformed to fit in orientation, rotation and size to the makehuman model. Afterwards, the compressed stl model is imported into blender. Now blender can connect to makehuman and can import the mh base mesh with the method mkh_importBody. Makehuman is started and the window is minimized. The method iaModifyPluginFile(1,0) and startMakeHumanProcess are called. This needs to be done, in order that the loaded mesh has a similar size to the human base mesh. After setting up the parameters, the mesh is compressed. this method is called if the plugin is unloaded.export the proxy to an stl file and stores it.loads the proxy with the model name and change the weight according to the defined weight.LoadProxy(app,vsWeight,modelName,userDocPath, mkhPath): this method is called when the plugin is loaded into makehuman.if doMKWork: the plugin loads the generated mesh to makehuman, modifies it and exports the mesh back to stl.if doMinimize: the makehuman window is minimized after the plugin has loaded.changes the plugin 09_vsScript according to the parameters.makehuman is started from the code with a delay time until the system is loaded.If you want to do the transform in the script set doTransform to 1 and adapt the transformation values depending of your script doTransform: set to 0, if you already adapted your mesh to size and rotation of the human base mesh,.exportSTL: 1 if a stl file with modified weight should be generated, 0 if only the makehuman proxymesh needs to be generated.decimateValue: value how much the mesh is compressed.If your mesh is small enough do not do the compression Mesh needs to have a similar size to the mh base mesh project path : path to the folder of the mesh.if the parameter export stl is set to true, you can also find the modified stl file (according to the parameters you set in the beginning) in the export folder.The code needs some minutes to run, afterwards you can find the created proxy from your mesh in the proxymesh folder.Run the code from the console as administrator with the following command: blender -background -python vs01_STL2MakeHuman.py.If you have run the code before with the same model name, clean the clothes, proxymesh and export folder.Adapt the transformation part to your model, it needs to have the same size and rotation like the human base mesh and the middle of the mesh needs to be centered at (0,0,0), you can either change the transformation part in the code or adapt your mesh in blender to the human base mesh and afterwards skip the transformation part in the code (set doTransform to 0).Adapt the paramters projectPath, modelName, vsWeight, exportStl, doCompression, decimateValue and doTransform according to your model and project (all parameters are explained in detail in scripts).After following the steps from getting start, you can open the file vs01_STL2MakeHuman.py.As the vs_Script is a user plugin, it needs to be activated as user plugin.The socket plugin and the MHAPI are makehuman plugins and can be activated in the normal plugin folder.In Windows MHAPI might be already installed. Activate them either in the settings.inl or in the makehuman gui (see following pictures). By pressing "N" the makehuman bar appears at the right sideĭownload the following plugins for makehuman:ĭownload the plugins and copy them to the makehuman plugin directory (~\makehuman\v1p圓\plugins).Search for the zip files of the downloaded addons and press install.Download the following plugins for blender: For Linux you might need to build the code up from source.ĭownload blender 2.9 and follow the installation instructions, also add blender to the path variables. How to adapt your mesh in size/rotation to MakehumanBasemeshĭownload the stable release makehuman version 1.2.0 and follow the installation instructions.The script and plugin uses makehuman and blender and some plugins. Furthermore the proxy can also be modified manually in makehuman. The weight of the proxy can be modified via the script and afterwards is exported back to an stl file. The following script and plugin for makehuman can be used to load an arbitrary person mesh (.stl) into makehuman by generating a proxy. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |