python script that reads text file containing coordinates and creates a path/curve for object to follow I am a highschool student working at a college's engineering department for the summer. I just began working in blender and have intermediate knowledge of python. Could anyone share a script they've made that can:

1) Read a text file of xyz coordinates into python.

2) Turn these points into some type of curve or path that an object can then follow to model the path the coordinates map out.

Like i said i don't have a great understanding of blender but if someone could write or give me a script that is able to do this it would help. Please explain in simple terms also.. Again I am not an expert.

The file has three points on each line, separated by commmas, and is pretty large. All the coordinates would need to be floats on account that they are decimals.

-4.934860e-06 , -1.380798e-06 , -1.504166e-05 ,
-1.359547e-05 , -4.301138e-06 , -4.403530e-05 ,
-3.727631e-05 , -1.307421e-05 , -1.287422e-04 ,
-7.177810e-05 , -2.724715e-05 , -2.643154e-04 ,

here are some of the data points when in the text file

now with the .csv they were put into an excel file

when copied and pasted they look like this:

-4.93E-06   -1.38E-06   -1.50E-05

You can run this code straight from Blender's Text Editor.

You'll see a lot is the same for creating a simple vertex-edge based mesh, but this snippet:

imports x,y,z as a list of coordinates
creates a curve object and prepares it to accept the vertex coordinates
transforms the list of coordinates to flat list
this means
[x1,y1,z1], [x2,y2,z2], [x3,y3,z3]
becomes
[x1,y1,z1,x2,y2,z2,x3,y3,z3]
uses 'foreach' to push the flat list of coordinate components onto the .points.co's.

code:

import csv
import os
import bpy

filename = 'circle.csv'
directory = '/home/zeffii/Desktop'  # <-- if you have linux or osx
# directory = r'c:\some\directory'  # <-- if windows, the r is important
# directory = 'c:/some/directory'  # <-- if windows (alternative)

fullpath = os.path.join(directory, filename)

with open(fullpath, 'r', newline='') as csvfile:
    ofile = csv.reader(csvfile, delimiter=',')
    next(ofile) # <-- skip the x,y,z header

    # this makes a generator of the remaining non-empty lines
    rows = (r for r in ofile if r)

    # this converts the string representation of each line
    # to an x,y,z list, and stores it in the verts list.
    verts = [[float(i) for i in r] for r in rows]

if verts:
    # curve coordinates require a 4th 'W'(weight) component,
    # the +[0.0] adds that for us
    out2 = []
    [out2.extend(list(i)+[0.0]) for i in verts]

    # has one coordinate by default, we add one fewer than we need
    num_points_to_add = len(verts) - 1
    curve = bpy.data.curves.new("path_name", type='CURVE')
    polyline = curve.splines.new(type='POLY')
    polyline.points.add(num_points_to_add)
    polyline.points.foreach_set('co', out2)

    obj = bpy.data.objects.new("obj_name", curve)
    scene = bpy.context.scene
    scene.objects.link(obj)

points to note:

by all means use your own file-names :) , but as a convention if you are using comma separated values, it helps to use the .csv so you know even without looking at the content of the file, that is stores data that way. Also the first line of the file should describe what each column contains ( see the example curves.csv in the other post)
my csv reading code expects the first line to have column information, the line 'next(ofile)` can be commented out if your data starts straight on the first line

If your csv isn't formatted in a standard way, you can try using this script and adjust it to your specifications.

Judging by the coordinates you're importing you might want to scale the input up by 1000 times so the resulting curve/object isn't too small to see without zooming in. If it were up to me i'd change the line where the value is cast to a float and add a scalar multiplication to go from -4.934860e-06 to -0.493486 . If you don't know what the e-06 means it's a scientific notation to quickly show the size of a number without adding 6 zeros between the decimal point and the significant digits.

# (or 100000, or more.. depending on the total object extents)
scale = 10000
# the r[:3] here means you are only interested in the first 3 values on every line.
verts = [[float(i)*scale for i in r[:3]] for r in rows]


Lines or streaks when Applying Textures I created a cube and I added  a simple texture to it. On some faces of the cube, the texture is skewed and this produces some strange lines on some of the faces of the cube.
And I don't think it's about how I unwrapped the cube because even if I set the Texture Cordinate Node to Generate, those lines still persist.
Can anyone help me solve it?

This effect is produced by having faces unwrapped as lines in the UV coordinates. Meaning, your long rectangles are represented as long lines in the UV layout, without any width to them. So the pixels of the texture are correctly represented only in 1 dimension (ALONG the rectangle), but not in the other.


Transparent PNG texture casting shadows I'm attempting to overlay a transparent PNG texture over a plane to create a glowing cutout effect. However, the transparent regions of the cutout aren't actually transparent and are casting a shadow on the floor below. Below are the top, side and node setup of the plane with the texture.

Set the transparent bsdf to one color (solid white: 1, 1, 1...alpha is disregarded). For this shader to be truly "transparent," the color must be so.

Transparency color levels from left to right: 0, 0.25, 0.5, 0.75, and 1 (yes, there is an invisible monkey on the end).

Here is the demo blend:

And here is a link to the transparent shader in the manual:

https://www.blender.org/manual//render/cycles/nodes/types/shaders/transparent.html

The color can also be used to tint (it doesn't have to be the same for R, G, and B channels):

From left to right, the RGB color is as follows: (0.5, 0, 0), (0, 0, 1), (0, 0.75, 0), (0.75, 1, 0.75), (1, 1, 0).


A single object in Blender = multiple objects in Pepakura As the title says, after using the Ctrl+J shortcut to merge several objects into one, and exporting to OBJ and then opening in Pepakura Designer, it acts as if I never connected them at all.

It's a helmet, and more specifically, the unfold in pepakura unfolds all of the separate objects and, if i managed to assemble all of the parts, I'd finish with 6 unconnected parts instead of a full connected helmet.

So, can anyone help me? I'm extremely new to Blender and have no idea what to do. I've been looking for a few days now.

Thank you all.

Assuming that you are using .obj file exange format, Pepakura will import the object exported from Blender as a single object if in blender you join all the geometry in a single object.

Pepakura is an unfolding software. Starting from the given geometry,it caluculates the angles and suggest where to put seams, add labels... but all rely on the initial geometry. If you give it two disconnected pieces, even if they are "the same object" they will be considered disconnected, so their boundaries will obiuvsly be seams.

Notice in the images above how pepakura ignores the fact that the cubes are intersected and cosider them as two disjoined cubes (as they are also in Blender, evon though they are stored in the same object).

You should work on your geometry and make all the pieces that you want be connected a whole.

You can use:

Boolean operations
Bridge edge loops, or add faces manually or with F2 add-on if the borders are distant
Remove doubles, if border are almost in the same place
etc...


How do i copy and paste and objects location,rotation and scale at the same time I have notice that when i do animations and make a mistake on where the camera should be its hard to fix it due to how long it takes to change its Locrotscale.
is there a faster way to copy it all and paste it to another frame.

With the 'camera' object selected, go to the 'dope sheet' editor window. Select the key-frames you want to duplicate and press Shift+D. Then press G to grab and drag the new keys to the desired frame. Hope this helps..


Is it possible to do this kind of wavy texture procedurally? How should I proceed creating this kind of wavy texture in Blender?

This node setup (be careful on second mapping node scale)

create this wave on plane.

You can use scale, distortion and detail on noise and musgrave nodes to get desired waves shape. Amplitude frame, multiply node factor change wave scale.


Change Diffuse shader to emission shader without affecting shader color I'm making a motion graphics. All elements (in hundreds) are modeled in diffuse and have different colours. How do I select them all and change to emission shader without affecting the colors?

This script from http://web.purplefrog.com/~thoth/blender/python-cookbook/change-diffuse-to-emission-node.html should work

import bpy

def replace_with_emission(node, node_tree):
    new_node = node_tree.nodes.new('ShaderNodeEmission')
    connected_sockets_out = []
    sock = node.inputs[0]
    if len(sock.links)>0:
        color_link = sock.links[0].from_socket
    else:
        color_link=None
    defaults_in = sock.default_value[:]

    for sock in node.outputs:
        if len(sock.links)>0:
            connected_sockets_out.append( sock.links[0].to_socket)
        else:
            connected_sockets_out.append(None)

    #print( defaults_in )

    new_node.location = (node.location.x, node.location.y)

    if color_link is not None:
        node_tree.links.new(new_node.inputs[0], color_link)
    new_node.inputs[0].default_value = defaults_in

    if connected_sockets_out[0] is not None:
        node_tree.links.new(connected_sockets_out[0], new_node.outputs[0])

def material_diffuse_to_emission(mat):

    doomed=[]
    for node in mat.node_tree.nodes:
        if node.type=='BSDF_DIFFUSE':
            replace_with_emission(node, mat.node_tree)
            doomed.append(node)

    # wait until we are done iterating and adding before we start wrecking things
    for node in doomed:
        mat.node_tree.nodes.remove(node)

def replace_on_selected_objects():
    mats = set()
    for obj in bpy.context.scene.objects:
        if obj.select:
            for slot in obj.material_slots:
                mats.add(slot.material)

    for mat in mats:
        material_diffuse_to_emission(mat)

def replace_in_all_materials():
    for mat in bpy.data.materials:
        material_diffuse_to_emission(mat)

if True:
    replace_on_selected_objects()
else:
    replace_in_all_materials()

Just paste a copy into a blender Text Editor, select the objects you want adjusted, and click the Run Script button.  If you want to rework all the materials, just change the tail end of the script to run the replace_in_all_materials() function.


Objects rotating weirdly I'm trying to animate the movement of the wooden sculpture that I made. I'm stuck trying to rotate each stick of this model vertically up and down so it would touch the stick of the lower part of the model at approximately 45 degrees, but it won't work.
I tried setting the origin to everything i found in the Set Origin menu, but it still behaves weirdly and also I tried to rotate it around the short edge and selecting Active Element and Normal in Edit mode but still I got the same kind of rotation.
What am I doing wrong?

I don't quite understand the problem, but I think what is wrong is that your pivot point is off. Tab edit mode, select the face you want to be a hinge, snap cursor to selected, then set the rotation point to cursor. Let's hope it works!


Creating curves in Python I am new to Blender scripting and I am getting some unexpected behavior when trying to add a curve through a Python script. I am using this code:

import bpy
import math
import pdb
from mathutils import Vector

# print all objects
for obj in bpy.data.objects:
    print(obj.name)
    if("Curve" in obj.name):
        print("found")
        bpy.data.scenes["Scene"].objects.unlink(obj)
        bpy.data.objects.remove(obj)

for cur in bpy.data.curves:
    print(cur.name)
    bpy.data.curves.remove(cur)

# sample data
coords = [(1,0,1), (2,0,0), (3,0,1)]

# create the Curve Datablock
curveData = bpy.data.curves.new('myCurve', type='CURVE')
curveData.dimensions = '3D'
curveData.resolution_u = 2

# map coords to spline
polyline = curveData.splines.new('POLY')
polyline.points.add(len(coords))
for i, coord in enumerate(coords):
    x,y,z = coord
    polyline.points[i].co = (x, y, z, 1)

# create Object
curveOB = bpy.data.objects.new('myCurve', curveData)
curveData.bevel_depth = 0.01

# attach to scene and validate context
scn = bpy.context.scene
scn.objects.link(curveOB)
scn.objects.active = curveOB

And this is the result I get.

I am confused why there are four coordinates. Blender seems to create one additional point at the coordinate origin (0,0,0), connecting it with the last point from my data. Why is this happening and how can I avoid it?

The solution was simple enough. I changed

polyline.points.add(len(coords))

to

polyline.points.add(len(coords)-1)

as found here:

http://blenderscripting.blogspot.de/2011/05/blender-25-python-bezier-from-list-of.html


Can I combine my GTX 980Ti with another card like GTX 1660? I have a GTX 980Ti and I'm looking for a lower end card to pair it with (like 1660 or 1070). Is this possible and what kind of AMD motherboard do you suggest for this?

You cannot run two graphics cards on the same tasks unless for Nvidia graphics cards unless they are the same make and you are using an SLI Bridge. You can have them on two seperate tasks if they are different but not the same. I have this motherboard but for Intel unfortunately, I did not know about thread rippers at the time. Could have had 6 more cores on top of ten for what I paid. But, this is the best I think. Works great on dual boot with CentOS. Just do not install gnome on it. Go with a Plasma KDE desktop. Gnome will most likely cause the login screen in CentOS to take along time to load if even at all.

https://www.amazon.com/GIGABYTE-X399-Designare-EX-Motherboard/dp/B07662S766/ref=pd_sbs_147_9?_encoding=UTF8&pd_rd_i=B07662S766&pd_rd_r=540bdb43-7b92-4671-bb17-a62503bac9b1&pd_rd_w=5KI67&pd_rd_wg=yGvMq&pf_rd_p=7c0dad87-8a25-4c4f-9349-026039ea6cb3&pf_rd_r=2039ZHRGX36XF8JRM04J&psc=1&refRID=2039ZHRGX36XF8JRM04J


How to fix "Select Non Manifold" Errors As you can see in the images, I have run the Select Non Manifold command to check for any errors. I got an error for the whole 3D text which is attached to the block of mesh behind it. I joined them together using Ctrl + J, but I don't know how to fix the errors.

I believe that's not an error, it's doing what you're exactly asking it to do.
Joining meshes using Ctrl + J do not affect their geometry, it just puts them as one object, think of it as a way of grouping meshes, any doubles or holes will remain the same, so what you actually did is overlapping your meshes, what you need to do is to close the holes, remove doubles, in other words make the mesh manifold. Trying to understand better what a manifold mesh is, think about it as a model of an open bottle, with a single surface, the hole at the top makes it non manifold, since the "exposed" inside of the bottle,  has no dedicated faces, faces normals are pointing outside, while adding a Solidify modifier, or closing the hole, makes it manifold (in case there are no doubles) because all "exposed" faces now have normals pointing outside the volume of the mesh itself.


Fluid: How to convert the simulation to a series of meshes? Once you've baked your fluid simulation, you can apply the Fluid in the Modifier panel in order to get one mesh that you can edit etc...
But how can you get the whole series of meshes, i.e. one mesh per frame?

You can get obj (wavefront) meshes in the cache directory as indicated here.

Mesh File Format (Liquids Only)
File format for the mesh cache files.

Binary Object
    Mesh data files with some compression.

Object
    Simple, standard data format for mesh data.

The settings:

Check "Mesh"
In the cache part, set the directory you want
Choose "object" as format for the meshes

Once the simulation played, if you go to the cache directory, you'll see:

and the meshes in obj format are in the "mesh" subdirectory. One per frame.
So that you can import them:


How do I change the DoF settings of the active camera using python? I want to change the DoF distance of the active camera in a scene using a script. So far I have written:

bpy.data.cameras[0].dof_distance = distance #"distance" is the variable I want to use

But that sets the DoF distance for the camera that comes first in the outliner (alphabetically), which is not necessarily the active one.

So I tried getting the active camera property from the scene settings using

bpy.context.scene.camera.dof_distance = distance

But that does not work at all, because this method only returns the object, but not the "camera-properties" (as far as I get it).

How can I make this work?

bpy.context.scene.camera returns the active camera in the scene. In order to change your Depth of Field settings use the Console, Python Tooltips or the API to find each corresponding property.

>>> active_cam = bpy.context.scene.camera
>>> bpy.data.cameras[active_cam.name].
                                      angle
                                      angle_x
                                      angle_y
                                      dof_distance
                                      dof_object
                                      ...
>>> bpy.data.cameras[active_cam.name].dof_distance = 7


Skinning a tank track Essentially, I'm running into the same problem as the OP in this thread: Skinning A Simple Tank Track For Unity3D
I'm not sure I understand the answer posted there, so I'm hoping to get a little more clarity.
Currently my weight paint looks like this:
There's 4 bones in the mesh and the weights are similar for every bone. My problem is that when I move the bone, I would expect the mesh to deform smoothly, but instead I get this:
And in this picture you can see the vertices:
I am a bit of a noob when it comes to weight painting, so bear with me here.
The thread I linked above had a similar problem but the solution was not explained in enough detail for my inexperienced self to understand. If anyone has any details to add, that would be great. :)

Here are the principles of bone control over vertex groups:
Let's say that I have a bone called Bone1 and a vertex group called Bone1 as well. The bone will control the vertex group that has its name (if it has been parented with an Armature Deform option). Here I assign a vertex group weight of 1 to the 2 vertices on the left, and a weight of 0.1 to the 2 center vertices:

If the center vertices are only part of this group, it doesn't matter how much is the weight, as long as it is not 0 of course, they will be influenced by the bone as much as if they had a weight of 1, see what happens if I move the bone, left and center vertices are equally moved by the bones:

Now let's create a new bone, called Bone2. I create a second vertex group called Bone2 and assign a vertex group weight of 0.1 to the center vertices, and a weight of 1 to the right vertices:

If I move Bone2, as the center vertices are now part of 2 vertex groups that equally influence them, they will be equally stretched between the 2 bones:

Now, for these center vertices, if I change the weight of Bone2 up to 0.5 instead of 0.1, this time the influence of Bone2 on these vertices will be 5 times higher than Bone1, and so on:

All this explains what you show: You think that the weight of the bone should smoothly decrease along the mesh, but it's not what happens:

Why? Because the vertices that seem only lightly influenced are only part of this bone's vertex group, so the influence of this bone on these vertices is as strong as if it was 1. To decrease the influence of the bone on these vertices, they should be part of the next vertex group as well. That's what you need to keep in mind when you parent the tank track to these bones. Parent With Automatic Weight should work, because it will smoothly share the vertices between the groups, but you can do it manually if you keep all these principles in mind.


Getting Views of Rendered Mesh Faces I'm working on a project that requires me to project a picture spherically around a dodecahegon and then get images of each of the twelve faces so I can make bitmap files of the design each face contains.

I first tried setting up twelve cameras and pretty much just taking screenshots of the views, but getting the cameras oriented in exactly the same way so there was no skewing in the pictures was nearly impossible.

As a second resort, I tried to unwrap the mesh and lay the picture that I projected to the mesh on the UV map, but since it was flat, the faces didn't contain the same design on the UV map compared to the Spherical Projection.

So, is there any way I can get precise, non-skewed views of the rendered version of each face of my mesh?

This is my first time using Blender, so if I overlooked something simple, or didn't explain something correctly, let me know and I'll try to clarify :)

Edit: Here are some pictures of what I'm trying to do. I want 12 separate pictures of the outside faces as they show in my rendered view. So far I took 3 photos of the faces, two of which you can see below

I suggest using custom transform orientations and a track-to constraint to get the cameras pointed at the faces. Please see the demonstration here: https://youtu.be/1Mu6loumKj0


When I Pose my Armature, the Mesh Attached "Fractures" I add armatures,

Ctrl + P,
    -Armature Deform
       -With Automatic Weights

It's looking pretty good so far:

Then, I try to pose my newly rigged character mesh:

What happened here?

The render looks like this:

Naturally, in an animation this would look awful, so I'm trying to find out how to prevent this.
Maybe I'm rigging it incorrectly?
Maybe I need to add some sort of modifier?

You should add some manual weighting:
Your procedure has created two new vertex groups: one named "bone", another named "bone.001".

Every vertex of your model will have a property called "weight" (range 0.0 - 1.0) for every vertex group associated to every bone of the rig.

If a vertex is weighted 1.0 to bone and 0.0 to bone.001, it moves along with the first bone and is not influenced by the movemets of bone.001.

If the two weights are both 0.5, the vertex will be moved by both bones, in a blended way.

There are many ways to assign the weight to a vertex, i.e.you can select a group of vertex in edit mode, then assign them to a vertex group specifiing the desired weight. Another popular but a little bit tricky method is to use weight paint mode.

Start your manual trimming of weights by assigning the vertex of that kind of "finger" coming out fron the knee, to both bones, not only one as it seems from the picture. Try to have all vertex with a total sum of 1.0 weight (1.0 - 0.0, 0.2-0.8, 0.5-0.5, etc .....)

Search for more info about "skinning".


How can I straighten a bunch of vertices into a straight line? (Odd angle) As you can see on the Top Ortho view, the selected vertices are a bit of a mess, and I need them to be perfectly aligned like the green line I draw next to them, while keeping the same, circle-ish shape.

How can I go about it?

I tried a few methods posted on this site and elesewhere but I never managed to make it the way I want it.

I would also prefer avoiding redoing the complete thing over again.

Thanks

This might work for you. Enable LoopTools in preferences then select the faces concerned rather than the vertices. Press W, choose "LoopTools", choose "Flatten".


ASCII Art in blender using Animation Nodes ASCII Art is the use of ASCII characters to draw images an shapes. I was wondering if it is possible to convert an image into an ASCII Art using Animation Nodes in blender. Here are some examples for the required output:

ASCII Art rely on a fundamental concept, when characters are viewed from far, they no longer look like characters but rather some white and black blocks. Some characters look more black that others, for instance, a dot . colors a single pixel black, while an I colors more that one pixel black and thus it looks more black that a dot from far away.

Let us define the density of a character as the ratio between the white and black pixels in a rasterized version of the character. From this, it is clear what we have to do in order to draw an image using characters:

Sample the pixels of an image and convert them to greyscale if they were colored.
Compute the density of each character and store it in a list.
For each pixel in the image:

Find the character with the closest density to its value and append it.

Break the list of characters into n number of row where n is the width of the image. Then output that text.

Sample Image Pixels

I am going to make a group that samples the pixels of the image as well as return its width. You can get the R values of the pixels of an image with name imageName using the expression:

bpy.data.images[imageName].pixels[:][0::4]

And the width by the expression:

bpy.data.images[imageName].size[0]

So the node group looks like this:

Notice that you can cache the results for faster execution in the future.

Compute Characters Density

To compute the character density, we are going to use a BVH tree. We will ray cast a group of ray in the bounding box of each character, count the rays that hit each character, divide it by the number of rays. This will get us the normalized density of each character. First, I am going to create a mesh with all possible characters aligned in a row. It is important to use a monospace font for this:

Next, I am going to create a loop that takes a grid of vectors, ray cast them on each character and compute the number of hits. Notice that at each iteration, I move the grid in the x direction by some offset value that is equal to the width of each character (Which is constant since we used a monospace font):

Next, we create the BVH tree and the grid that will be used as the input for the previous loop. The BVH tree is easy to compute using the Construct BVH Tree Node. However, to create the grid, we have to identify the width and height of each character, I couldn't really find anyway to do that, so I aligned a plane with one character and got the width and height from it, I also added an array modifier to get more accurate results by cross checking width and height with all characters:

Computing the grid in this case is easy, we get the difference between the lower left and upper right vertices locations of the plane to get the height and width, the Grid Mesh node returns a grid that is centered, to move it to the first quadrant, we subtract half of the difference vector. Having the grid in the first quadrant, we move it such that the first vector is aligned with the first vertex in the plane:

We then divide the number of hits by the total number of rays. Now the problem is to find the index of the character that its density is closest to each of the pixel values, so lets make a loop that returns the index of the closest value in a list to some reference value. We loop over the values of the density list, compute the difference between the current density and some reference value, if the difference is smaller that an initially infinity parameter delta we reassign an integer parameter to be the current index and reassign delta to be the difference. I realize it is not easy to understand what is going on here, but it really is easy, at the first iteration, delta is infinity and thus any difference is definitely smaller than it, so delta becomes the difference between the density of the first character and the index becomes zero (Indicating that so far the closest value is at index zero), at the next number of iterations, if we find a smaller delta (Difference), we reassign again indicating that we have found a value that is closer. Make sure to output the Closest Index parameter after you are done:

Now, we loop over the pixel values, use the previous loop to find the index of the character with density closest to it (The pixel value is the reference value here), then output those indices:

We now split the characters we used to create the mesh, get the characters at the indices we just generated, split them again at nth character where n is the width of the image, then join them with a line break as a separator. Notice that we  reverse the lines, that is because blender reads the image from the lower left corner, while text is written from the upper left corner:

One thing to note is that if one normalized the density by dividing by the maximum number of hits, the result will be richer. All of this results in a text:

Not sure if you can see it, but Lenna is drawn here. There is something to note however. The line height is much larger than the width of the character, so we may want to reduce it, since we can't do that in blender, we are going to take another approach. We are going to use cycles.

Shading Approach

What I am proposing is that we create a texture that is composed of the characters ordered from the lowest density to the highest density. We then compute a texture coordinates that position the characters in a grid where the the density of the character in each cell correspond to the pixel values in the image.

First we generate an image with the 84 characters we have ordered based on their density, we can do that by rendering a text object generates by this node tree:

We are basically sorting the characters, joining them and writing them to an object, then we render it producing an image like this:

Notice that the characters at the left are more sparse (lower in density) than those at the right, and that is exactly what we want.

We now have to compute the texture coordinates based on some input image, I shall not describe how the node tree is created because it is out of the scope of this answer, but I will share the blend so that you can study it yourself.

Character Instancing

Lets say we have 80 different characters that are used in the ASCII Art, they may repeat a lot inside the art, so there is no good reason to repeat them that many times and consume memory like that. A better approach would be to create 80 text object each with a character, then create 80 meshes with vertices, each of which will be the base for a DupliVert of some character, for instance, the character a was repeated a thousand time at different locations, we create a mesh with vertices locations equal to those of character location, then parent the object with character a to it, this will result in instancing the character a in all of the locations it was supposed to be in. By doing that for all objects, we create a complete grid of characters just like the one in the CSS and text editor example. So we use the Object Instancer Node to create the character objects as well as the DupliVert object as follows:

Then we hand it to the Instancer loop. This loop find the indices at which each character occurred, find it location in the text grid by means of modulo and floor division by the width, then the output locations are assigned to one of the mesh object, then dupli_type is set to VERTS and the character object is parented to the DupliVert Base:

And this immediately returns the results we are looking for, notice how by selecting one of the objects, we see all the places it occurred in:

We have about 9 million polygon in the scene and blender isn't complaining.

Here is the blend file for study and practice:


how to build mutiple targets in a loop in animation nodes? so i have made this nice animation within a loop. But if i put the curve object output in the loop, the target is the same. I want to create these columns in one loop and create a target for each column. is this possible with animation nodes?

Yes. You can create multiple targets using object instancer and simplify this process using loop.


Custom Split Normals Data broken by Subsurf? I am using the Data transfer modifier to transfer normals from one object to another. This works fine when it is in the modifier stack after the subsurf modifier. If the subsurf comes after, the mesh reverts to it's regular normals.

This is not a problem if leaving the modifiers, but I want to avoid this because Data Transfer of normals adds a big delay to the start of renders. I can create a Custom Split Normals Data layer and then apply the Data transfer. However, this is then the same as having the custom normals before the subsurf, so using subsurf again reverts to the regular mesh normals.

Is there a way to stop this, or a work around? Could I bake a normal map of the data transferred model to the default model and get the custom normals as a texture instead (perhaps a different question: Does baking a normal map include custom split normals layers.)

I was able to get around this by baking a normal map from a version of the model with the data transfer modifier on to a regular version of the model without it. Both had subsurf. I then used this normal map in the object's material.

I baked the normal map in Blender Internal as Cycles was giving me artifacts and horribly pixelated results, but I do not know if that matters. I may just have been using the Cycles baker incorrectly. I am using it in Cycles without issue (tangent space for the bake.)

I am still looking for any other solution, as use of a normal map isn't always possible, such as when using normal editing Addons.


How to avoid multiple running instances of same handler function when running it from editor? I'm doing simple handler script that gets appended to bpy.app.handlers.frame_change_post.

Every time I do a changes to it and hit Alt+P it registers itself again with a new version. after a bit I have 10 of the scripts running happily on every frame change.

How can I get rid of the old running versions without closing and reopening Blender, which seems to be the only option now?

I tried adding unregistering with bpy.app.handlers.frame_change_post.remove() but that is just throwing an error as if my script wasn't on the list. while at the same time print(bpy.app.handlers.frame_change_post) is showing my function name there in growing numbers :)

so, what's the best practice developing and running these?

thanks.

.b

In simple cases when you're not having to deal with other handlers, you can clear all handlers before adding new ones:

bpy.app.handlers.frame_change_post.clear()

However for projects which are already using handlers, you may not want to remove everyone elses handlers, and instead replace only a handlers the script added.

Currently we don't have a convenient way to handle this, or at least Python doesn't make it so easy to reference a function defined in a previous execution.

This example script shows how the functions name and module can be used, append_function_unique is a function to append and remove previous instances.

import bpy

def append_function_unique(fn_list, fn):
    """ Appending 'fn' to 'fn_list',
        Remove any functions from with a matching name & module.
    """
    fn_name = fn.__name__
    fn_module = fn.__module__
    for i in range(len(fn_list) - 1, -1, -1):
        if fn_list[i].__name__ == fn_name and fn_list[i].__module__ == fn_module:
            del fn_list[i]
    fn_list.append(fn)

def my_function(scene):
    print(scene)

def register():
    append_function_unique(bpy.app.handlers.frame_change_post, my_function)

if __name__ == "__main__":
    register()

Note: This is isn't such a problem for modules (add-ons or scripts you import). However scripts you run directly will use a module name of __main__. This means if you run multiple scripts directly, there may be function naming collisions - which is why this solution isn't ideal.


(Physics) Animated Model with Armature interacts with cloth, but not other objects I cannot find a answer to my problem.

The armature-animated model interacts perfectly with cloth physics, but will not interact with a physics-based cube.  I cannot find a answer to this problem.  Please help.

Cube: Active + Dynamic

Cloth: Active + Dynamic

Model: Passive + Animated

For some reason the cloth hits the cube but not the model itself.  Why?!

I just want the model to be able to push the cube off by turning.

Just figured it out, apparently this had something to do with it...


How can I create twisted geometry? I have attached an image as an example below. I want to twist a rectangle. Do I have to convert that rectangle into a curve or into mesh and then twist it with ctrl+T?

Please explain with an example.

Using PROPORTIONAL EDITING (with Linear Falloff type)
Add a plane , scale it along Z axis and divide it with many edge loops (Ctrl+R). Select the top edge and snap the cursor to it. Enable the proportional editing, set the falloff type to Linear. Now increase the influence circle with the Mouse Scroll and rotate (R) until you get the desired segments size.

Using SIMPLE DEFORM (BEND) and ARRAY modifiers
Add a plane and subdivide it as above. Go to Object Mode and add a Simple Deform Modifier. Increase the Deform Angle to 360 degrees. Then add an Array Modifier, increase the Count number and set the Z relative offset to 1.000. You may add another Array to duplicate the segments along the X axis.

Apply modifiers when done. Finally remove doubles.


How to join or articulate a group of bones? I am rigging with bones and parenting with empty groups but when I want to join more that two bones as one unique articulation or when I move then in pose mode each vertices goes apart.

This is the mesh in rest position where you can see the bones joining together

And here when I try to move them

Does anybody knows what can I do?

Thanks in advance

My approach would be to have one bone as root to move the whole thing around, a second bone is then attached to the arm to control lifting it up. I placed a Limit Rotation constraint on this so that it can only be moved within a reasonable range of motion.

For the hydraulics lifting the arm, I have two empties (shown as circles), one is parented to the arm, the other to the main chassis. A cylinder is then made as a child of each with a TrackTo constraint that keeps it pointed at the opposing empty.

As the arm is raised and lowered, these piston pieces imitate the hydraulic piston.

The bone for the "pivot" arm that is used to rotate the bucket is simply an unconnected child of the arm bone, again I have a Limit Rotation constraint to keep it sane.

For the bucket I have another unconnected bone that is also a child of the arm bone. To this I have added a Transformation constraint. While this constraint can be hard to grasp, it takes an input transform and maps it to the output transform, the input and output do not have to be the same type or axis, but in this case I use it to vary the ratio of movement. A little experimenting and I found moving the pivot bone between 20 and -20 degrees and having the bucket to move between -28 and 28 degress gives a close to static length in the connection between the pivot arm and the bucket. Note that I inverted the angle values so that the rotation happens in the opposite direction.

Similar to the arm hydraulics I have a cylinder with a TrackTo constraint, but here I only have the one.

With this setup you animate the main arm bone to raise and lower the whole mechanism and animate the pivot arm bone to adjust the bucket position.

I have parented the various parts to the bones, the same constraints could be applied directly to objects without using an armature.


Blender animation glitching in Unity I have created a gorilla and its animations in Blender, exported the file as an FBX file and then imported it in Unity. The animations works fine in Blender, the loop is perfect for the walking animation. When I play the animations in Unity (in the animation preview and in game) it glitches at the moment where it loops, the arms make a really strange quick move. Is there anything special to do to export Blender animations ?
Tell me if you need more informations.

EDIT: Here is the link to my blender file, if you want to try exporting it and import it in Unity.

The animation in the blend file you uploaded set to end at frame 79, whereas the animation continues to frame 119. I would try double checking the length of the animation as well as the start and end frame when it is exported. When I opened your file and played the animation without doing anything it was 'glitchy' when it looped, but changing the end frame fixed it. Your final animation should start at frame 1 and end at frame 119.


How to simulate an Infrared light source model I want to simulate a real image captured by an infrared camera under an infrared light source illumination. The length  of infrared wavelength is 850nm. How does we do such experimentation on blender. Is it possible to do it?

Tristimulus models such as RGB are effectively a wide band visible spectral light emulation, making such experiments impossible.

Even spectral based renderers might have a hard time with spectral rendering when dealing with non-visible infra red or ultra violet, depending on how they have been designed.


When i transform an object, the previous key frame changes as well The whole object moves across all key frames. I was just wanting to change the position at each key frame.

Shift your playhead to the keyframe, transform the object, hover your cursor over the 3D viewport, press "i" on your keyboard, and click "Location." To enable automatic keyframing, you can click  in the timeline editor.


Why are the straight lines in my model distorted when UV unwrapped? I am trying to unwrap a fireplace model. I have marked the seams wherever required but when I try to unwrap it, all the edges of the model are at an angle and are distorted as you can see. I want all the edges to be perfectly straight.

I've already applied the scale in the object mode. Any help is appreciated.

Maybe all the planes of the fireplace are not at right angle to each other. You can confirm with this script (select the fire place before executing it; the info will be printed on console).

All the angles should be close to 90 (or 0).

import bmesh
import bpy
import math

obj = bpy.context.object
me = obj.data

if me.is_editmode:
    bm = bmesh.from_edit_mesh(me)
else:
    bm = bmesh.new()
    bm.from_mesh(me)

for f1 in bm.faces:
    angleInfo = (f1.index, [round(math.degrees(f1.normal.angle(f2.normal)), 3) \
        for e in f1.edges for f2 in e.link_faces if f1 is not f2])
    print(angleInfo)


How can I assign an image texture on a Circle? I was recently working on a project of modelling the "Solar System",every thing was alright,but when it was time for Saturn I couldn't assign the ring texture on the model (Circle - rings of Saturn).

I Couldn't Uv-unwrap the Rings correctly.So What is the best way for assigning the texture on the circle (Rings) ?

Here is my Rings texture :

Thank you in advance ! Please In The Answer Explain With Photos.

Wanted ring shape :

In Edit Mode select all your faces making sure you specifically click on one of them to make it the active face.

Unwrap it using the Follow Active Quads option.
In the UV Image Editor turn on the option Constraint to Image Bounds under the UV menu.

Rotate your unwrapped faces 90º if necessary so their orientation follows the rings.

Move them so they fit to the 0,0 coordinate then using scale resize them so they completely fit within the image boundaries. The Constraint to Image Bounds option should make sure everything snaps into place easily.


Triangle to Quad produces disconnected triangles Using the Triangle To Quad option on this mesh produces a bunch of disconnected triangles, like in the photo.

What is the easiest way to remove these so that they are replaced by quads?

From that exact view (all those exact faces selected):

Hit X, then faces to delete the mess you have.
In edge mode,Alt+Right Click an edge, to select the loop around the hole.
Hit F to fill with an ngon.
Then hit Ctrl+T to Triangulate.
Then hit Alt+J to do a Triangle to Quad

EDIT:

Mr Zak's suggestion to use Grid Fill greatly improves this answer by reducing the last three steps to just one:

Hit X, then faces to delete the mess you have.
In edge mode,Alt+Right Click an edge, to select the loop around the hole.
Hit Ctrl+F then Grid Fill


How to have different origin for each object when separating a mesh by loose parts? When applying separate by loose parts to a mesh, I end up with many objects, as expected. But they all share the same origin. If I move one object, they all follow.

I've tried unparenting, but there is no Parent relation between them. It's the first time I encounter this. Is this expected behavior or a bug? Or Am I doing something wrong?

When you switch back to Object Mode, you can set the 'Origin to Geometry'.

With all the objects still selected, int the 3D view port, Go to :

'Object' -> 'Transform' -> 'Origin to Geometry'

Then the origin will be centered on the meshes physical center.


Skewed Grab or Scale in Edit Mode Just learning blender here. One problem I stumbled upon is expanding length of an object in Edit Mode, when that object's rotation is not aligned to global axis (e.g. rotation has been applied).

Let's say I selected four vertices forming one side of a cube. How can I grab the loop and move it without affecting the angles? G-G to slide loop only works within dimensions of the cube (i.e. I can only "shrink" the object"). Assuming there's a face between those vertices I can select the face, use Transformation Orientation: Normal and move the face. But what if there's no face? Normals won't work for this, and none of the other orientations or pivot points seem to do the job either (understandably). Same problem applies to scaling but I suspect if there's a solution, it'll work for both cases.

Seems like it should be a pretty common thing to do when modelling complex objects, so what's the trick? For now my workaround is to create a temporary face between selected vertices and use Transformation Orientation: Normal, but I'm wondering if there's an easier or more "correct" way to do this (also it probably won't work if vertices are not forming a plane).

TIA

GG can actually extend edges beyond existing bounds.

Either: drag slightly inwards to establish the edges you're sliding along, and then hit C or hold Alt while dragging outwards along the (now displayed) extended edges,

Or Go into the 'Adjust Last Operation' panel, and uncheck 'Clamp'

It's always worth checking operator options displayed at the bottom of the 3D View when you're getting to know new tools.. I'm still picking stuff up from there, even after using Blender for quite a long time.


When I right click nothing happens Is there a way to fix this? In Youtube tutorials, when they right click they get some options such as mesh, etc but I don't get anything please help.

Your question is very obscure, but what I think you are looking for is the Add menu?
You can get to this menu by pressing Shift+A. The resulting menu looks like this:

This menu is used to add objects to the scene, from lighting, to meshes, to curves, to armatures, to add-on generated objects.


Can I create a timer overlay for a video file to use in the VSE? How? I need to create a text overlay on my video file showing a timer started and stopped at certain times during the clips length.

All tutorials I found on creating text or titles to be used in the VSE or node compositor only mention pre-made still images or videos with text and alpha to be merged with the original video.

I know of the 'stamp' render option which can either display custom static text or even display time, but it will only show the overall playback time and can not be started or stopped.

Is there an easy way to create a timer with blenders modeling and animation capabilities to be used in the scene? (Easy enough for someone who only wants to edit live-action video and usually does not create 3D content)?

You could make a counter with the wonderful Randomiser addon http://bensimonds.com/2014/04/02/randomiser-add-on/ it has a count function.


How can you make a texture not being affected by blender lights? I modelled a shampoo and I put a label texture onto front face of it. When I'm rendering it the label texture is darker which is obvious to me because blender lights affect it. How can you make a texture like this not being affected by lights and just be there with stable colors all the time(the same colors when I'm opening the texture as image)? Node screenshots would be appreciated :)

If you're using Cycles then I would go for Emission shader with IsCameraRay linked to it Strength. This will make it act as shadeless flat material that doesn't receive shadows and doesnt emit lighting.


Is there an external editor like the compositor in blender? I know you can do to much stuff in the blender's compositor but it is too unfriendly for me. Do you know of program which has all these things like glare, vignette etc., all these presets ready to use with a press of a button. Photoshop doesn't have these "presets". You have to make them up for the most part.
Thx!

Try Natron. Still a bit unstable though.

Other free option is the free version of Fusion.

For paid software try Nuke.


How to make 2 objects of one? I want to slice an object in Blender into two pieces, but I can not get it done. If I use the Mesh tool Bisect it doesn't slice it rightly where I want it slices how i don't want it. I want to slice all the object to get two pieces. Please give me some information how I can do it rightly or how I can use knife tool to slice it. I don't know how I can merge all the object to one object and then slice it.

Here is what I have now

and I what to slice it to get two objects something like this

So I can move half of the dog up and half of the dog down.

When I use Bisect it doesn't slice it correctly how I want.

You can slice the object in two by using the Boolean modifier.

Here's how to use it do to this:
Step 1-Add a cube and scale it down on the Y axis until it bisects your object in the middle where you want two objects.

Step 2-Add a Boolean modifier to the object you are splitting, and make sure that the operation is set to difference.

Step 3-Make the object that modifier affects to your cube. Now you should notice in wireframe view that the object looks like it has a small breakage on both sides of the cube.

Step 4-apply the boolean modifier and delete the cube.
There should be a break in the object that separates it into two parts.

Now, select the object and go into edit mode.
Press 'P' on your computer keyboard, and select the option "separate by loose parts".

Blender has now separated the object into two individual meshes, and that should solve your problem.


is there an easier way to use a still from a movie as a texture? I want to use a single frame from a movie as an image for a texture.  And I do NOT want to store the still in a file (I'll be creating hundreds of these materials using python).

If I give the material a texture from an "Image or Movie" and pick the movie file then blender automatically picks a different frame from the movie for each frame in the animation.  This is very convenient if you want the texture to play back the movie during the course of the animation.

If, however, you want to use a single still from the movie, the only way I have come up with to accomplish the mission is to put keyframes on the Offset property of the Image subpanel of the texture.  By making the offset decrement by 1 each frame you effectively freeze the texture on a single still.

I want to make sure there isn't a checkbox I overlooked or a simpler way.

It's very easy to choose just one frame form a video to be used:

look for the frame controls in the texture panel.

Here's an example of how to use it:

Frames (how many frames you want to use from the video file, in this case just 1 since we want to freeze it, even if the original video has thousands of frames)

Start (at what point in the blender time line should this image start? In this case it will start from the very first frame of the blender project.)

Offset Set the frame number of the particular frame you want to freeze, in this case the frame with the smile is 1110.

In other words, blender will just use one image as a texture and will play only frame 1110 of the video file on every frame of the blender project starting from the beginning.

For Cycles the same options are available on the Image Texture node.


I am making a rubiks cube and cant figure out how to get the pieces to move correctly I can't get the Rubiks cube cubes to rotate and translate the right way without excessive animation and I'm wondering if there is some way to assign the cubes/pieces a certain path that they can follow but can't leave

Local rotation is your friend!

Here's what I'd do:

create an 'Empty' at the very center of your cubes
snap the 3d cursor to that Empty:

Set the pivot point to '3d cursor':

Choose 'Local' rotation mode:

Then select your face cubes and rotate, using axis-constrained rotation (i.e. only one axis at a time).  If you use Local mode it shouldn't matter what crazy orientation your cube is in, your rotation will occur relative to the rotation of the cube:

If you rotate using the 3d Manipulator, it'll stay in Local mode as long as you don't change that dropdown.  If you use hotkeys, press the axis TWICE to be in local mode.  That is, press 'R', then 'X' once, then 'X' again, to rotate around the X-axis in local mode.  You can see in my image those red lines shooting out of the faces that show the axis of rotation.

Hope this helps!


In edit mode, if I move a vertex the whole mesh is transformed Not sure what I've done or pressed, but in edit mode if I select a vertex/edge/face the whole mesh is transformed when I grab, rotate, etc. Also if I add new mesh elements and scale for instance even unselected elements are scaling
What have I pressed?

Thanks
John

you have probably enabled proportional editing the hotkey should be 'O'


Assemble / Disintegrate with Animation Nodes I would like to assemble an object made of Polys but I get stuck because the integration does
not stay.
At the moment I use the Offset Polygons Node to set the scale of the Polys influenced by a
locator object and a Point Distance Falloff as seen in the image.

I can reverse the falloff by an invert node that gives me what I want, but because its a
Point Falloff it does not stay,.
the directional Falloff is close to what I want but I would like to have it starting from
a point and not going in a fixed direction. directional Falloff is way to "directional"

the main goal at the end is injecting the object at different points and let the scale "grow"
till comlete visibility.

We need to store previous state of falloff. This allows to stay effect of falloff even it is changed.
In this example it stores Maximum falloff of Object Controller Falloff on each execution. The values of falloff are stored in AN.falloffData. The value of falloff is reset when frame is 1. The working of this technique is well explained here
To store data to AN module : setattr(AN, "falloffData", x)
Access stored data : AN.falloffData


Is it possible to make a cut from ortho view through the whole object that is measured 1cm from this edge? Red line is where I would like to cut straight through, 1cm from the loop selected. I couldn't seem to find any previous posts that described exactly what I want here. Anyone know if it is possible to make a cut like this?

Thank you in advance.

While the answer from @Robin-Betts is working in many cases, there are those situations where the cut would go through different loops and thus a loop cut with later adjustment would not work.

Here a solution that should work no matter what:

Select a vertex that lies along an edge from where you want the precise distance.
Duplicate the vertex with Shift+D and press Z to make sure it stays on that axis. Move the vertex above the object.
Press G followed by Y in this case to restrict the movement again and then enter the distance you desire the cut to be made at.(I used a specific distance to showcase the mentioned situation with a possible cut over multiple loops.)
Extrude with E from the vertex once to the left and once to the top and create a face (you can restrict the extrusion with Y and Z, but it's not absolutely needed here, as only the first duplicated vertex is needed to be precisely where it is). A triangle face is fine, as it's just a workaround to get an anchor for the knife tool. For some reason a single vertex as well as an edge won't let you snap to it with the knife tool.
Now you can activate the knife tool with K and it will find the vertex we first duplicated to use as startpoint.
Activate the angle constraint with C and cut through
with Z and pull the cut under the object to have the cut encompass the entire object.
Accept with LMB and confirm the cut with Enter

You can now delete the knife anchor face.

Here a more visual explanation:


I would like to have same offset at Extrude Faces Along Normals As like title, I would like to have same offset at Extrude Faces Along Normals..
I had searched that I can make similar deformation by make a simple E, then S + shiftZ to scale on X and Y axis,, But in this case, I can not control the offset by dimension(only by scale).
I believe I can do this because youtuber did same thing as I thought.
And reference pictures as below.
Hope you please give me a help.
(( picture#1&#2 is mine, and Picture#3 is from youtuber(using 2.9 version) ))
[
[
[

It looks like your object has been scaled in Object Mode, so even though you’re extruding an even amount in Edit Mode, after applying the object transformation, it looks uneven.
The way to fix this is generally to apply the object transformation, committing it to the mesh and then resetting the object transformation to zero. You can do this in Object Mode by pressing CtrlA (for apply), then selecting “Rotation & Scale” from the resulting menu. Then you can go back into Edit Mode and try extruding again, which should now produce what you expect.


Blender not showing whole images Blender is not completely drawing images. The 3D viewport itself works fine, but many of the other features are not working.
I will begin by showing images of the issue. At the bottom I describe my settings and system.

For example, the splash screen only shows half the image.

This image has finished rendering (As visible from the saved image), but only a portion of it shows in the viewport. The second image is just the image itself, not a screenshot.

Finally, the node editor is missing images and even entire nodes.

I've attached my system settings if anyone has any ideas about what may help.

I am running Arch Linux under the Nouveau drivers. Everything is completely up to date. I've already looked at this thread, over on the arch linux forums, and the fix was to switch to the Nvidia proprietary drivers. Unfortunately, those drivers fail to run on my card properly (I've got a dual gpu card which is not correctly supported and so it only uses one GPU which immediately dies under the weight and shuts off the computer) so that isn't an option. Has anyone seen this and come up with a solution?

Thank you!

I had the same on a old Dell notebook with Nvidia Geforce GO 7950 and Nouveau driver.

I managed to get the full images shown by selecting DrawPixels as Image Draw Method in user preferences.


How to import an image sequence? I have a collection of images that I want to import into the movie clip editor as an image sequence. The problem is that it only showed one image in one frame (1/1 instead of 1/22).
How can I fix this?

Looks like a little bug: to solve, when importing your image sequence, you have to sort your files by name.


Eyebrow bone is detached from the head mesh Exercising facial expression animation with settlers rig... ...and having a problem with keeping the eyebrow bones on the face surface.
The rig and mesh are from Blender Cloud, Settlers. (see links below)
Transforming the L or R eyebrow controller deforms the mesh freely so it can penetrate the head mesh or depart from it.
My question is how can I attach it to the surface, so transformations are constrained to keep it above and on the head surface?
I tried to lock the y transformation, I added a limit distance constraint (target=head, clamp=surface)- both had no effect.
Any input would be greatly appreciated.
Links:
The uploaded file:
The rig and mesh are from Blender Cloud, Settlers Gabby Settlers Blender Cloud Link

That's easy! All you have to do is add a "Shrinkwrap" constraint to each bone and set the target to the mesh with the head. It'll stick to the surface. One of my favorite modifiers


How to create a flare lighting up the background Hello! I am a Blender 2.8 beginner. I want that little sphere at the back to act like a Sun and light up some of the background, kind of like this:

But I have no idea how to achieve that. Can somebody please help me?
Also, any other advice or criticism is welcome.
Thank you

Firstly, that sphere is not lighting up the background. The background appears to be an HDRI and the HDRI lights the scene, the scene does not light the HDRI. The effect that you want is glow (aka bloom).
If you are in Eevee then you can give that sphere an emission shader and turn on bloom. and that is the only step. If it does not appear change the emission value or change the values of the bloom.
If you are in Cycles there are two options (probably more, but these are what I know).
First way is to give it an emission shader set to any ammount and set the render passes to include Emission. Then in the compositor use a gleam node set to something like fog glow.
The second way is to render it twice (this is the slow method unless you have a good computer or little geometry). Render it once in Cycles for the high quality render and again in Eevee (at the same resolution and settings except maybe samples which can be turned down). In Eevee set the render passes to include bloom. In the compositor combine the Eevee bloom pass with the cycles render with a MixRGB node set to screen or add.


Z-depth of Microdisplacements and Adaptive Subdivision Surface In Blender 2.78, there are two very cool features called Adaptive Subdivision surface and Microdisplacements. BlenderGuru has a great video on it.
If you don't have time to watch the video, here is a summary in lamens terms (written by me; just wanted the quote format to emphasize it):

Both of these features are Experimental features for Cycles render.
Adaptive Subdivision surface is an extension of the Subdivision surface modifier that calculates decreasing levels of subsurf the farther away the object is. It can even change the level across an object.

Image by BlenderGuru.
Microdisplacements uses the Displacement input of the Material Output node. It generates extra geometry at the time of the render. It's like a Displace modifier that only displaces during the render and uses any combination of Cycles material nodes.

However, when I try to use these features on a plane and use a Separate XYZ > Z node in my node setup, it doesn't work. I am theorizing that this is because the plane does not have any Z depth before the render. Is there a way around this?

As Duarte mentioned, generated coordinates do not factor in the displaced mesh. So you need to get a Z coordinate from something that does. You can use either "object" coordinates (available from the texture coordinate node or the geometry node, their "object" outputs are the same) or "global" (aka world space) coordinates from the geometry node's "position" output. These do not rely on precalculated geometry, instead they simply use the shading point's location.

The difference between the two is that object coordinates are in "object space", meaning they account for the transformation of the object. That means they won't move when you move the object, which is good for animated objects (otherwise they might appear to "swim through" the texture). It also means that multiple copies of an object will always have the same texture, although that one may or may not be desireable. Global/world space coordinates are absolute and do not account for object transformations and locations at all. They're nice when you need to keep consistent texture locations across multiple objects (such as adding a waterline to objects below the level of your water mesh) or if you want different textures across multiple static copies of an object


Python: Get the "stop" value of an UI element that's currently used So I have a simple UI like this:

import bpy
from bpy.props import *
from bpy.app.handlers import persistent

bpy.types.Scene.intNumber = IntProperty(name="intNumber", description="Enter int number between 1 and 100", default=1, min=1, max=100)
bpy.types.Scene.previousNumber = IntProperty(name="prevNumber", description="the previous value", default=1, min=1, max=100)

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout

        obj = context.object

        row = layout.row()
        row.prop(context.scene, "intNumber")

@persistent
def scene_update(scene):
    if bpy.context.scene.intNumber != bpy.types.Scene.previousNumber :
        print(bpy.context.scene.intNumber)
        bpy.types.Scene.previousNumber = bpy.context.scene.intNumber

def register():
    bpy.utils.register_class(HelloWorldPanel)
    bpy.app.handlers.scene_update_post.append(scene_update)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)
    bpy.app.handlers.scene_update_post.remove(scene_update)

if __name__ == "__main__":
    register()

This creates a UI element, a number dial to be specific, on the object panel.
When I'm using the UI element, so clicking and dragging, it will print the number to the console. But the problem is it also prints numbers while I'm dialing.

Output of this when dragging the UI element from 1 to 40:

1
6
14
17
20
25
29
31
34
36
40

I want to get the numbers like this:

1
40

I only want to get the number where the user stops dragging / dialing, or releases the mouse button.
Of course it should work in both directions (dragging up / down)

Update:
Although CoDEmanX approaches are flawless and working, it's still not exactly what I was searching for. I realized that this "stop value" is actually there, in the console there appears a

ED_undo_push: intNumber: 40

once I let go of the UI element. Could another solution lie in getting hold of that value?

There is no sophisticated event system that would let you distinguish between onChange and afterChange events. Changes to properties will immediately be evaluated. It allows for instant feedback, which is usually desired.

However, it's a nightmare in terms of user experience if the triggered operation takes very long. It will block Blender until completion, then start the next eval cycle if you keep dragging, resulting in a very unresponsive application.

In such a situation, in which you do not want immediate evaluation, use a props dialog (as opposed to a props popup, which comes with instant eval):

import bpy

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    myProp = bpy.props.FloatProperty(
        name="My Property",
        min=0,
        max=10,
        default=5,
        subtype='FACTOR'
    )

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

    def execute(self, context):
        self.report({'ERROR'}, "myProp = {}".format(self.myProp))
        return {'FINISHED'}

def register():
    bpy.utils.register_class(SimpleOperator)

def unregister():
    bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator('INVOKE_DEFAULT')

Note that it needs to be invoked to show the dialog. If you call the operator from Python console for instance, then it will be executed and not show a dialog.

Operators added to the interface are invoked by default:

bpy.types.RENDER_PT_render.append(
    lambda self, context: self.layout.operator("object.simple_operator")
)

Another approach is to have an additional property (e.g. on the WindowManager type) and add that to a panel. Then let the user adjust the value and click a button to assign the value to the actual property. A callback on the actual property will only be called when the property is assigned by the operator (or manually by the user in the Python console for instance), but not as the property in the panel is dragged - because that's a different property:

import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        wm = context.window_manager
        layout.prop(wm, "myProp")
        props = layout.operator("object.assign_value")
        props.helperProp = wm.myProp

class ObjectAssignValue(bpy.types.Operator):
    bl_label = "Assign Value"
    bl_idname = "object.assign_value"

    helperProp = bpy.props.FloatProperty()

    @classmethod
    def poll(cls, context):
        return context.object is not None

    def execute(self, context):
        ob = context.object
        ob.myProp = self.helperProp
        self.report({'INFO'}, "Assigned: {}".format(self.helperProp))
        return {'FINISHED'}

def register():
    bpy.types.Object.myProp = bpy.props.FloatProperty(update=lambda self, context: print(self.myProp))
    bpy.types.WindowManager.myProp = bpy.props.FloatProperty()
    bpy.utils.register_class(HelloWorldPanel)
    bpy.utils.register_class(ObjectAssignValue)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)
    bpy.utils.unregister_class(ObjectAssignValue)
    del bpy.types.Object.myProp
    del bpy.types.WindowManager.myProp

if __name__ == "__main__":
    register()


Getting the color of an object an empty collides with? How would I get the color of an object that collides with an empty. In this animation node example I get it's location but I would also like the color that it collides with.

Ok I figured it out. Moving the empty around gives me the color of the nearest surface once it hits the cube. Nearest surface is based on the objects polygon's center points and material indices. I would have preferred to get the RGB values directly but I can put those in a table later. Here are my nodes.


Activate Gravity at Frame X So I'm looking to have some text come crashing down. I have a cell fracture enabled and gravity starting disabled however, as I'm very new to blender, I don't have any clue on how to make the gravity only start to effect it at say frame 40. Would love any help!

You can do this by keyframing the Gravity checkbox in Properties>>Scene>>Gravity.

1.) Select frame 40 and keyframe the unchecked checkbox by pressing i or by right clicking and selecting "Insert Keyframe".

2.) Go to frame 41 and keyframe the checked checkbox by pressing i


Is it possible to render the object 'selection outline', or mimic it in some way, for a particle system? I am playing around with particle systems, and have been experimenting with this tutorial: https://www.youtube.com/watch?v=2bv973aqx-w
The system emitted particles from an icosphere, but the particle emitted is based on another object in the space. I'm basically trying to make it look nice. I think that when particles are next to each other, you cannot distinguish the shape, which I think doesn't look very good (Figure 1). When the particle system is selected, the objects all have outlines, which I think looks cool (Figure 2).
Is it possible to add an outline to a shape (i.e. every object in this particle system is based on an emission cube I have) which will then appear in the particle system. The main solution I've found online to getting object outlines is 'freestyle', which I don't think will work here as it is applied after, and therefore the cube generated in the particle system wouldn't pick it up.
Figure 1:

Figure 2:

Any solutions/workarounds welcome!

I agree, it's a very nice look.. It's easy to just get the wireframe of the cubes, but to capture all the edges created by intersecting faces without Freestyle is next to impossible in EEVEE or Cycles. There are some tricks you can pull with tightened-up AO, but none of them quite do it.
I think I would either shoot a pass in the Workbench renderer, say, displaying Object color of black, with Outline checked and set to white, to use as a mask in compositing later:

Or use the Header menu > View > Viewport Render Animation option to shoot the actual selection outline (perhaps with EEVEE,) bearing in mind you can create a custom theme under Edit > Preferences > Themes > 3D View, and change the Object Selected color:

If you would rather just have the wireframe, just say, and I / someone else will come up with a variety of ways to do that.


Hybrid rendering bug? While using the official Blender 2.81 release for the first time (the last time I used Blender 2.81, it was still in Beta) I encountered a strange phenomenon while hybrid rendering in Cycles.

If I start a render with only my CPU enabled as a CUDA device my Ryzen 3600 chews through the 8100 tiles in about 3 minutes.

However if I additionally enable my GTX 970 and use both in hybrid mode my CPU seems to stand still not finishing a single tile.

The remaining time of 0.08 seconds is frozen as well, indicating that something is going horribly wrong. My system monitor is showing 100% CPU utilization, which is even more confusing to me. What is my CPU doing the entire time?

I have to mention, that I'm using Manjaro Linux and the AMD Catalyst driver-package has been discontinued recently, although that should only affect graphics cards not CPUs and my CPU has been rendering just fine on it's own.

Does anyone know how to fix this issue?

Well, I just found out that this bug only occurs in the version of Blender that you get from the Manjaro repository. The binary from the official website seems to work fine. So I guess, I'll head over to a Manjaro forum and tell them about this...


"save as image" no confirmation when overwriting Earlier when saving a render with "Save as image" I miss clicked and saved over another render. Is there a way to enable a confirmation dialog for this action?  I will be much more cautious moving forward, but it would be nice to have that extra layer of protection.

There does not seem to be a way to enable any settings to cause a pop up confirmation dialog to appear.

If you are not concentrated on what you are doing during the saving process, you can still automatically click through the dialog and save over if you save files a lot and get used to the process so some conscious effort is still needed in any case. If you find it hard to know, when you are going to override a file look out for red color. That is very easy to spot if you are looking out for it. The file name field turns red if the same file name exists:


Finding a specific face/vertex/edge based on position value, not indices value [Looking for answers possible via python]

Hi everyone!

I'm trying to select a face/vertex/edge based on location rather than selecting it based on its specific index.  After the specific face/vertex/edge is selected, I have a code that I've found online that can then increase the size of the selected face by a radial distance, which is working the way I want it to.

I've found out that the index number changes when I run the script to generate everything in my model, so I can't (or don't know how to) select the specific face that exists in the location that i need to generate the radius of selected faces at, based on indexing.  I thought a simple solution would be to select based on location instead (ie., 0,0,1), but after searching online for a solution I haven't been able to get any closer to a resolution.

If anyone has ideas or links to help, I'd appreciate your help.  Please note though, I am a beginner in python and Blender so descriptive explanations would be appreciated.

Attached are images and code to better describe my problem:

This is an image of the working script that creates a radius of selection around a manually PRE-SELECTED FACE.  It works great, but I need the face to be selected via python (not manually) and the face that is selected can't change location because the face index changed when the script is run a second time, etc:

Here's the script that creates the above radius around a manually pre-selected face:

# This example assumes we have a mesh object in edit-mode

import bpy
import bmesh
# from mathutils import Vector

# Get the active mesh
ob = bpy.context.object # get the active object for example
mesh = ob.data

#45438 face number to start at. <---this changes when rerunning script
#length should equal radius of circle *1.1666

# Get a BMesh representation
bm = bmesh.from_edit_mesh(mesh)

# notice in Bmesh polygons are called faces
#bm.faces[45438].select = True  # select index 4  #this line doesn't work

# this is a coordinate like Vector((0,0,0))
active_median = bm.faces.active.calc_center_median()

# Modify the BMesh, can do anything here...
for f in bm.faces:
    f.select = False
    if (f.calc_center_median()-active_median).length <= 0.035:
        f.select = True

# Show the updates in the viewport
# and recalculate n-gon tessellation.
bmesh.update_edit_mesh(mesh, True)

Some methods to do this, in my preferred order. All Scripts below will select the closest face to the scene cursor.

BVH Tree

The module mathutils.bvhtree

  BVH tree structures for proximity searches and ray casts on geometry.

Make a lookup tree directly from the bmesh and use its find_nearest(location) method to return index of element closest to that location.

Test script run in edit mode

import bpy
import bmesh
from mathutils.bvhtree import BVHTree
context = bpy.context
ob = context.object
scene = context.scene
mwi = ob.matrix_world.inverted()

loc = mwi @ scene.cursor.location

me = ob.data
bm = bmesh.from_edit_mesh(me)
bvhtree = BVHTree.FromBMesh(bm)

pos, norm, idx, d = bvhtree.find_nearest(loc)
if pos is not None: # is zero vector boolean False?
    for f in bm.faces:
        f.select = f.index == idx

    bmesh.update_edit_mesh(me)

Sort the faces

If the mesh is pretty small then sorting the faces based on distance from location to face centre, could suffice.

faces = sorted(bm.faces,
        key=lambda f: (f.calc_center_median() - loc).length)
closest = faces[0]

Closest point on mesh.

Object.closest_point_on_mesh(...)   Uses object or local coordinates

returns valid, location of closest point, face normal, face index.

The closest point on mesh must be run in object mode.  Remember that switching modes will most likely trash any existing edit mode bmesh.

mesh version

Toggle to object mode, select then switch to edit mode,

import bpy
import bmesh
# from mathutils import Vector
bpy.ops.object.mode_set()
context = bpy.context
ob = context.object
scene = context.scene
mwi = ob.matrix_world.inverted()

loc = mwi @ scene.cursor.location

hit, loc, norm, idx = ob.closest_point_on_mesh(loc)

if hit:
    me = ob.data
    me.polygons.foreach_set("select",
            [p.index == idx for p in me.polygons])
    bpy.ops.object.mode_set(mode='EDIT')

bmesh version

import bpy
import bmesh
# from mathutils import Vector
bpy.ops.object.mode_set()
context = bpy.context
ob = context.object
scene = context.scene
mwi = ob.matrix_world.inverted()

loc = mwi @ scene.cursor.location

hit, loc, norm, idx = ob.closest_point_on_mesh(loc)

if hit:
    bpy.ops.object.mode_set(mode='EDIT')
    me = ob.data
    bm = bmesh.from_edit_mesh(me)
    for f in bm.faces:
        f.select = f.index == idx

    bmesh.update_edit_mesh(me, True)

Note: v2.80 Test Script(s) Substitute loc = mwi * scene.cursor_location to make them 2.7x compato


How to make a prism with different shapes at each end? I'm trying to make a triangular prism that becomes circular at the other end, but to no avail.

At this stage I have a circle with 3 vertices and another with 16, how would I connect these into a prism?

add 13 vertices to your triangle, select all with A and connect with LoopTools > Bridge (tools tab in T panel). Can't screenshot now.


Is it possible to completely go into fullscreen? I have hidden everything except the top header with the menus. Is there a way to hide that? Would scripting this require a lot of work ?

Edit:
 thanks for the reply. It still leaves the top header with the menus.alt + f9 hides the bottom '''footer'''. Isn't there a button for hiding the top one? Would scripting of that be complicated ?

Edit2: here's what i would like to hide in the 3d view

ALT F10 = something somebody already thought of. Repeat ALT F10 to exit fullscreen mode.

This is what I get with mouse over default 3D layout ...

...and as Sambler says once more with F11 and even the Blender bar is hidden.


Camera "Jitter" When circling around object So I made a simple camera rig (camera clamped to nurbus circle and parented to an empty, dead center in middle) but I get this unwanted jitter, not sure what causes it, if someone knows solution, I would be grateful, thanks!

Problem shown in a Youtube video attached

Youtube Link

Sounds like there is a conflict, two constraints fighting for control of the camera - the path and the empty.  To avoid this, have an empty follow the path, and parent the cam to the empty.  This will allow independent use of the cam, i.e. 'look at', rotation, etc.

I've used an invisible cube here to illustrate.


My eye is turning black when adding the transmission on the BSDF node I'm trying to make an eye and while adding the outer later that makes it shine it's turning it dark instead.
It's supposed to look like this:

But ends up looking like this:

Does anyone know what's up?
Here's my blend file.

He's in Eevee, maybe that setup works fine in Eevee, but in Cycles I think you need at least to mix your Principled BSDF (with 1.00 Transmission) with a Transparent BSDF node. There is a lot of solutions (like use Fresnel in the Mix factor, use Glossy, etc) but it will always be a mix with Transparent BSDF in my opinion.


Is there a way to get rid of this square artifact coming from lens distortion? I've got a noisy render that I'd like to composite with slight lens distortion (Fit=True, Distort=0.03, Dispersion=0.001):

I'm noticing a repeating pattern of square artifacts in the output of the lens distortion node. Here is zoomed in on the lens-distorted image:

Is there a way to improve the quality of this lens distortion?

This is not a bug.  It is simply how the the image manipulation algorithm works.  This must be fairly common since Corel seems to use a similar algorithm in Paint Shop Pro:

It's worth noting that the square pattern only appears close to the center... outside the center it becomes more like a concentric circular pattern radiating out.

The reason for these artifacts is that you are distorting an image made up of square pixels.  Ideally, this is what would happen to the pixel array:

However, you obviously cannot distort the pixels themselves and still have a proper 2D array that can be read by typical image software. So you must do some sort of combination of deleting and averaging of pixels.  Because that can't be done on a pixel level (there are no fractions of pixels), the image must be subdivided into sections in order to deal with each subset.  In the center, it makes sense to do this in square sections (since the distortion is minimal), but on the edges it should be concentric sections (since the distortion is circular in nature).

A uniformly noisy image (with large, flat, mono-chromatic planes) is pretty much the worst case scenario for this algorithm because of the contrast between individual pixels on sections that would otherwise have little variation.  You probably wouldn't even notice the artifacts on a smooth image unless you were really pixel-peeping. Here's the same distortion applied to an image rendered at 500 samples:

In short, this is to be expected.  The only way I know to reduce the effect is to apply noise reduction before distortion in your Composite node chain, or start with a less noisy image.  Essentially, the lower the contrast between individual pixels, the less visible the artifacts will be.


"Context is incorrect" python error, while script moves modifier up in modifier list during rendering I would like to run a python script, which adds every frame a new Mask-modifier to an object (and deleting the old). While following script works if the code runs in interactive blender window, during rendering it leads to an error message when it calls modifier_move_up().

import bpy

object_name = "Cube"

bpy.app.handlers.frame_change_post.clear()

def my_handler(scene):

    print("Frame Change", bpy.context.scene.frame_current )

    obj = bpy.data.objects[object_name]

    # delete mask-modifier and add new to last but one position
    if obj.modifiers.find("Mask")+1:
        obj.modifiers.remove(obj.modifiers.get("Mask"))

    obj.modifiers.new("Mask", type="MASK")
    #################################################
    bpy.ops.object.modifier_move_up(modifier="Mask")
    #################################################

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

Error message:

  RuntimeError: Operator bpy.ops.object.modifier_move_up.poll() failed,
  context is incorrect

As far as I understand, I should override the context, but I don't know how exactly and with which parameters.

According to this question (How do I override context for bpy.ops.mesh.loopcut?) I added an override, but with no effect.

import bpy

object_name = "Cube"

bpy.app.handlers.frame_change_post.clear()

win      = bpy.context.window
scr      = win.screen
areas3d  = [area for area in scr.areas if area.type == 'VIEW_3D']
region   = [region for region in areas3d[0].regions if region.type == 'WINDOW']

override = {'window':win,
            'screen':scr,
            'area'  :areas3d[0],
            'region':region[0],
            'scene' :bpy.context.scene,
            }

def my_handler(scene):

    print("Frame Change", bpy.context.scene.frame_current )

    obj = bpy.data.objects[object_name]

    # delete mask-modifier and add new to last but one position
    if obj.modifiers.find("Mask")+1:
        obj.modifiers.remove(obj.modifiers.get("Mask"))

    obj.modifiers.new("Mask", type="MASK")
    #################################################
    bpy.ops.object.modifier_move_up(override, modifier="Mask")
    #################################################

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

While running this code in blender I get after frame change following messages (the code itself works):

  PyContext 'modifier' not found
  PyContext 'object' not found
  PyContext 'modifier' not found
  PyContext 'object' not found
  PyContext 'object' not found

While I'm try to render this part of the messages changes to...

  PyContext 'modifier' not found
  PyContext 'object' not found
  PyContext 'active_object' not found

... followed by the mentioned "context is incorrect" error message.

What am I doing wrong?

Match the area that the operator is called from in UI.

The operator bpy.ops.object.modifier_move_up when run from the UI is done in the properties area.  (area.type == 'PROPERTIES').  Properties has some extra context members, context.modifiers being one of those.

As well as "modifier" the error message is also complaining about "object" not being a member of over-ridden context.

import bpy

object_name = "Cube"

bpy.app.handlers.frame_change_post.clear()

win = bpy.context.window
scr = win.screen
areas3d = [area for area in scr.areas if area.type == 'PROPERTIES']
region = [region for region in areas3d[0].regions if region.type == 'WINDOW']

override = {'window': win,
            'screen': scr,
            'area': areas3d[0],
            'region': region[0],
            }

def my_handler(scene):

    print("Frame Change", scene.frame_current)
    obj = scene.objects.get(object_name)
    if obj is None:
        return
    mod = obj.modifiers.get("Mask")
    # delete mask-modifier and add new to last but one position
    if mod:
        obj.modifiers.remove(mod)

    mod = obj.modifiers.new("Mask", type="MASK")
    override["modifier"] = mod
    # perhaps works without these 2 but hey???
    override["object"] = obj
    override["active_object"] = obj
    # avoid hassles by adding scene here
    override["scene"] = scene
    #################################################
    bpy.ops.object.modifier_move_up(override, modifier="Mask")
    #################################################

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


Is there a node or combination of nodes that can take an average colour out of a single image? This is the opposite of what people usually ask for, where when there is no UV Map for an image texture, an average of the image is applied to the model.

However in this case I am asking if there is a way to use an image to generate a single colour that can then be passed through other nodes.

For example in this Screenshot, the image texture would apply as an image texture to the top half, whereas the same image would produce a single colour, pass through a HSB node to be darkened to produce the bottom colour. Currently I am manually selecting the colour.

If you shrink the image to a size smaller than a pixel of the render result it will render as average, so you could just change the mapping of the coordinates:

You can use vector mapping node as well.

That might not be the most efficient way to calculate the average, but it's easy to achieve and it works.


Managing flame direction (Cycles) I have a fire on my scene and it goes upwards. I want it going in a horizontal direction. How can I achieve that? Changing Temperature Difference only flips direction in the vertical axis.

Overview:

You can control flame direction by Normals from Mesh that is your Flow object. In this example I'm using Circle filled with Triangle fan.

Mesh:

As I said before, simple Circle. You can check where Normals direction will go in Edit Mode > Mesh Display tab > Normals.

Flow:

Now in Flow settings you'll need to turn on Initial Velocity. Set Source to 0 and Normal to something higher then 0. This value will control the initial flame speed. By now flame will be rising but we can change it in Domain settings easily.

Domain:

In Domain settings you will need to set Temp. Diff. to 0. This will make flame straight. Higher value = faster smoke rising.


Linking Bones To Human Model In my human walk animation, when I play the animation, only the bones of the human move. How do I link the bones to the body so everything moves together?

This is an addition to @Denis 's answer.

There are other armature deform options, but with automatic weights looks like it's the most reliable with empty groups weights in a close second. It all just depends on how you want your mesh to deform. I made a turkey to show you:

here is the article to look to for a run-down on armatures, by yours truly.


Making a 3D semicircle and then hollowing out a portion of it I would like to make a 3D semicircle, and then hollow out a portion of the middle, making a shape similar to a letter "D". I need to first make this shape, and then hollow it out. However if there is a better way to do this please tell me.
3D semicircle shape

Hollowed out portion

Thank you for any help

I don't think hollowing it out is the advised way to proceed, booleans should be avoided.

Just start out with a flat mesh in the shape of the straight part of the D. Make sure it only half of it with the object center correctly positioned so we can symitrize it later

Dividide it at the desired proportions, or extrude a lower part corresponding to the desired letter width.

Correctly place your 3D cursor at the center of the shape and use the Spin operator to create half the desired curvature.

Then just let modifiers do the work for you dynamically. Add both a Mirror and a Solidify modifier to add thickness.


Keep Mirror Sides Bridged? When I use the Mirror modifier and move vertices away from the "mirror," the top "face" splits, making a large hole between the faces. Filling the hole voluntarily is quite annoying.

Mirrored...

Faces Split.

Is there any way to fix this problem? I don't see it happening with any other user on BSE.

Note that the two later-mentioned options are not checked because this photo is a cropped version of one that came from the Blender Reference Manual.

You need the Merge option. Clipping, too, would help.

Merge

The Merge option will join two vertices (1 real and 1 generated by the Mirror modifier) into one. The two to be joined are specified by each  being within the Merge Limit: of each other. 0.001 is a good default value, so I would leave it there.

Clipping

This prevents real vertices from breaking the "mirror." This will make joining the vertices a lot easier because you can just grab the top 8 faces (in your case), key G, then Y, then slide your mouse left to bring the sides together and LMB to confirm when the vertices stop moving as they hit the "mirror." The bolded part shows how Clipping factors into merging the vertices.

Last Note

Do keep in mind that once you enable this and merge the vertices, you will not be able to move them away from the mirror for the following reasons.

Think of it like constraints. A "merge" constraint merges the vertices into one; they can no longer be separated.
A "clipping" constraint (for some reason) still treats the vertices as two. Moving either away from the mirror would pull its partner through. That can never happen.

If you want to move a joined vertex away, turn off Clipping.


Nest complementary objects quick, without having to deform,distort? These are just simple placeholders for any two complementary objects which would have many vertices placed in the same location.

To get this picture I had to distort the tetrahedron and pull each of its' vertices to the vertices of the cube, by moving the cursor from vertice to vertice, and go into Edit mode of the tetrahedron to actually move its' vertices one at a time.

Is it possible to achieve the same result without distortion along the way, and in less steps ?

I already posed a similar question which was answered, but wasn't general enough, because the objects had a common axis, which made the alignment rely solely on Rotation... while simultaneous Scaling AND Rotation is required in most cases.

To construct the dual object, you can:

X Delete > 'Faces Only' of the original
F between selected vertices to create new edges
F selected edges to create new faces

If you already have the complementary objects, not in the right orientation or scale, maybe this answer will help?

EDIT: following commentary .. this sequence was keyed manually, forward and in reverse from a static exact fit position. I personally think 'cheating' is the easiest approach.


How to model and animate a bifurcated path? I don't know how to model a bifurcated path.

I'd like to do something good instead of that is bad bifurcation at 2 seconds of this video (the pipe is not full: it doesn't follow the full path at the bifurcation)

https://drive.google.com/file/d/1W22dFRZ_5Bj46ntfcV-lu6O2fK7URCJE/view?usp=sharing

blender file of this video:
https://drive.google.com/file/d/1M-8bKI7HsQxkfTsXez3lHQMdFCpU40yR/view?usp=sharing

Update

Thank you for these links showing how to fork a path. But even with this fork created, the pipe does not follow it. A solution?

thanks

Curves cannot be forked to create branches. And if you create more than one segment within the same curve object you won't be able to adjust an animation of those segments independently. You need separate objects.

As an example:

Let's say you animate the bevel Factor of a curve by animating the End, setting a keyframe with value 0 at frame 0, and one with a value of 100 at frame 60.

To make keyframes just hover the cursor over the value and press I.

Then you create a new segment with a new curve object and align it to start where you want the fork to start. A single curve cannot be animated at different rates in different segments, that is why it has to be a separate new curve. In this example I'm using the snap to function (Shift+S) to place the new segments precisely over the older curve.

Animate the start and end of the bevel for the second curve so that it starts at the point you want.


How to remove animation from duplicated object? I duplicated an object and then added an animation to one of them, the animation appears in both objects in the outliner, also in the dope sheet and graphic editor and I can't remove the animation from one of them without removing it from the other.

So, I removed all the key frames and the animation from the dope sheet and graph editor, also unlinked the animation in the outliner but the animation is still showing in the outliner and every time I try to ad a new one, it becomes shared by both objects again.

That's because you didn't duplicate the object (which is done by pressing Shift + D), you instanced it (done by pressing Alt + D).

The difference is that, when using the second method, all of the object's properties get linked to another's, so, editting one will result in all being modified.

To unlink a object, you use Make Single User, by pressing U, in Object Mode, which will give you a list of possible data to unlink. As you seem to only want independent animations, then choose Object Animation on the list that shows up


Explode modifier size change over time? When using a particle system, it is possible to change certain values (size, emission rate, etc.) over time using textures.

However, I cannot figure out how to do the same when using the "Quick Explode" feature. It seems that the preexisting "size" value in the particle system has no effect on the size of the smitherenated mesh.

How might I affect the size of the fragmented mesh using the particle system, specifically with reference to the texture-value manipulation system?

Check the "Size" option in the explode modifier. This will make the particle size affect the size of the exploded fragments.