How do I find the technical name for a function so I can assign a hotkey to it?

You can turn on Python Tooltips in User Preferences >
Interface > Display. Hover over the tool or button you
want to assign a shortcut for and the function (operator) name appears.

Then press CtrlC to copy that operator call and paste it into blenders python console CtrlV. Remove the brackets, type .idname_py() and press Enter to get the python identifier of the operator, which can be used to create or edit shortcuts in User Preferences > Input.

Example: bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
Python identifier: object.origin_set


Environment for implementing/testing Computer Graphics algorithms

Brief Answer

Yes (but it depends, read on...)
Not that I know of, you can use PyOpenGL, NumPy etc together though.
Yes, automate testing your algorithm. while interactive tools like blender are nice, try to setup your workflow so you can spend most of your time programming (rather then pressing buttons in blender), This is well supported but not necessarily obvious at first.

Longer Answer

There are pros and cons with using Blender for testing cg algorithms,

Of course it depends entirely on what you try to solve however I've found it very useful in some cases, even developing Blender its self I sometimes test algorithms in blender-python first before porting to C.

Pros...

the viewport for navigation and inspecting results.
meshes can be created to visualize data without having to write drawing code, they have vertex colors UV's and any number of weight's per vertex, so you can  store useful data here.
mathutils python module, handy modules for graphics math, written in C...
other modules (you're not limited to blender modules), see NumPy.
realtime updates, I don't want to over emphasize this since it can encourage not thinking enough and just guessing, BUT - it can still be valuable.
the power of a full 3d application at your disposal, so you can spit out ray-traced images, run operations like convex-hull or booleans on and see the result.
format support, this may seem uninteresting but being able to load data from all sorts of sources can save you time writing your own loaders, with support for animation, mesh formats, image formats, even sound.

Cons...

Python is slow, for algorithms that require speed such as image manipulation or very large data-sets, I wouldn't recommend it, though for testing, speed can sometimes be overlooked so its not useless either for this task and if you are clever you could use NumPy to load in larger datasets.
Blender has limited data support, so for example, colored-point-clouds and user-defined-voxel structures are not supported, and nurbs only have limited support. If you want to display data that happens not to fit well into a mesh, meta-balls, curve ... etc, then using blender becomes less of an advantage Note that Python can call OpenGL directly, but its not that convenient.

Listed some example usage...

Console for fast feedback

You have access to the python console which can manipulate data and get fast feedback, for testing small snippets I find it quite handy, There is also the MathVis addon you can use to show points, lines, matrix types etc in the viewport.

If you come up with something useful you can Copy as Script from the menu, which strips out the '>>> ' prefix to make the input useful as a script to further develop elsewhere.

Realtime Updates

Blender can easily be setup to run your code in a loop, and update the viewport.

Here is an example, After running this script, play the animation.

import bpy
import os

filepath = "/path/to/my_script.py"

def run_script_on_frame(scene):
    global_namespace = {"__file__": filepath, "__name__": "__main__"}
    with open(filepath, 'rb') as file:
        exec(compile(file.read(), filepath, 'exec'), global_namespace)

bpy.app.handlers.frame_change_pre.append(run_script_on_frame)

Ability "Use" Your Algorithm

Again, this is only useful in some cases but you may want to make some testing code that uses mouse input for example, maybe to change the values the algorithm (to check for jitter) for example and to get a feel for how the algorithm works.

For example in the case you give, you could have 2 meshes and move them, drawing a line between the 2, constantly updating.

This can be done by writing an Operator, or a Modal Operator, see templates from the text editor.

Run outside of Blender

Having to use Blender can be a hassle and you may want to stay in your python editor, in some cases I've setup Blender to render output, used with an image viewer that auto-refreshes, it can be quite quick to execute the script and see the result without touching blenders UI. See Tip: Don't Use Blender


Background image shows in front of 3D objects, not behind them.

Using the compositor, the most basic setup to combine a 3D scene with an image (still or a video file) is mixing the movie clip and the render layers using an Alpha Over node.
The node sockets to which the images are connected determines the result:
The background image should be connected to the top socket
The foreground image or scene to the bottom socket.

The foreground's alpha channel is used to overlay the foreground on to the background.

If both images had an alpha channel, both alphas are combined for the final image.


Rigging voxel character; How to reduce deforming of mesh at joints

One way would be to make pseudo joint on the mesh, where you expect it to bend (like knee) by making 2 additional edge loops and merging them on one side like this:


Precision modeling - how to achieve this simple shape?

To create a mitered corner like that, start with a cube.

Set the dimensions here:

Apply scale type Ctrl A. This step is important read this.

Enter edit mode.

On top Ortho abview select the top left vertices and move them 0.026m on the X axis. To make precise movements use the numeric input features of blender: you can type directly the amount you want to move and in which axis, like this:

G .026X

(Meaning: grab/move 0.026m on the X axis)

Select now the vertices on the bottom right and Extrude 0.068m (or however much you need, since you omitted that measurement) on the Y axis

E.068

Switch the pivot point to Active Element, select one of the vertices on the left side to make it active and select the rest of the top vertices, and then scale to 0

SY0

In order to see measurements on the 3D viewport in edit mode enable Mesh display->Edge Info->Length

Note that the units used will be those that have been set up on the scene-units section.

(form the Blender Manual)

  Units

  You can mix units with numbers; for this to work, units need to be set in the scene settings (Metric or Imperial).

  Examples of valid units include:

  1cm

  1m 3mm

  1m, 3mm

  2ft

  3ft/0.5km

  2.2mm + 5' / 3" - 2yards

  Note that the commas are optional. Notice how you can mix between metric and imperial even though the display can only show one at a time.

Read on unit names here


For shape keys, what you do is what you will get.

The only option is to join all the parts together before doing the morphing.

You will control the morphing using proportional editing


You use W>Remove Doubles, with everything selected A, this will find all the vertices within n units of another vertex and merge them. n is defined by the merge distance, which you can modify using F6 after executing the command.


f-curve modifier to an object that has an object contraint (track to)

solved it by limiting the influence of both constraints to 0.8


Having both FK and IK is essential in every rig for animation, so yes, Blender does offer this.
There are 2 easy options:

You can pose an FK armature with Auto IK. It has huge limitations:

The auto IK option in the Tool Shelf enables a temporary IK constraint when posing bones. The chain acts from the tip of the selected bone to root of the uppermost parent bone. Note that this mode lacks options, and only works by applying the resulting transform to the bones in the chain.

Riggify addon (it's included with every Blender)

You import a metarig (biped), adjust it to the character proportions, then you generate the final rig from it and you skin the character to the rig. It comes with FK-IK controls and buttons in GUI to switch between (via included script run from those buttons).

For non-biped characters you will have to build the metarig yourself, then generate the final rig with all the features:
How to use the Rigify building blocks for non-human rigs?

Setting up such feature rich custom rig yourself requires lots of steps and some knowledge and a bit of coding. It's nowhere near as easy as in Maya (or probably Source Filmmaker also) as there are tools to do the IK/FK switching for you, in Blender it has to be scripted by you.


you have a loop cut inside that part "overlapping edges"

select all the mesh in edit mode click remove double in tools
re-assign  the bevel weight again


If you have a scene set up with your camera in position, and a sphere that's been UV mapped, has a material applied with an Image Texture connected and setting the color, you can use this script to automate loading images and rendering the results:

import bpy
from os import listdir
from os.path import join, dirname

s = bpy.data.objects['Sphere']  # <-- REPLACE OBJECT NAME IF NEEDED
m = s.active_material
t = m.texture_slots[0].texture

img = t.image

imagesFolder = "C:/SomeFolderWithImges"  # <-- REPLACE THIS WITH ACTUAL PATH TO YOUR IMAGES

isImage = lambda fp: fp.endswith( tuple( bpy.path.extensions_image ) )

for f in listdir(imagesFolder):
    if isImage( f ):
        t.image.filepath = join( imagesFolder, f )
        bpy.context.scene.render.filepath = join( dirname( bpy.context.scene.render.filepath ), f )
        bpy.ops.render.render( write_still = True )

Just copy this into a new textfile in the text editor, replace the path to the images you want to map to your sphere on line 11, and press Run Script.

Sample scene initial setup:

Rendered results after running script:


As Nathan said, it's better to have a single armature, which will be the main animation tool (avoid mixing bones animation with object animation).
Check if all bones of the four legs have unique names (rename them if necessary), then select all four armatures and press Ctrl J to join them into one.
Then create in edit mode a new "center" bone, select the first bone of every leg, shift select the center bone and press Ctrl P (keep offset).
In this way in pose mode moving the center bone will  result in moving all four legs.
Then you can parent the center mesh to the center bone selecting the mesh, shift select the armature, go to pose mode, select the center bone, press Ctrl P (bone option).


Actually you only have one face (made of 6 vertices) while it looks like you have two (because you've created an edge from a vertex to another). An edge loops can't go through a ngon so it can't go through that face. So delete the face with X (Delete) > Only Faces, and fill the 2 faces.

What happened? Actually you must have created 2 vertices on the lengths of your face, then, instead of J to join, which would have separated and created 2 faces, you must have pressed F to fill, which has created an edge between the 2 vertices, but didn't create 2 faces, and kept the original face.


The Solidify modifier like many others, can be assigned to a Vertex Group. In the case of Solidify, the vertex weights affect thickness. If you paint a linear gradient down the right axis:

Then there's quite a lot of tweaking-room left in the Solidify's 'Thickness' and 'Factor' settings .. maybe enough to get the precision you need?


Animation Nodes: Is it possible to instance nested instances?

Unfortunally the Object Instancer does not work in subprograms, because node it has to monitor the scene to keep track of a specific set of objects. It's very similiar to the Separate Text Object node.

There are two main ways to work around that:

Calculate the number of objects you need and create that many before the loop starts. For a simple grid there is also a template:

Make the first row of instances using AN and then use the array modifier like I did in this audio animation:

For that the source object needs an array modifier and you have to activate Copy Full Object in the Object Instancer node so that the modifiers are copied to the instances as well.

[EDIT]:

I just created a node tree that does parts of what you want to archieve. You may be able to use it as a reference:

Basically I use approach 1. here. The first loop splits the long object list into multiple shorter lists with equal length. The second loop calculates the positions of the objects.


texture paint isnt working in certain places

I fixed It I just sighlighted the faces that had the bits of texcture missing and projected them from view and moved it to part of the image with the same colour


I checked it, first problem, you have your rig parented manually with your mesh, when you try to use "Parent with empty or automatic weights (or other algorithm) you have to have your mesh and armature without any parent/child relation, so you have to delete the parenting.
Now you will be able to parent your mesh to your armature (first select your mesh, then your armature and use parent) manually painting the vertex, only manually, why? Because you have duplicated vertexes and non-manifold topology.
If you want to use automatic weight paint you have to clean your mesh first.

Any further questions, don't hesitate to ask me.


There are lots of ways to do this. Here's one of them:

The Value node determines the softness of the highlights.


I'm don't think the wave texture is the best fit.

You could however use math nodes to recreate the effect by transforming the x and y coordinates.


Yes.

The alpha channel is just another array of values, just like the R,G, and B channels, or any other grey, yellow, or purple socket.

So any node which manipulates values can be used to manipulate the alpha channel. For example:

Note the keyframed input in the math node. It's animated from 0 to 1.

Will result in:


Glitchy-looking transparent alpha channel PNG when imported as "Image as Plane" in Cycles

When you click import images as planes and the file browser opens, in the lower right, under 'import images as planes', you need to check the  use alpha checkbox, or you will get bizarre alpha junk.  Why this isn't a default I have no idea.

As an alternative on the UV/image editor press N to bring up the options window and enable "Use Alpha"


Perhaps Multiple Problems.
Edit Mode.  Select Non-Manifold identifies some problems.
See Arrow in image above.
Add faces to holes you see.

Strange face. Edit Mode Face Selection. See arrow. Remove doubles can correct partially. Image above.

Look for more problems.  This does not strive to be a tutorial.

Consider using Blender Mesh [Join]. Inspect each time with the menu choices of the first image.

Consider converting all n-gons to quadrangles or triangles. Quads and Tris.

Consider the Remesh Modifier. There is an Apply button.

Consider duplicating the mesh and making corrections to improve to the point when your 3D printer software has zero warnings.  I do not have your 3D printing software.


How to make Normals on seemingly flat surface smooth

Tris on ngons won't work fine on slightly bent surfaces. You could use this kind of topology:

If you can't use a Subdivision Surface modifier it needs a higher topology but you can keep this sort of solution:

etc...


Using Grease Pencil (Annotation) from Modal in Blender 2.8

The answer is simple: the gpencil.annotate() call on the last line needs to include the argument "INVOKE_DEFAULT".

bpy.ops.gpencil.annotate('INVOKE_DEFAULT')


Gltf-model export from blender. Materials are missing in a-frame

glTF 2.0 specification only supports exporting PBR materials based on a metallic-roughness model.

Material support for Blender's glTF exporter only works for Cycles render materials at the moment.

And even then it requires a specific node setup to be used, as mentioned in the user documentation, through the use of a Node Group designed for this purpose. The node group is available for download from the repository.

For future versions, EEVEE material node tree support is planned, using the Principled BSDF Shader, but it is unavailable at the moment.

Also see .fbx export why there are no materials or textures?


My approach would be to use a circle with 16 vertices, and one with 4 vertices.
Add both in while in edit mode so they are part of the same object,and then use bridge edge loops operator  with Ctrl+E then L
You can then quad cap the 16 vert side with grid fill , ( Ctrl+F then G )and fill the quad with F


Cannot select vertices from different object while in edit mode

In order to make the both meshes editable at the same time you need to join the objects in object mode while they are selected using CTRL+J, then both meshes will be available in edit mode.

Another way is to install MultiEdit addon that will allow to edit selected objects simultaneously.


Can I make a force field that is defined with differential equations?

As the documentation says,

  You can use a Texture force field to create an arbitrarily complicated force field, which force in the three directions is color coded. Red is coding for the X-axis, green for the Y-axis and blue for the Z-axis (like the color of the coordinate axes in the 3D View). A value of 0.5 means no force, a value larger than 0.5 acceleration in negative axis direction (like -Z), a value smaller than 0.5 acceleration in positive axis direction (like +Z).

You can create the texture corresponding to your equations using Mathematica or similar packages. Or you could write your own program to output the texture.


How can I create a 3D repeating pattern on top of a flat surface?

Another solution is to use tissue add-on

Model your base shape:

Create a component shape (the shape on top of final object)

Select the component object first, and then the base object, and click tessellate.

Note that the order in which you select the objects is important with tissue, if selection is done in the incorrect order you will up with strange results.

Adjust options in redo panel F9

For this object, it was needed to merge by distance and extrude the bottom faces in -Z. This step may vary per object use case.
Also, can select border faces and Alt+E >Extrude Faces Along Normals to create an extended border around the object.

Result:


Rendering a imported mp4 video within a animation

My fault. I imported as a plane and it worked. Before I just dragged the .mp4 into Blender, probably just acting as a reference.


Baking ambient occlusion from python script

I've solved it by adding a texture to the material, seems this has done the deal. I had to switch to "generated" image source. Now some updated code is here:

import bpy
import os
import sys

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

# initial values
bpy.context.scene.render.bake_type = 'AO'
bpy.data.worlds[0].light_settings.samples = 4

basepath = os.getcwd()
respath = os.path.join(basepath, 'resources')
baselistTxt = open(os.path.join(basepath, 'baselist.txt') )
baselist = baselistTxt.read()
baselistTxt.close()
baselist = baselist.split('\n')

# beleuchtung
lampData = bpy.data.lamps.new( name="Licht", type='SUN' )

#material
if 'einheitsmaterial' in bpy.data.materials:
    mat = bpy.data.materials['einheitsmaterial']
else:
    mat = bpy.data.materials.new('einheitsmaterial')
mat.diffuse_color = (1, 1, 1)

matTexSlot = mat.texture_slots[0]
if 'AOTexture' in bpy.data.textures:
    matTex = bpy.data.textures['AOTexture']
else:
    matTex = bpy.data.textures.new( name='AOTexture', type='IMAGE' )

if 'selfAO' in bpy.data.images:
    img = bpy.data.images['selfAO']
else:
    img = bpy.ops.image.new( name='selfAO', width=256, height=256 )
img.source = 'GENERATED'

matTex.image = imgSelf
matTexSlot.texture = matTex
matTexSlot.texture_coords = 'UV'
matTexSlot.mapping = 'FLAT'

# for each OBJ-File
for baseplate in baselist:

    # alles löschen
    for obj in bpy.data.objects:
        if obj.type == 'MESH':
            obj.select = True
            bpy.ops.object.delete()

    # import OBJ
    bpFilepath = os.path.join(respath, baseplate, 'standardUV.obj')
    bpy.ops.import_scene.obj(filepath=bpFilepath)
    bpObj = bpy.context.selected_objects[0]
    bpObj.select = True

    # set active
    bpy.context.scene.objects.active = bpObj
    bpy.ops.object.mode_set(mode='OBJECT')

    # switch on lamp
    lamp = bpy.data.objects.new( name="Lichto", object_data=lampData )
    bpy.context.scene.objects.link( lamp )
    lamp.location = ( 0.05, -0.05, 1.0 )

    # assign material
    bpObj.data.materials.append(mat)

    ##########################################
    # NOW WHAT IS THE WAY TO GO HERE?
    img = bpy.data.images['selfAO']
    bpObj.data.uv_textures[0].data[0].image = img
    bpy.ops.object.mode_set(mode = 'EDIT', toggle=False)
    bpy.data.screens['UV Editing'].areas[1].spaces[0].image = img
    bpy.ops.object.bake_image()
    #bpy.ops.object.mode_set(mode='OBJECT')
    ##########################################

    # export unter neuem namen
    tSelfFilename= os.path.join(respath, baseplate, 'self.jpg')
    img.file_format = 'JPEG'
    img.filepath_raw = tSelfFilename
    img.save()


At the time of import: use the FBX options, and scale to 0.005 or 0.05
Else: Make an empty, import your 500 objects. When they come to scene make sure you are looking at your empty. then "A" (to select all), then "A" (or ALT+A if 2.8) and every object is now selected. LASTLY: SELECT YOUR EMPTY. Then hit CTRL+P (Parent objects), KEEP CURRENT TRANSFORMS.
Everything will be child of the empty object you made. Now, press "N" to bring the numeric panel on your 3D viewport. And try scale 0.05 on all X, Y, Z
See if that works.

If you find this is the answer, thank you for your consideration to vote me as the answer by clicking to the left :the icon with a check mark and upvote this answer.

BFCT_Schiller


Copy render settings between scenes using Python

There is this bundled addon for this:

If you specifically need the python code, you can do it like this:

import bpy
settings = ["resolution_x", "resolution_y", "resolution_percentage"]
dict = {sett: getattr(bpy.context.scene.render, sett) for sett in settings}
for scene in bpy.data.scenes:
    for sett, val in dict.items():
        setattr(scene.render, sett, val)


Can't get a specific mesh to render (though everything else renders fine)

Your object have Alpha is 0, you need to go to select your object, then go to the Material properties > Alpha, and change this to 1


Which GPU toPurchase? Nvidia Quadro k2200 or gtx 980?

Never did any actual real world testing, but from my limited experience and from what I've heard NVidia Quadros (or any "professional" grade cards) are never worth the extra money.

Besides that in Blender's specific case they are probably not worth it because they are likely not optimized, simply because most blender developers don't have testing access to Quadro card so even if they work at all, there's a good chance that there's little to no performance benefit at all. Most likely you would not get your price bump's worth in performance gain at least.

I have no benchmarks to back my theory up though,  so I advise you to do some actual investigation in this area by searching for "Cycles Cuda benchmarks"  or something along those lines.

I own a 980ti and it works very well in parallel with my older gtx580.

I'd say you are probably better off buying a regular consumer card like the 980ti or even a TitanX if you need the extra memory for complex scenes.

If you need extra performance buy multiple cards and assemble them in a non SLI configuration. Blender Cycles scales really well with parallel cards.

You may also look into the newer faster and cheaper GTX1080 which is expected to preform very well. But have in mind that because it is still a very new hardware it is not yet fully supported in Blender, this will likely change in future versions, though when that might happen is not known yet.


I was not able to apply the transformation
bpy.ops.transform.translate(value=(1.03353, 0.00369117, 0), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', mirror=True, use_proportional_edit=True, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

to the uv-mesh. Blender only applies this transformation to the active element.
Instead, it is possible to rotate the mesh manually. To obtain the proportional rotation, I rotated the mesh depending on the radius of the mesh point.
import bpy
import math
import numpy as np
import random
import bpy
import mathutils
from mathutils import Vector,Quaternion

#make objects glow
bpy.context.scene.eevee.use_bloom = True
#make background black
bpy.data.worlds["World"].node_tree.nodes["Background"].inputs[0].default_value = (0, 0, 0, 1)

#delete all objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)

#camera0
bpy.ops.object.camera_add(enter_editmode=False, align='VIEW', location=(20,0,0), rotation=(math.radians(90), math.radians(0), math.radians(90)))
camera = bpy.context.active_object

#sphere
bpy.ops.mesh.primitive_uv_sphere_add(segments = 30,ring_count=30,radius = 2, enter_editmode = False, location=(0,0,0))
galaxy = bpy.context.active_object
galaxy.scale[2]=0.1

mat = bpy.data.materials.new("GalaxyMaterial")

mat.use_nodes = True
node_tree = mat.node_tree
nodes = node_tree.nodes

output = nodes.get("Material Output")
bsdf = nodes.get("Principled BSDF")

links =mat.node_tree.links

node_coord = nodes.new(type="ShaderNodeTexCoord")

node_texture = nodes.new(type='ShaderNodeTexNoise')

links.new(node_coord.outputs[2],node_texture.inputs[0])
node_texture.inputs[2].default_value=25
node_texture.inputs[3].default_value=5.3
node_texture.inputs[4].default_value=0.567
node_texture.inputs[5].default_value=1.1

node_ramp = nodes.new(type='ShaderNodeValToRGB')

node_ramp.color_ramp.elements[0].color = (0,0,0,1)
node_ramp.color_ramp.elements[0].position=0.45
node_ramp.color_ramp.elements[1].position=0.7
node_ramp.color_ramp.elements[1].color = (1,1,1,1)

links.new(node_texture.outputs[0],node_ramp.inputs[0])
links.new(node_ramp.outputs[0],bsdf.inputs[17])

def proportional_rotation(radius):
    return mathutils.Matrix.Rotation(math.radians(-200*radius), 4, 'Z')

# rotate vertices proportial to their distance from the origin
mesh = galaxy.data
for vert in mesh.vertices:
    r = math.sqrt(vert.co[0]*vert.co[0]+vert.co[1]*vert.co[1])
    vert.co = proportional_rotation(r) @ vert.co

galaxy.data.materials.append(mat)

The result looks like:


How do I know a details about video codec used by Blender?

Blender uses Ffmpeg to encode video (https://ffmpeg.org/). The Blender install provides support to read a wide variety of codecs, but offers a limited number of containers and codecs to write. The available codecs may also depend on how blender was compiled, and what other codecs are supported by the operating system you are using. For example on apple's confuser you might find other quicktime codecs (for licensing reasons) than on windoze or linux (to further compound the differences, some linux distributions don't provide ffmpeg support out of the box, like Fedora, again for legal reasons).
As much as we like to use blender for every need, be aware also that there are much better and more flexible encoder only apps out there. Even ffmpeg in terminal (or in many of the different frontends or GUIs) can give you more options (and faster encoding)
.


Apply Object Transformations When Rigging

The problem with the figure's foot is that the scale of the figure and the scale of the rig are not both equal. This can cause unusual behavior like what you experienced.

To prevent this from happening, whenever you are joining a rig to a mesh, you must first always apply their scales so the scales are both set to 1.

The reason for this is simple: when you import a figure, it will default to have a scale of 1. Also, when you add a rig, it too will default to a scale of 1.

However, almost always the figure and the rig will be different sizes, so you naturally will change the scale and maybe even the rotation of one or the other so they match up and the rig fits right inside the model.

This results in a difference of scale (and maybe rotation) of the rig and the model. In your file, the figure's scale is 1, but your metarig's scale has been reduced down to 0.195:

(You can see the scale of objects in the Properties panel, which can be opened with N)

This difference of scales becomes problematic when the rig is joined to the figure.

Therefore, whenever you finish scaling and/or rotating both your figure and your rig, you need to Apply Object Transformations to both the figure and the rig. When you are Applying Transformations, you can apply the location, rotation, and/or scale.

Here is how you do that, first for either the rig or the figure, then for the other:

In Object mode, select either the rig or the figure
Then use one of these methods to apply transformations:

3D View Header -> Object -> Apply -> Rotation & Scale
CTRLA -> Apply Rotation & Scale

The main goal is to have the Rotation for both rig & figure set to 0 for X, Y & Z, and also to have the Scale for both be set to 1 on X, Y & Z.

Then your rig will work properly.


Is there a way to change Ray Visibility settings of linked objects?

Many properties are defined in the master blend file where all changes should be made. We can't change these properties in a linked file as they are always read from the master.

In most cases the only linked items that we want to modify in a scene file are armatures. To be able to modify an armature we make a proxy of the armature in the linked file (CtrlAltP), this can also be applied to other objects. The drawback of making a proxy of a mesh object is that we loose any modifiers in the proxy.

Apart from loosing modifiers other changes made in the master file will still show up in the linked file, this includes mesh changes, materials, textures, but you can change various properties of a proxy object like Ray Visibility.


Spherical emitter does not illuminate very well?

The problem

The issue here is that cycles, which uses backwards path tracing (tracing light rays from the camera to the light sources), is not very good at rendering caustics in these  kinds of situations.

This is because it's not very likely for a ray to bounce off a surface, transmit through the glass bulb, and hit the element within. Multiple Importance Sampling (MIS) usually helps with this by guiding more rays to hit light source(s), however the glass bulb surrounding the light source effectively prevents this from working.

From left to right: Element with MIS, Element without MIS, Element with MIS and glass bulb.

To properly render such a situation, solutions like Bi-direction path tracing and Metropolis Light Transport (MLT) exist. Unfortunately, cycles does not yet have this functionality, and it is considered "not a priority" according to the cycles roadmap.

Even so, there is a working patch for MLT (and adaptive sampling/stopping) which is being actively developed as of the time of this posting. You will have to compile blender yourself (it's really not hard) to use this patch.
There is also an older patch for Bi-dir here.

Here is an example render of the element and bulb with the MLT patch:

It's better, but not at all the desired result (I don't really know any of the MLT related settings yet, so it's possible this could be improved some more).

See also:

How is Cycles different from Blender Internal?
reflecting direct light on glossy surface in Cycles (this is a similar problem to yours, but with reflection instead of refraction)
When should MIS be used and when should it be disabled?

Workarounds

Use the fake glass setup (see How to illuminate the darkness inside glass objects in Cycles?):

Basically, if the incoming ray is a reflected ray and/or a shadow ray (A shadow ray is a ray that hits a light source), it is sent straight through as if the glass wasn't there (via the transparent node). This allows MIS to work as it normally does, so you get a nicer result like this (there are some fireflies, but you can probably clamp them out, or combine multiple renders with different seeds, etc.):

Use Luxrender, an open source, unbiased, spectral renderer which has Bi-directional path tracing and MLT support. It also has support for GPU rendering with OpenCL.

Use a point lamp for doing the actual illumination, and make the bulb and filament only visible to the camera by mixing the glass or emission shader with a transparent shader based on the is camera ray output of the light path node.

Notes:

There are a few things which can prevent indirect bounces from transmitting through objects entirely:

No Caustics enabled in Render Settings > Light paths.
MIS disabled on lamps (does not apply for mesh lamps, see What is multiple importance sample option for more details).

Make sure No caustics is disabled and any lamps which you want to shine through or reflect off transmissive or glossy materials have MIS enabled.


No. You can't change the font size.

I think this is an issue with blender and should be fixed as soon as possible.

But if you think other way around, then the answer is, Yes. You can change it's color.

In themes, you can change is background color via Header and text color via Header Text. Both available in 3D View category.


How snap PlayHead to start or end of strip in NLA Editor?

Using PgUp and PgDn will cycle through the beginning and end of strips.


why there are just 4 options for rendering animation?

Those settings actually exist under FFmpeg video. The options for containers and codecs are under the encoding options just under the output options


What techniques are used to begin creating new models?

There really are only ~6 in blender, except for impracticable ones/not supported, the rest are derivatives:
1. Mesh modeling:
This is where you use edit mode, and move around, connect and disconnect vertices to form a shape.
There are a lot of sub-approaches, like extrude modeling and box modeling to name a few. As a rule, use extrude modeling if you're not going to have to eyeball proportions, since you can use the details from the start and work faster (like modeling off blueprints), and use box modeling for when your eyeballing stuff since it is much easier to adjust proportions.
Some people only like to do it one way, I'd try both and see what you like.
In this area Blender has very good tools.
2. Sculpting:
This is where you work off of a very high poly mesh, and form a shape by pushing vertices in large numbers to form a shape, this can produce very creatve and organic workflow, generally used form non hard surface meshes, although some people sculpt hard surface meshes.
In this area, Blender has quite good tools.
3. Curve modeling
This is where a form is created using joined curves, spline modeling. This technique has been largely fased out, but was popular in the 90's (I think)
The most famous form is NURBS modeling, where you can create surfaces between curves, but as I said few people now use that method.
Blender does have curve support, but no support for trimming or viewport UV's.
4. Procedural Modeling:
This is where code/modifiers does the modeling work. A good example is the displacement modifier, where a mesh can be distorted based on a height map. It is easy to create rock surfaces using this technique.
With code added, procedural modeling can go very very far, see these videos. https://www.youtube.com/watch?v=jOLhnwllpgs & https://www.youtube.com/watch?v=WP473rNZ_Eo
Blender's tool set here aren't so advanced, though there are external add-ons that can help: eg: https://github.com/nortikin/sverchok
5. Simulation
This is useful only for things like a fluid, liquid or gas/ it also is useful for modeling damage or clothing.
The fluid and to some degree the smoke simulator are limited, but the  cloth simulator is pretty well featured
6. Metaballs
These are basically shapes that are enclosed in what can best be descried as a shrink wrap shell... They merge together, making it easy to modeling something like a peanut. When they are separated sufficiency they split and go back to their original form. There are few practical applications I know of for meta balls in blender.
See: http://en.wikipedia.org/wiki/Metaballs (this example only shows a few but you can have 100's)
Other Methods of Modeling:
These mostly include scanning and photo-modeling, but Blender doesn't include tools to do this out of the box, you'd need specialized software for this.


Mesh Face Count Different in Edit and Object Mode

So I guess your purpose was to create an object that looked smooth. To do it, first you need to press the Smooth Shading option in the Tools panel of your 3D View. Then you need to have a high-poly mesh. The easiest way to have a high-poly mesh is not to create a lot of edges, because it will be heavy and very tedious to work with, it's much better to fake it with a Subsurf modifier.

What I see is that you have both a high-poly and a Subsurf modifier, so as you don't have any reason to have a high-poly you have to go back to a low-poly, and keep your Subsurf to fake the high-polyness.

Also, about your Subsurf modifier, decrease the Subdivisions values to 2 and 2, and choose the Catmull-Clark option rather than Simple.

Now, despite having both a high-poly and a Subsurf, you still have a cylinder that looks squared. It's because the vertical edge loops are aligned on the same axis, 5 by 5, so they create faces. So even if the Smooth Shading + the Subsurf should make your cylinder look round, these aligned edge loops tend to flatten the faces.

So to fix this, either restart from scratch with a low poly cylinder (like for example 12 vertices), or delete the edge loops that create all these faces around your current cylinder.


Why Asset Browser is missing from Blender 2.92?

well, it's simply not ready to be released in 2.92
so they push the asset browser feature back to 2.93
you should check the 2.93 alpha and play with it, and report if there's bug


Is it possible to unwrap and map selected faces, then unwrap and map other selected faces?

This should be done with face assignment too beside uv mapping. So select some faces, assign the material to the faces. then put seams and unwrap, then map with image. After this is done, select some other faces, assign new material to the faces, put seams and unwrap, and map with other image, and so on. Can't be done with just one material.


How to make particles refract/change direction through an object

you need to use keyed physics in particle system,then use a curve of your desired shape as the guide for leading the particles,here's how you do;

create a particle system,crank up the lifetime and play around with
emitter geometry.
Create a curve of desired shape.
Create another particle system at the end of the curve.
In physics tab,select Newtonian,then add keys and select the target.

Voila there you go.


Can I make a bevel curve transition to another one during the same bevel process?

I don't know of a way to to morph a bevel from one curve to another.  If you want a blend a curved plane from one profile to another you need a NURBS surface.

Add (Shift + A) a Surface, NURBS Curve.
Edit the curve to the profile you want for one end of the surface.
Duplicate (Shift + D) the curve and move it along the Y-axis.
Flatten out the curve control point by scaling them in the Z-axis.
Select both curves and press F to loft them into a surface.


Instead of using a single object to make the whole ribbon you could use several in order to fake it, like that (material is not good):


How do I choose a specific vertex to be extruded with Python?

A bmesh approach.

In as much as the operator calls are written in INFO area, and can be used to make scripts I always recommend using API class methods when possible.

Here I've created a new object at (1, 2, 3) using a bmesh and the bmesh extrude individual vert bmesh.ops.extrude_vert_indiv(...) which returns the newly created vert at the other end.  For example sake I've added 3 random length branches in random directions.

Because of the random in all directions will get some rubbish result.  For practical use  some kind of tree data structure.

Added the modifiers using API method Object.modifiers.new(name, type)

a test run

import bpy
import bmesh
from mathutils import Vector
from random import randint, uniform
context = bpy.context
scene = context.scene
me = bpy.data.meshes.new("Thing")
ob = bpy.data.objects.new("Thing", me)

bm = bmesh.new()
root = bm.verts.new()
for i in range(3): # tree branches
    v = root
    for l in range(randint(1, 4)):
        ret = bmesh.ops.extrude_vert_indiv(bm, verts=[v])
        for v in ret['verts']:
            v.co += Vector([uniform(-1, 1) for axis in "xyz"])
        bm.to_mesh(me)

ob.location = (1, 2, 3)
skin = ob.modifiers.new(name="Skin", type='SKIN')
sub = ob.modifiers.new(name="Sub", type='SUBSURF')
sub.levels = 2
scene.objects.link(ob)

Used the extrude operator to match the question.  Could simply add a vertex at next location and use that to create edge.

newvert = bm.verts.new((2, 2, 2))
newedge = bm.edges.new([root, newvert])


How can i create a seamless blend between two objects and give the illusion of rubber stretching?

Add a plane with some subdivisions: hit W then S (in 2.79) a few times. Add a cube above it, adjust its scale then subdivide it a few times. Delete the faces at the legs in the cube and in the plane (one face/leg). Select the edges around the holes both on the cube and the floor, then bridge them with "Bridge edge loops" command. Then add a "Subdivision surface" modifier to the mesh. You can correct the legs with new edge loops by hitting ctrl+p.


Why isn't my 'frame_change' app handler working?

As we can see in the documentation at https://docs.blender.org/api/current/bpy.app.handlers.html :

import bpy
from bpy.app.handlers import persistent

@persistent
def load_handler(dummy):
    print("Load Handler:", bpy.data.filepath)

bpy.app.handlers.load_post.append(load_handler)

handlers need an argument.

You probably do not need it persistent, but you need the dummy part. This will work:

import bpy

def my_handler(dummy):
    bpy.data.objects["Cube"].location[0] += 0.5

bpy.app.handlers.frame_change_pre.append(my_handler)


The 'warning(...)' and 'error(...)' functions behave very similarly to the 'printf' function in that they output strings to the console output.

For example, in this answer the printf function is used to format output to the console using a command as follows :

printf("Point %f,%f,%f\n", P[0], P[1], P[2]);

This outputs the formatted string (with each %f replaced by one of the following arguments) to the console.

The warning(...) and error(...) functions work similarly except each call outputs a line formatted with the work 'WARNING' or 'ERROR' and details of where the function was called from (the shader function) similar to the following :

WARNING: Shader warning [my_shader]: Point -0.320504 -0.812141 0.157532

With the syntax being identical to 'printf' :

warning("Point %f,%f,%f\n", P[0], P[1], P[2]);


How to get all images for an image sequence? (from Python)

This function returns all the images which share the same prefix, suffix (and have a number suffix), eg:
/path/to/my_image_0001.png

def image_sequence_resolve_all(filepath):
    import os

    basedir, filename = os.path.split(filepath)
    filename_noext, ext = os.path.splitext(filename)

    from string import digits
    if isinstance(filepath, bytes):
        digits = digits.encode()
    filename_nodigits = filename_noext.rstrip(digits)

    if len(filename_nodigits) == len(filename_noext):
        # input isn't from a sequence
        return []

    return [
        f.path
        for f in os.scandir(basedir)
        if f.is_file() and
           f.name.startswith(filename_nodigits) and
           f.name.endswith(ext) and
           f.name[len(filename_nodigits):-len(ext) if ext else -1].isdigit()
    ]

# example use
print(resolve_image_sequence("/path/to/my_image_0001.png"))
>> ["/path/to/my_image_0001.png",
    "/path/to/my_image_0002.png",
    "/path/to/my_image_0003.png",
    ]


How to use an animation for one object on another object?

When you keyframed the locations on an object, an action has already been created

Select the object which should be animated
Switch to the Dopesheet and change to the Action Editor
Assign the action to your object. (default name here is Textaction)

Note that the keyframes have absolute coordinates, I you're looking for relative changes you would need to offset them in the NLA-Editor (or alternatively change the origin of the individual text objects).

When you want start animations at different time offsets you would need to place them as Action-Strips in the NLA-Editor there you can move the strips to the time offset they should start (and even scale the duration).


code under modal operator gets executed only when mouse is moved or a key is pressed

What you are looking for probably, is running a timer alongside the modal operator, so you can check the serial data whenever the operator gets executed with a timer event.

There already is a code template in blender, that shows you how to do this.
Look for the Template menu entry at the bottom of the Text Editor and select Python > Operator Modal Timer

The relevant code is in the execute function:

wm = context.window_manager
self._timer = wm.event_timer_add(0.1, context.window)

The 0.1 controls the time interval between successive timer events in seconds.

Then you can check for a timer event in modal with:

if event.type == 'TIMER':

And for cleanup in the cancel function:

wm = context.window_manager
wm.event_timer_remove(self._timer)


How to "flatten" the faces of a solid to level with its vertices?

A very unscientific way to do it would be to first create this shape:

Use the Array modifier in Object Offset mode, rotate the offset object 72° on the Z axis:

Rotate your mesh in Edit mode so that if fits perfectly with its instances:

Apply the modifier, duplicate, rotate the copy 180° on the Y axis, rotate 36° on the Z axis, merge the 2 meshes:

Bevel if you want more geometry:


Is there a textured but unlit (full bright) viewport mode?

Yes, you can enable Shadeless in 3D view > Properties (N) > Shading while in textured view:

If you are in BI, this only works if using Multitexture shading:

If you are using GLSL in BI or material shading in Cycles, you'll have to use shadeless in the material settings for BI and a emission shader for cycles.


How to select all the vertexes with border select?

That is the regular behaviour of Blender. By default "Limit selection to visible (clipped with depth buffer)" is enabled.

When you disable the button I marked in the screenshot, select the vertices again, all four vertices will be selected.


It looks to me like you have two materials on that object. I'm guessing the second material (the one you edited to have some color) is not assigned to the mesh anywhere.

In edit mode select the whole object A A. Now click on the material in the list (yours is called "Material.002") and press the Assign button.

Now if you are not using the first material for anything you can simply remove it. Go to Object mode (you can not remove material slots in edit mode), with the first material selected click on the minus button on the right.


Saved pictures do not appear in my folders

You don't specify what platform you are using (Win, MACos, Linux, or something else), but you can find the file using a OS level search. In the file system search engine use the name of file, and if you did not happen to have chosen a unique name for your image file, the date you created the file,  and the OS search facility should provide you the path to which you saved it. With that information, it should be easy to find the file, and perhaps move it to a more desirable location.

A little preventative effort goes far here. Before you start a project, create a home for it, and store all related elements in that folder as you make them.


I am having trouble with emissions in my materials. How do I remove emissions?

try setting the transmission on 0, and emission black


Use value as scalar field in Marching Cubes node (Sverchok addon)

to make scalar field use XYZ and W.
Bounds can be as Box node generator or any other simple geometry creating square
Follow screenshot

or even this:


How can I get a bullet-time effect (slow motion) in the BGE?

This functionality has just been added. It will be in 2.77, until then it's only available in development builds.

  getTimeScale(): Get the time multiplier between real-time and
  simulation time. The default value is 1.0. A value greater than 1.0
  means that the simulation is going faster than real-time, a value lower
  than 1.0 means that the simulation is going slower than real-time.
  setTimeScale(time_scale): Set the time multiplier between real-time
  and simulation time. A value greater than 1.0 means that the simulation
  is going faster than real-time, a value lower than 1.0 means that the
  simulation is going slower than real-time. Note that a too large value
  may lead to some physics instabilities.

You can set the time scale with bge.logic.setTimeScale(multiplier), where multiplier is the number by which the base timestep is scaled.

For example, here's a simple function to toggle between slow-motion and normal-motion:

from bge import logic

def toggle_slomo():

    if logic.getTimeScale() < 1:
        logic.setTimeScale(1)
    else:
        logic.setTimeScale(.1)

And here's an example .blend. Note that you'll need a recent version of blender for it to work.


Why objects with cloth modifier don't move after I parent them to moving empty?

If there are pinned vertices in the cloth and the object doesn't move, a previous simulation is cached and blender is using this old cached data.

The simulation needs to be refreshed by playing the timeline or re-baking the simulation.


Mesh doesnt change in the viewport while view port shading is in render mode

That sounds like the update-hook/redraw-hook got lost.
Did you try toggeling edit and objectmode?
If that aint working, I'll try writing a patch.


Just apply the Armature Modifier for every loose part of your model. Then delete the armature. Before that I recommend you to apply transformations to all the parts (Ctrl+A).

I noticed, that legs mesh has multiple users and the error occurs. Go to Object Data header and click the '2' button to make it a single user.

I've noticed, that after applying the Armature Modifier for the knife an error accured. I just deleted the modifier and everything works okay, but this is is the first time I see this kind of error. I've got no idea how to fix it (I should ask a question about it).

After applying Armature Modifier to every part of your model you may delete the bones.
Cool model BTW :).


Given a grouping of selected vertices in a mesh, how do I test if they form a contiguous edge loop?

I'd implement the following algorithm:

Give each vertex a unique ID.
Choose one of your grouping's vertices, and add its ID to a set() S.
Check all vertices ID that are connected by an edge to (2). Add these IDs to S.
Are any of the IDs in (3) the same as the ID in (2)? If yes, Return True.
If not, for each in (3), recursively do steps 2-5. If you run out of edges/vertices, return False.

Note: you use the vertices IDs in S to avoid choosing already processed vertices in step 5.

EDIT:

Pseudo-code could be something like:

grouping = [ selected vertices in a mesh ]

S = set()

for v in grouping.vertices():
    S.add(v.id)
    for vv in v.edges().vertex():
        if vv.id in S:
            return True
        else:
            S.add(vv.id)
return False


How To Simulate Water Spray from Nozzle Such As Pressure Washer

Found the best way to do this was with particles. Ended up using about 70,000 particles and added some children with it and bumped up the normal on the velocity of the particles to help with the speed of them. Motion blur was also needed to smooth the spray effect.


Reference the full script on github or at the end of the answer.

Note, that this will be the wrong approach in most cases. Your own bpy raytracer will lack features and be slow and inefficient. There are other APIs (nvidia link>) which are probably more suited for this purpose.

When testing, use small resolutions and few lamps.

To calculate the colors of an image, for each pixel, we have to:

Shoot a ray and check if it intersects. If it doesn't, this pixel stays at an alpha of 0.
If a ray hit an object, get the hit position.
Send a ray to each lamp in from the hit position. If this new ray hits another object, the lamp is obstructed and will not contribute lighting to this pixel. Otherwise calculate the light contribution (with the lamps color, intensity, falloff and object normal) and add it to the pixel.

I'm going to use numpy to store the pixel values and copy them onto an image at the end. This is faster than manipulating a reference to a blender image.

import bpy
import numpy as np
import mathutils

I will store a reference to the scene, the lamps, and the render settings. The width and height of the image can by directly deduced from the render settings. I will use the sensor_width as a fixed constant and calculate the sensor_height relative to the images dimensions. For 2.8, we have to access the view_layer when using the ray_cast function of the scene.

scn = bpy.context.scene
view_layer = bpy.context.view_layer
cam_mat = scn.camera.matrix_world
cam_loc, _, _ = cam_mat.decompose()
lamps = [ob for ob in bpy.data.objects if ob.type=='LAMP']
cam = scn.camera.data
render = scn.render
horizontal = cam.sensor_width/2
vertical = horizontal/render.resolution_x*render.resolution_y

width = render.resolution_x
height = render.resolution_y

Construct the base image array and the corresponding rays. Read this answer and this post on how blender stores images.

For now we will create a pixel list which looks like this:

[y coordinate][x coordinate][rgba index]

and can by done with numpy

pixels = np.zeros((height, width, 4), dtype=float)

The rays are a grid starting from (0, 0, 0) and pointing downwards. The focal length equals their negative Z coordinate and their x, y range is stored in the sensor settings.

ray_width = np.linspace(-horizontal, horizontal, num=width, dtype=float).reshape(1, -1)
ray_width = np.repeat(ray_width, height, axis = 0)
ray_height = np.linspace(-vertical, vertical, num=height, dtype=float).reshape(-1, 1)
ray_height = np.repeat(ray_height, width, axis = 1)
ray_depth = np.zeros((height, width), dtype=float) - cam.lens

rays = np.stack([ray_width, ray_height, ray_depth], axis = 2)

Each ray will have to be transformed by the camera's transformation matrix and be shot from camera_position in direction of camera_position to transformed_ray.

Now we iterate through all the pixels in the image by x, y coordinates. We get the ray for each pixel and transform it by the camera's matrix_world. If the ray cast hit something, that means this pixel should be colored and visible.

for y in range(height):
    for x in range(width):
        ray = cam_mat @ mathutils.Vector(rays[y, x]) - cam_loc
        result, loc, nor, ind, ob, mat = scn.ray_cast(view_layer, cam_loc, ray)

        if (result):
            intensity = base_intensity[:]
            pixels[y, x] = intensity[0], intensity[1], intensity[2], 255

To make lights influence the pixel's values, check if there is a clear path from the last ray_casts position loc. If yes add this lights color and to the intensity. I used a linear falloff like 1 - (point_light_distance / lamp_light_distance). Multiply this by the result of the dotproduct of the surface normal and the direction to the light. This will stop making only faces which directly face the light receive the full amount of light.

        if (result):
            intensity = base_intensity[:]

            for lamp in lamps:
                dir = lamp.location - loc
                dirn = dir.normalized()

                start = loc + dirn * 1e-4
                hit,_,_,_,_,_ = scn.ray_cast(view_layer, start, dirn)
                if not hit:
                    multiplier = max(0, min(1, 1 - dir.length / lamp.data.distance)) * lamp.data.energy * max(0, dirn.dot(nor))
                    intensity[0] += multiplier * lamp.data.color[0]
                    intensity[1] += multiplier * lamp.data.color[1]
                    intensity[2] += multiplier * lamp.data.color[2]

            pixels[y, x] = intensity[0], intensity[1], intensity[2], 255

Finally, create a new image (or use an existing one) and replace the images pixels list with our flattened pixels array.

img = bpy.data.images.get("name")
if (    (not img) or
        (img.size[0] != width or img.size[1] != height)):
    img = bpy.data.images.new("name", width, height)
img.pixels = pixels.reshape(-1)

Full script

import bpy
import numpy as np
import mathutils

scn = bpy.context.scene
base_intensity = list(scn.world.color)
view_layer = bpy.context.view_layer
cam_mat = scn.camera.matrix_world
cam_loc, _, _ = cam_mat.decompose()
lamps = [ob for ob in scn.objects if ob.type=='LIGHT']
cam = scn.camera.data
render = scn.render
horizontal = cam.sensor_width/2
vertical = horizontal/render.resolution_x*render.resolution_y

width = render.resolution_x
height = render.resolution_y
rays = np.zeros((height, width, 3), dtype=float)

ray_width = np.linspace(-horizontal, horizontal, num=width, dtype=float).reshape(1, -1)
ray_width = np.repeat(ray_width, height, axis = 0)
ray_height = np.linspace(-vertical, vertical, num=height, dtype=float).reshape(-1, 1)
ray_height = np.repeat(ray_height, width, axis = 1)
ray_depth = np.zeros((height, width), dtype=float) - cam.lens

rays = np.stack([ray_width, ray_height, ray_depth], axis = 2)

pixels = np.zeros((height, width, 4), dtype=float)

for y in range(height):
    for x in range(width):
        ray = cam_mat @ mathutils.Vector(rays[y, x]) - cam_loc
        result, loc, nor, ind, ob, mat = scn.ray_cast(view_layer, cam_loc, ray)

        if (result):
            intensity = base_intensity[:]

            for lamp in lamps:
                dir = lamp.location - loc
                dirn = dir.normalized()

                start = loc + dirn * 1e-4
                hit,_,_,_,_,_ = scn.ray_cast(view_layer, start, dirn)
                if not hit:
                    multiplier = max(0, min(1, 1 - dir.length / lamp.data.distance)) * lamp.data.energy * max(0, dirn.dot(nor))
                    intensity[0] += multiplier * lamp.data.color[0]
                    intensity[1] += multiplier * lamp.data.color[1]
                    intensity[2] += multiplier * lamp.data.color[2]

            pixels[y, x] = intensity[0], intensity[1], intensity[2], 255

img = bpy.data.images.get("name")
if (    (not img) or
        (img.size[0] != width or img.size[1] != height)):
    img = bpy.data.images.new("name", width, height)
img.pixels = pixels.reshape(-1)


Why can my NLA strip only be 10 000 frames long?

So I clicked the button called "NOW" right beyond the red rectangle on the screen, and it helped so great. ;D

Working with Blender is so emotional <3


Another 'In Principle' option...

Animate a 'pulse' mesh along a curve derived from, or used to construct, your blood vessel, using a Curve deform modifier, keying the location of the pulse mesh along its deformation axis:

Give the blood vessel a  Vertex Group for displacement, set to 0. (Vertices outside the group altogether will not be affected) Assign a Vertex Weight Proximity modifier, using the vertex group, targeted on the pulse mesh:

Assign a Displace modifier to the blood vessel, aimed at the vertex group.

'In principle', because, to say the least, you probably want the shape of your deformer, weight influence, timing, everything to be tweaked differently. :D But all the adjustments are available.

The pulse mesh could itself be shape-keyed on its journey, to modulate the expansion.


Using cycles volumetrics to make planet's atmosphere

I don't really know how the gradient texture node works so I usually make my own gradient texture using the generated coordinates and a Seperate XYZ node.

Here is what I have come up with for a homemade 3-dimensional linear falloff spherical gradient texture (plugged into a volumetric emission shader to visualize).

The object this material is applied to is actually a cube.

Here is the node setup:

Click to enlarge

It works by calculating the distance from every point to the point (0.5, 0.5, 0.5) in the object's bounding box (using generated coordinates).  This creates a gradient from 0 to 0.5 (going out from the center of the bounding box), but a gradient from 1 to 0 would be much more useful so this value gets multiplied by 2 and inverted by subtracting from 1.  (Ignore the math node labeled "clamp to [0,1]", it's accidentally left over from an earlier version.)

You can then plug this value into an RGB curves node (or through a few math nodes if you want to be more precise) to create whatever kind of falloff you want.

Here is the .blend so you don't have to manually copy all those math nodes!


Can I set the start point of a bezier curve?

The thumb rule is that basically, for a closed spline, the last segment created upon closing a curve is will contain the first vertex of the curve spline.
So if you want to make a certain vertex the first one, then delete the segment immediately before or after it to make that vertex the starting point. Then close that spline again.
As far as I know there is no easy way to determine which of the gaping vertex will actually become the first one. And on 2D curves, you can't tell them apart easily because there are no normal arrow indicators to guide you.
If you don't like the outcome though, you can always open the curve again, and call Switch Direction operator, either from the Search menu, Right Click context menu, or Segments > Switch Direction, reverse the result as desired then close the spline again.

For 2.8+ you can also activate the addon Curve Tools from the preferences, and under the Edit tab of the 3D View sidebar under Utilities > Set First Point allows setting an arbitrary point as first for selected splines.


What is the correct way to smooth sharp edges between faces?

You can go to vertex selection mode.

Select all the vertices.
Got to mesh option on the top.
Clean up > merge by distance.
This will delete the unwanted vertcies.
If this does not work, you  should go to face select mode and apply correct normals ( shortcut : ctrl+ N, in edit mode obviously.

If you see any red color that means some thing is wrong. You need recalculate normals. If every thing you see from out side is blue then you are good to go.
Againg if it does not work just apply your mirror modifier on object mode and then give it a subdivision surface modifier then smoth shading.
Hope it helps.!