That is one of the syntax changes between python2 and python3. python 2.x you would use print "some text" in python 3.x you use print("some text") What this means is the script is written for blender versions older than 2.50. Since 2.50 blender has used python3. The last update for...
python,translation,scale,blender,mesh
The first thing you should know is that the vertex positions are in object space - as in distance from the objects origin. You need to use the objects matrix_world to translate that into world space. If you only want the lowest z location to be equal to zero then...
I have inspected the code step by step and it seems that the Blender plugin is outdated, the expected data structure at many points for the current version of three.js loaders is quite different then tue data structure returned by the plugin. EDIT: It's already working in the dev branch!...
So, the first step is to learn how to create a scene in threeJs and learn some feature with Blender. When you are ready, create your first model and before exporting keep this in mind: you need to an object with vertices, so if you just create a text with...
I resolve the problem. I changed the system_exec command with exec, put the json object in quotes. this is my code now: $json = str_replace("\"", "\\\"", json_encode($jsonArray)); $script = "C:\Users\madalina\Desktop\workspace\script.py"; $blander_path = "C:\Program Files\Blender Foundation\Blender"; $output = exec("cd $blander_path && blender -b -P $script -- \"$json\"", $data); print_r($data); ...
objective-c,animation,blender,scenekit,collada
3DSMax + OpenCollada exporter works great.
python,c++,blender,python-3.4,boost-python
After a lot of trial and error I got it working! I'll try to give a step by step tutorial on how to do that for OSX. In the next couple of weeks I'll also try to get it working on windows and will update this answer as I succeed!...
Like Ami wrote in the comments, it depends on what you're doing. The system epsilon is good for single operation errors, but when you use already rounded values in further calculations, the errors can get much larger than the system epsilon. Take this extreme example: import sys print('%.20f\n' % sys.float_info.epsilon)...
The bge module is for the Blender Game Engine, it is only available while the game engine is running, it cannot be accessed from blender's python console. To run python code in the game engine you connect a python controller to your sensor and start the game engine. ...
UPDATE: The here described error in the dependency installer script has been fixed meanwhile (https://developer.blender.org/rBf3f991c80fa92ccb7a831b8e8449ff5f21065a9d) :) Ok so I tried to remove the globally installed llvm and clang packages on my system and ran the installer again, leading to a failure due to unavailability of any clang, which caught my...
three.js,blender,normals,uv-mapping
It seems that OBJMTLLoader can handle only triangles and quadrangles, but obj files can describe faces with any number of vertices, but the faces should be convex. If you check your model with http://3dviewer.net, you can see that every face exists, but there are some issues with non-convex faces. So...
The code wasn't working because there were no texture maps for the model I was importing. What I did was go back to Blender and create a model with two textures that could each be applied to the whole model. The exported JSON file then had the model geometry and...
I'm a little confused because you are referring to a hole while it seems that your cube does not have any hole and your are adding a plane on top of it. What you are seeing is called depth fighting and it's because both objects have the same z-value, yes....
The solidify modifier will generate a second surface parallel to the original. If you want the new surface as a separate object, you can disable 'Fill Rim', then when you apply the modifier the mesh will be two disconnected parts. In edit mode Press L to select linked vertices which...
If you wish to directly access an object you could make a list and access it: import bge from random import random def main(): cont = bge.logic.getCurrentController() own = cont.owner scene = bge.logic.getCurrentScene() #Your list objlist = [obj for obj in scene.objects] entity = objlist[obj] add = scene.addObject(obj,loc,0) add(entity,' location',0)...
You haven't added your code here but I think your problem is that when you don't export the material from blender, you have to make your own material; then assign it in JSON loader. If you try to get the material from the JSON file it obviously is nonexistent. I...
import,zip,compression,blender,fbx
That data is a zlib stream and can be decompressed with zlib. The decompressed result is shown here in hex: 00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00...
While in edit mode press P and choose Selection. This is also available in the Mesh menu under Vertices->Separate. You may also want to use CtrlD to duplicate the selection before separating if you don't want to remove the part from the current mesh. Also Blender has it's own site...
javascript,three.js,blender,blender-2.49
In the .mtl file the value for d is 0 for all three materials. From the source code that parses the .mtl file: // According to MTL format (http://paulbourke.net/dataformats/mtl/): // d is dissolve for current material // factor of 1.0 is fully opaque, a factor of 0 is fully dissolved...
python,ubuntu,python-3.x,module,blender
Those instructions are quite clear about what to do: run make install. Copying the packages manually is only if you know exactly what you're doing.
In the Viewport press N and in the rendering options switch from multitexture to GLSL and then switch to Texture mode, You don't have to tweak the settings. you can try this by creating a new blend file. Hope this helps
There are a number of issues in this code. I won't go into a lot of detail on most of these, but wanted to at least point out the main issues. OBJ parsing The main part of what you're doing is probably fine as long as you generate the OBJ...
Just to close this topic: After some trial and error, we ended up using one keyframe in Blender for each morph target (shape key) we wanted to export. The influence of the morph target was 1 (maximum) on that frame. So for 3 morph targets we had 4 frames (3...
I got a test object that was created and animated in the center of the scene in blender. When importing this into Three.js the position seems to shift a bit (somewhere between -1.5 and 1.5 units on every axis for me), but that can be fixed manually in Three. This...
javascript,3d,blender,babylonjs
Ok I found the solution ( used Blender ver: 2.70 ): Instead of vertices property you have to use positions property, AND uvCount is not available in mesh ( I found that value 3 is making mesh showing properly ). It's probably issue with this Blender version ( I have...
You were using using 'mat' when you called material. Here's what it should be: var loader = new THREE.JSONLoader(); loader.load("models/pine.json", function ( geometry, materials ) { var material = new THREE.MeshFaceMaterial( materials ); mesh = new THREE.Mesh( geometry, material ); scene.add(mesh); }); PS: Your model is really dark. Compared to...
animation,blender,jmonkeyengine
The answer was i was not properly applying the location rotation and scale to the model. After i did that everything worked great.
Ok, I finally realized what the problem was... my drawing code was incorrect. I tried https://msdn.microsoft.com/en-us/library/bb197293(v=xnagamestudio.31).aspx code from msdn website and it all worked out. I am stupid. Also, downloading https://msxna.codeplex.com/releases/view/117230 and installing all the files in the correct order (following the instructions .txt) fixed the monogame content project error...
xcode5,blender,xcode6,osx-yosemite
The problem you are seeing running Blender seems to be because of new iCloud stuff... there is a fix checked in if you wana try https://developer.blender.org/rB86f42ee33137897ec08ddde0fdcd2d1087ea78dc I'm having the same issue, haven't tried building Blender yet with this fix but it should work....
For some reason Blender import doesn't support FBX models that are serialized to text. As a workaround the model can be changed to binary FBX model and imported to Blender. At least I am able to use Autodesk FBX 2013.3 Converter even I don't have any other Autodesk software installed....
json,3d,three.js,undefined,blender
In my experience so far with the exporter, you have to be very careful which boxes you tick! This length error is usually because you are either not exporting the vertexes, or exporting the scene rather the object....
Try the Autodesk FBX Converter. Unfortunately it is no longer maintained, but it can converts many file formats, up to FBX 2013 format. Alternatively, if you know a bit of C++ you can write a simple command-line file converter using the FBX SDK....
There are two ways to run python code in the game engine, as a script or as a module. A script gets run from start to end while a module is a collection of functions that are called specifically. Modules can also keep global variables that can be accessed from...
... is a literal syntax for the Python Elipsis object: >>> ... Ellipsis It is mostly used by NumPy; see What does the Python Ellipsis object do? The code you found uses it as a sentinel; a way to detect that a no other value was specified for the clss...
It depends a bit on what you want to achieve. Currently you have created a scene in blender containing multiple parts that together result in your BlackHawk helicopter. If you just need a single object in Ogre, you can combine the elements inside Blender into one object, export that and...
i can't give you an answer for the threading question. But if you want to know more: Usually it can be a (little) performance difference. But it is casedependent. If you want to spawn an item by pressing a key it is better to do it with bricks, because they...
Cycles uses a node based material system that is not compatible with most export options. To have a material that can be exported use the blender internal material and texture settings....
Your faces are probably facing (hehe) the wrong way. Try inverting these faces in blender and then export again. Or try making a double sided material that draws the material inside and outside, but the first option is more efficient. See this tutorial...
To make a circle a sphere or a rectangle a cylinder, I'd use the spin feature. See: http://wiki.blender.org/index.php/Doc:2.6/Manual/Modeling/Meshes/Editing/Duplicating/Spin Note, Apple's logo doesn't lend itself that well to a spin operation though. If I were trying this, I would probably take the left half of the logo and spin that to...
c++,visual-studio-2010,opengl,blender,.obj
The program crashes at line 149 of objloader.cpp (says the callstack) This line is about UV coordinates. You model doesn't have any, which should ring a bell =) You will have the same problem with normals, btw. So, you have 2 options : Make the object have UVs and normals...
The solution is simpliest - press Normalize All button in Tools: ...
You'll need more information. The install_deps.sh script will download and compile each library for you, you should be able to find the OSL source files, and manually try building it. As it is a linking error chances are a library (or required version) is missing, or not where it is...
three.js,blender,phong,ambient
In practice, the ambient reflectance of the material should usually match the material color, also known as the diffuse reflectance. Doing so will likely make your model look better. For example, you can do this material.ambient.copy( material.color ); or material.ambient.set( 0xff0000 ); three.js r.67...
I worked it out, based on the fact that each vert in the loop is joined to the next by an edge, so starting from any vert I just search the selected edges for the first that has that vertex at one end, make a note of the next vert...
While git keeps the information of all versions around, it doesn't keep all versions in the working tree simultantously. And its interface is meant to show differences between revisions. The problem is that unlike text files, there is no good and common definition about what a "diff" between two images...
python-2.7,blender,blender-2.61,blender-2.67
bpy.ops.pose.constraint_add() is an operator that only effects the active item, in this case a pose bone. While you are looping through the bones in the selection you aren't using the reference to each bone as you loop through. Instead of using an operator you can manually create the constraints on...
That first line needs to be changed to for i in range(len(bpy.data.materials)):. Alternatively, you could write the following instead: for mat in bpy.data.materials: if str(color) == mat.name: mesh.materials.append(mat) break ...
I think its not your points that are rotated, but that the axis does not line up. Try swapping the axis like this: foreach (Vector3 v in vertices) { Vector3 p = lp - v; Gizmos.color = Color.yellow; Gizmos.DrawCube(new Vector3(p.x, p.z, p.y), new Vector3(0.02f, 0.02f, 0.02f)); } Note: I swapped...
This issue is caused by the order in which the nodes are being rendered in your scene. In the first model, the hair is drawn first, then the skin, then the eyebrows and eyelashes. In the second model, the hair, eyebrows and eyelashes are all drawn before the skin. By...
Because OBJ and OpenGL use a different definition of "vertex", and handle indices differently. In the following explanation, I'll call the coordinates of a vertex, which are the values in the v records of the OBJ format, "positions". OBJ The main characteristic of the OBJ vertex/index model is that it...
android,3d,augmented-reality,blender,metaio
It appeared that I haven't included a MTL file in my project...
windows-7,three.js,export,blender
It seems like the folder to put addons in might have moved. I'm on a Mac, but had a problem getting the Three.js exporter to work with Blender 2.72 as well. It turns out that after moving the io_mesh_threejs directory into /Applications/blender.app/Content/Resources/2.72/scripts/addons/, it worked. I'm not sure what the Windows...
I guess you are referring to this exporter: https://github.com/ksons/xml3d-blender-exporter/ This exporter supports armatures in many but probably not all ways supported by Blender. Here is a very coarse mapping from blender objects to XML3D elements: https://github.com/ksons/xml3d-blender-exporter/wiki/Mappings...
python,string,typeerror,blender
Bytes-only operations like self._send(c1.raw) needs to be encoded correctly. Use either self._send(bytes(c1.raw, "utf-8")) or self._send(c1.raw.encode("utf-8")) However, since your classes like FinsTCPframe is actually operating bytes stream instead of unicode literals, I'd suggest to just stick to bytes (append b in front of any affected string constants, like b'' instead...
SceneKit supports materials exported in DAE from Blender. It doesn't support every possible shading option that Blender has, but unless you're doing exotic stuff it should cover most of what you're looking for. At run time there's no difference between materials loaded from DAE and those created programmatically. What you...
Be careful grouping objects under a Null (empty) in Blender. I tried this awhile ago with my light setups as its normally a logical work flow but found that there were transformation issues when the scene was constructed in three. When I export in three.js, only the last selected object...
Can't recreate this. The pastebin is only a partial JSON and not too useful in this context. The exporter creates a log in your $TMPDIR. A shell window prints the log path Log: /var/folders/0s/d7365qbn5gv76sj266_9qqs00000gn/T/io_three.export.log That is a bit more informative and without the actual scene the log is possibly the...
"Without The" helped me resolved this issue by first remove the texture then added back in using the following code: CC3MeshNode * jeans = [rezNode getMeshNodeNamed:@"Bison:jeans01"]; [jeans.material removeAllTextures]; [jeans.material addTexture:[CC3Texture textureFromFile:@"jeans_basic_diffuse.png"]]; ...
You can start a new Blender process from any application (a C++, Python app or even command line) and tell the new process to run a script file (written in Python). This script will generate your geometry and then can save the new scene to a blend file. To start...
This has nothing to do with the quality of your mesh. You are just seeing individual pixels without smoothing. SCNView exposes the antialiasingMode property that will help you get smoother edges (try .Multisampling2X or .Multisampling4X).
ios,objective-c,blender,scenekit
If you don't specify additional options when creating a physics body for a node, what you get is a convex hull encompassing that node's geometry. Because your landscape is a static body, you can make it use a concave shape that more closely approximates the geometry. (Note that this works...
I figured out my problem. I was animating and rendering incorrectly. Solution from threejs.org/examples/webgl_skinning_simple.html: function animate() { requestAnimationFrame( animate ); THREE.AnimationHandler.update( clock.getDelta() ); controls.update(); render(); stats.update(); } function render() { renderer.render( scene, camera ); } ...
Check out the dev branch. There have been recent commits for texture support for the upcoming r71 release.
OpenGL provides an API which allows you to interact directly with your graphics card. Software like Blender and Maya add layers of abstraction on top of this, making them easier and more intuitive to use. The approaches are also different: whereas using OpenGL involves writing function calls in order to...
python,text,multidimensional-array,blender,mesh
If your sample data matches your file then the basic logic of your loops are out. The logic of your loops depends on all face data being on one line. with open(filepath, 'r') as file: for line in file: # the following is done for each line if not line.startswith('<p>'):...
Blender has various resources it needs to run that are located in the same folder as the binary, it starts with the current working directory to find them when you start blender. In the terminal you are typing commands, there is a sequence (defined in the PATH variable) to where...
opencv,opengl,blender,stereo-3d,3d-reconstruction
Its possible to do in Blender, but for your simple purpose Opengl should be enough. To get started with Modern Opengl check this list of contents: link In opengl, before drawing anything you must "send" data (vertices) to your GPU. One part of this process is called Vertex Buffer Object....
import,blender,scenekit,details
I must type at least 30 characters in order to post this screenshot....
Your message is not long enough (sequence is shorter than 17). You should test length of frame, or use zip and slice to be sure, you don't try to call index that does not exist: tags = (b'ICF', b'RSV', b'GCT', b'DNA', b'DA1', b'DA2', b'SNA', b'SA1', b'SA2', b'SID', b'MRC', b'SRC') for...
The issue with your operator call is that it doesn't accept positional arguments, you need to name each argument - bpy.ops.wm.open_mainfile(filepath="file_path") Blender only allows one open file at a time, when you open another blend file the existing data is flushed out of ram, this normally includes the script you...
python,if-statement,game-engine,blender
The reason for the problems are rounding-errors with floating-points. Unfortunately, for floating-points addition and multiplication introduce small errors that can lead to problems with comparisons. Instead, you should use "clamping", which means you prevent over/undershooting by comparing with a threshold, and then setting the value to the threshold itself: acceleration...
python,matplotlib,blender,.obj
First create a list to store all your vertices. Each element of that list will itself be a list containing the x, y, and z coordinates as floating-point numbers. Then read the .obj file line by line, splitting each line into a list. If the first element of that list...
c++,opengl,osx-mavericks,blender
On Windows, you can embed a file into the resources and then load them from within your software.