text:
OSL script node : detect if two object collides and output a bool
I would like to have a script node that would output a boolean depending of if two objects are intersecting or not.
The goals is to use it in a mix shader and to hide / show my object depending of the intersection (kind of a mask).

The available inputs of my script node should be two objects ("active" object and "mask" object); and the output should be a boolean (0 or 1) for the FAC of a mix shader.
After having read this, I think it is possible, but don't know Blender scripting good enough yet to achieve it.

https://blenderartists.org/forum/showthread.php?390733-Generate-a-material-change-at-mesh-intersection
https://blender.stackexchange.com/a/9080/14306

Can anyone help ?
Thanks !

Does this actually need to be a script node or could it be achieved with other means - such as Dynamic Paint?

Hi Rich, I don't know about Dynamic Paint.  I added an image to improve my question. What do you think ?

Knowing that I would like to be able to "switch" the material of the inside voxels too, not only the "surface" of the pile.

Do you intend for the whole object (cube) to switch as soon as any of it intersected with the ‘mask’ or would only the intersecting bit be affected?

The whole object.

it's better to this with python and hide the geometry if it intersects with another object... specially because there are too many voxels, doing this in OSL is not a good ideia.

I've been working on something that goes somewhere towards answering your problem.. don't take it too seriously, I'm only getting used to some of the quirks of OSL in Blender/Cycles: some of these conditionals may look unnecessary, but for example, if I don't use the 'hit' local variable, it won't work, even though I don't need to.
#include "stdosl.h"

shader Dipper(
    string Container = "",
    output int IsInside = 0
)

{
    if  ( raytype("refraction") != 1 ) IsInside = 0;
    else{

        int ray_depth;
        getattribute("path:ray_depth", ray_depth);

        if  ( ray_depth % 2  != 0){

            string source_name;
            int hit;
            hit = trace (P,I);
            getmessage ("trace", "geom:name", source_name);

            if (hit==1){
                if (source_name == Container ){
                    IsInside =1;
                }
            }
        }
    }
}

You enter the name of your container object in the 'Container' input,(unquoted).

I'm also pretty sure you could make the logic of this shader fail, without too much effort.

Awesome !!! I'll try that.  Just to be sure : OSL does not work on GPU ?

@gordie .. at the moment, you are not offered the option of OSL if you select GPU as your rendering device in Blender.

You could adapt this old script of mine. It works with materialsIDs, so you get a better control of what objects work as a mask and what objects should be rendered as normal. https://blenderartists.org/forum/showthread.php?329326-Multiple-transmissive-objects-as-just-one-surface&highlight=

Seems nice too. Also, what I wanted to achieve is to "toggle" the material change (eg. when the origin of the mesh is inside the "domain"); not to have a transition. Would it be possible ?

@Secrop - thanks for your ref, tider and more knowledgeable than mine; material IDs are the way to go. (I didn't even know you could retrieve them). One line has me stumped:
{exteriorSurf=(myMaterialIndex==hitMaterialIndex)+hitFace;}
e.g. if myMaterialIndex != hitMaterialIndex and hitFace is True, (hit face was backfacing), then exteriorSurf evaluates to 1? So enclosed unlike materials are made transparent?
Maybe I've got the returns of {getmessage ("trace","backfacing" , var)} wrong. Where can you find the complete set of values that can be returned by {getmessage ("trace", "..." , var)}?

@gordie If you want to flip the entire material of an object when its origin is enclosed, maybe an approach like this one is better: https://blender.stackexchange.com/questions/105789/update-values-of-objects-for-python-script/105897#105897

@gordie, I still think python is the best option (i.e. Robin's sugestion), as tracing rays is an expensive task.

@Robin Betts, the script is old.. from a  time I was still exploring OSL. just posted here to show that you can also probe materialsIDs, when tracing. For the full list of attributes you can retrieve from the message system, check the osl_services.cpp: https://git.blender.org/gitweb/gitweb.cgi/cycles.git/blob/HEAD:/src/kernel/osl/osl_services.cpp

It's my first experience with OSL, so I can't say if this code has no bugs, but at first look it works as it should. I used source from Secrop's comment and adapted just as he advised.
surface Mask(
    closure color Surface = 0,
    output closure color Closure = 0
) {
    float visible = 0.0;
    float myMaterialIndex = 0.0;
    float hitMaterialIndex = 0.0;
    vector VectorTrace = vector(0.0, 0.0, 0.0);
    int Hit = 0;

    getattribute("material:index", myMaterialIndex);
    if(backfacing()) {
        VectorTrace -= I;
    } else {
        VectorTrace += I;
    }

    int DoTrace = trace(P, VectorTrace);

    if(DoTrace) {
        int HitTrace = getmessage("trace", "hit", Hit);

        if(Hit != 0) {
            HitTrace = getmessage("trace", "material:index", hitMaterialIndex);
        }

        visible = myMaterialIndex == hitMaterialIndex;
    }
    if(visible != 0) {
        Closure = Surface;
    } else {
        Closure = transparent();
    }
}

The setup consists of setting equal pass index for both objects materials and plugging script's node right before last node.

Be aware that any objects, placed behind one with according material index, will block view at your masked object. It sounds obvious, but not really, when it comes to transparent objects too, even those that doesn't contain typical shader output but only volume output.

Ye, it doesn't return boolean, as author wanted, but at least it
solves that tricky problem, when you forced to use multiple render
layers and compositor...)


text:
Array Modifier - Equal space between all duplicates (Loops)
I know this has been asked already, but the answers, despite giving a certain degree of improvement give no satisfying solution for those who want extreme accuracy.
When using the array modifier for a loop/circuit as the path, is there any way to have ALL spaces (Including the one between first and last duplicate) to be the same distance apart, so that there isn't the typical inaccurately spaced gap/distance that occurs between the first and last duplicate?
For example if I was using a plain circle as a path, couldn't I click a theoretical option for example, lets call it "Consistent Spacing" that would divide into equally spaced sections as I increase the duplicate count, so if I have 3 pieces the path would be divided into 3 and the duplicates placed appropriately?
The only reason this matters so much is because of some very irregular paths that I need to have spaced accurately. One easier example would be accurately spaced tank tracks.
Perhaps there is an easier way, or I'm underestimating/getting something wrong. If manual math is the only solution, are there any direct resources for this?
Thank you in advance.

Please increase clarity by including screen snapshots with annotations if necessary.  This will help others to understand your extreme accuracy problem.  Please show what is successful/desired and what has failed.

Please show train tracks.  Please show irregular tracks.

Consider an [Array Modifier] followed by a [Curve modifier]

In the above image you see some distortion of angles between faces.
Consider a script which calculates [x constant offset] of the array modifier.  Note the warning.

Consider a [spline constraint ] where each track has a one-to-one correspondence with a single bone.

Added picture that hopefully makes it a little clearer, the same spacing principle would be present for anything that needed to be duplicated, such as traintracks.

source: Stack Exchange

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

sort: votes


text:
Animation Path Hierarchy problems
I've recently moved onto the task of animating for a few simple rigid models, and am having a lot of trouble
 with understanding offsets and bone Hierarchy/relations.
I'm trying to make a miniature train with a body following a path, and a set of rotating wheels and cranks that do
revolutions constantly, while maintaining position and rotation in relation to the parent bone/body.
(This is for the Source Engine, so I'm using Vertex groups with bone parents, all part of a single armature and a single object.)
I can do all of these animations seperately without issue, including the path animation, the cyclic pieces, linear extrapolation for speed etc. and can save and export the "Action" from the path as keyframes, but I cannot get the parenting to work without things having their offsets being misplaced, warping, gradually moving out of position etc.
The way bones and objects move around between Edit, Pose and Object mode is also very confusing, considering some of these problems seem to be offset and origin based, leading to more confusion when trying to reposition them.
I had assumed I would just need to have each animation/action bake ready seperately per bone, then move the child bones (And attached Vertex groups) in relative position to the parent, create the hierarchy then add the Parent path constraint, I must be doing everything wrong as Blender seems to want to
make this very difficult for me.
I have a feeling this is a very basic sort of question, but I cannot find help for this case anywhere, almost all path animation tutorials don't even attempt to explain how hierarchy works when multiple moving/animated parts are set up.
Even a very basic .Blend file a few text pointers would be of great use to me, I should be able to work out everything else myself after seeing even one working example.

I was considering adding pictures, but I doubt in this case it would be of any use.

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


text:
batch rendering several .blend files with the same light setup
I was wondering about the easiest way to render multiple objects (like 100 different objects) with the same light setup without creating a light setup in each '.blend' file.
I created a '.blend' for each object, the object is parented to an empty and grouped. On the other hand I created a '.blend' where I have my light setup, camera, compositing, etc.
Is there a way to make all my renders easily?
Thanks for help :)
Katsele

Also the same focal length/camera settings? Object sizes?

Everything the same just the object changes

Probably the best way is to open your light setup and run a python script that will look for all .blend files in given directory, and for each of them: 1. import new object, 2. render, 3. remove current object. I don't know Bledner API yet but it shouldn't be hard. Will try when not on mobile if noone does it.


text:
2.82+: How to use fluid.bakeData() in python code
Before Mantaflow (2.82+), we were able to bake smoke sims with custom python code like follows:
o = bpy.context.selected_objects[0]
c = {}
c['point_cache'] = o.modifiers['Smoke'].domain_settings.point_cache
bpy.ops.ptcache.bake(c, bake=True)

o in this case is the selected object (Smoke Domain), while c is a custom context supplied to the op. Now with Mantaflow, I've tried the following, which causes Blender to crash:
o = bpy.context.selected_objects[0]
c = {}
c['point_cache'] = o.modifiers['Fluid'].domain_settings.point_cache
bpy.ops.fluid.bake_data(c)

Resulting error isn't much help:
Error   : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF71D40835C
Module  : C:\Program Files\Blender Foundation\Blender 2.82\blender.exe

What is the correct way of calling fluid.bake_data() in custom python code?
Thanks for your help!

I'm curious if you ever worked this out?
I'm trying to bake fluids in python and am running into a similar issue when running bpy.ops.fluid.bake_all()

This works to an extent for me on an AWS GPU instance:
for scene in bpy.data.scenes:
for object in scene.objects:
    for modifier in object.modifiers:
        print(object.name, " - modifier type: ", modifier.type)
        if modifier.type == 'FLUID':
            print(object.name, " - fuid_type: ", modifier.fluid_type)
            if modifier.fluid_type == 'DOMAIN':
                print("Bake All: ", object.name)
                bpy.ops.fluid.bake_all({'scene': scene, 'active_object': object})
                break

The problem I have is that I have three objects

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


text:
How to change component selection type in edit mode in Blender 2.8 alpha?
Anyone know what happened to the Ctrl+Tab shortcut? Usually when in object mode it switches to weight paint mode, and when in edit mode it offers a menu called "mesh select mode" to choose between vertex, edge, or face selection.
That used to work fine on last weeks builds of 2.8, but today I've downloaded the new build and now Ctrl+Tab only shows a menu to change between "object interaction mode" (object mode, weight paint, sculpting, etc..).
Note: Tried exporting the key configuration file from a previous build where this was working, but that didn't fix the problem.

I'm voting to close this question as off-topic because it is about issues with unfinished experimental versions of Blender

First of, Blender 2.8 is in development. It's an unfinished alpha product constantly changing hour after hour. So if you're not prepared to constantly change with it, you should wait for the 2.80 release.

For now, the default keymap is one of the things currently being worked on. You can follow the advancement  on the tracker here. There is also a list of shortcut being made here.
The previous component menu seems to be gone for now. Though you can use 123 to switch between each of them.

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


text:
Why is mesh reacting weirdly when adding a Solidify modifier or smooth shading?
I've been struggling a while to get some sort of a tube/flow conduction for a rotor right, but I get some weird glitches (or I am doing something stupid).
How I made the mesh (maybe it helps to know, so you know where I went wrong):
First I made a cylinder, deleted the bottom and top face. Then I drew a path and made it to a certain shape. After that I use a array modifier on the cylinder and a curve modifier. So after that I was left with a curved tube.
Then I just started to delete some faces to open it up and added some sort of a roof to it, so it would let the water flow in a certain way.

Problem I am having:
Then I wanted to give it a little bit of thickness, so I used the solidify modifier, but after applying it to the mesh it did not want to do what I want:

Also, when I tried to use smooth shading it showed some weird stuff:

Link to the photos : https://imgur.com/a/VX4RekM
How do I fix these bumps when I give it a little bit of thickness? And how to fix the weird smooth shading thing?

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

Hi. Please add any relevant images inline using the built-in uploader. See: https://meta.stackexchange.com/questions/75491/how-to-upload-an-image-to-a-post

I've added the file, thanks for the reply! @moonboots

I've added the file instead of pictures, thanks for the reply! @RayMairlot

A blend is good, but ideally blend files should be supplemental to good question content, e.g. a description of how you imported them and screenshots of the result. We ideally want people to be able to answer the question (or see if they have the same problem) as easily as possible.

yes you must have made some bad manipulations but it's hard to tell how it happened. Anyway, you can select all in Edit mode and W > Remove Doubles, with a Merge Distance of 0.02 on the bottom of the left (Tools) panel. Also, recalculate the normals with a ctrlN. Then some isolate vertices will remain and you can delete them: select the main shape with L and invert the selection with ctrli, then X to delete. At last, you have some tris that you could easily replace with quads.

Thank you so much! This fixed the problem! Thanks!


text:
Moving multiple objects at once
I'm trying to move a set of objects along say x-axis, I select them all and try to shift them, but all of them are aligned to the different axis,  so they move along different axes.

How do I quickly fix this.
P.S. I'm an absolute beginner

I think you need to change the transform orientation from local to global. By default, it’s in the header of the 3-D view port.

yes, i did that but that doesn't help

Do you have it set for individual origins for the transform or median point?

for individual origins

Change it to median point.


text:
How do I set Gradient Texture not to be global in an array?
I created a 3D model from an SVG and now that I set the material of the "play" button to a gradient and create an array, the gradient seems to be global and I want them to have the exact same gradient

I guess you need to apply the Array modifier and separate each object

I tried, but even if I managed to do this, wouldn't I lose performance creating new objects?

Yes, what you can do is select them all, select one last, and press Ctrl L (Make Links) > Object Data, so that they all share the same mesh

To avoid fiddly math with UV offsets in the Array modifier, the simplest thing to do might be to unwrap your object from a vertical orthogonal view, with U Unwrap > 'Project From View (Bounds)':

Then every array element will carry its own UV coordinates, 0->1 in U:

I tried this but the gradient was all jagged, I think that is due to the SVG file I used to extrude the struct, maybe I should just create the triangle by hand

Hi @Pedro! Thanks. The distortted UV might be due to the heavy triangulation of an imported SVG. Try X > 'Limited Dissolve' on the triangle before extruding.


text:
Does anyone know how to convert a custom node group into a node which is not a nodegroup?
I have been trying to make my custom node groups into a node. Can anyone help me ?


text:
Washed-out Mesh's colors on 2D animation
I'm making a 2D animation and i'm using some meshes to make the face and a Grease pencil object to make the mouth.

On viewpoint shading it's perfect, but when a render, the meshes get that washed-out color.
Already try to change the view transform but no work. What can I do?

Is one stroke object affected by lights and the other one not?

Looks like its the mesh getting lighter, not the grease object getting darker... you could try using the color picker on the render to match the grease pencil color with the mesh perhaps?

@TheLabCat the head is made with various meshes (Plane object) and only the mouth is a grease pencil object. How I can disable the light affecting these planes?

@NascentSpace I can use the color pick, but the washed-out color will continue.

If this is EEVEE, just use an emission shader.

FOUND: change the material surface from Principled BSDF to Toon BSDF make the trick.

FOUND: change the material surface from Principled BSDF to Toon BSDF make the trick.

The Material preview is now with the wrong color, but the Render is right and that is what matter.


text:
Is there a way to get/calculate the final color code of an object after using subsurface colour?
Is there a way to get/calculate the final color code of an object after using subsurface color? I use these codes to find the optimal color palettes for my scene.

In the Blender Render window you can right click to get stats on the pixel you're pointing at.

@Allen Simpson
Unfortunately, it won't be accurate enough


text:
Is it possible to extract the bmesh python module and use it standalone, in other python projects?
I have been searching around the web for python mesh processing libraries that can do "simple" mesh editing functions like edge beveling, or face extrusion. There's not really anything out there that I can find, that can do what blender does.
So I'm wondering, is it even feasible to build/compile/extract the bmesh system to work standalone?
I've been digging around in Blender's github, the amount of files related to bmesh is staggering..
Failing that, I'm also wondering if it would just make more sense to include a full blender install folder and simply append it to python path in the correct places and use the bmesh python module that way..
Not sure if bmesh requires blender to be up and running to function or not.

Probable duplicate https://blender.stackexchange.com/questions/117200/how-to-build-blender-as-a-python-module

if you build (or obtain) bpy as a python module, you can import bmesh

It's not feasible in the sense you're thinking of.  Blender, including the bmesh implementation, is mostly written in C++. There isn't a bmesh python implementation, only a bmesh python interface to the C++ code.
You would have to extract the bmesh code, make it into a stand alone C++ module, and provide C++ runtime support in your python system.

thanks for your input!


text:
How can I ignore the occlusion relationship of the mesh in GLSL drawing?

gpu.state.depth_test_set("NONE")
The drawing of the back side (white) should be occluded.
gpu.state.depth_test_set("LESS")
But I don't want it to be occluded by the mesh.
Can I achieve this? How can I do it?
Thanks.

Reading the docs for this function it shows a handful of other options like NONE, ALWAYS, LESS, LESS_EQUAL, EQUAL, GREATER and GREATER_EQUAL. Have you tried any of those?

@Jakemoyo I tried, it still gets occluded by the mesh.


text:
Lock x-axis only in sculpt?
As shown in the picture, I don't want to mirror the mesh for the time being, and I encountered some problems when using sculpting: I want to lock the point on the x-axis (red edge)
Can this be done using geometry nodes or scripts?
Thanks！

Hello. Please avoid text written inside images, always prefer typing it directly in the body of the post instead. Image content can't be indexed and thus can't be readily found when searching in the future. Updates are difficult because it can't be easily edited in case of mistakes, nor updated in case of future changes. It doesn't follow the fonts and style of the website automatically, and doesn't work with screen readers.


text:
Rendered image only black and white noise
I am new to Blender and try to reproduce a YouTube TutorialBlender Tutorial: Splash Effect. Everything works fine, up until I try to render the image. What I get then is nothing but black and white noise, also known as salt-and-pepper noise:

I re-checked that the three light sources are set to Emission. The number of render samples is set to 10, but also increasing it to 100 doesn't change anything.
Here is the blend file
I'm sure I made a stupid noob mistake, but which?
Thanks a lot,
Polis

I'm surprised that people can't answer that question right away as it appears to be quite a noob problem. Anyway, I added a link to the blend file now. I hope you can open it.

You have two fluid domain objects. Try deleting one of them.

I just deleted the outer fluid domain object and now everything seems to work. However, I don't understand it as I think I did what was explained in the video, and it works there, and also the simulation worked fine. But thanks anyway.

It appears you have two fluid domain objects, one of which has no material (Cube).
Since you can only have one fluid domain while baking, presumably this second domain got accidentally created after the bake was done. Since it has no material it defaults to diffuse. At 10 samples this diffuse surface appears pretty noisy, giving the result in your example render:

Delete it, and all is well:


text:
Create a new edge along a face
See the model below:

Is there a way to move the selected face without affecting the body of the plane? the wing was created by simply extruding the face, so now it shares the bottom edge of the wing and moving the selected face lifts body too.
Of course, I'd still want it to be connected to the body, i.e. the newly created edge should slide on the body face.
Edit
Here is what I wanted to do. Open blender, select default cube, go to edit mode and simply extrude one of the side faces (not top or bottom face) of the cube. You get two connected cubes (sort of). Now select the bottom edge that is common between the two cubes. I wanted to move this edge upwards (in Z direction), while keeping one of the cube intact.

Hi, idk if I got what ou mean, but also see if "loop cut and slide" (CTRL-R) helps

@m.ardito: No. Loop cut doesn't do this. To see what I mean, open blender, select default cube, go to edit mode and simply extrude one of the side faces (not top or bottom face) of the cube. You get two connected cubes (sort of). Now select the bottom edge that is common between the two cubes. I want to move this edge upwards (in Z direction). See the new image above to see what I mean.

oh, I see better now. In this way you get an opening in the mesh. You can also use ALT-V (rip fill), if that is needed.

@m.ardito: In fact ALT + V better suits my needs. Thanks a bunch.

Made it work. I just needed to go to Vertex mode and select the two vertices that join the body and the wing. Then from Vertex menu (Ctrl + V), choose Rip.


text:
Connect edge with perpendicular edge
Is there a way to connect the selected face (white in the image) to the edge in front of it?

Result should create two vertices in the facing edge and simply merge the selected edge with the newly created edge.
Hope I made myself clear.

The fastest solution in this case may be using a knife tool. Press K and snap the knife to the vertices. After pressing the LMB press C to make the cut go straight and cut the longer piece horizontally. Repeat the process for the other vertex. Now you can use a bridge tool to connect pieces (and then dissolve the unnecessary edge). You may also use a snapping tool (vertex) to connect pieces and then remove doubles.

That's precisely what I needed. Thanks a bunch.


text:
Blender 2.8 - Keyboard not detected
I'm trying out the latest Blender 2.8 beta (tried both 15th and 16th of December) and I can't get Blender to detect my keyboard. No key works. If I look in the user prefs/input it's completely empty. Is this a known bug or am I missing something? It all works without problems in 2.79.
There's an error when starting in command line:
C:\>D:\blender-2.80.0-git.4488056f3d9-windows64\blender.exe
    Read prefs: C:\Users\Simon\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend
    found bundled python: D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python
    Traceback (most recent call last):
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\addon_utils.py", line 351, in enable
        mod = __import__(module_name)
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\addons\io_scene_gltf2\__init__.py", line 24, in <module>
        from .io.com.gltf2_io_debug import Log
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\addons\io_scene_gltf2\io\com\gltf2_io_debug.py", line 20, in <module>
        import logging
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\logging\__init__.py", line 26, in <module>
        import sys, os, time, io, traceback, warnings, weakref, collections.abc
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\traceback.py", line 5, in <module>
        import linecache
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\linecache.py", line 11, in <module>
        import tokenize
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\tokenize.py", line 33, in <module>
        import re
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\re.py", line 122, in <module>
        import enum
    ImportError: bad magic number in 'enum': b'\x03\xf3\r\n'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\__init__.py", line 81, in <module>
        main()
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\__init__.py", line 78, in main
        utils.load_scripts()
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\utils\__init__.py", line 273, in load_scripts
        _initialize()
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\addon_utils.py", line 47, in _initialize
        enable(addon.module)
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\addon_utils.py", line 359, in enable
        handle_error(ex)
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\addon_utils.py", line 299, in handle_error
        import traceback
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\traceback.py", line 5, in <module>
        import linecache
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\linecache.py", line 11, in <module>
        import tokenize
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\tokenize.py", line 33, in <module>
        import re
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\re.py", line 122, in <module>
        import enum
    ImportError: bad magic number in 'enum': b'\x03\xf3\r\n'
    Traceback (most recent call last):
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\utils\__init__.py", line 186, in register_module_call
        register()
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\startup\bl_operators\__init__.py", line 69, in register
        register_class(cls)
    ValueError: register_class(...): already registered as a subclass

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\__init__.py", line 81, in <module>
        main()
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\__init__.py", line 78, in main
        utils.load_scripts()
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\utils\__init__.py", line 261, in load_scripts
        test_register(mod)
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\utils\__init__.py", line 228, in test_register
        register_module_call(mod)
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\scripts\modules\bpy\utils\__init__.py", line 188, in register_module_call
        import traceback
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\traceback.py", line 5, in <module>
        import linecache
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\linecache.py", line 11, in <module>
        import tokenize
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\tokenize.py", line 33, in <module>
        import re
      File "D:\blender-2.80.0-git.4488056f3d9-windows64\2.80\python\lib\re.py", line 122, in <module>
        import enum
    ImportError: bad magic number in 'enum': b'\x03\xf3\r\n'

    location: <unknown location>:-1

    location: <unknown location>:-1
    Keymap: '3D View Tool: Select Box' not found for tool 'Select Box'

I'm on Windows 10

I'm having the same issue and got this response on the Blender website.
It looks like conflicting settings with some old version.
Try the Blender zipped version.

Or clean uninstall old blender files
Load Factory Settings & Save Startup File Also Edit -> Preferences Load Factory Setting & Save

Then try a new project.
For a smooth Blender experience, update your graphics drivers to the latest version from the official site.

If this works, or if you've found another solution please update.

After compiling 2.80 in Linux I had similar problem, no keys were working and this error was repeated infinitely:
Keymap: '3D View Tool: Select Box' not found for tool 'Select Box'

By googling this message I have found you question. I solved the issue by removing ~/.config/blender/2.80 - after this everything worked.
It was a bit strange that my own build did not work with my existing user preferences, since daily builds worked just fine with them, but I guess something was wrong, since after recreating them and enabling similar set of addons everything works just fine.
In non-Linux OSes path to user preferences is much longer:
Windows Vista/7/8/10: C:\Users\username\AppData\Roaming\Blender Foundation\Blender
Windows XP: C:\Documents and Settings\username\Application Data\Blender Foundation\Blender
Mac OS X: /Users/{user}/Library/Application Support/Blender

Navigate there and try to remove or rename 2.80 folder.

On every OS since Windows XP, you simply can replace the long path to "Roaming" with "%AppData%". This will take you directly to the currently logged-on user's Roaming profile.


text:
Whenever I move an object a circle appears that also affects other objects
I am not entirely sure how to even describe the issue I am having. I am making a pretty simple animation with two people and a cop car. Whenever I move one object a large white circle appears around it and anything inside the circle is affected by where and what I do with the object I am trying to move. I have looked all over but I cant seem to find a solution if anyone knows what I am talking about the help would be greatly appreciated.

Hi, maybe share your file using http://blend-exchange.giantcowfilms.com/, then edit your question and paste the provided link, it would help others to help you

I'd just like to point out that blend-exchange's terms are pretty broad on what they can do with your files! Now, the person who owns the site almost certainly has no bad intentions, but personally I don't feel comfortable with it. You don't have to use it if you don't want to. (:

You are probably in "proportional editing object mode" in order to toggle this circle and get back to the standard handler press "O" on keyboard.

Oh my gosh thank you so much! this was the problem <3


text:
Mirror Modifier mirrors object incorrectly
I have encountered a problem. When I add the mirror modifier to my object, it does not mirror correctly as the mirror object is distorted (the sleeves of the shirt have been swapped) and therefore it does not fit correctly.
You can see the mirror object on the right has randomly swap the sleeves of the shirt, and so when putting them back together, it just gonna look wrong. Is there any way to solve this problem??

I'm super new to Blender so it may just be a dumb question. Thank you guys in advance!

I am not entirely sure why you would use a Mirror modifier there. The mesh is not mirrored so you can't "put them back together". When working with a Mirror modifier you only create one half of the shirt and use the Mirror modifier then to generate the other half. You created a whole t-shirt and mirrored it. Why would you even want to apply the Mirror modifier now?
If you want to get a perfectly symmetrical shirt you have to do that from the beginning by creating only a half of it.
https://www.youtube.com/watch?v=JfWfisAPEzE
I hope I could help.

If you are trying to create a symmetrical shirt. You can do.
1: Model only half of your shirt and use the mirror modifier.
2: Edit Mode > Select All > Go to Mesh Menu > Symmetrize.
Since you have your shirt already modeled you can prolly just do #2.


text:
2.80: Pie menus and Quick Favorite menu - conflict?
When I have the 'UI Pie Menu Official' activated I cannot open the Quick Favorites Menu when pressing q. All I get is another pie menu with possible view port option (top, front, left etc.)
Any idea?

Pie Menus are enabled by default in blender 2.8, so you no longer need to enable the addon.  So now the q key will work as quick favorites.
But how do you get the view pie menu that the addon previously provided with key q?  Well, that's now the backtick key (`).  You can see all the pie menu key mappings under the user_preferences->keymap and filtering on pie:


text:
Is there a way to hide the cycles shader node when using my own render plugin?
I'm working on my own renderer plugin for Blender 2.8.
I have my own set of shader nodes.
Is there a way to hide the cycles shader node when my renderer is selected as the rendering engine in Blender?
Thanks

If you use a custom node tree type for your nodes (i.e. they are completely separate from Cycles/Eevee nodes), then you can hide the Cycles shader node tree by setting the class attribute bl_use_shading_nodes_custom in your implementation of the RenderEngine class to True:
https://docs.blender.org/api/current/bpy.types.RenderEngine.html#bpy.types.RenderEngine.bl_use_shading_nodes_custom
On the other hand, if you put your custom nodes in the Cycles/Eevee node tree, I do not know of a way to hide the other nodes (I suspect it's not possible).

Thanks for replying, I tried your attribute. However, it is not exactly what I want.
Basically, this flag only removes the node options from the right-click menu. It doesn't hide the existed nodes that have already been created before. Eventually, there is still the possibility to connect cycles node to custom ones.
Do you know if there is any example does a perfect job of extending the system?
As far as I know, most of the blender render plugin, like mitsuba, pbrt, readeon pro render, renderman, don't handle it perfectly.

You might want to clarify in your question that you put your custom nodes into the Cycles shader node tree instead of using a custom node tree type (which I assumed).

What I would like is to create some custom shading nodes into the cycles shader node tree. However, I don't want to cross-connect to the cycles nodes and my custom ones, which is why I would like to hide the native cycle/eevee nodes when my rendering engine is picked.
So do you have the solution to the problem?


text:
panning on linux conflicts with zooming
so i recently switched to pop os, and i imported my keymap the problem is, the view3d.zoom is mapped to wheel in/out, but i also have view3d.view_pan mapped to ctrl/shift + wheel up/down on windows i never had any issues, but on pop os both commands get activated, maybe this is a 2.80 thing but the last build that i had worked (on windows), that was in july or so, this is a major problem for be because i rely on the panning for  moving in the viewport, since im not using blender often im not going to relearn it.

Is this on a laptop?  Do you have emulate 3 button mouse enabled?

on a desktop, i have a normal steel series (rival 100) mouse.

In blender 2.80 there are icons in the viewport that do these functions.  You can also use the +/- keys and ctrl + numkey to zoom and pan

i know,  but i literally can't move without panning i never realised that, its like not being able to use wasd or the arrow keys in a game, anyways thanks for taking the time to comment.


text:
Boolean on two simple bmesh
I'm a newbie in blender and I'm trying to play around with the boolean difference modifier.
I have two concentric disks and I want to perform the boolean differece between them. I'm using the python API.
Here is an example:
import bpy
import bmesh

c1mesh = bpy.data.meshes.new("Disk1")
c1object = bpy.data.objects.new("Disk1", c1mesh)
bpy.context.scene.objects.link(c1object)
bm = bmesh.new()
bm.from_mesh(c1mesh)
bmesh.ops.create_circle(bm, cap_ends=True, diameter=2, segments=128)
bm.to_mesh(c1mesh)
bm.free()

c2mesh = bpy.data.meshes.new("Disk2")
c2object = bpy.data.objects.new("Disk2", c2mesh)
bpy.context.scene.objects.link(c2object)
bm = bmesh.new()
bm.from_mesh(c2mesh)
bmesh.ops.create_circle(bm, cap_ends=True, diameter=1, segments=128)
bm.to_mesh(c2mesh)
bm.free()

bool = c1object.modifiers.new(type='BOOLEAN', name = "diff1")
bool.operation = 'DIFFERENCE'
bool.object = c2object
c2object.hide = True

This has no effect (besides hiding the second disk). When I try to apply the modifier from the gui I get no result (besides some weird lines over the disk 1).
I guess that the problem is just my poor initial knowledge of blender (and general 3D modelling).
Thanks in advance.

Hope this helps:
import bpy

# initialize the variables to work with, in this case two selected objects, in yours c1mesh and c2mesh
first_object = bpy.context.selected_objects[0]
second_object = bpy.context.selected_objects[1]

# add the modifier and change settings
first_object.modifiers.new(name = "Boolean", type = 'BOOLEAN')
first_object.modifiers.get("Boolean").operation = "DIFFERENCE"
first_object.modifiers.get("Boolean").object = second_object

# just cosmetic hiding of second object so you can instantly see the result
second_object.hide_viewport = True


text:
I can't get the hair on my model to render, or even apply color. (Buzzcut)
I'm trying to give my model a buzzcut. I went through all the proper steps that I know of. Creating a vertex group, all these things with the particle system and everything, but when I go to change the color of the model's hair (black), it turns the entire model that color and I can't figure out why. Additionally, when I render the model, the hair does not appear. I've been stuck on this for three days now. Thanks :)
Add: This picture is what I am now faced with. Changed the color of the scalp and not the hair.

To increase the clarity of your question please include screen snapshots.  Include successful and unsuccessful parts of your question.  Thanks.

A few possibilities are (assuming using cycles):

For the mesh, you should make two materials; the first material is for the mesh itself, the second material is used to select it from the 'particle systems' to use for the hair material. To change the hair material, you should only modify the second material, since the first material is used for the mesh (for example face color). In image, the first material, light colored is used for the mesh and second material, dark colored is used for the hair and is also selected in the particle systems.

When you are in particle edit mode, then you don't see the hair when you render it or use rendered shading. You should see the hair, when you are in vertex paint mode, edit mode, object mode, sculpt mode, weight paint mode or texture mode.

But I am not sure if this is what you mean :)

Actually, I think that might just solve my issue, thanks! I'm going to check it out and see what I can do!

Yes, there's the hair in vertex paint! Thanks! Now to find a YouTube tutorial on how to implement THIS feature.

Ok, so I don't know how to separate the hair material from the main body of the model. I can create new materials all day, but I can't figure out how to link them to the hair material and not the main object.

I added image for clarity :)

I tried to do that, by making the vertex group for hair a different mesh, but I did not succeed. I think I must have done it incorrectly.


text:
Switch to camera from linked group
I have a .blend file with my game character, including camera. Character elements are in the same group. I'm linking this group into the second file. Unfortunately I cannot switch to the linked camera properly. Is it possible to switch to camera from linked group?

Ok, I found a quite nice workaround. One can just add a Scene->Set Camera actuator to one of the objects in linked group (for now I'm adding it to my character object) and feed it with camera. If the game engine will be enabled with this group linked to the scene, linked camera will be picked. One drawback I've noticed so far is that the rendered viewport is not limited respectively to the camera boundary if you use this method.
EDIT:
Actually, if you enable game engine in camera view (it can be any camera) the viewport is limited as usual.


text:
Blender Crash on .fbx export
So I finally finished my 1st animation in blender and wanted to check it on UE4. I tried to export it but when I click export, doesn't technically crash but it stops responding and into "thinking" mode. It works when I disable animations but I need them. I'm mostly a beginner in this stuff so any help will be appreciated.
Edit: Deactivated "All Actions". It works now
I'm using blender version 2.79b on Windows 10.

For me, running Blender 2.83 on Windows, the solution was to reboot my computer. ¯\_(ツ)_/¯

Tips to avoid this:

Activate Selected Objects (not whole scene)
Activate only "Deform Bones" under Armature tab(so rig won't corrupt the FBX if many constraints, or loopback bones that might make it bug - will also export in a clean way, etc)
Disactivate "All Actions" from Animation tab (so that rig will export only it's aniamtion clips, not the whole scene animation
Make sure that SDS is at a reasonable level of Render Settings (1 or 2 max), SDS at 3 or 4 will take a long time to "Apply Modifiers" to the mesh - specially if it's a whole scene. You can optionally turn this "Apply Render setting modifiers" off under Geometries tab

Then export and the software won't have to think so hard or ultimately crash.

tnx for your help


text:
Normals Inverted
The normals on the "cube"s, for some reason, appear inverted. They look inside out. I've tried recalculating normals but it still isn't working. I'm a bit of a beginner so what should I do?
Edit: Fixed. Didn't select all faces in recalculating normals.

Without opening the file you either have -1 scaling or your normals are actually inverted in the .blend file as well. Blender by default shows you both sides of the faces, you need to enable "Backface Culling" in the 3D view properties or enable normal display in edit mode to see which way they are actually facing.

Thanks I checked with backface culling and they are inverted in blender. I've tried recalculating normals but it still isn't fixed. I'm a bit of a beginner so what should I do?

Recalculating normals SHOULD work for a simple cube, did you have all the faces selected? Anyway you can flip normals of selected faces using CTRL+F menu in edit mode.

Ah thank you. I didn't select all faces.  It seems such a stupid mistake now. So should I answer my own question for others or delete it? I don't know all the rules of this site properly


text:
Cycles - Adding an object with emission shader makes part of my scene darker?
When I turn an object (with an emission shader) in my scene on it makes part of the scene actually go darker.
The light in question is on the outside of a vehicle (which has lights on the inside of the vehicle too) The light on the outside of the vehicle cannot reach the inside of the vehicle as it has no path.
I have made a quick example of the problem. But the problem I am seeing is more pronounced than this example, in my scene even if I turn the samples up to 2000 I never recover the light and it still appears darker and more grainy.
Here is a quick 100 sample render with the light disabled:

And here is a render with the light enabled:

Notice that in the second picture that the scene inside the vehicle actually becomes darker
What can I do to tackle this issue???
Update
I have got clamp Direct set to 4 and indirect set to 2 which tackles a lot of the grainy-ness but adding this light just makes my scene look terrible... but i need this light as it is integral to the scene.

It looks like it's just because of noise. Try cranking up the samples, and try enabling multiple importance sampling on the light inside.

Genius, I actually did the reverse but hey... turning multiple importance sampling OFF for the lights outside did the trick. I'm not sure now if I'll get the problem in reverse but it is way less important to have problems outside the vehicle as all the action, ahem, not like that, is happening inside. If you added an answer describing multiple importance briefly I'd happily accept it.

What happened there, is you where telling Blender that those lights where more important than the lamp inside, so it was throwing more samples there, and it made everything else noisier. I'll write up an answer in a second.

Done. I'll probably make some changes to it, but in general I'm done. If it's not specific enough, let me know.

What's happening here, is you have your light inside. Cycles is throwing a lot of samples there because there aren't any other lights. Then, you added your other light and it had multiple importance enabled.
Cycles will of coarse have to throw some samples at that light, so that in it's self will make it noisier, but in addition to that, having multiple importance on, tells Cycles that that light is more important than the other light, so it throws even more samples at it.
So basically what you're seeing, is your render getting noisier, and therefore appearing darker, because of the extra lights.


text:
Remove / Merge / Add vertex where overlapping occurs
I'm currently creating text and applying an offset so that the text/font is a bit thicker. This sometimes creates letters that overlap themselves depending on the font used. After converting the text to a curve or mesh I would like to either join these overlapping parts or create a cut where the overlap occurs. I'm curious to know the most efficient way to do this in blender 2.93.

if you're talking about a mesh, you can use the TinyCAD addon, then select all, right click > TinyCAD > XALL, it will remove the faces, merge by distance, fill the faces

Awesome! Exactly what I was looking for :) Thanks! Is there a way to do the same thing or something similar with curves?

not that I know, but you can convert a mesh to curve

but keep in mind that you can't create curve vertices that are connected to more than 2 vertices, so your topology must be compatible to this constraint

Why not just use the text object in blender?

You can use the text object like any other text editor (just jump into edit mode with tab like normal

You can add your modifiers as normal (some are not available as with a text object)

But if you convert your text object to a standard mesh, you can do whatever you want with it

The geometry is a bit rough, but you can re-topologise it once you're done modifying it if you need to

Thanks but that's what I'm doing already. I'm just looking for an automated way to intersect the overlapping parts of a single mesh so that I can dissolve the vertices/edges/faces that do so


text:
Select Faces of Landscape Mesh Using Mask
I want to apply several materials to a landscape mesh. I understand that the normal way to do this is to manually select faces, which is what I've done in the 3D viewport with some place holder materials. However I also have material maps from World Machine. I want to use these material maps to select the faces of the mesh, where white is do select, black is don't select.

The reason I want to do it this way instead of just applying a bitmap texture to the entire landscape is because I want to use the materials that are already in the game engine I'll be importing the mesh into. So basically just make place holder material slots in blender and apply the actual materials after import to the game engine. I'm new to blender so I thought maybe this could be done by importing a black/white image in the uv editor and somehow selecting faces from that, but so far no luck.

So I reckon that Robin Betts's solution would do the trick, but after thinking about what I really wanted to do a bit more I realized I just needed to buckle down and do some scripting. So this solution does basically the same idea as the previous answer, just in a more efficient in a way. Here's the process:

Export two .bmp maps from world machine. First is the usual heightmap that's needed to use on the displacement modifier, the second is a multi-colored .bmp, let's call it material_ids.bmp, where each color represents a different material. Each pixel should be weighted 100% a single color, no blending. Keep the hex code of each color around for later on.
Same as in the above answer, make a grid that's the same resolution as the two .bmps, unwrap, and apply a displacement modifier using the heightmap
However many materials are represented in material_ids.bmp, add this many materials to the mesh. Since the idea is to texture outside blender, I go with high-contrast, single-color materials for ease.
Open material_ids.bmp in the Texture Properties making sure to change the Mapping -> Extension to Clip.
In the Scripting window and copy-paste this script,

import bpy
import bmesh
import matplotlib.colors as colors
import numpy as np

material_id_bitmap = bpy.data.images["material_ids.bmp"]

hex_colors_to_mat_ids = {'#060044': 0, '#440000': 1,'#444200': 2,'#3c0044': 3,'#007500': 4,'#004344': 5}

bpy.ops.object.mode_set(mode='EDIT')

landscape_mesh = bmesh.from_edit_mesh(bpy.data.objects["grid_mesh"].data)

bitmap_pixels =  np.resize(np.array(material_id_bitmap.pixels), (int(len(material_id_bitmap.pixels)/4), 4))
from_dec_to_hex_color = lambda l: colors.to_hex([l[0],l[1],l[2],l[3]])
hex_colors = list(map(from_dec_to_hex_color, bitmap_pixels))
faces_array = np.array(landscape_mesh.faces)
material_ids = np.array([hex_colors_to_mat_ids[x] for x in hex_colors])

landscape_mesh.faces.ensure_lookup_table()
for i in range(0, len(material_ids)):
    print(i, material_ids[i])
    faces_array[i].material_index = material_ids[i]
    landscape_mesh.faces.ensure_lookup_table()

Change a few things in the script before running it

change "material_ids.bmp" to whatever you called the multicolored bitmap
change the keys of hex_colors_to_mat_ids to whatever colors are in the material_ids.bmp, and change their values to the ids of the materials you've assigned to the grid mesh; the ids are just integers representing the top-down order of the materials starting from 0
change "grid_mesh" to whatever the name of the grid mesh is
if you don't have matplotlib installed for blender's python distribution, you'll either have to install it, or replace from_dec_to_hex_color = lambda l: colors.to_hex([l[0],l[1],l[2],l[3]]) with a lambda function that takes as an argument a list of length 4 where each element is respectively a decimal R-G-B-A value and returns its #RRGGBB hexadecimal equivalent

Select the mesh and run the script

And from a .bmp like this

The result is something like this:

I'm sure this can be done with some mixture of geometry nodes like the above answer suggests, but I found dealing with the python directly more straightforward. For processing time, for a 1024x1024 grid mesh the script takes just over a minute to run.

It's now possible to transfer a bitmap to Material ID with Geometry Nodes.
Assuming you have an nxn bitmap to convert to material ID's in an nxn grid of faces:
Construct a UV map for the grid which will make point-samples of the bitmap

Assign and apply a Split Edges modifier to the grid, so all its faces are separated
UV unwrap the grid, with 'Project from View (Bounds)'.
Set the pivot in the UV Editor to 'Individual Origins'
With all faces selected, S scale to 0, or near-0 :

As you see, each face becomes a dot over the bitmap. Once this is done, you can M > By distance weld your grid back together again. You can copy the UV map to other grids with the same number of squares.
Transfer with GeoNodes
Now give the grid a Geometry Nodes modifier, with this simple node-tree..

.. following the steps to make an (image-texture) Texture to sample from. Click the rightmost little button in the Sample Texture node, to jump to the 'Texture' tab where you can create it. In that area, under 'Sampling', disable Interpolation.
As it happens, all the casting between GeoNodes types and domains just works, in this case, so the  tree doesn't have to be fiddly. Now the texture, (displayed on the left) has been transferred to Material ID's (on the  right).
If you have multi-color bitmaps you want to transfer, that would be possible, too. The tree would just be a bit bigger. Ask in a comment, if you need that.
 (Blender 3.0a)


text:
I'm rigging this low poly model and every time I rotate the leg it starts to warp and shrink

I'm still new to blender and I've attached the bones via vertex points, haven't done any weight painting, any help would be appreciated. Also any guides for this sort of thing would be great, I've looked at a few but they tackle the topic in different ways that confuse me.

hello, please share your file: https://pasteall.org/blend/

@moonboots I uploaded the file, thank you!

you need to share the link (URL) it will give you, please copy paste it here  ;)

@moonboots https://pasteall.org/blend/a0eab9d2b65b4bf1bca378aeda6db853, alright I think thats it

@moonboots thank you so much for your help, are you able to give me a brief explanation and how the fix worked and how I got there in the first place>

Maybe you've duplicated and mirrored some parts with SX-1, which inverts faces. As for the rigging, inverted faces lead to bad rigging, because it considers the outside as inside and vice versa, so it will incorrectly bend the mesh

You have inverted normals as you can see. In Edit mode, select all and press ShiftN to recalculate. Then reparent With Automatic Weight.


text:
strange artifacts in normal map
I've got problems with Blender Normal bake.
I'm Trying to bake a set of High res (sculpted) Teeth to a low poly model of the teeth.
In the normal map I see some spots that stay purple, the normal map doesn't bake to this piece of the map.
I think it has something to do with the bake settings, but I need some help, how to control them.
And I get some strange colors like green and orange.

When I apply the normal map, as you can see it's really ugly.
Here is a link to the Blend file: teeth.blend

@Sandra Vissers, I, too extend a welcome to the site. Those who might wish to help might find it useful, besides knowing whether you're using Cycles or Blender Internal as the rendering engine, will also very likely find it valuable to see a copy of your ~.blend file, with necessary images packed in.

Thnx for the advice guys

The texture images are missing from your .blend file. You can include them in your file by clicking on the highlighted menu item in the screenshot. You may first want to save the file under another name so as not to alter your working version. Oh... I'm new here too, and the image can only display from an answer, not a comment so see below.

a hint as to including texture images in your uploaded .blend file:
pack external data

Using Cycles I was able to achieve the following result using the meshes from your .blend. Not sure why your image has the funky artifacts, but as far as I can see the result I turned out seemed okay? I'll add the steps of how I achieved the result below... :)

1. To begin, after deleting all previous mesh data (Materials, UV Maps, etc- helped me to start afresh) and with the multires mesh selected, add a new 2048x2048px image in the UV Image editor. Then create a new Cycles material with this image attached to the diffuse colour (as this image needs to be applied to the multires mesh in order to bake the normals, and plugging it to the diffuse colour will help us view it in Textured View Mode later on if need be).

2. Next enter edit mode and UV Unwrap the multires teeth mesh onto the new image.

3. Now we can head over to the Render settings in the properties panel and jump to the Bake tab. Change the Bake Type: dropdown to 'Normal'.

4. You can change the Margin to be '0px' and check the Clear box beneath it. This'll just make the normal map look a bit cleaner, you can leave it at higher values if desired, it shouldn't affect the normal map. Finally, hit Bake!

And there ya go! You can save the UV Map externally by tabbing out of edit mode, hovering over the Normal Map in the UV Image editor and hitting F3. Hope this helps! :)

Thnx Hexbob6, youǘe explained it clearly, Unfortunately there's something going wrong with the bake process.
Blender cannot find an image to bake to, the message I get is: No active image found in material.
Do you know what Iḿ doing wrong here?

No worries Sandra, yes I think I encountered that when I was having a play about with it. Just make sure you add a new image in the UV Image editor, name it something obvious so it's easy to find, then make sure its selected when you add the Image Texture node. Then try baking the normals :)

Oh and ensure that the object that has the material is unwrapped and selected in edit mode when you hit Bake! :P

Hey Hexbob6, I indeed didn't bake from Edit mode. but that wasn't the problem.
I looked in the outliner, and I cannot seem to assign a texture to the material.
So blender doesn't find a texture by the active material.
I tried to unlink al the materials and start from fresh, but it still doesn't work

Ah sorry, I think that was bad explaining on my part, you dont assign the texture from the outliner, you create it in the UV Image Editor, and then assign it to the Image Texture node, in the material Node Editor. I'll put a screenshot here hopefully explaining what i mean a bit better :) http://www.pasteall.org/pic/90011

@SandraVissers have you managed to get it to work all okay now? :)


text:
Change things between render layers?
I have two render layers. I want to change some properties, such as object visibility, material settings, etc between these layers. Is there any way for me to do this? I am not looking for a situation specific way to do this, I want a general way to change properties between layers.

A shadow catcher? http://blender.stackexchange.com/a/19767/3710

This is the most useful "marked as duplicate" that I've had in a long time. Thanks!


text:
cloud generator add-on with cycles
I'm trying to have a helicopter flying above some clouds. The most elegant way to create clouds that I've seen is using the cloud generator add-on that comes included with blender. When rendering with BI, it works just fine, but in cycles all I can see is the original mesh/bounding box. I've messed around with some volume materials, but I can't figure it out.
What materials should I use? Which objects should I apply them to? I've read in several forums that cycles doesn't support some critical volume-related feature that the add-on used, but they were all old, and I think the features have been implemented since then.
What I've tried to do so far is replace the material that the add-on creates automatically with this cycles "equivalent":but it still doesn't work right. I just see a cube with a sphere inside of it:
I specifically want to use this add-on, not an alternative way to create clouds

possible duplicate of How to create and render clouds in blender cycles

Regarding your edit. It shouldn't matter how you create this, what you want is the material..

Have you seen this vid tutorial on using the Cloud Generator? https://www.youtube.com/watch?v=EpGdRJFPVEI It's for BI, but might be a good starting point.

@iKlsR Well..this question is about how to make some addon work under cycles, not how to make clouds. The answer will be the same like in the duplicate for now, but in future cycles will support point density and a solution will exist.

@mentalist yeah,i already got it working in bi. The whole question is about getting it to work in cycles

The point density that this addon needs to create the clouds volume is now only supported in the Gooseberry branch: Point Density Cycles
Without point density you need to model/sculpt those clouds yourself.

Edit: As the Point Density texture is in trunk now, it is reflected in this answer:
Is there an easy way to make volumetric clouds for Cycles?

I'll get the latest gooseberry build and get back to you once I've tested things

Thank you! This seems like the solution! Also, just curious, but what exactly is the gooseberry branch/how is it different from the standard branch?

@Markasoftware It is a custom build blender release with features needed for the open movie Cosmos Laundromat. Mainly there is some hair simulation for sheeps and volumetrics for the tornado. The features are probably not tested enough to be in official branch.

Will they eventually be in the normal branch?

@Markasoftware Yes, but sometimes it may take years for feature to get in trunk, sometimes they get in the next release, it varies a lot.

Ok. I'm probably just gonna use normal stable and create clouds using another method until it gets there


text:
How to close an area using python
How to close specific area types down using python.
Definitely don't want to switch area types, or be jumping in out fullscreen mode?
Close Vertically? or Close Horizontally? Since Blender developers already use the principle, top to bottom, left to right. Then why don't we just start from the top?

Here is a basic example of it working. The above illustration is what should be really focused on though. closing down a middle window.

Any guidance on this would be amazing. Thank you

Unless I'm mistaken in blender you can't "close" an area, you have to join it to an existing one. But I dont even know if that's exposed to the API

https://blender.stackexchange.com/questions/120479/how-to-join-two-areas-using-python  https://blender.stackexchange.com/a/161786/15543

https://blender.stackexchange.com/questions/161983/operator-tooltip-from-layout-text

i think you need to override context to not close the area in which you are working:
here is an example that you can run from Text editor:
import bpy

override_context = bpy.context.copy()
area = [area for area in bpy.context.screen.areas if area.type == "NODE_EDITOR"][-1]
override_context['window'] = bpy.context.window
override_context['screen'] = bpy.context.screen
override_context['area'] = area
override_context['region'] = area.regions[-1]
override_context['scene'] = bpy.context.scene

areas = [area for area in bpy.context.screen.areas if area.type == "NODE_EDITOR"]

for area in areas:
    bpy.ops.screen.area_close(override_context)


text:
Why does video load unpredictably?
I'm having trouble trying to motion track a video, because it loads a frame ahead or behind depending on whether I play or seek through it.
As an example: I load my .blend and then seek to frame 70. Then I open it again, but this time, I play the animation until it reaches frame 70, then seek there. All of the trackers are now off.

This sort of error isn't good when I'm seeking and playing a lot, as it causes my tracking to look early or late. Is there a way to fix or work around it?

Test with a more recent build of Blender, if the problem persists then follow the bug report procedure , and file a bug report - if it's broken you don't want workarounds, you want it fixed.

@zeffii No luck... I'll report it.

More research shows that it's not actually a bug. I won't report it, I guess.

@MaoHi Nice find! Now that the post is reopened, would you care to put the answer in the answer section down below? The question isn't really the right place to put the answer (but it's understandable given that the question was closed at the time).

It turns out that this isn't a bug. I found that I have to check "Proxy/timecode" in the movie clip editor and set "Use timecode index" to "Record run." Now it works fine.


text:
How do I get the Color value from an RGB node with Python?
I'm a seasoned programmer, but fairly new to blender and 3D-modeling in general. So to get an understanding of different properties I want to write  python scripts to create multiple renderings with different settings of various values.
In the example below I have figured out how to change the Volume Absorption Density, ex:
bpy.data.materials['MyMaterial'].node_tree.nodes['Volume Absorption'].inputs['Density'].default_value = 100

But not the RGB-node. It seems I cant even get the current values out of it. Some things I have tried:
bpy.data.materials['MyMaterial'].node_tree.nodes['RGB'].color
bpy.data.materials['MyMaterial'].node_tree.nodes['RGB'].color.r
bpy.data.materials['MyMaterial'].node_tree.nodes['RGB'].color.outputs['Color']

How do I get and set output values of the RGB-node in py python-script?

just fyi here's a script showing how you can build your nodes directly from python: https://blender.stackexchange.com/q/35436/5334 and here's another https://blender.stackexchange.com/q/34609/5334

Welcome to Blender.SE, UlfR.
Finding out a property in Blender is relatively easy. Make sure, you have python tooltips enabled (in the user preferences).
Then hover your mouse cursor over the property (in this case the color). A tooltip containing the python command will appear.

The property you seek seems to be outputs[0].default_value.
def_rgb = bpy.data.materials['MyMaterial'].node_tree.nodes['RGB'].outputs[0].default_value

It is a bpy_prop_array by default, so you may want to convert it to a list.
float_values = list(def_rgb)

Miceterminator beat me to it by 3 minutes. I will leave this answer up, as it mentions the python tooltip and his doesn't you could accept his answer as the correct one however.

my problem was that bpy.data.materials[1].node_tree.nodes['RGB'].outputs[0].default_value = (1.0,1.0,0.5,1.0) works but bpy.data.materials[1].node_tree.nodes['RGB'].outputs[0].default_value produces nothing in the Python console. Converting it to list then displayed the hidden values.

You can also access the individual values directly from the bpy_prop_array via their indices, such as def_rgb[0].

As you already found you way to the node tree, the "Copy data path" option is generally very helpful:
Right click on the field you want to access and use the "Copy data path" option.
bpy.data.materials['MyMaterial'].node_tree.nodes['RGB'].outputs[0].default_value
You can also look at the answers here and here


text:
How do I flip a texture?
I have a model (not built by me) where one of the materials is defined as shown by the image below. Occasionally I would like to flip the texture-image (sailor_right.png).
I thought I could connect a Mapping-node somewhere to do the flipping but I cant figure out how and where? So:

What type of node should I connect?
Where should I connect the node?
What values should be used in the new node?

The point is that I'm using this model and driving it with python to apply different texture-images between renderings. I could of course flip it using some other program before feeding it to blender, but I think that would be inconvenient since I could just get blender to do it for me.
Obviously I'm fairly new to blender and 3D-modeling so please be kind to me. But I might be all wrong here in my assumptions, if so then tell me that!

Add a texture coordinates node and a mapping node.
Depending on what you mean by "flip" can change the scale to negative one for whatever axis, or rotate the coordinates 180 degrees on a particular axis.

On the UV Editing tab press s, x, - 1 (Scale X-Axis -1) and the mapping will be flipped.


text:
How to set active 'Scene Collection'
How to set active 'Scene Collection'? bpy.context.view_layer.active_layer_collection = bpy.data.collections['Master Collection'] not working.

Set active 'Scene Collection'
scene_collection = bpy.context.view_layer.layer_collection
bpy.context.view_layer.active_layer_collection = scene_collection

You can loop trough all your [first level] collections and set the one you want with it's name
collections = bpy.context.view_layer.layer_collection.children

for collection in collections:
    if collection.name == "name_of_the_collection_you_want_active":
        bpy.context.view_layer.active_layer_collection = collection

If you want to loop in all collections looking for "My Collection" and set it active you can use this code Change active collection from johnzero7 :
#Recursivly transverse layer_collection for a particular name
def recurLayerCollection(layerColl, collName):
    found = None
    if (layerColl.name == collName):
        return layerColl
    for layer in layerColl.children:
        found = recurLayerCollection(layer, collName)
        if found:
            return found

#Change the Active LayerCollection to 'My Collection'
layer_collection = bpy.context.view_layer.layer_collection
layerColl = recurLayerCollection(layer_collection, 'My Collection')
bpy.context.view_layer.active_layer_collection = layerColl

I don't think @cscholl's solution works recursively - e.g. it will only work if the collection is not nested in another collection.

@ddd : you're right, I've edited the code to add a recursive exemple

#Change active collection
bpy.context.view_layer.active_layer_collection = bpy.context.view_layer.layer_collection.children['Master Collection']

Hi, thanks for the post. This site is not a regular forum, answers should be substantial, stand on their own, and thoroughly explain the solution and required steps. One liners and short tips rarely make for a good answer. If you can, [edit] your post and provide some more details about the code and how it works, perhaps add a few images illustrating some steps and final result. See How to write a good answer?, otherwise it may be converted to a comment.


text:
Continuous rotation in AN with certain control behavior? (Speed)
My Goal is a continuous rotation of an object in Animation Nodes around on the z-axis that can be controlled via a value in the way that 0 means no rotation and 1 means certain speed. -1 would be reverse.
Increment values, reassign values?
My understanding of AN got tested in this case really hard. First of all the Rotation Input by default doesn’t use the Object Transform Output as a new Input, is there a way?
Second of all is there a way to “store” values or “reassign” them to get this certain kind of behavior.
My First idea was to simply do it with a time_info but multiplying the time_info, logically prouces reverse motion on curve descend. Demo File is 2.81
Comparison to Unity C#
Coding this behavior in unity and c# is easy, because of its incremental fashion: Every tick I can use the current rotation as new input and decide whether I want to add or subtract a certain amount. In AN the linear Time_Info Curve gets multiplied and clinched as a whole.
help would strongly be appreciated! :)

You want a rotation and your input is a speed curve? Correct?

@Leander yes, this is the case. Maby its simple, but i cant get my head around it.

as seconed option to this idea of reassigning values, i now thought about differential equations, because it seems a speed curve would be in this way connected to the rotation-value curve. math it not my stongsuit, so maby im wrong..

To be able to properly animate in Blender, it is important that frames can be evaluated indepedently without the need for a previous frame or start frame. (Sometimes you want to change the start frame, but frame X should still show the same content.)
Create an empty object, which controls the speed. I added and empty circle and keyframed its X-axis. Grab that Fcurve with Animation nodes.
The position on a frame is merely the accumulation of the speed-value on all previous frames.
To simplify the matter

I use a starting position of 0
interpret the input speed value [from the fcurve] as speed per frame
ignore the subframes (no differential equations) and pretend the speed to be constant for the duration of a frame

but you can easily add the first and second bullet points.
This means we have to get a list of speed values up to the current frame. For that, I use a loop with as many iterations as the current frame number and evaluate the speed-fcurve's value. The resulting list must be summed to get the actual value. I use it to control the X position of a cuboid.
With movement on multiple axis this actually the same.

Final note, do not go the math routes. Although I don't know your context, integrals are most likely overkill.

thank you very much, really a great answer! Very much appreciated :)

to sum up the list i used the "reassign loop parameter", in case someone has a similar problem.


text:
Simulating LCD display angle effect (duplicating millions of realistic pixels)
I need to realistically simulate the light field created by a tablet/mobile phone LCD display including the limited display angle (the rendered output of the scene will be used for training a computer vision application). At present the LCD in scene is created with a material featuring a combination of a pixel image array and scene image being fed into an emission node as described in this youtube tutorial which looks convincing when viewed directly however does not take the limited viewing angle of pixels into account - ideally I would like to create a grid of RGB spotlight triplets so that the outer fringe (umbra?) of the spotlights could be controlled by a parameter or map - however were talking about a 1080 HD screen that needs to be simulated. Any suggestions on how this could be done? (the render machine is a 3.1 Ghz quad core with 8GB ram)

I think the problem is to provide an answer that could be meaningful for training a CV application. Nothing is obvious also to "guaranty" a realistic rendering. Can you add some information about that?

The program is being trained to do photometric stereo using the illumination provided by patterns on the screen - the training image is from the rendered camera which is situated in the scene to mimick a forward facing phone camera. My latest idea for injecting a viewing angle restriction is to place a block of material with a volume absorption shader (the path through material increases reducing brightness as the viewing angle changes - in theory).. still working on other parts of project before I put that to the test.

Maybe this kind of approach can help, as it compares a target surface normal to the camera angle. https://blender.stackexchange.com/questions/147491/materials-how-to-compare-two-vectors

Thanks to the suggestion from user lemon in the comments the solution I ended up with was to use the dot product between the geometry normal and the incoming ray vector in order to control the strength of the shader emission (divided the dot product by the length of the incoming ray to normalise the value).
The emission is cut off completely when the sine of the angle is below the value in the 'Greater than' node. And increases smoothly above that angle until reaching full strength when parallel with the normal.


text:
IK bone does not perfectly follows the target

I have no idea why it behaves like that. even when i'm doing animation render, the IK is still miscalculated a lot.
Here's the render result

notice that the hand is slightly moving down from the grip, even though i parent the IK target bone to the front grip.
the target bone follows the grip perfectly, but the IK bone is just keep glicthed up and down make it seems disconnected from the target.

Open the Blender debug console and make sure Blender is not detecting a cyclical dependency chain in your armature.  IK constraints are the first to freak out when these are present in your model.

Consider adding another small low polygon mesh which  parented to the gun.  Set this mesh to No Render.
A Cube, Sphere, Empty Controller, or Plane work well and have a known center.
The new sphere will be the target of the IK constraint and its placement can be flexible.
The sphere can be placed anywhere on the handle,
Know that a mesh target will have a particular point chosen by some algorithm which will choose some average.  This average may not be exactly where you want it to be.

In the image above, a mesh is created to be the target of IK.
Particular vertices of a high poly mesh, a vertex group, can be a target yet I find that less flexible.

so instead of parenting the ik target directly to the grip mesh,i should use an empty (which is parented to grip) as ik target parent?


text:
Runtime Error : Modifier is disabled, skipping apply (2.83.9) with boolean modifier
So I'm trying to do a boolean operation between two objects. Here's how I'm trying to do it.
def engraveText(baseName, textName):
    bpy.ops.object.select_all(action='DESELECT')
    bpy.context.view_layer.objects.active = bpy.context.view_layer.objects[baseName]
    bpy.data.objects[baseName].select_set(True)
    obj = bpy.data.objects[baseName]
    op = obj.modifiers.new(name="bool", type="BOOLEAN")
    op.object = bpy.data.objects[textName]
    op.operation = "DIFFERENCE"
    bpy.ops.object.modifier_apply({"object": obj}, modifier=op.name, apply_as="DATA")

The error I'm getting is :
Traceback (most recent call last):
    File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2088, in __call__
        return self.wsgi_app(environ, start_response)
    File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2073, in wsgi_app
        response = self.handle_exception(e)
    File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 2070, in wsgi_app
    File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1515, in full_dispatch_request
        rv = self.handle_user_exception(e)
    File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1513, in full_dispatch_request
        rv = self.dispatch_request()
    File "/usr/local/lib/python3.7/dist-packages/flask/app.py", line 1499, in dispatch_request
        return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
    File "/blender_server/src/server.py", line 76, in getEngravedModel
        engraved_path = be.engraveNewModel(base_path, face_path, text)
    File "/blender_server/src/blender_engraver.py", line 106, in engraveNewModel
        engraveText(base_name, text_name)
    File "/blender_server/src/blender_engraver.py", line 93, in engraveText
        bpy.ops.object.modifier_apply({"object": obj}, modifier=op.name, apply_as="DATA")
    File "/usr/lib/python3.7/2.83/scripts/modules/bpy/ops.py", line 199, in __call__
        ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Modifier is disabled, skipping apply

If I'm missing any info please let me know.

Quite simply cannot apply a disabled modifier. Far better off using https://blender.stackexchange.com/questions/146559/how-do-i-get-a-mesh-data-block-with-modifiers-and-shape-keys-applied-in-blender

So I should use bmeshs to apply a boolean modifier?

Or to_mesh  Hard to know, the error message suggests you are using bpy as a python module and running from flask.  Can you run the code without applying the modifier and then take a peek in blender?

So after running it in blender directly it seems that the object I'm trying to select isn't a mesh, rather still a text curve. I'm going to try convert it and see what happens.

So after converting it to a mesh the issue still occurs in the python code I run with flask, but not the one I run directly in blender. Could this be an issue with blender running headlessly?

After more testing it seems like this is only occurring in the flask environment. Not sure why that would be the case.

Another user says that they had to run blender in the background before running the flask server. (https://stackoverflow.com/questions/65685398/bpy-works-in-global-scope-but-not-in-flask-app) Will check this out tomorrow.

So it turns out this error was being caused by the fact the blender code was being run in flask.
I found a solution here :
https://stackoverflow.com/questions/65685398/bpy-works-in-global-scope-but-not-in-flask-app


text:
Mesh converted from Text has weird Faces and Directions
So I'm trying to convert text into a mesh with all the normals facing the same direction. I'm getting this weird issue where the convert to function is creating a face at a weird location / direction and I want to get rid of it. Beautifying the mesh helps clean up the mesh but the face facing the wrong direction still exists. I need this to be automated so I can't change it by hand (since I want to extrude the text later after applying some functions to the mesh). Here are some pictures to demonstrate the problem.
Any help or solutions are much appreciated.
Facing Weird Direction Non Beautified :

Facing Weird Direction Beautified :

Showing how the face is connected when moved slightly :

It's hard to tell what is happening, first of all if there is something wrong with the Convert To function it is unclear if it is related to the specific Blender version you're using, or it might be related to the font you are using for your text. Have you tried different fonts, do they produce the same weird results? Fonts are basically vector graphics defining the shape of the characters, now there might be vectors which give bad results when converted. @Chris: why would all normals facing in the same direction look weird? A text converted to a mesh usually has all normals facing upwards.

I'll try with another font, but this is the default blender one so I assumed it would "just work"

@GordonBrinkmann The changing of the font worked. Would you like to post it as an answer or shall I?


text:
Blender track quadruped with kinect?
Can blender handle quadruped track data from a kinect?

Is this a question about features of kinect tracking or whether blender can use the data? What method are you currently using to import the kinect data?

@RayMairlot - I don't have the kinect yet, I wanted to find out if it's possible before I go rent or buy one

I'm voting to close this question as off-topic because it is asking about a Kinect's tracking features.

@RayMairlot - Its asking about the features within blender. If blender can import and use data from a quadruped .

related http://blender.stackexchange.com/questions/540/is-there-a-working-extension-to-import-kinect-skeleton-data-as-animation-into-bl

That was what I was trying to ascertain from my question. If you can edit your question to make it clear you are asking specifically about whether blender can handle quadruped data the question can be reopened. Currently, the main point in your question seems to be "are kinects only designed to track bipeds like humans?", which is not about blender.

@RayMairlot - Hows this

Nominated for reopening.

I will say that it should be able to, depending on the tool you used for the import


text:
Dynamic, script-based animations of object creation and deletion
New to blender. Here's my dilemma.
I am dynamically animating a protein network using a python-script using user-provided text-files.
The animation is done using key-framing for each object's actions (see below - self.frame_number and self.disjointed_frame allow the class in question to remember what frame the animation is on)
    def add_progressive_location_keyframe(self, frame_step):

        bpy.context.scene.frame_end += frame_step
        bpy.context.object.keyframe_insert(data_path="location", frame=self.frame_number)
        self.frame_number += frame_step
        self.disjointed_frame += frame_step

So far, animating reactions that merely involve the transloation of one protein from one location to another have worked fine.
However, some reactions involve two proteins forming a complex, a new protein.
In this case, I have to dynamically delete the two reactants in a certain key-frame and in that same frame create the product.
However, I cannot add a key-frame to an object I have deleted and I am unable to add a key-frame to an object that doesn't yet exist.
This results in the two reactants being deleted and the product being formed in frame 0 (the first one).
My question: How can I add key-frames to these objects in order to dynamically delete and create them in certain frames? Is there a work around I am unfamiliar with?
Your help is much appreciated.

have you experimented with hiding / unhiding instead of deleting? that can be keyframed too.

I have considered that approach, but that would require me to create all required objects (thousands) at the very beginning of the animation.

You know the position of all these atoms in advance? (ie you aren't using blender game engine to calculate reactions)

Correct. The animations are all deterministic/'predefined'. The data being fed to pyhton, and by extension blender, would allow me to place all the necessary objects in the right place and then hide/unhide them as the animation proceeds. However, can blender even handle that kind of object load and ensure a smooth animation?

I'm willing to help you do this, can you provide a small sample file or do you only have the massive file? I work on an addon called BioBlender and this is a feature i was going to add anyway..

Hey man, thanks a lot for the offer :) . However, since this is part of my thesis I am expected to do it all myself (grades and such). I will give your hiding/unhiding a shot, since implementing it won't be an issue - only the overall performance may suffer. Really appreciate all the help!

In that case I propose

preprocess the file into separate files per frame ( Alternatively create a cache dict if you have plenty of RAM, that way you avoid having to deal with writing/reading extra files :) )
store each cloud of atom types and their coordinates something like

this:
 C x y z
 C x y z
 C x y z
 N x y z
 N x y z

write a file reader that can take each frame's file and

on the first frame

check if the object in the next step exists already, skip this step if it does.
create a vertex based mesh object for each type of atom ( ie create a vertex for every atom of one type and put those in an object named something like atom_cloud_C, and do the same for all other atom types ). Meaning, if your file only has 3 C atoms, that your  atom_cloud_C only has 3 verts.
on subsequent frames you read the next frame's file and overwrite the coordinates of each atom, for all atom types.
code:
f_v = list(itertools.chain.from_iterable(verts))
mesh.vertices.foreach_set('co', f_v)
mesh.update()

This produces clouds of atoms as different objects, which get updated every frame.
Then create the spheres that represent each atom type (only need one sphere per atom type)
Then use the dupli feature set to Verts to duplicate the various spheres that represent the atom. (this is a low memory way to display many spheres )
instead of keyframing it all, you can attach a bpy.app.handlers.frame_change_pre to perform a function on each frame change (pre or post), examples for this can be found in the documentation.

Great! This is pretty similar to what I have so altering my code shouldn't be too bad. Thanks a lot for the help!

With big quantities of atoms i'd avoid key framing individual atoms, and suggest an alternative.

I will try your suggestion of "bpy.app.handlers.frame_change_pre" and "dupli" feature


text:
What is the difference between bpy.props.CollectionProperty and bpy.props.PointerProperty?
I noticed that bpy.props.CollectionProperty and bpy.props.PointerProperty can both be used to collect custom properties (as is shown here: http://www.blender.org/api/blender_python_api_2_75_release/bpy.props.html).
There are also other examples on the internet, but I still can't figure out the difference between these two properties.

related: http://blender.stackexchange.com/questions/6975/is-it-possible-to-use-bpy-props-pointerproperty-to-store-a-pointer-to-an-object

A collection is an array of a set of properties. Every element in the array has the same properties (with individual values).
A pointer property is used to organize properties. The sub-attribute the pointer property is stored at will hold a set of properties. It is not an array of properties however.
Scene.collection
  Scene.collection.add()
  Scene.collection.remove()
  Scene.collection ...()
  Scene.collection[0]
    Scene.collection[0].name # Foo
    Scene.collection[0].val # 123
  Scene.collection[1]
    Scene.collection[1].name # Bar
    Scene.collection[1].val # 234
  Scene.collection[...]
    Scene.collection[...].name # Baz
    Scene.collection[...].val # 345

Scene.pointer
  Scene.pointer.name # Foo
  Scene.pointer.val # 123

Worth noting that you can use collections for UI-Lists (as used for vertex-groups, UV-layers... etc)

Where can I find all the methods applicable for a collection, like add() and remove() and their documentation? Thank you for you answers!

They are unfortunately not documented, you'll need to use dir(...) on an actual collection or use auto-complete of the Python Console. There are actually just two more important methods however, clear() and move().


text:
Lock part of an object so that it doesn't scale
I'm trying to draw an object that has a lot of tubes of different heights. Those tubes are all exactly the same, with a hole on one side at the bottom.
The holes of all the tubes should be exactly the same, and only the height of the tube change from one to another.
Tube looks about like that:

Now, the question, since all the tubes are the same, I'd like to have them linked, so that if, in the future, I'm modifying something on one, it affects the others. But, if I do Alt+D and try to scale the tube, the hole at the bottom gets elongated, which is something I don't want.
So, is there a way to "fix" the size of the hole, and having the scale change the height of the tube, without deforming the hole.
EDIT: To make it a bit clearer, a very important point is that I want a linked-copy of the tubes. I want that if I change something in the tube, for example the shape of the hole, this change affects all the tubes. The only difference that the tubes will have will be their height (above the hole).

I think you just need to grab the top vertices in edit mode, and move it up or down. The holes won't be affected, and all the other tubes will follow the change because you copied it with ALT + D.

But then all my tubes will have the same height, which is not what I want.
I want the tubes of different height, but linked so that if I change something to the hole for example, it is passed to all the other tubes.

the holes do they stay at the same place at the bottom?

Exactly, same place, same size

I created the dynamic length pipe with two objects. The first object is one unit long, only large enough to house the hole at the end. The second object it just the tube, easy to change the length, via scaling or inputting dimensions.

The way I link the two pieces, is with a Child of Constraint (scroll down to the bottom of answer).
Normal parenting would influence the scale, but with a child of constraint (CoC) each of the transform operations and channels are selectable.
Add a CoC to the hole object with the Target set to the main pipe.  Uncheck all the Scale boxes.

Blend File
You will move the tube from only the large main section. However when you duplicate it, you will need to duplicate both objects.

Very nice, and completely answers my question. Not sure it's exactly what I need, as quollism's answer below seems also an interesting approach with the array modifier, since I need a lot of the same objects repeated. Thanks, I'll test both.

You could use shape keys for this.
In object mode go to the properties panel, then go to data object data and open the shapekeys tab.

Click on the "+" button, to get the basis key.
Click on the "+" button again to add another shapekey (key1).

Go to edit mode select the top vertices and move them to the maximum height your tube can get (for example 50) so G 50.
Then go back to object mode. The object jumps to the base object. Under the tab shapekeys Key1 selected, slide the value slider. You can copy the object with SHIFT + D, and change the height with the valueslider.

Just tried, and it doesn't behave as I want. Issue is, I want to do a linked copy, with ALT + D and not a normal copy. Doing a linked copy and using your method still changes the height of all the copies. I want a linked copy because I want that, if I change something on one of the tube (except the height), it is copied to all the copies of this tube.

Short answer: no. Scaling and instancing do not work that way.
To achieve what you want, use different objects with an Array modifier that has a Start Cap object set. The Start Cap is instanced to whatever object is using it - if you change the shape of the hole in the Start Cap object, the change will propagate to all the other objects.
This way you can control the length of each cylinder using the Count parameter in the array modifier - it's not exactly scaling, but the flatter you make the slice of cylinder (box in my example), the finer the control you get.

If you want to instance the mesh across the different objects as well as the Start Cap, you can go to the Data tab (looks like an inverse triangle) and set the mesh datablock to be the same for all your objects too. (This is glitching out for me however.)

Actually, I need to make a grid of 5x4 of my tubes, with a relatively logical placement repetition and evolution of sizes, maybe I can manage to do all of them with the array modifier.


text:
Geometry Nodes: How to move and rotate Instances in simulation area
What is the reason, why this cylinders aren't rotating correctly while moving into the y-direction.
As soon as I add instance rotation to them, they don't rotate around their local center and the movement behaves strange.
What's wrong here, please?
I want to move them into a direction while they are rotating. Every cyclinder have to rotate around its local center.
Thank you

I would recommend just multiplying your rotate and translate vectors by the instance ID with an ID node. Rather than using a repeat zone. Much simpler and I think will solve your problem.

Thank you. But I need it in a simulation zone.

You simply have to disable Local Space right here :

You don't want the translation to rely on the local axis of each instance. Instead, you want to move them in a global space.
This is pretty much the same as local and global axis in the viewport : one is rotating with the object, the other is the global set of axis as the ones you see in the viewport.

Thank you. Do you know how to move the instances locally (along the source mesh normals) and still rotate them?
The problem is: As soon as I switch the Local Space for translation off, the Instances rotate right, but are not moving along their local coordinates.

That's what you have with Local Space on. I'm not sure what you mean.

I've placed another question here. It describes my problem well:
https://blender.stackexchange.com/questions/322608/geometry-nodes-how-to-rotate-instances-while-they-are-moving-along-surface-norm