blender

How does Blender calculate vertex normals?

我与影子孤独终老i 提交于 2019-12-12 19:58:09
问题 I'm attempting to calculate vertex normals for various game assets. The normals I calculate are used for "inflating" the model (to draw behind the real model producing a thick outline). I currently compute the normal for each face and average all of them (several other questions on Stack Overflow suggest this approach). However, this doesn't work for sharp corners like this one (adjacent faces' normals marked in orange, the normal I'm trying to calculate is outlined in green). The object

Should I bake model in Blender before importing it into Unity?

那年仲夏 提交于 2019-12-12 13:07:40
问题 As in the title, when is it important to bake texture for the (Blender) model to use it in a mobile game and what are the benefits from baking for performance ? Is there any problem if I didn't bake it and I use the texture directly on my model in my game ? 回答1: There is baking in Unity and baking in blender. Your question seems to be about baking in blender before importing model into Unity and this answer will cover that. how to benefit from baking for performance ? Baking model in blender

How to properly load a Json File in Threejs

删除回忆录丶 提交于 2019-12-12 04:37:44
问题 I have done a couple of projects on Blender and decided to display one of them using threejs, however the object doesn't display. What would be the proper way to load a JSON file with keyframe animation? Here is the specific JSON file that I want to load and the extract of the code that I'm using: var mesh; function initMesh() { var loader = new THREE.JSONLoader(); loader.load('./ocean.json', function(geometry, materials) { mesh = new THREE.Mesh(geometry, new THREE.MeshFaceMaterial(materials)

(Blender) (Python)How can I animate the factor value in the mix node with Python code?

纵然是瞬间 提交于 2019-12-12 02:56:32
问题 What I want is a way to handle the 'factor' value in the mixRGB node like a normal object, like for example a cube, so with fcurves, fmodifiers and so on. All this via Python code made in the Text Editor 回答1: The first step is to find the mix node you want. Within a material you can access each node by name, while the first mixRGB node is named 'Mix', following mix nodes will have a numerical extension added to the name. The name may also be changed manually by the user (or python script). By

Texture from Blender doesn't appear in Unity 3D

大憨熊 提交于 2019-12-12 02:49:55
问题 I've searched endlessly for an answer to this question. However, I have created a model in Blender and export it as a .FBX directly into Unity. But the textures I have applied in Blender do not render in Unity (Even in the preview screen). I have UV Unwrapped the model, and created a custom texture pattern to suit. I've inserted the textures into Unity, however this just loads them how Unity feels, not how I'd like it to look. I've attempted to add it as a .blend file, but Blender crashes,

Loading HDRi maps in Cocos3D

不问归期 提交于 2019-12-12 02:42:11
问题 I want to load an HDRi map (similar to Google Maps) in an iPhone application, and then I want to be able to load some 3D characters to play around in the scene. You can see here an example of what I would like to load: http://www.hdri-hub.com/hdrishop/freesamples/freehdri/item/117-hdr-041-path-free Currently I'm using Cocos3D for loading 3D models from Blender through POD export files, so maybe there is a way to load HDRi in Cocos3D. I found out this class CC3STBImage which can be used to

OBJ File Different Formats

你。 提交于 2019-12-12 01:44:47
问题 I am working on my own java 3D Game Engine, everything is working perfectly fine BUT i allways get a mistake. I've found the error, but I've absolutely no idea how to solve this. I haved used Blender for creating my OBJ Files. Here is an excample for one obj file. v 0.500000 -0.500000 -0.500000 vt 0.748573 0.750412 vn -1.000000 -0.000000 -0.000000 f 5/1/1 4/3/1 8/4/1 These are the most relevant informations i need for drawing my objects on the screen. But now, when i create my OBJ Files, my

How do I open .mhd file corresponding to a .raw file in Blender 3D tool?

戏子无情 提交于 2019-12-11 23:18:10
问题 How do I open 3D medical images in .mhd format linked to .raw files in Blender 3D tool. I have already installed the .raw add-on but it is not helping. 回答1: You could use SimpleITK in Python to load in the data, convert to a Numpy array, then use a python script to extract the 3D array, and export that to a Blender-digestible format. Take a look at this question/answer for how to convert the volume into an isosurface, then export that surface into Blender. 来源: https://stackoverflow.com

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

别等时光非礼了梦想. 提交于 2019-12-11 21:06:24
问题 I need to run in cmd a python script for blender from blender and print the result from a php project, but I don't get the all result. Here is my code: $script = "C:\Users\madalina\Desktop\workspace\script.py"; $blander_path = "C:\Program Files\Blender Foundation\Blender"; $output = shell_exec("cd $blander_path && blender -b -P script.py -- $json"); print_r($output); and here is what I receive: found bundled python: C:\Program Files\Blender Foundation\Blender\2.69\python Blender quit And here

Error in OBJFileLoader

ぐ巨炮叔叔 提交于 2019-12-11 17:32:03
问题 There's error in OBJFILELOADER.py file from the link - https://www.pygame.org/wiki/OBJFileLoader . I think there's python2 to python3 version error, however I tried changing the raise ValueError thing and used obj as obj=(filename) But still there's lots of errors. I took the .obj file from blender, I don't think that's the issue. Can anyone tell me the exact objfileloader for Python3 Error - Traceback (most recent call last): File "/home/warted/anaconda3/lib/python3.6/site-packages/OpenGL