blender

Frequency Analysis in Python

主宰稳场 提交于 2019-12-18 11:59:06
问题 I'm trying to use Python to retrieve the dominant frequencies of a live audio input. For the moment I am experimenting using the audio stream my Laptop's built in microphone, but when testing the following code, I am getting very poor results. # Read from Mic Input and find the freq's import pyaudio import numpy as np import bge import wave chunk = 2048 # use a Blackman window window = np.blackman(chunk) # open stream FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 1920 p = pyaudio.PyAudio()

Blender学习笔记01

倖福魔咒の 提交于 2019-12-15 11:11:13
本人B站账户@觥筹交错几分,学习于@只剩一瓶辣椒酱,想做一个建模宝典也是起源于他的教程,但是辣酱繁忙有段时间没有更新blender建模宝典,所以我想暂以我拙略的水平也总结一下这些原理,也算是自己的学习笔记,也希望能给看官一点帮助,如有错误请指出。另:主要原理总结于c4d建模宝典,青之巅翻译组翻译的真的很棒。 1,为什么建模都要求四边形: 用辣酱的话来说,就是为了确定多边形的走向。四边形在这方面是最有优势的,当你选中一条边后,排除这条边的邻边,剩下的对边就是模型中多边形的走向。如果是三角形或者n-gons(大于四条边的多边形),它们是很难确定多边形走向的,反映在软件中,就比如blender你进行环切(hotkey:ctrl + R),正常的四边面blender可以识别环切(黄色)应该往哪里延申: 上图是正常四边面的环切,但当出现多边面(值非四边面)时,blender就不能判断环切该往哪里继续了,如下图,利用切刀(hotkey:k)创造出一个五边面后再次环切出现的情况 可以看出,环切终止了。正是因为对于多边面或是三角面建模软件都不能更好的找到延伸方向,所以四边面才是最好的选择。下图是3dsmax,c4d寻找循环边的演示,第一张是c4d正常四边形寻找循环面,第二张是c4d出现三角形时的情况,第三张是3dsmax寻找循环边的对比: 可以看出,c4d当不确定多边形走向时,会随便延伸

What is the best way to render blender model in Android?

拈花ヽ惹草 提交于 2019-12-13 16:34:44
问题 I know there is way to parse Blender model by exporting it as OBJ (WaveFront) file and then parsing its (plaintext) contents, but this is silly when you're dealing with huge models. It just doesn't make sense to parse the file every time the application loads when the file itself is 5MB heavy (the obj file). I came to an idea to parse it once and record all those coordinates into arrays and then just use them to draw the model, but not sure if this is the right way. What is the recommended

How to mark last imported *obj in blender

坚强是说给别人听的谎言 提交于 2019-12-13 14:23:25
问题 The (probably not so well written) question is: Is there any way to get object data right after it is loaded through bpy.import_scene.obj function? I mean when i import an obj file with this function i need to make some more transformation for it. When i select an object via name 'Mesh' (default name of object after import) all those functions works for other objects named 'Mesh' in my scene. I tried to get an last object from objects list in scene but they're arranged alphabeticaly, so it

How to align a face to a position in world space?

耗尽温柔 提交于 2019-12-13 06:19:34
问题 I have a mathematical problem. Let's say I have a face (with 3 or 4 vertices) at some world position. I want to translate/rotate the mesh so that the face is "facing" up and is centered (0,y,0). What is the formula(s) needed to pull this off? I can do this with a gui (this example was simply an x rotation of appx -90 degrees), however I need to do this via a script so I need to know how this can be done mathematically. EDIT: I should also note that these vectors are part of a mesh which I'm

Three.JS plugin for Blender not working

末鹿安然 提交于 2019-12-13 06:12:28
问题 I cannot install the Three.js plugin for Blender. I have a Fedora with Blender 2.69, I created the directory io_mesh_threejs in /usr/share/Blender ... /addon and copied the 3 .py files into but the plugin doesn't appear in the user preference. I also tried with a downloaded 2.65 version of Blender with no success. I did it for another library (Babylon.js) and it worked fine so I guess it comes from the python files ? 回答1: Here is what I did to get it to work with Win 7 - may work for you also

three.js - how do I get the vertices of an object?

Deadly 提交于 2019-12-13 04:43:59
问题 I am trying to import a model from blender and loop through all vertices. I am using the colladaloader for the import. It all works fine and the model is loading. But I do not want the faces of the model - I only need the vertex positions for my purposes. Can anyone tell me if there is a way to do this? e.g. a loop that loops through all vertices of the imported model? Thanks, Tomo 回答1: If geo represents your geometry: for (var i = 0; i < geo.vertices.length; i++) { var v = geo.vertices[i]; /

Scene rendering strangely in babylonjs

久未见 提交于 2019-12-13 04:28:09
问题 So, I've loaded my scene I made in Blender into Babylonjs, and it's producing some interesting effects. Basically, I am trying to apply gravity and such to the scene, move the player to it's proper location, and make the entire scene lit and visible, but none of that is working. This is the script: var BABYLON; var canvas = document.getElementById('gamecanvas'); var engine = new BABYLON.Engine(canvas, true); var player_height = 2; var player_speed = 1; var player_inertia = 0.9; function INIT

Error involved in displaying images on a shape using Three.js

岁酱吖の 提交于 2019-12-13 02:23:31
问题 I am trying to display images on each face of the polyhedron using three.js r71. I am making the geometry by loading a JSON file which holds the data that defines the shape. I set a plane below the polyhedron as well. I get an error and I'm wondering what this means or what I am doing wrong. Here is the error message I get in the JavaScript console: [.WebGLRenderingContext-0888D200]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 1 WebGL:

Positioning children objects in scene (car <-> wheels hierarchy)

一世执手 提交于 2019-12-12 21:26:23
问题 I need to add car model to scene with wheels as separated objects to allow their easy rotation and possible replacement. The question is wheels positioning - they need to be on exact places in relation to car body. How it can be done in proper way? In WebGL demos and TriggerRally there are existing wheel positions - they were predefined for 3D scene - but how? Can these positions be somehow mapped to Blender model coordinates? I've tried to separate one wheel from body, set pivot point to its