Menu
  • HOME
  • TAGS

Blend2Java.py Shows Errors While Trying To Export

java,python,blender,vuforia

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...

Blender - Move mesh so that smallest Z point is on the Z = 0 plane

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...

Unable to import a blender scene into three.js

three.js,blender

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!...

ThreeJs and Blender (using colladaLoader): first contact

three.js,blender

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...

Php: Running a python scrip using blender from a php project using cmd commands

php,python,blender

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); ...

SceneKit + Collada + animation

objective-c,animation,blender,scenekit,collada

3DSMax + OpenCollada exporter works great.

Using Boost.Python to build a shared lib and import it in Blender through Python

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!...

Formulating the “close enough to zero” condition

python,blender

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)...

Blender BGE import nameerror

python-3.x,blender

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. ...

Building Blender on Fedora 20, OSL compilation failing due to LLVM/Clang (mismatch) issues

clang,llvm,blender

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...

Why is my three.js model missing faces after import?

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...

How can I change the texture in a Blender model loaded into three.js, after it's been loaded, with ImageUtils.loadTexture?

three.js,textures,blender

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...

overlapping of geometries in Scenekit

blender,scenekit

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....

Generate Backface of a mesh in Blender

unity3d,blender,culling

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...

How to access objects from specific layer in blender game engine

python,game-engine,blender

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)...

Blender three json export errors

json,three.js,blender

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...

What is the compression algorithm used in FBX file?

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...

How to create part of an object a separate object on Blender?

python,blender

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...

Converting NIF to OBJ in Blender 249.2 Yields Invisible Object

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...

ubuntu python 3.4 no site-packages library [duplicate]

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.

How can I get shadows in blender game engine?

blender

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

Drawing Quads in OpenGL from .obj File

c++,opengl,blender

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...

Exporting morph targets from Blender to Three.js

three.js,blender

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...

Three.js Import Blender scene including animations

animation,three.js,blender

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...

No vertices property in exported scene / mesh ( Blender to Babylon.js exporter )

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...

Imported blender model has no color in three.js scene

json,three.js,blender

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...

What is causing messed up animations between blender and Jmonkey?

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.

Can’t Load .fbx from blender to Monogame correctly

c#,blender,monogame

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...

Building XCode project for Blender using CMake on OS X 10.10

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....

Blender fbx import from ascii format

import,ascii,blender,fbx

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....

Three.js JSONLoader blender model error: property 'length' undefined

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....

Blender doesn't like FBX 6100 files

blender,fbx

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....

blender game engine as simulation tool how to include one time calculations

python,blender

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...

What is this syntax “…” in blender

python,blender

... 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...

Convert from Blender to Ogre3D

blender,ogre

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...

In blender game engine, add object actuator compared to using scene.addObject?

blender

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...

Blender Exporting OBJ - material is not exported

textures,blender,.obj

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....

faces not appear from some angles in three.js

javascript,three.js,blender

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...

Blender- How to make a 2D object 3D without bevel?

3d,apple,2d,blender

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...

Trouble loading simple mesh into OpenGL

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...

Something wrong with weighting

blender,mesh,blender-2.67

The solution is simpliest - press Normalize All button in Tools: ...

Building Blender on Fedora 20, OSL compilation failed

c++,fedora,blender

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...

Can I set the ambient property of a MeshPhongMaterial to false in a three.js imported Blender model?

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...

How can I get a sorted array of selected verts in blender python

python,blender

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...

Version control of a digital image and the file that produced it

image,git,blender

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...

Blender 3D python For Every pose bone add a constraint not working

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...

Blender Python Material search [closed]

python,list,blender,material

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 ...

Rotate Object around Pivot Point

c#,unity3d,blender,mesh

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...

Cocos3D - background shown through meshes

blender,cocos3d

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...

Why does the number of vt and v elements in a blender .obj file differ?

c++,opengl,blender

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...

How to apply texture image to my 3D model in metaio

android,3d,augmented-reality,blender,metaio

It appeared that I haven't included a MTL file in my project...

Does Blender 2.72 work with the Three.JS add-on?

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...

XML3D: Exporting animations from blender

javascript,blender,xml3d

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 3.4 with an older Python script for use in Blender, TypeErrors

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...

Workflow between blender and xcode (scenekit)

ios,blender,scenekit

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...

Three.JS Blender Is Only Exporting A Single Object

three.js,blender

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...

Three.js Blender Exports With No Materials

json,three.js,blender

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...

Cocos3D - Texture not displayed

ios,blender,cocos3d

"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"]]; ...

Is it possible to create Blender file (.blend) programmatically with Python?

python,blender,3d-model

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...

fixing sharp looking geometry objects with widthSegmentCount property

ios,geometry,blender,scenekit

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).

SCNNode static body with .dae causing issues

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...

Animated Three.js file not rendering

javascript,three.js,blender

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 ); } ...

Is three.js ObjectLoader capable of loading textures?

three.js,textures,blender

Check out the dev branch. There have been recent commits for texture support for the upcoming r71 release.

Difference between using OpenGL and 3D modelling software

java,opengl,blender

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...

Encode Mesh from text-file

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 2.7 MacOS console error

python,blender

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 with blender or opengl?

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....

geometry object's created in Blender lose details in SceneKit

import,blender,scenekit,details

I must type at least 30 characters in order to post this screenshot....

IndexError when applying setblocking(0) for a Blender3D Python script

python,sockets,tcp,blender

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...

Opening .blend files using Blender's Python API

python,blender,bpy

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...

Unexpected behavior with the IF function in Blender Game Engine

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...

How do I get coordinates from .obj-file in python?

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...

How to link .obj Files into an opengl program and use them?

c++,opengl,osx-mavericks,blender

On Windows, you can embed a file into the resources and then load them from within your software.