简体   繁体   English

Mayavi和纹理映射(或将2D图像转换为3D图像)

[英]Mayavi and Texture Mapping (or turning a 2D image into a 3D image)

I have a project where I have a 2D image but I need to then turn this into a 3D object. 我有一个项目,其中有2D图像,但是我需要将其转换为3D对象。 I already have the skeleton model of the object, it is a simple matter of applying color to the surface. 我已经有了对象的骨架模型,这是将颜色应用于表面的简单问题。 I have been looking around and it seems 3D programs like Blender have a method like this called texture mapping or uv mapping. 我一直在寻找,似乎Blender之类的3D程序具有这样的方法,称为纹理映射或uv映射。 However I was assigned to use Mayavi and Python, and so far I could not really find anything about texture mapping in the Mayavi documentation. 但是我被分配使用Mayavi和Python,到目前为止,我仍然无法在Mayavi文档中找到有关纹理映射的任何信息。 I was wondering if someone knows how (if possible) to perform texture mapping in Mayavi. 我想知道是否有人知道(如果可能)在Mayavi中执行纹理映射。

Alternatively, if texture mapping is not possible, what would be the best way (if there is a way) to turn a 2D image into a 3D object. 或者,如果无法进行纹理映射,那么将2D图像转换为3D对象的最佳方法(如果有)是什么。

Here is documentation on Mayavi with examples on texture mapping: http://docs.enthought.com/mayavi/mayavi/tips.html#texture-mapping-actors . 这是有关Mayavi的文档,其中包含有关纹理映射的示例: http : //docs.enthought.com/mayavi/mayavi/tips.html#texture-mapping-actors If this is not what you need you can always script with Blender like you previously mentioned. 如果这不是您所需要的,则始终可以像之前提到的那样使用Blender编写脚本。 http://www.blender.org/education-help/python/ http://www.blender.org/education-help/python/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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