简体   繁体   中英

Programing Blender in PyDev Python Editor

I am trying to create a 3D model, particularly a realistic 3d human model using a programing language where I would input a set of points/vertices that would connect to make the figure I want.

I first tried using Java 3D but I only found it useful for creating basic shapes like cubes, and upon doing further research it did not seem to be a good tool make complex shapes that require meshes.

After doing some more research I saw that Blender is a good tool to create 3d models and it has the source code available that can be used to create python scripts. However it seems like these scripts can only run in blender itself and not through pyDev in Eclipse, which is what I would like to do so. Is there another way to be able to leverage the Blender code so that I can use it to programmatically create a 3D model by providing a data set? I read that Blender is coded in C, so is there a way achieve what I want in C, and if so does anyone know a good reference/tutorial that I could use to create 3D models leveraging existing Blender code?

While you can alter blender's source code to add features, it is often easier to use python scripts or addons. Blender's python API provides access to it's data.

It is possible to remotely debug python scripts using pycharm or pydev (both are eclipse based). Some info is provided here and you can find several questions on using pycharm at blender.stackexchange .

You can also build blender as a python module which allows you to import the bpy module into any python interpreter and use blender's mesh tools without using it's gui. You will need to build blender from source yourself to get this module.

For extra performance you can use numpy, which has been included with blender for some time. You may also want to look at using cython to generate c-code from your python addon so it can be compiled into a binary python module, cube surfer is an example .

As for your plan to generate human meshes, I would suggest looking at MakeHuman or ManuelbastioniLAB . Both of these use a set of pre-built meshes and shape keys that can be interchanged based on a set of paramaters.

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