text:
Packaging external libraries in the game engine 'Create Runtime'
I'm wondering if I create a game using the game engine that relies on external libraries, for instance midi device libraries like pyGame.midi, if those can be bundled in the executable created by the game engine?  I want to generate midi to external devices from the game engine, but I want to be able to use python modules that use ctypes etc to connect to native dll's/.so's.
What are the rules for packing external resources into the game engine?
Does anyone have an example where this is being done?
I have seen a lot of posts describing using socketed IO to communicate with externally packaged apps, but I would like to be able to bundle everything for an architecture into one executable.
Or just not possible?

The limitations of the Make Runtime Function is that it can only work on the Blend file that's currently open. If your game has external assets (unpacked textures, unpacked sound, other blender file as libs, external Python modules), these will not be packaged automatically.
But it's definitely possible to make a stand-alone package with all the Python modules. It's just a matter of knowing where everything goes.
Python Module Basics

Understand where Python looks for modules (hint: local modules override system modules)
Because the current path of the Blend file is always the first place Blender will look for Python modules, you can just place any module right next to the Blend file. Alternatively, I'd like to keep all my non-standard modules in one folder. So if you have a myModule, I would place it in a directory called externs.
You can access modules you've placed under externs by import externs.myModule

Packaging
For packaging a runtime to include all the external libraries, you just need to keep everything in place relative to the Blend file, since the blend file is always going to be your starting point. This applies to Python scripts/modules as well as unpacked asset such as textures and sound.
Pure Python modules are easier to deal with because you don't have to worry about them not working on different OSes. For dynamically linked libs (dlls/so's), just make sure you have a working version for each of the platform you are releasing for.
Folder Structure
Unfortunately, the structure of a packed runtime is slightly different for each OS. So you'd have to know where the Blend file is in order to copy the py modules to the right place.
On the mac, a runtime is pretty much the original blenderplayer.app with a game.blend file stored under the blenderplayer.app/Content/MacOS/Resources/ directory. So typically all your external asset that's not packed by make runtime need to go in the myGame.app/Content/MacOS/Resources/ folder.
On Windows, a single .exe is created that contains the blend file. So, any external asset go relative to the .exe file.
I believe Linux is the similar to Windows, external asset go relative to the binary blob.
Hope that helps!

So you are saying that if I need to use a shared library, put it in the same directory as the compiled runtime?

For Windows and (I think) Linux, Yes. For Mac, put it under .app/Contents/MacOS/Resources


text:
Do "make install" on different Linux sytem than the one used for "make bpy"
I have successfully built Blender-2.80-Beta as bpy (as in make bpy) for linux in Ubuntu 18. Also when i do make install on the same system i can sucessfully use import bpy.
However i don't know what the best approach would be to install the bpy-build to another different linux system. For me it is not really an option to also do the "make bpy" on that other system, since that system has very limited resources (400MB of free hard disk space)
Some approaches i can think of:

Is there maybe a (automatic/manual) way to do make install with
changed directories for python3.7, ... etc. ?
Or is there a reasonable manual way to install? (The library is only bpy.so and the 2.80 Folder right?)
Or can i maybe build to a virtual environment, install there and then
copy the whole environment to the other linux system for it to work there?

I have tried copying bpy.so and the 2.80 folder to the other-systems site-packages but while it reads printTest.py it cannot use import bpy as seen in the picture:

Thank you for any help!! :)

I would think as long as it's for the same architecture it should work (in theory). You'd need separate builds for x86 and x86-64/amd64 as far as I'm aware.

Have you tried copying the lib and folder to other machine's python (of the same version) site packages?

@batFINGER i added a picture to the question of what happened when i tried doing that.

Blender uses the libraries that are installed as dependencies when setting up a  build. Make sure these libraries are also on other system.  eg https://packages.ubuntu.com/bionic/libjemalloc-dev    Could use the option to build with static libraries. btw Not sure where it's at, re questions about building blender as being off-topic.

This is not really an answer, not my knowledge either.
Wanted to add this as a comment, but I don't have enough reputation to do so.
I asked Campbell Barton several years ago about how to build blender so I could share my builds with people that used a different distro than I did, and this is what he replied:

There are a few issues here, First is with general libraries - if the
users doesnt have those exact libraries, blender wont start. To find
the libraries blender depends on do...
objdump -x blender.bin | grep NEEDED
You can do this too, it will show all indirect dependencies too.
ldd blender.bin
There are 2 ways to go about this,
*) statically link all libraries
*) include the libraries and use LD_PRELOAD_PATH to ensure they get found, this requires a wrapper script. to set the environment
variable.
Statically linking libs is best if you can, but for that you will need
".a" files, so not libpython3.2.so --> libpython3.2.a
however not all libraries come with static versions by default... it
can be a hassle to get them all.
There are docs on static linking libs, you can check online for more
info.
Also be sure to static link libgcc_s.so.1 and libstdc++, gcc has some
options for this.
once you have this sorted out the main remaining problem is linking
against libc, since you cant run blender on and older linux distro if
you linked with a newer glibc (normally called libc.so.6).
To workaround this you need to link against an older glibc, This can
be done by setting up a chroot environment that uses an older libc. or
simply by using a VM with an older linux distro installed, both are a
hassle :S.
Try google: linux link against older glibc
It comes up with some useful links.
Note that for our official linux builds we have a chroot with some
older libs installed so blender loads on older linux installs too.

Hope that helps!

You want to use ldd bpy.so not blender.bin. The target machine needs all dependencies to be installed. Turn off features you don't need to reduce the overhead. eg. turn off OSL, openvdb, collada, alembic.

Thank you rijnswand and @sambler! :)  I have spent quite some time trying to get it to work, but i'm somehow stuck at properly statically linking a library. Could you maybe provide a small example of how or where i would statically link a library? Do i need to add some code to some of the Cmake files? And if so in what file do i need to do the changes for that (i.e There is no CMakeLists.txt in my build_linux_bpy folder, so should i maybe change the link.txt file)? Or does it only have to do with the CMake variables (where the paths are set etc.)?

@RobertRoth At the top of the blender source tree you will find the main CMakeLists.txt. From the build dir you can run ccmake <path/to/source> or cmake-gui to adjust the available options, press T to see all available. You will find WITH_STATIC_LIBS as well as WITH_OPENMP_STATIC and if you are enabling OSL LLVM_STATIC.

@sambler When i set those settings with ccmake and do make, ldd bpy.so will still show some shared libraries such as libjemalloc.so ... Do i need to add those with some add_library lines in the CMakeLists.txt (the one in the blender source folder as you mentioned)? Or how could i otherwise substitute those remaining shared libs with static libs?

@RobertRoth I wouldn't say to expect 100% static build, just reduce them as much as possible. The linux builds available for download have a lib folder with libgl in them, try copying any remaining libs into this folder before copying across to the other machine.

@sambler i really appreciate your help! Where should this lib folder be located (For me the only libgl i can find is the libgl.so in the usr/lib/x86_64-linux-gnu folder... )? Should i maybe copy all of the libraries (including libgl.so) into the blender-git/build_linux_bpy/lib folder? And which folders and files should i then copy to the other machine? Or do you mean that i copy the libraries to the other machines usr/lib/x86_64-linux-gnu folder?

@RobertRoth the linux downloads available from blender.org unzip to have a lib folder with the blender binary, that would be lib inside the build dir. Try copying libs into there before copying it over to the other machine. Failing that you could make a list of what needs to be installed, I'd properly install a few packages before copying libs into standard system lib folders.

To understand this, you have to get a bit into the Unix (and thus Linux) Library loading system.
The object file is dynamically linked, which you can see by running file bpy.so. Dynamically linked objects require other libraries at runtime. You can see the required libraries by running ldd bpy.so.
There area also statically linked libraries, called "archives", they typically end in .a (Note that the ending is never causing the type, rather than the bytecode itself). On my system, there's the file /usr/lib/libtkstub8.6.a and running file on it yields: libtkstub8.6.a: current ar archive. No word about dynamic. And you can double-check with ldd libtkstub8.6.a: not a dynamic executable. That means this file does not require other libraries at runtime. They are considered portable.
To get the compiled binary working on another system, you have following options:

You stay with the dynamic library and try to replicate the system environment by copying all libraries ldd specifies at the exact same location on the target system. (You also have to copy the dependencies of those libraries, etc...)
You create a static library, which you can place wherever you like. It will be larger (since it has all the necessary functions in the file itself), but completely portable. Check out this guide (scroll to "Static Linking")

I'm very grateful for your answer :) and i have spent quite some time trying to get it to work, but i'm somehow stuck at properly statically linking a library. Could you maybe provide a small example of how or where i would statically link a library? Do i need to add some code to some of the Cmake files? And if so in what file do i need to do the changes for that (i.e There is no CMakeLists.txt in my build_linux_bpy folder, so should i maybe change the link.txt file)? Or does it only have to do with the CMake variables (where the paths are set etc.)?

Sorry for late response, was offline a few weeks...
I do have no experience with cmake at all, but I'll try to get a build working. Gonna respond again, if I got one.

@RobertRoth Where are you stuck? I get pretty good-looking results...

What were you trying? How would you for example statically link the libjemalloc library? For example if i try to just edit the path in ccmake to the static library version i will get a ... need to recompile with -fPIC error... (I tried modifying the install-deps.sh to add -fPIC to cflags and cppflags but it wouldn't solve that problem). Maybe my approach is wrong?

I solved my problem by setting LD_LIBRARY_PATH on the other filesystem and using the libjemalloc library as shared library. It works now! Thank you for all your help!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How to apply clothes to an armature
I have a modeled person that has an armature and I created a T-Shirt for it in rest position now I need to figure out how to put the shirt on the model in pose mode.

I followed Den Den's instructions and get this:

Sometimes I think for tight fits it's easiest to use your body mesh, dupe it, scale it up ever so slightly, make a couple of loop cuts where sleeves collar etc go and delete  the rest. ( Or just select on mesh and extrude slightly.)  Then your weights and armature modifier are already set up.

See that's what did to create my shirt but none of the armature modifiers seem to effect the shirt

As well as the armature modifier the shirt shoujld also be a child of the rig, just like the body.  And is it green because it's part of a group or is there physics involved?

Select armature and enter pose mode;
Select bones that are close to your cloth - in your case chest, neck, collarbone, etc. No legs and such;
Press Ctrl + i, then H;
Select character mesh;
Select cloth;
Enter weight paint mode;
Push Transfer Weights and use options as below:

In blender 2.8+, the "transfer weights" option is in weight paint/weights (top left of screen)/transfer weights

I followed and ended up with an extremely warped t shirt.

I ended up just putting the armature into pose position and readjusting the vertices to make the shirt fit onto the model.

You can do this:
Create one more mesh enveloping your character and T-Shirt. (or T-Shirt only)
Next, you Transfer Weights to this mesh
Then, with MeshDeform modifier, you bind the body of the character and the T-Shirt (or T-Shirt only)

Would be good if you could add further explanation of how the user should use the 'Transfer Weights' and the 'MeshDeform' modifier.

Delete all the existing vertex groups/armature mods from the shirt and put the character in it's default pose position. Apply the Mirror Modifier if present. Then follow these steps:

Select the shirt in object mode.
In the Modifiers panel, select "Add Modifier", select "Data Transfer".
In the Data Transfer panel, choose your character and the Source Object, check the "Vertex Data" box, then click the "Vertex Group" button, and then click the "Generate Data Layers" button at the bottom. I usually move this modifier to the top of the stack and once I'm satisfied it works, I'll apply it.
Add an Armature modifier to the shirt and select the character's armature in the panel. I usually like to move the Armature mod all the way to the top of the stack and any sub-d mods to the very bottom for best performance.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Array not looking smooth in render along a path
I have an array modifier attached to a curve with a curve modifier. I want to make the crease in between each cube smooth but it's not working. I've applied the array modifier and smoothed the faces, verts, and edges and that didn't do anything. I've also applied a subsurf modifier with smoothing on which also didn't work. There is are 650 arrayed cubes scaled down on the z to make it as smooth as possible. The curve also has hundreds of vertices so that's very smooth too. I've searched everywhere for a solution and couldn't manage to find one. Any suggestions?
Edit: I just scaled the arrayed object down on the z axis making it really small then making the array count 5000 and the creases stayed the same. So the path needs more verts. I don't want to increase the verts on the curve, because it's already hard to edit and adding more verts will make it sooo much worse.
Project File: stackexchange.blend
(BTW I know the subsurf modifier is set to 0 in this picture I did try it with 3 subdivisions. Obviously didn't work.)

have you press on the eye icon to make it visible? have you smoothed it? Also you should put the subsurf on the bottom

As said in the description I did smooth it, I didn't make the subsurf modifier visible in the view port to display the problem. And yes when I tried using the subsurf modifier to solve the issue I put it at the bottom of the stack and smoothed but that didn't work.

perhaps share your file

Yeah I'll link it in the post.

I think that:

Your curve has way too many vertices, so I guess it cuts your shape in small slices and annihilates the smoothing. You need to simplify it a lot: Convert it to mesh, delete most of the vertices with the Checker Deselect tool and Dissolve Vertices, come back to a curve, now in Edit mode, in the Tools panel, Set Spline Type to Bezier, and Set Handle Type to Automatic then Aligned.
Or simply redo a spirale with less vertices.
In the Properties panel > Data > Shape, give more Resolution to your curve. It has 12 by default but as it is a long curve you must increase the Resolution to 48.
Add some horizontal edge loops to your object so that its arrays can bend along the curve.


text:
Smoke Simulation has weird artifacts and looks low res

I can't figure out why my smoke looks like this. It has weird artifacts and looks like it was rendered on 144 resolution. This was actually rendered in 2560 x 3840. I also used 400 samples and I'm using cycles.
Here are the domain settings

And here are the emitter settings

I've done a few simulations that have turned out perfect, but this one is just not working.
Edit: so I increased the domain resolution but the wisps look weird now. They looks low res also. Is there a way to get rid of the wisps. Maybe increasing the density or something.

You can:

Increase the domain's Division value (this will change how the smoke simulates, interacts and looks and will increase simulation time)
Turn on Smoke High Resolution (this will introduce noise into the simulation to add detail, more info in manual).
Check if the domain material has Cubic set for it's voxel interpolation (should be by default):

Volumetric domains are like raster images but in 3D. Imagine rendering a low resolution texture close to camera on a FullHD render - no matter what you do, even if you go to 4K, the texture would still render as ugly blob.

I increased the domain resolution but the wisps look weird. I edited the post and added a picture.

@AlexPensotti If you don't want the wisps, you need to simulate with lower divisions and rather turn on High Resolution, that should give you the look you are after.

just quickly flying through. I found this and it might help. It's under Render Properties in Volumes. Step Size set to lower than original 0.1 m solved my issue with the same looking cubic smoke. Try it and let me know if it had worked for you too. Cheers!


text:
Node Wrangler Deactivate Solo Node
I'm trying to toggle solo mode for a node in Blender Cycles the same way I do it in C4D Octane. In Octane, to enable solo mode you right click the node and choose "Solo", then once you are done, you right click on the node and choose "Disable Solo" to exit solo mode. Simple.
In Blender (with Node Wrangler), enabling solo mode is really easy, you just have to use Ctrl+Shift+LMB on the node. That works really well.
The problem is exiting solo mode. I have to go to the Principled BSDF node and Ctrl+Shift+LMB. I was hoping to have something similar like Octane, where I just right click the node I'm soloing and choose disable solo mode.
Having to go to the Principled BSDF node and Ctrl+Shift+LMB is a pain when you are working with deep groups: if I solo a node inside the group, to exit solo mode I have to leave all the nested groups, then go to the Principled BSDF and Ctrl+Shift+LMB. It's also a pain for complex shaders that have lots of nodes, because you have to scroll to the Principled BSDF if it's out of viewport bounds.
My question is:
Is there an easy way to exit solo mode in Node Wrangler, without having to go to the Principled BSDF and Ctrl+Shift+LMB? Is there any global shortcut I can press to "exit solo mode" just like in Octane?

Tried Ctrl-Z ? (AKA global Undo). It does of course mean that you can't carry out any other action that you want to keep in the interim.

Open a small viewport in the corner and center the principled bsdf there

Found the answer to my question.
There are two ways to accomplish this.
Solution 1: Use two shader editors
As Allen Simpson suggested, you can just have a second shader editor open that has the Principled BSDF always in focus and Ctrl+Shift+LMB it.
Solution 2: Code
The other way is to write an Operator using the Python API:
    class Wrangler_Unsolo(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "wrangler.unsolo"
    bl_label = "Unsolo"

    def execute(self, context):
        tree = context.space_data.node_tree
        bsdf = tree.nodes['Principled BSDF']
        out = tree.nodes['Material Output']
        tree.links.new(bsdf.outputs['BSDF'], out.inputs[0])
        return {'FINISHED'}

Note that this only works with Principled BSDF.


text:
Export vertices as "float4" type
So, in order to ensure good data packing in our shaders the vertex position is a float4 type.
I would like to make use of this 4th attribute and encode some custom data in it( a texture array slice index to be exact). Is it possible for us to encode this data in Blender somehow and export the mesh as a fbx ?
I would also be happy with a way to add that value in the UV's, i.e make the uv a float3 not a float2.

FBX may contain several UV maps, you may use it

You could also consider encoding this value into vertex colors somehow.

Yeah, the MeshLoopColor object that represents vertex color data in Blender is currently represented as a float4 array.

I solved the problem by recreating the mesh uvs as a vector3 in unity with a custom importer


text:
Mirror modifier creating a pointy edge
The mirror modifier is creating a pointy edge where I want it flat or round. What can be done to fix this, and the reason for this?

Turn on merge and clipping in the modifier options - also make sure there is no face between the "halves".

Thanks！Looks like I had extra faces and edges inside the model.


text:
Extruding only some segments of a cylinder with subdivision mod creates weird artifacts and gaps

I have a shape I created from a cylinder.
It's wider at the top.
I have a bevel modifier applied.
I have subdivision modifier applied.

I am trying to extrude incomplete ring of faces along normals, like this:

With the modifiers, this results in artifacts around the corners and gaps, where the extruded part doesn't look attached to the part below it:

What would be the best way to deal with this? I have tried a few things like beveling the edge connecting the shapes, separating the mesh, adding ring loops... with no luck.
Here is the file:
Thanks!

Hello and welcome! please share your file https://blend-exchange.com

just did. thanks!

You can use this kind of topology, but I've added vertical edge loops on this part (like if it was a 32 vertices cylinder) in order to avoid bad shading:

Hi! thank you for the answer! Could you elaborate a bit? It looks like you beveled the edges maybe?

Yes and once you've bevelled you need to create the topology I show in the second picture. Maybe use a Shrinkwrap on some of a vertices with a cylinder as target and your vertices as vertex group so that your vertices keep a nice round shape

Thanks. I've been messing around with it and i guess i don't know enough yet to be able to replicate this yet. Will accept if I don't get other suggestions

Nevermind, i watched a bunch of videos on redirecting edge flow and was able to do this. Thanks!

oh ok great, sorry for not being more helpful, it's a bit complicated to explain the whole thing in Blender Stack Exchange, you're right videos are much better to understand

No worries! you put me on the right track


text:
In 2.92 how do I show the 3D cursor in 2D drawing mode?
I am trying to rotate a stroke object in 3D space, but I need to rotate at the 3D cursor.  In 2D mode, you never see the 3D cursor, and clicking the 'cursor' Icon doesn't display anything. I can see the location of the 3D cursor is changing in the View details, but I can't see it anywhere in any view.
To reproduce start with a new 2D Drawing, then rotate the view with the number pad and 4,6,8 or 2.
Is there a way to turn the cursor back on???

You need to go to Viewport Overlays > 3D Cursor


text:
A working guidance for building blender as bpy python module?
There are informations on how to build a bpy python module from blender source but, it does not work (for me)
using Ubuntu x64 16.04LTS.
We need a working guidance !?
Building it up with:
https://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake
but use
sudo ./blender/build_files/build_environment/install_deps.sh

...and at the end:
cd ~/blender-git/blender
make bpy

or: different cmake config:
https://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule
Problem:

building blender bin is fine out of the box.
but  make configs and also "make bpy" throws errors:
requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC

some solution for this is to:
1.
build up python on your own with "enable-shared" and copy over libpython3.6m.a
sudo apt install build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
tar xvf Python-3.6.0.tar.xz
cd Python-3.6.0/
./configure --enable-shared
sudo make altinstall

and copy over libpython3.6m.a from /usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a to /opt/lib/python-3.6/lib
BUT the main problem is
sudo ./blender/build_files/build_environment/install_deps.sh

which should behave the way to build python with fPIC right away !
2.
Answered from blendercoders chat:
There is a pending fix for it:
https://developer.blender.org/D3078
But not in master today.
still:
Question:
Is it the purpose not to include folder "2.79" on "make bpy" so there are files missing -- compared to the ^^Ideasman42 config, is there a pending fix or is that "working as designed" - could it be made better!?

Where did you get the sources? How did you try to build Blender?

I followed the discription on: https://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake .....  ./blender/build_files/build_environment/install_deps.sh

That page doesn't describe where to get the sources from. Did you use Git? Which revision/branch did you check out? Add this to your question, so that it's clear in one read for others, without having to require them to read through all the comments.

as first point says, I used:
git clone https://git.blender.org/blender.git ..and.. git submodule update --init --recursive ..and.. git submodule foreach git checkout master ..and.. git submodule foreach git pull --rebase origin master

..on the error on top - I tried the way to set up pyenv as alexlee posted https://gist.github.com/alexlee-gk/ba07524dc0d972be9eac#setting-up-a-new-python-environment-using-pyenv but It does not work better I get the "relocation R_386_GOTOFF" errors, still I'ts not out of the box or should it do build up with "make bpy" ? - as I'm not familar on the dependencies and building stuff, It may be worse now ... trying fresh

Which version of Ubuntu are you using? And which compiler? By the way, this may be easier to debug if you join IRC on FreeNode, channel #blendercoders.

This issue should be fixed by commit 0a02c288aa258e18d19eff0be984f214d556b159
(27.03.2020)

"install_deps: Enable PIC in Python static library."

It was discussed here: https://developer.blender.org/D7177
Also similar question here:
https://stackoverflow.com/questions/36779834/compiling-blender-bpy-recompile-with-fpic/60903565#60903565

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Image in 3D animation is not appearing in render
I'm a total beginner.  I've created a simple animation consisting of a rotating image.  It looks fine from the Camera Perspective.  I've placed the lighting and camera appropriately.  But when I render the animation I'm getting a black screen.
I slapped a meatball object into the animation and it renders fine.  I'm suspecting that images are somehow unsupported unless they're attached to an object.  Is this true?
The program allows me to add an image to the animation workspace and manipulate its parameters.  It seems like a cruel joke not to render the image.   Or is there some magic attribute I need to set deep in the image or elsewhere to get it to render?
I've checked the Compositing and all of the usual suspects (as per many Google searches) for black images.
Any insight would be appreciated!

https://www.youtube.com/watch?v=o_CEsPD_OlE
This video should show you how to do it, hope it helps

because that is just an "Empty" object. it's not designed to be rendered. use a proper mesh object like a plane or circle and add a material to it. You can also use the addon Images as Planes https://docs.blender.org/manual/en/latest/addons/import_export/images_as_planes.html

Images are not unsupported. I tested your file, so I imported the image as background, then as reference and lastly as "Image as planes". The last one was the only time that it rendered as it had material as image and Principled BSDF material applied. Now I think that you imported the image as either Background or Reference and applied animation on it. Try it with Images as Planes, maybe that will work.

Thanks to Nascent Space, Harry McKenzie, and Wiseman for the quick and clear responses.  The "Images as Planes" add-on solved the problem.

Not much to test there in the file... the object is an empty, empties won't get rendered.


text:
Visualising multiple spherical particles translating and rotating in a box
I have a simulation of particles that are translating and rotating inside a cubic box. I have a txt file of their positions. I need to import them to Blender and show their dynamics.
x_1 y_1 z_1
x_2 y_2 z_2
.
x_N y_N z_N
and angular velocities (O - Omega)
Ox_1 Oy_1 Oz_1
Ox_2 Oy_2 Oz_2
.
Ox_N Oy_N Oz_N
from t_0 to t_m so I have 2m files in total.
Currently, I am using MATLAB to make a spherical mesh for each of the N spheres. I assign a orientation vector to them which rotates with Omega (this is equivalent to having an initial [theta, phi] for each sphere and updating them with Omega)
I have done this with a pair of spheres (https://www.youtube.com/watch?v=uONPJZreQC8), but it does not look good with multiple spheres. I would like to use Blender to make the visuals more appealing. Any help is greatly appreciated. I have not used Blender before.

could you pls explain how it should look like or even better insert an image/sketch how it should look? The problem about "more appealing" is: we don't know what you mean with that and the opinion might differ from individuals what more appealing means/is.

Thank you for the prompt response, here is a sample movie made using MATLAB
https://drive.google.com/file/d/1JY_P2UEA0FV7NOoRSUIP6dst-T0hsfXc/view?usp=sharing

so now your problem is just the texturing of the sphere? or did i misunderstand that?

Yes.
I have txt files of the locations x,y,z. The spheres are of radius 1.  I have their angular velocities as well Omega_{x,y,z}. In Matlab I assign a orientation vector to each sphere at time t_0 and advance it. d(p)/dt = Omega x p. Then I generate multiple sphere that rotate and translate.
I hope to do this in Blender but I have no prior experience with it. I realize I need to use Rigid body animation (not physics). Hence, any guidance is greatly appreciated.

So the text files I have are named as
pos00xxx.txt
ang00xxx.txt
where x goes from 0 to 100 for example. Hope this is a bit more clear.

uhm...now you confused me a bit more ;) In Blender you can use rigid bodies. But as long as you don't check the "animated" checkbox, Blender calculates all positions and rotations for you. You cannot change the positions and rotations by yourself (or your text file). If you check the "animated" checkbox, you can change positions and rotations (but honestly, then you don't need rigid bodies, because you are already animating your objects manually).

ok, proposal: can you pls provide us a small example of your txt file (maybe add is as text in the question or as download link from some cloud provider) and then we can try to help you a bit more concrete. Is animation nodes (a free add-on) as solution ok?

Okay sorry, I am probably wrong then.
I do not need Blender to do any physics. I will give it the location of my 'N' spheres for each time and the angular velocities (equivalently the orientation vector or spherical coordinate angles). Will it be able to make a movie like how I have made in MATLAB ?
I can share the txt datafiles and my MATLAB script file if that will be helpful.

yes, this can be done pretty easily via animation nodes ;) (...BUT...only of course it is just easy, if you have coordinates and rotation angles). If you really have angular velocities, you would have to calculate the rotational angle per frame per object somehow in your code (which isn't trivial i assume). Because Blender can only "work" with positions and angles, not with velocities.

I assume these angles that Blender asks are alpha, beta and gamma in here https://en.wikipedia.org/wiki/Rotation_matrix#General_rotations
So I assume it creates a rotation matrix in 3D and rotates the object.
If this is true, then I can provide these angles quite easily by doing a Euler explicit time marching.
d(alpha)/dt = Omega_x, d(beta)/dt = Omega_y, d(gamma)/dt = Omega_z

ok, great, then i can show you how to make an animation from these data with animations nodes....i will write an answer, if animation-nodes is ok for you?

Thank you Chris.
Here are the files. I generated the 3 angles for the 3 directions (as you can see in the script process.m) So the raw files needed for Blender should be pos00***.txt and ang00xxx.txt.
https://drive.google.com/file/d/16M8tfbvCWspKMVOi50r1ciHNCd6YkpLm/view?usp=sharing

ok, here is my "first shot":
It has following restrictions:

i animated just one object
the first 3 values are x,y,z and then follow the rotation values

i used this animation nodes setup:

The text block reader reads your data from text file (there is a text-editor in Blender, where you can copy & paste the data in).
This is my text file (which i used for my little test):

Afterwards i am just "parsing" the data by separating by lines, then by "," to separate the single values and combining them again to position and rotation vectors.
The object transform output node then uses this data to change the object itself.
result:

if this is, what you need and you are happy with this, i will update my answer so that it works for more than just one object
UPDATE:
So, here is a node tree, how you can read multiple files with AN:

afterwards you have to parse the data as i showed you in the first node tree.
of course you have to adapt the path that it fits to your directories.

This looks great. (I should have said earlier that I am doing molecular dynamics type simulations and have used VMD software before. But I was unable to show rotations with VMD.)
Is it possible to load multiple files into Blender automatically (like PARAVIEW. It recognises sequentially made *.vtk files)

Or I must use a script like BPY (https://pypi.org/project/bpy/)

no, you can do this with AN too...give me a bit time ;), but yes, would be possible with python too but more complicated...i think. But if you are a python expert, it might be easier for you ;)

i updated my answer so now you should be able to read multiple files.

Beautiful !! thank you very much. I will give it a try and update here (I will not be as fast as you I am sure)

you are welcome! I had fun figuring it out myself ;)


text:
Rigging bones to mesh with automatic weights not working
I am very new to blender but have 3d modeling experience from other software's and have been playing with the bone rigging and armature stuff in blender. I modeled this character and assumed for weighting I should join all the meshes belonging to the character together, so I selected everything and join with ctrl + j.

I rigged my bones and have the relationships all setup properly, so when I move the bones individually, everything works fine.

As soon as I try to tell blender to join the bones to the mesh, this is where things seem to go awry. I shift click the character mesh + bones, go to pose mode, select all the bones, and ctrl + p and select "with automatic weights. It seems to work great but when moving the bones, the arms and legs meshed get distorted unequally when the symmetric bones are moved the same amount.

I have checked weight paint and everything seems ok, what is going wrong and how do I fix this!
Link to blend file

hello could you please share your file? https://blend-exchange.com/

I added a hyperlink to my google drive where the blend file can be downloaded.

Check the normals, as you can see they are inverted on the arm and on the leg, so in Edit mode select all and press ShiftN. Also apply the scale of the armature and object, and parent again.

Yay it worked! thank you so much for your help! I have been stuck on this for like 5 hours at least...


text:
UV unwrapping of complex possibly concave polygons
Suppose I have a flat surface that looks like a T-junction. There are at least three ways to do it:

Single concave polygon
Several convex polygons
Several convex quads

(note that the right polygon on the second image is not quad, as its left side contains 4 vertices)
The first way seems the most natural, as my surface remains a single entity. If I want to move it, I just select it all in one click and do it. The other ways require me to manually select all polygons that my surface is composed of. Not very convenient. Vertex groups alleviate it somewhat, but still.
(2) and (3) unwrap correctly. Unwrapping of (1), however, results in a very weird map:

Am I doing unwrapping wrong? Or Blender just not supposed to unwrap concave polygons correctly? Will I be fine if I stick to convex n-gons? Or I should avoid them, too, and use simple quads only?
http://chireiden.torlan.ru/blender-unwrapping.zip - here is zipped .blend file, just in case.

For ease of selecting a chopped up ngon, it might help to use Shift+Ctrl+Alt+F to select all linked planar faces.

The normal for the plane seems to be the problem. If you recalculate the normal using Ctrl+Shift+N on your mesh, it seems to unwrap correctly.
You can also use Project from View in the UV unwrap options, that seems to work without doing any modification on the mesh.

Yeah, recalculating normals helps for some reason, but once I rotate the mesh several times, unwrapping may suddenly become weird again. And recalculating normals didn't help at all in my larger model. In fact, flipping them inside, to the wrong direction, made unwrapping correct. Hit and miss. I'd certainly prefer splitting my mesh into simpler polygons to doing random normal flipping (which doesn't work every time). Project from view works here, but my larger model is not flat, so unfortunately it isn't an option.

I can't say why, but if you rotate it 360° (so basically no change), it will unwrap correctly.
I also tried Remove Doubles, Remove Doubles UV, removed Only Faces + Make Edge / Face and Mesh.validate(), but none of them helped. Doubling the scale did not work either, but something like scale factor 2.5847 worked.
You can also use Smart UV Project, which works a bit differently but gives proper result (with different orientation however) without the above rotation hack.

Rotating it by arbitrary angles does change the unwrapping. But it seems completely random. Sometimes it's OK, sometimes it's just as bad but completely different. Smart UV project, as I understand, ignores seams, which means it'll take a lot of effort to arrange resulting map as I need.


text:
GameEngine: KX_BlenderMaterial vs KX_PolygonMaterial
I have a question about the material types in the game-engine.
e.g.:
2.66 Blender API - KX_PolyProxy(SCA_IObject)
2.66 Blender API - name ~ The material of the polygon.

When is the material a BlenderMaterial object ?
and
when a PoylgonMaterial object?
What are the internal differences?

Thank you.


text:
Camera movement shows in viewport but not in render animation
I'm trying to render my animation, but the camera movement doesn't show when clicking on Render Animation.  The camera stays still ignoring the keyframes.
I've unchecked the sequencer in post-processing as a question suggested but it didn't work.
The camera movement does show when rendering a single image throughout the different keyframes. But when you render an animation, it lays still in the first keyframe.
I've tried baking the camera animation, but it didn't work either.
It's probably something really dumb but I can't seem to find the solution.
File the file in the link below:
https://www.dropbox.com/s/rtljuyxvcumnhk5/30%20Animating.blend?dl=0

i just tried it ...and it worked. Do you render from command line or in Blender? I rendered from Blender and had to change your output path because it was something on dropbox and then it worked here.

Hey Chris, thanks for the reply! I tried rendering now after rebooting my pc and now it works. I'm guessing is something about the cache? Either way thanks so much for trying, means the world to have that push to just rebooting like an idiot and finding that was the answer. Jeez. Thanks you either way, my bad, man.

I just had to reboot.
Things that might solve the problem:

this: Why is my camera pan not rendering
Rebooting
Adding a new camera to the scene.
Making sure you're not using a mesh as a camera (How can I make a camera the active one?)


text:
Trouble with baking cylindrical objects
This is a half Blender/half XNormal question. I'm having difficulty with baking cylindrical surfaces. I'm trying to bake normals and occlusion for the twisted top edging of a wicker basket. Here is the high poly:

The low poly on top:

And the fantastic result:

How can I get a better bake with a shape like this?
I used the shrink wrap modifier which increased the vertex count too much and the result was equally awful:

Here is a link to a blend file with the shrink wrapped low poly model and the high poly twist model:

I do recommend you upload a portion of the .blend file for inspection. you can use this link to upload your file http://blend-exchange.giantcowfilms.com/

Thanks for the heads-up on that one. I've updated the post with the link.

Try using smooth shading on the low-poly object.

Will this old method work for you ... using a prerendered hemisphere normal texture.
Basically I have attached a shadeless material of a normal rendering of a hemisphere. You will find the image packed in the blend file. Using a orthographic camera I render from the top view of the model. Also I have replaced the color of the background to a flat normal color which is (R0.5,G0.5,B1.0)

This is where you change the background color under the world tab on the
properties panel.

Hit the render button on the Render panel and you should get this result.

Let me know if you have further queries.


text:
how to bake high poly and texture normal map together
okay so. my plan is to add a normal map and texture to a low poly mesh. the normal map should be a combination of the high poly model and a texture. they should be baked together. I know you can bake them separately but that's not what I need. I need them together. could you please help? I think I figured it out but the mesh cant connect to itself or everything is messed up. ex) it will work on a plane but not on a cube. please help and thank you for doing so. :)

A normal map and a color texture contain different kinds of information. You can combine them, but it will make a pretty useless texture in most cases.. Are you sure this is what you want to do? Usually the color texture and the normal map are applied separately, as separate textures.

See How does normal baking work? on how normal maps are created.
You can't bake other textures and the normal into a normal map because the normal map encodes the direction of the normals in the RGB channels of the image representing the map.
From Bump_and_Normal  (Linked to 2.4 because there is more info)

Normal maps in Blender store a normal as follows:

Red maps from (0-255) to X (-1.0 - 1.0)
Green maps from (0-255) to Y (-1.0 - 1.0)
Blue maps from (0-255) to Z (0.0 - 1.0)

Since can add more than one texture to a model this isn't a restriction.
EDIT: A normal vector is perpendicular to a face its coordinates (x,y,z) are stored as a pixel in an image map.

im sorry. im a little confused. can you explain some please? :) thank you for trying to answer though. so. how do video games have normal maps? in video games it looks like they have a high poly normal map and then a texture normal map combined and then applied to a low poly mesh so you have say, smooth surface on a cube but then rocky normal map on the curved surface too.

like if you have a rope with 3 sides but it looks round because of the normal map but then you might have a tear in it so they add the normal map of the tear into it too. if  im making any sense

@EthanSmith I added an image to explain it a bit more. Could you give a reference for a game engine. If you have a low poly model like your rope example you would need additional information (from a high poly rope) to add fake geometry to the rendering. Interpolating the normals of a 3-sided rope couldn't do that.

okay. so those lines are perpendicular to the faces theyre protruding from? I think that's what you mean. so then. if I were to bake a normal map of the mesh it would look.... like the mesh... but then if I change the.... "blue" or the "Z"... I could also get the texture applied to the mesh into the normal map? is that what youre saying? and then say what I just said works... I could then apply the combined mesh and texture normal to a low poly mesh to have a more detailed low poly mesh look high poly with a texture normal?

I don't understand what you mean by " get the texture applied to the mesh into the normal map?" Have you already read: http://blender.stackexchange.com/questions/2466/how-does-normal-baking-work ?

the game engine would be Unity3d and your example would be, I have a rock im modeling. there are two versions, a low poly of 500 polygons and a high of 2000. I also have a high res texture for my rock. if I generate a normal (or bump ive read what the difference is but im not sure which is best, but my guess would be normals are still better) from the high res rock and apply it to the low res rock it then looks like the high res rock now. but then. I have my texture which I have just generated a normal for. I cant have two normal, so how would I merge them or bake them together?

http://docs.unity3d.com/Manual/HOWTO-bumpmap.html

I read that. I understand it too. so let me try again. y'know how you can make a normal from a texture right? and.. also from a mesh. I want to apply a texture to a mesh and have it generate the texture normal into the mesh normal so instead of having two normal I have one combined normal. is that clear enough? (no sarcasm or rudness intended) the unity thing looked like it would work but I have to try it out.

okay so I read the unity howto bumpmap. I get what its doing and that's what I want. except for the bumpiness. it said to make the bumps more noticeable use the bumpiness slider but instead of using the bumpiness slider couldn't I use the image to tell where the bumps should be?         so step 1 would be make a make a height map. mine would be generated from blender of the high poly mesh. then step 2 would be to generate the normal map with the bumps using the bumpiness slider. instead of using the slider couldn't I use my texture?

You will have to convert your color map to a normal map and then assigning 2 normal maps in your texture slots. Then you will have to create a new image and bake the normals (not from multires). This way you have your 2 normal maps combined in 1.
-Bert


text:
Parenting Mesh to Bones Issue
I have been working with blender for a few months now and just tried modeling a character which I am currently rigging and completed weight paint on.

After completing the weight painting of all the parts, I came across a problem with the relationship between my bones and mesh. For some reason when I try to pose the characters thigh bones, I get parenting or weight painting issues that I don't understand and don't know how to fix, here are some pictures of the distortion of the mesh I get after posing the character.

One thigh is distorting the body mesh, which I don't want it to, and the other thigh wonks out and starts curving in an odd way when the mesh should stay lined up with the bone its weight paint is associated with.
I assume the problem has something to do with all the little dotted lines for parenting going to the one thigh bone and not the other, and i'm not sure how to really fix this.
Any ideas out there?

I think we'll need to see your Blend file. You can share it via https://blend-exchange.com/ following the instructions there to copy the link to it and then edit your question and paste the link into it.

Just added the blend file to the bottom of my question.

A few issues there: orientation, origin, scales, naming, weight paints and hierarchy. Posting an answer, it will take some time.

A few issues there: orientation, origin, scales, naming, weight paints and hierarchy. It's only the weight paint issue that you see in action in your screenshots, but the others would cause you other issues when animating that would be annoying to deal with, so gotta fix it too.
Orientation
If you hit Numpad 1 to set your viewport to front viewpoint, you will see that your character isn't facing the front of the world:

It might seem like nothing, but Blender uses orientation in some tools, like symmetrizing rigs, pose mirroring and such, so you definitely want to orient your assets the right way.
To fix this:

↹ Tab into object mode
Select your mesh objects and armature object
Press RZ270⏎ Enter to rotate them around the Z axis by 270°
Press ⎈ CtrlA > Apply Rotation so that the current object's rotation is their "zero" rotation.

If you enable your armature's axes display, you will see that your bones are poiting different directions too:

This will make symmetry work harder, and each of your spine bones basically rotates differently than the other.
A common setup is to have vertical bones to have their +Z facing the Global +Y, and the horizontal bones to have their +Z facing the Global +Z.
To fix this:

Select the armature and ↹ Tab into edit mode
Select the vertical bones (legs, spine, ect)
Press ⇧ ShiftN to open the recalculate roll menu and choose Global -Y
Select the horizontal bones (arms)
Press ⇧ ShiftN > Global +Z

Origin
If you look at our objects now, you should see they have their origin points on the thigh:

When it comes to the mesh object, their origin isn't really relevant when they are deformed by an armature - as long as they are not too far apart - but you definitively want to keep your armature's origin centered (for symmetry purposes again) and most often on the character's ground level (makes placement easier).
To fix this:

Select the two legs objects and ↹ Tab into edit mode
In front view, select the two lowest points of each leg like so:

Hit ⇧ ShiftS > Cursor to selected
↹ Tab into object mode, select all the mesh objects and armature
 RMB > Set Origin > Origin to 3D Cursor
Select only the armature object and press ⎇ AltG to send it back to the world center.
Optional: Select only the mesh objects and hit ⎈ CtrlA > Location to set the world center as their current origin.

Now you should have a perfectly centered and symmetrical object:

Scale
If you select some objects and look at their scale in the viewport's sidebar, you will see that they don't all have the same values. Some are even negative. This can cause some calculation issues, so you should apply them all to one.
To fix this:

Select all mesh and armature objects
⎈ CtrlA > Apply Scale

Your left limbs who had negative scale now have their normals facing inwards, as the Face Orientation overlay shows you:

To fix this:

Select these objects only
↹ Tab into edit mode
Press A to select all
Hit Shift N to invert the normals

Naming
Your arm bones are not named.
But more importantly, Blender have a naming convention for symmetrical bones, which is used by symmetry and mirror tools and bones coloring. Use the suffixes .L and .R to mark left and right sided bones.
For the bones you already named with Left and Right, we can use a search type of batch renaming.

Select the armature
↹ Tab into pose mode
Select all with A
Press ⎈ CtrlF2 to open the batch renaming tool
Set it as follows for the left side:

Redo from step 4 for the right side.

Hierarchy
Not a blocking issue as long as you don't export in a game engine, but definitely annoying nonetheless when animating: you don't have a dedicated root bone.
Root bones are extremely usefull for a few reasons:

When you have parts of your mesh you don't want to assign to other bones: assign to the root bone (required for some export formats and softwares)
Is the single top parent of all the bones (required by some softwares)
Some software will actually need a top-parent bone that is at the world center anyway
Extremely usefull to have a root bone when animating to place the character in pose mode without impacting the rest of the armature that wears the actual animation.

To fix this:

Tab into edit mode.
Make sure your 3D cursor is at the world center by pressing ⇧ ShiftS > Cursor To World Origin
Press ⇧ ShiftA to add a bone at the 3D cursor
Select it and rename it to Root
Bones don't have the same coordinates axes than the world, so to make it simpler for animation, I advise you to set its tail position to these coordinates to that it points to the +Y axis and is therefore aligned with the world when animating:

Select SpineBottom then ⇧ Shift select Root
Press Ctrl P > Make Parent (Keep Offset)

If you go in Pose mode, and try to move the root bone with Local transform orientations, you should see the gizmo pointing the same way as the world, and the corresponding axes values changing in the sidebar:

Overlapping vertices
Your mesh has overlapping vertices from the misfired mirroring, so let's clean that up to avoid issues with weights:

Select your mesh objects
↹ Tab into edit mode
A to select all
Hit M > Merge By Distance to remove all overlapping vertices

Weight paints
For the legs' deformation, it really is just an incorrect weight painting.
If you select the right leg mesh object, ↹ Tab into weight paint, and ⇧ Shift RMB on the thigh to select the Sock.L vertex group, you will see that it is indeed painted to be affected by the Sock.L bone. Hence, the wrong deformation.
To fix this, multiple ways are available, and actually you might use all three. The first is good at making a nice baseline to start from, and the other two are just two different ways to edit weights that work best for different scenarios, just use whichever seems easier depending on the changes you need to do.
A. Redo automatic weight
With all the fixes we did, you could just run an automatic weights generation and have only small fixes left to perform. To do this: select all the mesh objects, then armature, then ⎈ CtrlP > Parent to Armature Deform with Automatic Weights. With a bit of luck, it gives a good enough result with no needs to touch ups.
B. Edit weights in Edit mode
In edit mode, select a part of mesh you want to remove from a vertex group, then in Properties Editor > Mesh Data tab > Vertex Groups panel, select the vertex group you want to remove it from and hit the Remove button.
C. Painting weights
In Weight Paint mode, ⇧ Shift RMB to select the vertex group you want to preserve. Then go to the menu Weights > Normalize All to normalize all vertex groups. It will make it so that the product of all weights for each vertex doesn't exceed 1.
To avoid creating this issue in the future while weight painting:
Enable auto normalize and multi-paint in the options' popover in the top-right viewport corner:

Then you can paint weights to your heart's content. Remember that with autonormalization, it's easier and more predictable to paint weight on a group (which autonormalize will make it "take" the weights from any other bone that has is), rather than subtracting weights (which autonormalize will have to give back to other bones).

Wow this is a lot of useful information, I am looking over it all now and I greatly appreciate the help

I just got everything fixed and this was super helpful!!! Thank you again for all your help!

Glad it helped. Please don't forget to look at my answer's top left corner to upvote it and use the ✔ button to mark it as the right answer :)


text:
Seamless transition between isometric cubes
just gave it a try the last days but maybe I'm not using correct keywords to solve my issue. Hopefully you can help me.
Just created some isometric cubes with Blender (3.0) and rendered each of them. Afterwards I put those rendered images next to each other in different program (e.g. Tiled, GIMP, ...) but unfortunately the transitions between those cubes are not smooth. Any idea how I can get rid of those "border" lines so it is not possible to see when a cube ends and the next once starts?
Played around a little bit with position of Light (Sun) but it doesn't solve my problem or at least I'm not able to find proper position.

In general I did nothing special just set up a cube change camera rotation (X=60° | Z=45°). You may can check attached blend file. Just render the cubes on your own and place it according to isometric rules. Might also help to make used of Tiled to place tiles.

It's unclear how you end up with this problem. Please edit the question and add more detail. What exact steps should someone take to get this problem? Or you could share a .blend file with the problem (Here ).  The way I see it, you should just make the 3d objects more precise and snap them to each other so they don't have any gaps in 3d.

As @MartynasŽiemys mentions, some more detail would be interesting. If I create some cubes with let's say a cube length of 2 m and put them 2 m apart on one axis, there is no visible seam. What did you exactly do to get this result?

Oh wait a minute, those cubes are not lying next to each other in the scene and rendered together? Reading the question again I get the feeling you rendered them separately and put them together in the compositor...? I guess the problem them is antialiasing around the edges.

@Gordon, sorry if it wasn't clear enough. Yes I rendered each type of cube and put them together in separate program like Tiled or GIMP. Just added blend file, so you might can check on your own with same cubes. Based on rules of isometric view (as far as I understand them) the cubes are always placed at half of the other cube to look like they are in same row. Let's say first cube is 64px width and placed at 0|0 (X|Y) the next cube should be placed at X=32 and Y=16 to be in line with the first one.

No need to check the file, your isometric view rules are not the problem or how you place the cubes. It's a matter of antialiasing.

The problem you have here is the antialiasing which is controlled through the Filter Size setting under Render Properties > Film (in Eevee which you are using, in Cycles it's Pixel Filter > Width). By default this value is 1.5 pixels, which creates a smooth but not too blurry edge.

This is usually fine for rendering but creates problems when you want to overlay transparent images. The edges are now semi-transparent and no longer completely opaque which becomes visible for example when you are overlaying a shadowed side over a bright side or vice versa.
To get rid of these semi-transparent edges, you can set the Filter Size to 0 (or Width to 0.01 in Cycles). This way there will be no antialiasing. To see the difference, here is a comparison of the Alpha Channels, left is 1.5, right is 0. Wherever the pixels are not black (fully transparent) or white (fully opaque) the cube will be showing what's lying underneath:

This becomes visible when you place over a colored background for example. Of course that's usually what you want to make the edges appear smoother and more blended into the background:

But it becomes a problem when you overlay those cube images with each other, then of course the underlying cube shows through and reveals that there are two objects instead of one:

The only problem you will now have when you disable antialiasing by setting the Filter Size to 0 is that the edges - not only the ones between object and transparency, but also within the object in textures etc. - will no longer be smoothed and might look worse than before. But this always depends on what you render and how your materials/textures look like.


text:
Some faces appear dark, but the normals point outward as they should
I have this model which I downloaded from the internet (as an .obj file) and part of it shows up much darker than the rest:

I've done some looking around, but none of the similar sounding questions fix my problem. I have tried:

Recalculating normals - this is the most common answer I've found, but it doesn't work. As can be seen in the image above, with "Face Orientation" turned on in the Viewport Overlays everything shows up blue, which should be correct - flipping them again so they are red doesn't help either.
Deleting all materials, since this thread suggested it may be a problem with the materials (the answer also does something with nodes, but since this is from an .obj file I don't have any of those, they cannot be the cause)
I'm already using flat shading, so this thread isn't of help either.

This darkness shows up in other programs as well (I've used it for a school project with ThreeJS, and using the Windows 3D Viewer also makes the reflection of that part look weird)
I am inclined to say that the problem has something to do with the normals, but flipping them is clearly not it.
It does seem like the light-reflection on each face is inverted in some way. In the image below you can see that in cases where it should be dark (left) it actually turns lighter (right).

Is Autosmooth enabled which could use Custom Split Normals Data? But it looks pretty dark... hm.

This is most likely not a problem caused by auto smooth. Auto smooth does not cause this sort of problems and turning it off probably just hides the real problem. Looks like maybe there is some broken custom split normal data in the model. That would explain why exporting and importing fixes it - because it's lost during this process. I think clearing custom split normal data would help as well in situations like this:

My answer wasn't saying that Autosmooth was the cause, just that turning it off was one way that solved the problem for me. But you are right, what you say here works, and it's probably the easiest fix as well.

It doesn't solve any problem, it just hides it. There may also be situations where you import an object with the same issue and for example want to use weighted normals modifier that requires auto smooth on, then what?.. It's better to solve the actual problem especially considering how easy it is - literally a press of a single button.

I've found a solution thanks to @Blunder. Turning off Autosmooth fixes the problem.
Autosmooth is under Properties > Object Data Properties > Autosmooth

That should fix the whole thing, if things start to look weird and shaded right after unchecking it, be sure you're using flat shading by right clicking your model in Object mode, and selecting Shade Flat

That fixed it for me, and the problem is also gone when you export to .obj again.

Side note: If you turn Autosmooth back on during the same session the problem will obviously come back. But, if you export to .obj and then import that file again, Autosmooth will be on by default but you don't have to switch it off again because the obj file isn't messed up anymore.

Did you try to use the Weighted Normals modifier and check the "keep sharp" in its options?
I always keep an active Weighted Normals modifier at the bottom of the modifiers for most of the meshes I work on.

this... actually also fixes the problem.

glad that it's worked ^^

@Sander
Hello and welcome. This site is not a regular forum,  Please don't reply "Thanks" as an answer or comment, instead upvote the post that helped you. If you feel it completely solved your issue consider marking it as accepted.


text:
How can I export multiple objects into one json file?
I have downloaded a car model which consists of 1 car body and 4 tires for a simple game development.(totally 5 objects)
Although it's no problem to separately export each object with UV mapping information in json file ,how can I export them at the same time into one json file?

What do you mean by a "tier"? There are 5 meshes, and the three.js Blender exporter is only exporting one at a time?

Thanks for pointing out my error , it should be "tire". I haven't known the way to export more than one object at a time until half a hour ago, but now I knew about  something like group objects , and I am going to give it a try!

Grouping the objects didn't solve my problem , and so was all select function(keyboard:a).After I exported , it was still only one object which displayed with white font in the outliner winodw.

I'd try the Blender glTF exporter and THREE.GLTFLoader.


text:
Launching Blender seems to have messed up my microphone input to now pickup a radio signal
After installing Blender and launching it, I noticed a console popup with errors that goes away shortly, followed by the program opening seemingly fine.
I didn't have time to read those errors so I hit my Shadowplay Instant Replay recording hotkey. Upon playback, I could read it. (Here's a screenshot:)

It got weird fast, because then I could hear in my Shadowplay recording, for the first time ever, a radio signal.
This happens with different microphones, too, including having no microphone in, so it's not a hardware issue! What could I do to fix my microphone input? I've since uninstalled Blender and am frustrated to have a problematic microphone channel on my computer now.
UPDATE:
After uninstalling and reinstalling Blender, and also doing the same with the OpenAL library that seems to be related, I'm still having radio recorded on my mic channel.
UPDATE:
It seems to stop happening temporarily sometimes. Haven't figured out the pattern.

Blender might be opening a channel you didn't normally have active. Which means that your gear always picks up radio signals? In Blender User preferences you can switch off openAL (if you think thats a problem). can you try booting in another OS, I assume you are on linux? But honestly it could be anything.

Make sure your PC is properly grounded, and that all recording volume slides are all the way down (except for the channel you want to use).


text:
Eevee vs Cycles Blender 2.8 & Glossy BSDF [SOLVED - FIX IT]
From this video for blender 2.7 cycles:
https://www.youtube.com/embed/BtVYCMNvykg
I made this:

In blender 2.8 with cycles, the glossy is effective.

but with eevee doesn't work. I don't know the workflow of eevee (cuz I added a lightprops cubemap to "looks like" the same effect, but is not the same like cycles) and I did found the documentation or information.

Any help?

In the Render properties at the right-hand side of the screenshot you can see the Screen Space Reflections section - enable that and you should see reflections.
Eevee works quite differently to Cycles and the more features are enabled the slower the render. Many of the options are disabled by default for efficiency and must be specifically enabled when needed.

it's possible know what options are disabled? or we must wait for the documentation?

@RogerVR On your screenshot you can see each of the options - the list with a drop-down arrow and a checkbox. You can enable that ‘feature’ by enabling the checkbox (eg, alongside Screen Space Reflections) or see the additional options by clicking the arrow.

So the thing is that I do your taks with the settings on, but the "reflection" is not working like cycles. And the reflection probe is doing the job. http://oi63.tinypic.com/15ge52x.jpg
With HDRI the resolution is not the best. Even if the HDRI has a very large or big resolution.
http://oi65.tinypic.com/qrer03.jpg

@RogerVR I'm quite new to Eevee - you're right, on reflection this isn't the screen-space reflections. I'll be interested to see what other solutions people post here.

UPDATE:
They fix it! :D Now it's working fine!


text:
Bending a model with Simple Deform vs Lattice that's Simple Deformed
Why shouldn't I use the Simple Deform modifier directly to bend a mesh?
Details
I made a low-poly shield that's flat.  To bend it, the tutorial I followed suggested to use either

Proportional edit (with a decent falloff curve)
Lattice modifier

Another shield creation tutorial demonstrates option 2 where the lattice itself is made a tight bounding box of the shield and then deformed using simple deform.  The model itself is applied the lattice modifier with said lattice.
When I asked the tutor if I can apply directly use Simple Deform, he said "not really", without explaining himself.
Why do people go through the lattice way?  Why is it not advisable to directly use the Simple Deform modifier on the mesh itself?  Blender's manual seems to use it as-is while experienced modellers don't.  What am I missing?

All these methods work fine for what you want, Surface Deform as well, feel free to use the one you want, Proportional Editing seems like the simplest in your case, Lattice is the most complicated

Thanks for the reply!  I understand that my case would be solved by one of these, just curious why people use the lattice method.

for your particular case I don't see any reason, Lattice can be a bit tedious, it's the last thing I would use to simply deform a shield, but maybe I also miss something

Different out-of the box outcome
My wild guess would be that you'll simply not get the same deformation. Propotional editing is using a smooth falloff by default, while the Simple Deform modifer is bending linearly...it's a nuance, but if you try, there is a different shape as outcome. Same for the lattice modifier. With the Simple deform modifier you basically get one thing, with the other you have more room, they are more flexible.
At the end I think he is suggesting to use the tool beacause without it you'll not get the exact deformation he was looking for.
You can easily experience the difference by doing the inverse: try to get a perfectly circular deformation using proportional editing. You'll find more challenging than you expect.

Another reason could be that you cannot straight use the Simple deform modifier, but you'll have to rotate your object from the XY plane to get a proper result, while in all the tutorial the shield is right on that plane.


text:
What's the shading algorithm behind Smooth Shading?
When I flip between flat and smooth shading, I see that the vertex normals flip between n vertices for n meeting faces and single (averaged) normal.  Once the vertex normals are deduced, how're objects with Smooth Shading rendered?  I'm interested in the shading algorithm/interpolation model (Phong, Gouraud, etc.) than the illumination model (like Blinn-Phong, etc.) used.  When smooth shading, are lighting calculations done per-vertex or per-fragment?
I'm a graphics programmer (OpenGL) who recently started learning Blender.  I'd like to understand how Blender works under the hood for better understanding.
I searched in the manual but couldn't find anything regarding this, understandably.  The Blender 3D Wikibook says Phong while an answer here says Gouraud.
When flat shading, the usual technique is to just shade the entire tri or quad with one lighting calculation performed with the face normal.  I hope this holds true with Blender too.

Hey there! In case you didn't know, Blender is also open-source, so you can take a look at its source code to see how it does smooth shading.

Here is the source code for Blender: https://developer.blender.org/diffusion/B/

Thanks for the tip :) Yes, reading the code is an option, while having someone (with context) explain it to you is a lot better.  However, I'd do this if we don't get any answers.  Thanks!

I assume you want a pointer to the code in question. What engine are you asking for workbench, Eevee or Cycles?

@Robert The viewport renderer; not sure of its name though. Is that the one called workbench?

@legends2k yes that is the workbench engine.

It's not that easy to read the Blender's source code if you have never worked with it. However, it is likely that it uses Gouraud for the smooth shading because in the parts of the code where it is mentioned there are several operations that include vertices and their interpolation. Maybe someone more expert could clarify it.

As phong uses interpolated vertex normals this is the method used checking the docs of the source code.
source: https://github.com/blender/blender/blob/01a2bd03695f217616acc2581fe8746f5cd226d7/scripts/modules/bpy_types.py#L672
def shade_smooth(self):
        """
        Render and display faces smooth, using interpolated vertex normals,
        removing the "sharp_face" attribute
        """
        _name_convention_attribute_remove(self.attributes, "sharp_face")

"Phong" and "Gouraud" are not always used consistently between sources.  If we consider Phong shading to be a shading algorithm where the interpolation of vertex normal is used to light fragments, and Gouraud shading to be a shading algorithm where the interpolation of vertex lighting is used to light fragments, then Workbench uses Phong shading.
We can see this by looking at the specular highlight of a smooth shaded object in Workbench:

The vertices of this smooth shaded cube are all darker than the specular highlight in the middle of the face.  That highlight cannot be created by interpolation of vertex lighting.  As a comparison with Gouraud shading, you can see the demonstration of specular artifacts at https://en.wikipedia.org/wiki/Gouraud_shading .
As for how we get that fragment normal, it is the renormalized weighted average of vertex normals of its (triangulated) face's vertices.  The weights are the barycentric coordinates of the fragment.  If we'd like, we can see these coordinates by using a geometry/parametric node in a shader.

Agree with the inconsistent usage of the term; it's why I'd used different terms in my question: interpolation model (where/how many calculations are done) vs illumination model (calculations made at each unit to arrive at a colour).


text:
Is Anyone familiar with rotation errors after export?
IM made a turret style with a spinning chamber, when I export to external Animations softwares like sketchfab's profile renderer the entire mesh spins with the chamber.How do I separate the rotations IN BLENDER?

How did you export? As FBX or try Alembic

Hi, thanks for the response. I exported in FBX. Will exporting in Alembic affect Unity at all?

Thanks that fixed it

cool you're welcome!


text:
Get Number of Splines from Geometry Nodes
Question:
Is there a way, using geometry nodes, to retrieve the number of splines from a curve object? It seems to be a very straightforward question, but I cannot come up with a solution.
Details:
I'm not sure all of this is relevant, but just in case, here is exactly what I'm trying to do. I'm creating some text animations and I have some nodes that morph one curve into another. As the "Factor" from the group input moves from 0 to 1, the initial curve is transformed into the final curve. An example is shown morphing "1+2" into "3+4".

In this example, the initial curve "1+2" has 3 splines. The final curve "3+4" has 4 splines. To ensure the curve ends up looking right after the morph, I add a fourth spline to the initial curve before morphing. This is done by the nodes in the "Add Splines" frame. My issue is, depending on the curves involved I may need to add a different number of splines. I'd like to get the number of splines in the initial and final curves so that I can plug the difference into the "Amount" input of the duplicate geometry node. I can't figure out how to get this information though.

i wrote this often - and write it again: to attract more people to your question who don't want to rebuild your node tree manually - it would be a great idea to add your blend file so we can easily and quickly answer your question.

Thanks I appreciate it. Didn't realize I could do that and just figured out how.

thanks for your blend file - so you atttracted me to answer ;)

How about the node Domain Size?

@quellenform This works perfectly as well, thanks. Can't believe I missed this one!

You can get the max spline index like this:

so just add 1 and you get the number of splines.

Thank you! I'd forgotten about the attribute statistic node and couldn't figure out how to easily get the max index.

you are welcome

Use the Domain Size node, in curve mode it has a Spline Count output.
The answer of Chris can't differentiate between 1 and 0 splines, since both will result in a max index of 0.

Yup, it is also more straightforward to use IMO


text:
Can I use the API to select an edge or face by length / area?
If I want to select all the edges in a mesh which are over 10 units in length, or all faces with area > 10 units, can I do this via the API?
I've looked at bpy.ops.mesh.select_similar() which lets you select features which are similar to the currently-selected feature, so it feels like this should be possible, but I'm not sure how.

Using the bmesh module
This is quite simple with the bmesh module.  Test script selects all faces with area > 10 and all edges with lengths > 10.  Remember these are local coordinates.
import bpy
import bmesh
context = bpy.context
ob = context.object
me = ob.data
bm = bmesh.from_edit_mesh(me)

# select faces with area > 10

for f in bm.faces:
    f.select = f.calc_area() > 10

# edges length > 10

for e in bm.edges:
    e.select = e.calc_length() > 10


text:
What would be a simple way to model a curved funnel?
I'd like to model a surface like this curved funnel (pic from Wolfram Math World):

So far I've tried starting with a cone, subdividing it and scaling down successive rings of vertices, but it's a bit fiddly and the result wasn't great. Ideally I'd like a solution which doesn't involve too much vertex selection, so that I can implement it via the API.
Can anyone think of a better way?

Try using the Extra Objects addon, with its XYZ Math Surface mesh option!
Use the parametric equations with a = 5, say:

Note that I use log(u + 1) instead of just log(u), because the domain of u includes zero.
Then invert the normals, shade smooth, and you'll get

(To enable this addon, go to File → User Preferences, select Add-ons, search for "Extra objects," and enable the "mesh" one. Then, to create the object, hit ShiftA and select Math Surface → XYZ Math Surface.)

Note that I suggest this because it gives you all of the precision of the Python solution, with the advantage of already having been implemented, tested, and tweakable!

Thanks, I like this solution. Using the same equations, I ended up with a curved funnel inside a cone. I had to delete the faces that made up the cone before flipping the remaining normals.

@user2950747 Make sure to leave "U wrap" unchecked (see screenshot).

You could make a bent line in the XY plane for example (1), a subdivision surface modifier and use a screw modifier (2) with

screw : 0
steps : as you like
angle : 360

(1)

(2)

I would use the formula directly in python. It is the better approach to not use operator, but rather "absolute" calculations when creating objects in python.
Here is a rather messy mockup code for the funnel.
import bpy, math, bmesh
import numpy as np

def create_new_mesh(name = "myObj"):
    me = bpy.data.meshes.new(name + "_GEO")
    ob = bpy.data.objects.new(name, me)
    scn = bpy.context.scene
    scn.objects.link(ob)
    scn.objects.active = ob
    ob.select = True
    ob.show_name = True
    return ob, me

def funnel_vert_at(x, y, a = 1):
    p = float(x**2+y**2)
    return 0.5 * a * np.log(p)

def funnel_iteration(iteration_start, iteration_end, iteration_steps, i, exp = 8):
    i_s = iteration_start**(1/exp)
    i_e = iteration_end**(1/exp)
    iteration_step = (i_e - i_s)/(iteration_steps-1)
    return (iteration_step * i + i_s)**exp

def create_funnel_loops(iteration_start = 0.1, iteration_end = 1, iteration_steps = 9,rotation_steps = 24, iteration_exp = 8, a = 1):
    verts = []
    for i in range(0, iteration_steps):
        for s in range(0, rotation_steps):
            rad = math.pi*2 / rotation_steps * s
            dist = funnel_iteration(iteration_start, iteration_end, iteration_steps, i, iteration_exp)
            print(i, dist)
            x = math.sin(rad) * dist
            y = math.cos(rad) * dist
            verts.append((x, y, funnel_vert_at(x, y, a)))

    edges = []
    for a in range(0, iteration_steps):
        for b in range(0, rotation_steps):
            next = 1
            if b is rotation_steps - 1:
                next = -b
            b = b + a*rotation_steps
            edges.append([b, b + next])
    return verts, edges

me = create_new_mesh("Funnel")[1]

verts, edges = create_funnel_loops(
    iteration_start = 0.1,
    iteration_end = 1,
    iteration_steps = 7,
    rotation_steps = 9,
    iteration_exp = 8,
    a = 1
    )

me.from_pydata(verts, edges, [])
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.bridge_edge_loops()
bpy.ops.object.mode_set(mode='OBJECT')

The main formula is in the function funnel_vert_at(). X and Y are created in create_funnel_loops with the circle functions sin and cos.Since I was too lazy to implement it, the script uses the internal Bridge Edge Loops function, in the final solution, the faces should be calculated as well.
I also calculated the funnel_iterations very roughly with the power function. You should reverse the funnel formula so that the spacing between the loops is more even.

It is also possible to bevel a Curve (I used a path here, just because it's a straight line by default) and use a second Curve as an Taper Object which gives the desired shape:

The advantage of this method is that the shape stays editable (non-destructive)

When you're done, you can convert it with ALT+C from Curve to Mesh afterwards.
Also see this great answer


text:
What's the simplest way to wrap extruded text around a cylinder?
What's the simplest way to wrap extruded text around a cylinder that has a specific radius (for example, the label on a can of baked beans)?
I've tried using the Simple Deform modifier, but that (a) doesn't allow you to choose a radius and (b) requires the text to be converted to a curve.
I'm trying to model a cylinder with radius of 30, which has a line of embossed text that runs around the curved side, facing outward.
Thanks!

Try using a Curve modifier.

Add curve circle (ShiftA> Curve Circle) and set the radius as desired in the Redo menu (at the bottom of the Tool Shelf):

Add the text object (ShiftA> Text) and type in your text (Tab> Edit mode):

Add a curve modifier to the text object in Properties > Modifiers, and set the Object to be your curve circle:

Rotate the text object 90 degrees on the X axis (RX90) and then scale by -1 again on the X (SX-1):

Increase the Extrude value in Properties > Text > Geometry to give the text some thickness:

Optionally increase the Depth and Resolution values for Bevel to round the edges a bit.

Result:

Notice there is some odd distortion with deformed text (top of the 'T'), you may want to apply Subdivision-Surface and set it to 'Simple' to reduce distortion artifacts before distortion happens.

@ideasman42 "T" distortion is due to low amount of vertices. When Text object use modifier is automaticly meshed (triangulated). Letter "T" has only corner vertices in shape. To get it correct - text has to be converted to curve. For more info see https://blender.stackexchange.com/a/160721/2214

You could simply add BezierCircle to the scene and add a Curve Modifier to text object

I found you must also use the keystroke Alt + C on the text in order to apply the modifier. If you don't do this then you can't apply the modifier, and if you don't apply it then the text will not be wrapped when you render.
So get the text exactly the way you want it as described by gandalf3, above, and then hit Alt + C, then apply the modifier. This took me about an hour to find out why I couldn't get it to work after I'd gone through the steps, so I figured I'd come back here and post this extra info. Thanks!

Sorry, but except for a special case, there is no need to convert the text. Your answer may be interesting if you provide some more information (pictures), to illustrate the need of converting the text. Thanks

I have had to export to curves, also, and use NutsCircle instead of bezierCircle.
Using bezierCircle, the circle radius is arbitrary (it adapts itself to text instead of adapting text to circle radius).
Also, if text is not exported to curves, there is no "extrude" control.

Do you mean Nurbs Circle? You can extrude any text much like you can extrude any curve object. Also you don't "export" to curves, you convert.

You do have Extrude option in the Geometry rollout in the text object properties which is the same as for curves. It's hard to tell how you managed to make curve adapt to text radius however it does work how is described in the answer above.


text:
Can I assign the vertices created by the solidify modifier to a new vertex group?
I've got a mesh with lots of faces which I'd like to solidify. After making it solid, I'd then like to simplify one side (via the decimate modifier) to reduce the polygon count while leaving the other side untouched. I thought one way of doing this would be to assign the new vertices generated by the solidify to a vertex group, then apply the decimate to that group. Is this possible?

You can use a workaround to select them all at once.
If the modifier isn't applied
Assign generated faces to new material and select by material
Create one more material for your object, you may leave its default settings
as they aren't important. The only thing which may be changed is the name of the material so you are able to find it quickly (and you should keep in mind that this material must be used only for this purpose in order this trick to work).
Then, in the options of the Solidify Modifier find Material Index Offset which lets you assign a material to faces generated by modifier. Set it to the value of the material you just created. From the wiki:

Material Index Offset
Choose a different material to use for the new geometry; this is applied as an offset from the original material of the face from which it was solidified.

After the modifier is applied, you are left only to select one of the faces generated by modifier, and click Shift+G > Material. All the vertices with the same material will be selected and you can add them to vertex group.
If the modifier is already applied
It should help selecting all the loops around rims and using Select > Select Loop-Inner Region:


text:
KDTree Function only works once
I'm using mathutils.kdtree.KDTree within a function to find the closest vertex to a particular location, and then extrude it to that exact point.
When I call the function to operate on one mesh it works perfectly, but when I subsequently call the same function to operate on another mesh, it has no effect.
There's no difference between the two meshes that would cause one to fail. I've tried swapping the order, and it's always the second mesh that is unaffected by the function.
I'm wondering whether the KDTree has to be specifically destroyed after use (perhaps when I add the second mesh's vertices it appends them to the tree formed from the first mesh?). I've tried setting it to None at the end of the function, but without success.
I can't find much more detail in the docs.
Here's how the tree is being used:
import mathutils

def add_corner_verts(feature_name):
    mesh = bpy.data.objects[feature_name].data
    size = len(mesh.vertices)
    kd = mathutils.kdtree.KDTree(size)
    for i, v in enumerate(mesh.vertices):
        kd.insert(v.co, i)
    kd.balance()

    # kd.find() and extrude stuff

    # kd = None # Adding this didn't seem to help

Does anyone know why a KDTree might only work the first time?

Fixed it. Nothing to do with kdtree after all, but an intervening function I called was changing mesh.select_mode to FACE when add_corner_verts required it to be VERT. Silly me.


text:
Exporting to unity leads to wrong rotations
Okey guys I know there are many questions many tutorials about that. Probably I have tried all of them. But if I model something like that.

I mean if a model contains more than one parent its going to be always rotation problem in unity someobject always shows -90 on X like that

I tried all settings on exporting panel tried some addons but couldnt figure it. Please help me on this what am I doing wrong because it really makes me sick just want model same rotations on Unity as blender.

You likely don't have the rotation applied to HatchCover_Bottom. Select it in the scene or outline and check if there is X rotation. To apply the rotation press CTRL+A and select rotation.

Thanks for reply but it is not my problem also in blender HatchCover_Bottom rotations are 0 0 0


text:
Vertex coordinates of mesh imported from Blender as fbx are all equal to 0,0,0?
Edit: When I use FBX ASCII export and set Normals == None in Unity's import settings it allows me to access the vertices as expected, I have no idea why this works though..
I was trying to figure out what was wrong with altering the vertices of my model and found that printing the vertices of a model imported from blender resulted in every vertex being == (0, 0, 0). Using the same script to print the vertices of a Unity created Cube worked as intended.
        GameObject go_body = GameObject.Find("tiger_body");
        Mesh mesh_body = go_body.GetComponent<MeshFilter>().mesh;
        Vector3[] body_verts = mesh_body.vertices;
        for (int i = 0; i < body_verts.Length; i++){
            print(body_verts[i]);
        }

Does anyone have any insight into why the blender model is different? I additionally don't understand how the game engine can render it in the correct place when all of the mesh's vertices are equal to (0, 0, 0)?
Thanks in advance!

I tried exporting it in ASCII instead of binary and the vertices exist as expected in the fbx file, why is Unity not recalling them properly with mesh.vertices;?
Additionally, when I export using .OBJ the vertices work as expected as well.

I had this issue and solved it by unchecking the Scale Import option.  I think its because the model was too small so when it scales it down, everything is too close to 0.0 and gets rounded.
I imagine you were getting the same thing as most of your values are already 0.1 and then scale it down 100x it becomes 0.0.


text:
Looping over hierarchies of objects with Python
Today I'm able to select all parameters that I need. But select a object it's pretty simple, using name it's ok.
But I use a very complex hierarchy in blender. As you can see just below:

Thereby I start with a simpler example and try to created a script just to print each object with their name and save the hierarchy, but some difficulties appears to me.
First I start to use type and be sure to conserve the hierarchy.
I decide to use an Empty as a "structure node".
So if I come across a Mesh I just print its name and if it's "EMPTY" I print its name. After printing all the mesh's names I check to see if another Empty is in the same block. I then go to the next one and do the same things. I do this for the entire group, it's a recursive function I think.
This is my Outliner:

But I have two difficulties:
First, I try this script to print the object, but didn't work well. I'm a newbi sorry if there is mistake. Could you help me to understand why it doesn't work?

Secondly, I tried something simpler, just to print by type, starting from the first one to the second one, but it seems to print by alphabetical order. I don't know what happened.

I've tried so many things in a week and now I'm here for your help. Could you take the time to help?
I am at your disposal for further information.
EDIT 25/07/2019
Hello evvery one,
So i try myself to find a solution, and it's pretty hard for me .
I created two function to created a list with all original parents
def explo_hie(id_scene):
    global memoire_1
    global generation_1
    memoire_1=[]
    generation_1=[]
    for o in bpy.data.scenes[id_scene].objects:
        memoire_1.append(o.name)
    ##
    k = len(memoire_1)
    ##
    for i in range(0,k) :
        if bpy.data.objects[memoire_1[i]].parent == None :
            generation_1.append(memoire_1[i])
            print("Add")
        else :
            print("Do nothing because has parent")
    ##
    print("First genration or origal parents",generation_1)
    ##
    w = len(generation_1)
    ##
    for a in range (0,w):
        memoire_1.remove(generation_1[a])
    ##
    print(memoire_1)

explo_hie("Scene")

And it's work pretty weel i'm pround of me, but i think there is some upgrades to do.
But my probleme is over the looping, because as you can see i created a code to check types of objects :
################
#Step One
################

# We need to knwo the len of the generation_1
#This list contains the first object of our generation
k = len(generation_1)

#I scan all object of this list
#For each index i check the type
for i in range(0,k) :
    type = bpy.data.objects[generation_1[i]].type
    if type == 'MESH':
        print("Func grab mesh",type)
    elif type == 'EMPTY':
        print("It's a structural node",type)
    else :
        print("User you don't respect rules",type))

But as you can see it's note a reccursive fonction so i tried to do this :
################
#Step Two
################

# We need to knwo the len of the generation_1
#This list contains the first object of our generation
k = len(generation_1)

#I scan all object of this list
#For each index i check the type
for i in range(0,k) :
    type = bpy.data.objects[generation_1[i]].type
    if type == 'MESH':
        print("Func grab mesh")
    elif type == 'EMPTY':
        print("It's a structural node",type)
        #But if it's a structural noed i need to check if it has children
        nbr_enfants = bpy.data.objects[generation_1[i]].children
        if len(nbr_enfants) == 0 :
            print("Pas d'enfants fonction get info")
        else :
            print(nbr_enfants)
            a=len(nbr_enfants)
            for o in range(0,a) :
                e = nbr_enfants[o]
                print()
                type = bpy.data.objects[e].type
                if type == 'MESH':
                    print("Fonction grab mesh")
                elif type == 'EMPTY':
                    print("reccursive func")
                else :
                    print("User you don't respect rules",type)
    else :
        print("User you don't respect rules",type))

But i'm not able to created a the reccursive function ... and to be honnest i don't really understand how to do it.
I try some simple exemple for algebric operation and i achiv it but for blender i don't know how to do it. Could you help me ?

scene.objects is all objects in scene. Use this if you are interested in all objects in a scene.  ob.children is a list of all immediate child objects.

Hi. Please explain it "didn't work well" in greater detail. What didn't go well? What happened? Use the [edit] link below your question to add more details.

Edit 25/07: I add infos about my work

Printing the hierarchy
Note sure if this totally answers your question, but it shows how to traverse a hierarchy recursively.
Code similar from
How do I copy children of an object using copy() method, without messing up their positions?
and Show and Hide child objects along with Parent
Test script to recursively run thru the hierarchy.  Change the levels keyword argument to go deeper than 10.
import bpy
scene = bpy.context.scene

def print_heir(ob, levels=10):
    def recurse(ob, parent, depth):
        if depth > levels:
            return
        print("  " * depth, ob.name)

        for child in ob.children:
            recurse(child, ob,  depth + 1)
    recurse(ob, ob.parent, 0)

root_obs = (o for o in scene.objects if not o.parent)

for o in root_obs:
    print_heir(o)

 Lamp
 Camera
   Cube.003
     Cube
       Cube.001
       Cube.005
 Cube.002
 Cube.004

Thx a lot, you help me so much and give me more informations to learn and trying to improve my knowledges  :-)


text:
Instance 3D text on object with random rotation
I'm struggling with a 3D design for a lighter case.
I have a cylindrical object and want to cover it with 3D text instances, each with random rotations. (while avoiding self-intersections, if possible.)
Any tips or techniques to achieve this efficiently?
This is how far I've come using the curve modifier, but I just can't find a way to make random rotations without doing it by hand individually.

EDIT: here's a image of how it should roughly look like:

can u pls show an image how the end result should be like? rotations can be in different ways...

@Chris hey I just updated my post to include that. hope this clarifies

wow ...ok...avoiding intersections isn't that easy.... :(

I think it would probably be easier to split out the problem of the non-intersecting randomly rotated scatter of your motif, in the flat. (It can be mapped onto the curved surface later.) The motif is a long,thin rectangle,  truly random rotations would result in a very sparse scatter.. maybe you're looking for imperfect packing? Maybe a rectangular version of this answer ?

@RobinBetts that’s a great idea! I’ll try that. Thanks


text:
Why are Grease Pencil Strokes converted to thin Lines?
I was working on a small test animation within the 2d animation, but somehow hit a hotkey that I couldn't seem to find and fix it.
The image below shows how it looks after the accidental hotkey input.

I had the same problem with the random hotkey, still don't know what it was.
On the top right corner of the viewport are four icons which change the Viewport Shading.
Select the second or third icon on the top right corner of the viewport to change Viewport Shading

This is because the viewport is set for Wireframe shading mode.
The hotkey for this is Shift+Z.