blender

Blender 2.5 Python animated world texture setup

时间秒杀一切 提交于 2019-12-05 20:04:15
I need to set up an animated (i.e. from video file) world texture in blender 2.58 using python. I make a texture like this: import bpy # create new clouds texture bpy.ops.texture.new() wtex = bpy.data.textures[-1] # set World texture wrld = bpy.data.worlds['World'] slot = wrld.texture_slots.add() slot.texture = wtex slot.use_map_horizon = True This creates a new CloudsTexture and binds it to slot. How can I make an ImageTexture and set it up to have a video as a source? Or, how can I specify the type of a new texture made by bpy.ops.texture.new()? For data addition/removal, its best not to use

How to bake(convert) bones as FK from IK in Blender

╄→гoц情女王★ 提交于 2019-12-05 18:40:37
How can I convert from IK(Inverse Kinematics) to FK (Forward Kinematics) in Blender? I am trying to export a model which has skeletal animations, to THREE.js. However, It does not support IK. therefore, I need to convert all bones into FK. Does anyone know any solutions? Thanks! Happy Holidays! I found, Bake Action can be bake all frames as IKs. But I suppose, there are better solution... If you'd like to bake all frames, see the following link. http://blenderartists.org/forum/showthread.php?308277-bake-ik-to-fk From the pose menu select Animation -> Bake action with "Clear constraints" and

In Python, how can I export a 3D isosurface into Blender

余生颓废 提交于 2019-12-05 15:08:12
I have some 3D (x,y,z,value) data in python and I can visualize the isosurfaces in Mayavi. How can I export this isosurface into a file that I can read into Blender? Here is some example code: import numpy from mayavi import mlab x, y, z = numpy.ogrid[-5:5:64j, -5:5:64j, -5:5:64j] values = x * x * 0.5 + y * y + z * z * 2.0 mlab.contour3d(values, contours=[.5]) mlab.show() Using @timday's suggestion, I added the following code to save the isosurface in a wavefront (.obj) format: mlab.savefig('surface.obj') Then, I can open it in Blender with File>>Import>>Wavefront (.obj) I had to scale down

Design of virtual trial room

喜欢而已 提交于 2019-12-05 08:54:24
问题 As a part of my masters project I proposed to build a virtual trial room application intended for retail clothing stores. Currently its meant to be used directly in store though it may be extended for online stores as well. This application will show customers how a selected apparel would look on them by showing it on their 3D replica on screen. It involves 3 steps Sizing up the customer Building customer replica 3D humanoid model Apply simulated cloth on the model My question is about the

How to load json models in three.js properly?

人盡茶涼 提交于 2019-12-05 08:43:00
I'm having a hard time loading JSON models in three.js. I'v made a very simple tube-like model and textured it in blender. The issue is that whenever i try to load the json model in three.js, the vertexes looks weird. I'v tried exporting model with different settings but got always the same problem, so i think the problem is within my code. EDIT: Negative. I loaded buffalo model and it looked like it should. Any idea what i'm doing wrong inside blender? <html> <head> <style> canvas { width: 100%; height: 100%; } </style> </head> <body> <script src="threejs/three.min.js"></script> <script> var

how to show a message from a blender script?

£可爱£侵袭症+ 提交于 2019-12-05 05:13:42
Is there a way to show a simple message box with a text from a blender script? For example if i'm having an error during execution. Update: The link does not exist officially any longer and I stopped developing for Blender. The old 2.5 cookbook is still available in the internet archive at: https://web.archive.org/web/20120824033549/http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Cookbook/Code_snippets/Interface#A_popup_dialog Have a look at this code snippet for an error dialog / message window. After selecting, a (text) file a message pops up when the word return is read. It works

Is there a way to add an outline in scene kit?

一笑奈何 提交于 2019-12-05 01:10:24
问题 I've been making a game in scene kit, but the edges of objects are difficult to see, making some of the games details impossible to see. Is there a way to make a black outline around all the game objects? 回答1: you could use an SCNTechnique as mentioned in another answer (you can have a look at this article about cel shading, which has an edge-detection pass) but full-frame post-processes are quite expensive. On OS X you can also leverage geometry shaders (see this article). But it's not

Transferring rig weights from one mesh to another in blender 2.76

淺唱寂寞╮ 提交于 2019-12-04 14:14:40
I've recently started using blender in order to create my own models for games and such. I have created a model, rigged it, created clothes separately and now I want to add those clothes to my model so that it moves with the rig without the skin poking through. So there are many solutions that use the weight transfer tool but I can't seem to get this working with blender 2.76. I parent the rig to the clothes with empty weight groups under the deform option. I then, selecting the mesh and then the piece of clothing, go to weight paint mode and choose the 'transfer weights' option under the

Open a file from a specific program from python

荒凉一梦 提交于 2019-12-04 13:45:15
I would like to do a very simple thing but I am quite lost. I am using a program called Blender and I want to write a script in python which open a .blend file but using the blender.app which is located in the same folder with the blend file, not with the blender.app which is located in Applications. (using Macosx) So I was thinking that this should do the job...but instead it opens blender twice... import os path = os.getcwd() print(path) os.system("cd path/") os.system("open blender.app Import_mhx.blend") I also tried this one import os path = os.getcwd() print(path) os.system("cd path/") os

打造一个创客专用的UbuntuKylin版本-UMaker

岁酱吖の 提交于 2019-12-04 12:44:30
创客经常要干的事情都是从无到有,都将经历一个从创意、草图到模型、实体,然后电子电路开发、软件设计、作品集成这样一个完整的过程,才能将最初的创意实现出来,这里收集的软件包括:1、二维设计,2、三维设计与数字建模,3、3D打印控制软件,4、GIS地图与空间数据处理,5、机器人操作系统,6、开源硬件平台与软件工具集。这些工具基本能够满足准专业级别的软硬件融合的智能产品开发的需要,而且是完全免费、开源的。 最近做的一些东西,用到很多工具,有时候虚拟机出问题需要重装,消耗大量的时间。以前还有一些版本不太兼容,就放到了多个虚拟机里,但使用起来还是不方便,就产生了一个想法,把各种常用的工具放到一个操作系统的版本之中,做一个专用的操作系统版本。使用UbuntuKylin15.04,马上开干。 涉及到的软件全部为开源软件,包括二维设计、三维设计、3D打印、GIS、机器人操作系统等等。安装过程如下(工程浩大,一步步验证,遇到问题会把攻略记录下来,供大家参考): 1、二维设计 1.1、Inkscape,矢量绘图软件 这个主要做前期创意的记录和草图绘制。 # sudo add-apt-repository ppa:inkscape.dev/stable sudo apt-get install inkscape 1.2、GIMP,影像处理软件 媲美PhotoShop的开源影像处理软件。需要拍一些照片