How can I use bpy as a module in an IDE? I am new to blender and python and need to get something done.  I want to use an IDE to help me along.  The inability of VS or PYCharm to be able to recognize bpy.types really is slowing me down.

Yes, there is a solution that include compiling (??) a Py Module (??) but I really don't understand it and it seems like its very advanced for a beginner.

Does anybody have the files I need?  Can anybody just make them?

Thanks for the answer.  I knew when I wrote this that the Module was not part of the official build.

LEt's see if I can state my case differently.  I've written code for decades yet I'm new to blender and python.  I've watched the videos and reviewed all the example code.  I'm ready to start by making small incremental changes to the examples.  First up is getting my dev environment working.  An IDE with code checking and code complete will cut my learning time by 90%.  Blender, Visual Studio or PyCharm. Go.  Then I run into a wall.

Code checking and code complete don't work.

After a day of research, I find that there's a workaround.  Compile as a module (??).  But this seems to be the most advanced process.  The instructions assume (and say) that you must have experience.  I don't.

It seems like at least a day, and the likelihood of success is low.

I don't believe my situation is unique.  If the goal is to encourage more use and development, solving this is in everybody's interest.

Is there somebody out there that can do this in a half hour?  Somebody experienced who knows exactly what to do?  Somebody with the dev environment ready to take this on and only needs to work a few minutes to accomplish this?

Could someone do this for the current build and post it?  Newbies like me will appreciate it.

The blender as a module build is not officially supported which means the blender foundation won't make it available as part of the normal blender releases, which means compiling blender yourself is currently the only way to get a copy of blender as a module.

Graphicall.org is a site that makes custom builds of development and experimental versions of blender available. It could be worth commenting on one of the builds for your system to see if the builder might be persuaded to make a module build available.


What does the mapping type do on a mapping node? What do the four buttons (texture, point, vector, and normal) at the top of the mapping node do?  It by default uses point and I have never changed it.  But in the answer to this question David mentioned changing it to texture (which makes intuitive sense).  But technically what do these buttons do?  I have always thought the mapping node is the same as using a vector > split XYZ and math nodes to manipulate the components, in fact I often do this instead of a mapping node if I want to plug some other nodes into the values.

The mapping node works by changing the coordinate system. This is why (when left on the default point setting) you have to put in a larger number to scale a image down. What is you are actually doing is scaling the texture coordinates up.

When set to Texture you are still changing the Coordinate system, not the texture. The only difference between Point and Texture is that for texture all the values are inverted.

Try it, when set to point a value of 2 is required to make the texture repeat 4 times.
When set to texture to get the same repeating 4 times the value must be .5.

I would highly recommend going through the cg cookie tutorial (archive) about the mapping node.


Why do I have to use negative solidify values when the tutorial does not? So, I was following this blender tutorial and the first time I did it, it went swimmingly.  Now I have a problem: whenever I copy the top of the doughnut and solidify it for the icing... the thickness goes INISDE the doughnut.  This means that whenever I snap the icing to the face of the doughnut when trying to make the icing look runny, it always goes inside even when snap works.
Whenever I use the positive thickness, I get this problem:

But whenever I set the value to be negative: it nearly fixes this problem.

I have no idea why.  Could someone please point me in the right direction?  This almost works, but it still leaves the issue of the "Crease" setting not quite working properly.

It must be because his faces normals point inwards while yours point outwards, you can check the faces orientation if you enable the Face Orientation option in the Viewport Overlay panel, the blue face means normal positive orientation, red face meaning normal negative orientation. To recalculate inside, select all in Edit mode and press ShiftCtrlN, to recalculate outside, ShiftN.


How to access driver f-curve data with python? I have a script I am working on where I create and add a shape key to an object and add a driver to the value of the shape key. By adding the driver through python it doesn't have any keyframes like a driver would if you manually added it.

I want to be able to add keyframes to the driver's F-curves but I cannot find the data path to access it.

Here is a sample of my script where at the end I would want to insert keyframes:

import bpy

context = bpy.context
data = bpy.data
aobj = context.active_object
me = aobj.data
scn = context.scene
objs = data.objects

if me.shape_keys == None:
    bpy.ops.object.shape_key_add(from_mix=False)

bpy.ops.object.shape_key_add(from_mix=False)

current_key = me.shape_keys.key_blocks[1]

sk = me.shape_keys
cur_key = sk.key_blocks[1]
cur_key.driver_add('value', -1)
drivers = sk.animation_data.drivers

cur_driver = drivers[0]
cur_driver.modifiers.remove(cur_driver.modifiers[0])

I was trying to use keyframe_insert(), but what I needed to use was keyframe_points.add().

Here is a sample that adds a F-Curve with an ease-in and ease-out to the driver:

import bpy

context = bpy.context
data = bpy.data
aobj = context.active_object
me = aobj.data
scn = context.scene
objs = data.objects

if me.shape_keys == None:
    bpy.ops.object.shape_key_add(from_mix=False)

bpy.ops.object.shape_key_add(from_mix=False)

current_key = me.shape_keys.key_blocks[1]

sk = me.shape_keys
cur_key = sk.key_blocks[1]
cur_key.driver_add('value', -1)
drivers = sk.animation_data.drivers

cur_driver = drivers[0]
cur_driver.modifiers.remove(cur_driver.modifiers[0])

cur_driver.keyframe_points.add()
cur_driver.keyframe_points.add()

co = [(0.0, 0.0), (1.0, 1.0)]
handles = [[(-0.25, 0.0), (0.25, 0.0)],[(0.75, 1.0), (1.25,1.0)]]
for i in range(len(co)):
    cur_driver.keyframe_points[i].co = co[i]
    cur_driver.keyframe_points[i].handle_left_type = 'FREE'
    cur_driver.keyframe_points[i].handle_right_type = 'FREE'
    cur_driver.keyframe_points[i].handle_left = handles[i][0]
    cur_driver.keyframe_points[i].handle_right = handles[i][1]


why am I getting weird pepper shadows the brows are making weird shadows. I am using a sun lamp

It looks like you have enabled ambient occlusion in your viewport. You can control it in the Properties region ‣ Shading.

For more info, see the Shading Panel manual chapter.


Audio Visualizer Script Error I knows lots of people have been having problems with this tutorial but I haven't found anyone with the specific problem that I have (I've been looking for a while).

The script I have so far:

import bpy

rows = 5
columns = 5

r = 0
c = 0

for i in range(0, rows*columns):
    if c == columns:
        r += 1
        c = 0

    bpy.ops.mesh.primitive_cube_add(location = (r, c, 0))
    bpy.context.scene.cursor_location = bpy.context.active_object.location
    bpy.context.scene.cursor_location.z -= 1
    bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
    bpy.ops.object.transform_apply(scale=True)

    bpy.context.active_object.scale.x = 0.5
    bpy.context.active_object.scale.y = 0.5
    bpy.context.active_object.scale.z = 5

    bpy.ops.anim.keyframe_insert_menu(type='Scaling')

    bpy.context.active_object.animation_data.action.fcurves[0]. lock = True

    bpy.context.active_object.animation_data.action.fcurves[1]. lock = True

    bpy.context.area.type = 'GRAPH_EDITOR'

    step = 100000/ (rows*columns)

    bpy.ops.graph.sound_bake(filepath="C:\Users\Stephen\Music\Arcade Blaster - Reboot.wav", low=i*step, high=i*step + step)

    bpy.context.active_object.animation_data.action.fcurves[2]. lock = true

    c += 1

I don't understand any of the error.

Can someone help solve/explain the error?

Thanks!

is it because your filepath is not a valid filepath?

Either use a prefix r to make the path raw, or use forward slashes. Backslashes have special meaning in programming languages like python. valid paths are

   # windows
   filepath = "C:\\some\\folder\\file.mp3"
   filepath = r"C:\some\folder\file.mp3"
   filepath = "C:/some/folder/file.mp3"

   # posix style (linux, osx)
   filepath = "/home/folder/file.mp3"

This bug is fixed as of today: this error will now return 'File not found', which is better:
https://developer.blender.org/rB39b85e452faae543d10831e4fa66fdffbc22e0a1


Add node into multiple materials I have seen that a Python script can update several materials, that contain basically the same nodes, with simple value changes (Change multiple specific nodes in multiple materials (with python?))
I need to do something like this to affect over 2400 almost identical materials.
I have used a map globe downloaded from 3d Warehouse. This globe is black and white, and has been created by the designer using over 2400 jpegs of map squares and identical materials with unique jpeg names in the initial Base Colour node (see picture below).
The Material names are GLOBE_0 through to GLOBE_2448. If a node group had been used with the unique jpeg as input, I could change the node group to affect all. However, that was not the case.
I want to change the colour from black and white to gold and cream. I believe this update of the image could be created as a node group, with an input/output of Color, and slotted in between the Base Colour and Principled BSDF nodes. Although I am still a Blender novice, I will work out what this node group should contain (probably nick similar transformations in Blender STackExchange if I'm honest!). However, I don't know how the slotting in of a new node group would be scripted in Python.
The commonalities in all these materials are:

Material names - GLOBE_0 through to GLOBE_2448
A new node group - call it ColorGold
Link between Base Colour and Principled BSDF nodes

Thanks in advance.

Try this
import bpy

group_name = "ColorGold"

for mat in bpy.data.materials:
    if not mat.name.startswith("GLOBE_"): continue

    # Find Principled node
    for n in mat.node_tree.nodes:
        if n.type == 'BSDF_PRINCIPLED': break
    else: continue

    # Find Base Color texture node
    soc = n.inputs["Base Color"]
    if not soc.links: continue
    if soc.links[0].from_socket.name != "Color": continue
    tex = soc.links[0].from_node
    if tex.type != 'TEX_IMAGE': continue

    # Insert group node
    g = mat.node_tree.nodes.new("ShaderNodeGroup")
    g.node_tree = bpy.data.node_groups[group_name]
    g.location = tex.location[0] + 100, tex.location[1]
    tex.location = tex.location[0] - 250, tex.location[1]
    mat.node_tree.links.new(g.outputs[0], n.inputs["Base Color"])
    mat.node_tree.links.new(tex.outputs["Color"], g.inputs[0])


2D solidify. Is it possible? Is there a way to make some "2D solidify" from edges to faces. (It's about creating roads from GIS data). I've tried Skin modifier, converting to curves with depth and back to mesh, but all the methods resulted in a dirty mesh with lots of intersections and bad geometry. The problem seems to be that simple and straightforward that it simply must have a simple way to solve. But I don't see it. Please, point it out.

The easy way, which requires a bit (just a bit) of manual work:

Install "Edit Tools 2" and "Loop Tools" addons. They're both
available in basic blender 2.79/2.79a, so just find them in addons
and enable
Select your edge, hit W > Edit Tools > Offset Edges (make sure you're in edge editing mode)

Offset twice, for both positive and negative direction

Select both of edges you've just created. Hit W > Loop Tools > Bridge


How to use mathutils.geometry.tessellate_polygon()? I have troubles with this function:

mathutils.geometry.tessellate_polygon(veclist_list)
Takes a list of polylines (each point a vector) and returns the point indices for a polyline filled with triangles.

What is a polyline?
http://www.travellermap.com/tmp/delaunay.htm
I thought I can just throw a list of Vectors() at it like in this JavaScript example but apparently not.

The tessellate_polygon() function expects a list of lists (or tuples) for its only argument veclist_list. This allows for polygons with holes. You can commonly leave out additional sequences of Vectors, and just pass it one set of Vectors that form a polyine: tessellate_polygon((points,)).

Here's a script that takes the first polygon of the selected mesh object and uses its vertices as points for the tessellation function (actually, it's a triangulation function). A new mesh is created from the results, leading to a copy of the initial face at a first glance. But if you look closer, you will notice that it consists of multiple triangles (if the input was a quad or ngon), and they aren't connected. To show this better, I added an "explode" feature (move all verts of a triangle based on the distance between the triangle center and the center of the mesh):

import bpy
import bmesh
from mathutils import Vector
from mathutils.geometry import tessellate_polygon

scene = bpy.context.scene
me = bpy.context.object.data
bm = bmesh.new()
bm.from_mesh(me)

points = [v.co for v in bm.faces[0].verts]

tess = tessellate_polygon((points,))

bm_tess = bmesh.new()

faces = []
for tri in tess:
    verts = []
    for p in tri:
        verts.append(bm_tess.verts.new(points[p]))
    faces.append(bm_tess.faces.new(verts))

# Explode
for face in faces:
    center = face.calc_center_median()
    for vert in face.verts:
        vert.co += center

me_tess = bpy.data.meshes.new("Tris")
bm_tess.to_mesh(me_tess)

ob = bpy.data.objects.new("Tris", me_tess)
scene.objects.link(ob)
scene.update()


Using a background image to model in Blender I have chosen the book BlenderBasics_4thEdition2011.pdf to use in teaching my first 3D Animation Class using Blender.  In it, on page 38, there is a lesson that uses a background image as a guide to create a 3D logo.  The text says to scroll down on the Transfom Panel to find the "Background Images" panel.  I cannot find that panel.  I have downloaded the latest Blender 2.72 release.

Can someone help me with this please?  I have done a couple Google searches and found images of that panel but I can't seem to find it on the Transform panel.  What am I doing wrong?

Press N to open the properties panel on the right side of the 3D view (if it is not already open)  Then scroll down till you see backround images and click add image.  To see the image you must be in orthographic mode and a side view, pressnumpad 5 to toggle orthographic/perspective mode and numpad 1/3/7 to go into a side view.


How to keep edges around the square hole sharp? I need help on how to keep the edges of this squar hole sharp please. If I use the edge loop method, yes it keeps the edges shard but causes pinching at the same time. As for edge split method, it just causes the hole to be a sharp rounded square. Any advice?

You can try using Edge Crease by pressing Shift + E after selecting the edges around and inside the hole.

Make sure you select all of these edges for the desired result.

I added an Edge Split modifier at the end to get rid of the smooth shading artifacts.

Hope this helps!


subdivided/unsubdivided linked split screen Is there a way to split the viewport so I can view my unsubdivided model in edit mode and my subdivided model in object mode at the same time? I'd like to be able to edit my mesh and see it update on a subdivided version on a separate window. Thanks!

A trick to do that :

Temporary use a mirror (1) with another object as center, here an empty (2).

You can edit the original and see the mirrored mesh with subsurf.

When finished, remove or hide the mirror modifier.

Just remember that the shape is mirrored... so the left becomes the right, etc.

From that you can set two views in order to choose the rendering mode for each:


How can a Script be periodically invoked from the BGE? In a script I try to get the coordinates of a head tracker and to change the current scenes camera. The script is wired as shown in this image:

Unfortunatly the script is only called once. How can I setup the Sensor/Controller to invoke it periodically (preferably after a frame has been rendered)?

I had to click the small button (highlighted) and set the frequency to 1.

The option is called bpy.types.Sensor.use_pulse_true_level


I get a "Width not divisible by 2" error when I render I can't seem to figure out what this is talking about. I've tried to change my settings, but nothing works.

This is what it says.

These are my settings. I can't find anything that is 1171x658.

You actually do have your render set to 1171 px wide.
Look at the "Percentage Scale" value directly below the width and height under the Dimensions category of the Render tab of the properties window. It is set to 61%, and 1920 x 0.61 = 1171.2.

Simply set the "Percentage Scale" to 100% and you will be rendering at the expected 1920 by 1080.


how to attach spot lamp to camera and make lamp always face out from camera like headlamp? still new to Blender and this forum.
I'm wondering how to attach a spot lamp to camera and make lamp always face out from camera like a headlamp? So as the camera moves around, the spot lamp light is always facing straight out from the camera just like a cave explorers lamp on their helmet. So wherever the camera goes, and wherever it points, a nice bright spotlight is shining the way, shining brightly on anything the camera looks at?

Select the light and add a child of Constraint, then select the camera as target. If you move the camera the light will do the same thing.


Subdivision surface modifier creates pinching at corners mesh1.blend
I've only been 3D modelling for a few days now, so this may just be a newbie mistake:

However, because this model is for use in a game I am trying to stay away from proximity loops for performance reasons. Instead, I have used edge creases to maintain the structure of the model. It has led to certain vertices not being affected by the subsurf modifier, causing undesirable lighting at high subsurf levels.

Manually moving each point in a bit seems kind of sloppy but I'm not too sure what the best way to go about this is.

If any more information is needed I'll give what I can, thanks in advance :)

The issue is in your topology. I suggest you do something like this :

The idea is that you have to place the basis of topology which the subdivision modifier will follow :

If you do that correctly, you will have the right result.

Also, be aware that using mean crease really should remain as a temporary solution. It's handy for prototyping mostly; because it's fast and doesn't require more work, but it doesn't provide any precise control on the obtained shape and geometry.
I've seen some people using it to create quickly and roughly a basic shape. Once they are happy with the shape and volumes, they add a new object on top of it, add some shrinkwrap modifiers, snapping tools, and they to the final model and focus on topology and shape refining.


Is it worth running Linux on my Mac to use the built in AMD graphics card? Is it worth running Linux on my Mac to use the built in AMD graphics card with Blender? Right now I'm only using cpu and it takes a very long time for high poly rendering. Would it work to partition my computer and is it going to make that much of a difference?

Thank you.

Blender usually renders considerably faster on linux, but if you are not sure wether you should install linux or not, it will be easier to just create a linux live usb stick and boot on it. This way you can try linux and render stuff without making any changes to your system. When you are done, you can simply plug out the usb stick and boot on your os. The only downside of a live usb is that your changes won't be saved so you will have to download blender every time you boot on it, wich is really annoying. If you have questions simply comment my answer.


How to smooth shading glitches around edge The red mark is the mesh beside the groove. How do I make it smooth?
The green mark is what I want to make smooth.

I have used some cutters that are hidden. If you wish you can unhide and see it. I have added subsurf of level 4. Yet the mesh is not smooth some parts.

To be scared even more you can use Zebra matcap shading in viewport.
Issue raise more visible.

You can change Data Properties > Normals > Auto Smooth > Angle to 14 in this case, that make the Normal Shading better, but it doesnt fix it entirely.

Both issue makes even beter with SurbSurf 5.

... but since cuts are far from folowing base topo, it generates a lot of Ngons with unpredictable triangulation. I think Retopo is waiting for you :)


Using groups in other files I've modeled a clock and saved it as clock using blender 2.56. I've also modeled a room using blender 2.56 and saved it as room. I've made the clock a group and named this group clock. How do I open up my room file and then open up the clock group in the room
file or scene?

If you go to File > Append or press ShiftF1 , you can navigate to the blend file, open the Group folder and import the group.

Appending the group will create a unique copy of it in the new file. If you want to keep working on the group in the original file and have any changes there be updated in the new file, you should Link instead. Go to File > Link or use CtrlAltO. Note that if you link however, you won't be able to edit the linked group.

Related - How to add an object from another scene?.


need help with deforming a mesh over another mesh say you have sphere and plane meshes and you want to take the plane and slide it to the sphere without it clipping through but you also need it to deform around the sphere. is there a way to do this?

im asking because im trying to put windows on a boeing 777 and i need the windows to take the shape of the plane's body and i dont want to go editing them to fit each area one by one. i tried the snap function but i need something that can deform it too

If I understand correctly you want the shrinkwrap modifier. It will wrap the sphere with the plane. Place the modifier on the plane and select the sphere as the target. If it does not work make sure the plane has the necessary geometry to deform.


How to add glossiness on a cartoon shading? I know I asked something like this before, but this is more centered on the glossiness. How can I add glossiness on a material that has a toon|diffuse shader on it? Do I have to combine the toon|diffuse and the toon|glossy shaders? But how? The add shader doesn't seem to do a good job, because it masses up the colors brightness or something on the colors. Basically, how to combine the toon|diffuse and toon|glossy shader effectively?

A BSDF shader requires three parameters: normal, size and smooth.

If the mix-shader doesn't produce the results you want you can still write your own shader using OSL.

shader Toon(
float diffuse_Fac = .5,
float glossy_Fac = .5,
color diffuse_color = .8,
color glossy_color = .8,
float diffuse_size = .5,
float glossy_size = .5,
float diffuse_smooth = 0,
float glossy_smooth = 0,
normal diffuse_normal = N,
normal glossy_normal = N,
output closure color BSDF = background()
)

{
BSDF = diffuse_Fac * diffuse_color * diffuse_toon(diffuse_normal, diffuse_size, diffuse_smooth)
     + glossy_Fac * glossy_color * glossy_toon(glossy_normal, glossy_size, glossy_smooth);
}

This one was adapted from this BA Thread where you also find pointers on this topic.

You only need to enable OSL in the render settings (this implies that it can't any longer be process by the GPU) and add a Script Node as shown in the image.

You could also try specular_toon() I wonder why this is not accessible from the Add Menu.


How can I get my usual interface when opening projects created by other people? I've bougth cup models from internet.

In the ZIP I get the blend file and pressing F12 I can render the project (Do you call it project?)

But I don't see anymore the "Layout" tab, that is what I use the most.

Why and how can I go back to my usual interface?

Like in the Opening Layout:

UPDATE 1

I could open the file with the default layout, however I'm not seeing the objects in there:

UPDATE 2

How to open Collection 1? It's grayed out.

Everyone uses blender in a different way and reconfigures the user interface to their needs. The user interface is saved as part of the project.

You can load other people's projects using your own user interface this way:

Close the project.

Then go to file open, uncheck the load UI box and then open the project.

In newer versions you need to click on the gear on the top right of the window to see the LoadUI option.


Problem regarding fluid domain While using blender for making water simulation,when I set the physics of cube to fluid domain the cube still remains soild so I cannot see my water simulator unless I turn the wireframe mode on . I cannot figure out the problem . Please help me !

Go to "Mesh" and press "Bake Mesh". This will create a mesh based on the information generated by the fluid data bake. What you are seeing now is only a particle system helping you visualize the fluid and is not meant to actually be used in a finished product.

After baking the mesh is finished, the domain will take on the shape of the liquid, and you will no longer need to use wireframe mode.


Adaptative ray bounces in Cycles Sometimes, in order to avoid noise and render faster, I set the bounces to 0. The problem is that I don't get any reflection on water, glass, etc. I know that some nodes provide tests to stop a ray (like "is camera ray"). Can I get the best of both worlds: reflection but no noise?

I thought of controlling how many bounces a light path makes with nodes or python depending on what kind of materials it hits. Like get +1 bounce if glossy or so.

What about using settings like this:

In Render settings → Light Paths → Bounces?

As mentioned by sambler,
This is also possible per shader with nodes, but only in development versions newer than r58776. This feature will be available in 2.69:

  We have a global (Total Max, Diffuse/Glossy/Transmission max) control
  for bounces. It would be useful to add a ray depth control for
  shaders. This way, we can specify if a certain shader should only do 2
  bounces for example. This can help with performance and noise a bit.
  Maybe this option could also be added to lamps, so we can set lamps to
  only do 0 or 1 bounce, and act only as a fill light for example.

To control bounces per material with the light path node you could use a setup like this:

Where the highlighted value is the number of bounces for this material to be sampled (negative values will not sample it at all, letting rays straight through).

To show this, take the following render (Suzanne has the above node setup with a value of 2)

As you can see, Suzanne only appears in direct reflections (the pedestals "farther down" are empty).


How to recreate the pixel effect that happens when you move rendered objects I want to recreate this effect that happens when you move a rendered object (like in this video) Can it be done? Or is there anything close to it? I would only want it to last half a second or two.

It's not terribly clear what you are hoping for, but what I believe you are asking is how to sample the image in such a way that results in that blocky look.

You should be able to effectively get a similar result using the Transform node in the compositor. Simply:

Resample the image to be a very low resolution version of the input image using Nearest sampling and the Scale value. For example, sample your image from 100 pixels by 100 pixels down to 10 pixels by 10 pixels.
Resample the image back to the original resolution using nearest and the scale value again.

Combinations of the above may be required if you are animating, to control the smoothness of the motion. Nearest will literally find the nearest sampled point and can result in very blocky movement, while a combination of nearest with linear may smooth things out. You can see a sample of the effect used in this music video from several years ago, achieved with a custom bit of node code as nearest wasn't available.


How do I connect the end of the extrusion back to the surface a second time? In the following the OP may be using the word [natural] where other people may understand the word [connected] as a single surface with a smooth contour.

I'm not sure how to fix this. The turn looks unnatural- even after I render. I'm not sure how/if I can comment images so I'm editing post to add them. Second image is render. Notice the bottom of handle connecting to mug looks natural while top looks unnatural.

Using Bridge edge loops to make the mug one connected surface.
Use the Bridge operator to connect the open edge to a created hole in the mug
Use bevel operator to control the contour of handle to mug connection.

The bridge operator about to be executed. Note the hole at top is selected. The open circular edge of the handle is selected. Two holes aligned. Image above.  Please click on the image to see it larger in a separate web page.

The bridge operator finished. Surfaces are connected and ready for smoothing.  Image above

Create a second hole in the destination area.  The vertex count of the hole should match the extruded vertex count.
Use Mesh Loop Tools to change the hole into a circle, this is a time saver. Fine points not discussed here.
Use Bridge edge loops to make the connection
This whole operation could take 88 seconds for someone experienced.  If you take 8 minutes that is wonderful.

The Mug with Subdivision Surface Modifier and Smooth Shading.  No artistry intended.  You can do a better job.  Please improve and experiment.
There are often many way to do similar things in Blender.  You can experiment with extruding from two holes on the mug and having them meet in the middle with Bridge Edge Loops. Or something similar.  This technique follows.

Mug with two extrusions that meet in the middle of the handle.  In the top 3D View is the edit mode before bridge edge loops and finished version. In the bottom 3D view is showing the extrusion which uses the [Bevel] operator. This can be controlled by you for particular contours at the extrusion.  Handle formed with the Spin operator with a positive angle of 89 degrees and negative angle of 89 degrees.
Bridge edge loops is a time saver.  The other time wasting method is to connect each face separately by selecting the 4 vertices and creating a face with
F
Merge is also available.
There is also a way to get very convincing placement of vertices and lighting information using  two different meshes.  That can wait for another day.


How to set a random value for multiple shape keys? My question is related to my previous asked one: How to set a specific value for multiple shape keys?

I have about 300 shapekeys and want to set the random value for all of them . How to do it using scripting?

I'd recommend random.uniform(a,b) for a random float range:
import bpy
import random

# iterate through the shape keys of the context object
for shape_key in bpy.context.object.data.shape_keys.key_blocks:

    # check if it's not the first one
    if shape_key.name is not 'Basis':

        # assign a random float between 0 and 1
        shape_key.value = random.uniform(0, 1)

        # print the values
        print (shape_key.value)

The values should look like this:
0.5418003797531128
0.4634256660938263
0.77964186668396
0.37678709626197815
0.8787218332290649
...

For better access, I've implemented this functionality into this Add-on:

Exclude input field checks whether the 'name' of the shape key starts with 'your input' and also accepts multiple values (comma seperated)  in order to ignore placeholder shape keys like  --- Test --- or ### Test ### via *, - at once.


How to duplicate a camera? Is it possible to duplicate a camera in a scene? I tried selecting the camera an going to Object >> Duplicate Objects but it doesn't seem to duplicate the selected camera.

it is definitely possible.
You even did it already ;) Just: the new camera has got exactly the same settings as the original. Means: In the 3D view both lay exactly over each other and appear as one.

Press "G" for grabbing and move mouse for moving the new (selected) camera after duplicating. Once you reached the wanted position, press the left mouse button.

Alternatively you can use the short cut "Shift + D" for duplicating and grabbing the camera. Now you're able to reposition the camera after duplicating it.

Greets
Jaspa


Set color of Blender object based on external data (e. g. temperature) using a colormap I want to do an animation of a Blender object that changes color over time using a script. I already found out how to change the colors and set the keyframes from a script, but what I would need in addition is a possibility to "translate" the values of the external data (which are temperature values) to corresponding colors with a colormap (like e. g. the Jet colormap in Matlab).

I suppose that there is a simpler solutions than calculating these values "by hand", since I already saw how this can be applied for smoke, but the solution there seems not to be applicable for objects different from smoke.

Thank you again really much for your answers, you are a great help for me!

Edit: the question on the complete task I want to achieve (which has as suggested been split up into several smaller questions) can be found here, where also the application is shown.

In this case you have a predefined range 10 ... 90 degrees, it's simple to remap those to a 0....1.
Using a Cycles material
You could give each object a Value Node and key-frame its values within a range 0 ... 1, then convert them via a ColorRamp node to your Jet colormap (here quickly defined by hand).

Octave Gradients (add-on)

I wrote a little add-on that can recreate Octave/Matlab default gradients: Get it here. Installation can be done using the zip on github and Blender's Install from File feature in User Preferences. {category: 'Node', name: 'octave gradients'}
This adds a panel called Octave Gradient Demo to the Cycles node view.
From here you can choose the gradient by name, it will display the colors in the same panel.

The set gradient button will write the gradient to a ColorRamp if it finds one in the current material, else it adds a ColorRamp and then fills it with the gradient info.

The location of the newly added ColorRamp is a contentious issue, how would I decide where to add it? for now i've set it to add the node to (0,0).

Notice i've defaulted it to Linear, but gradient might be smoother.

Choices:

Usage

enable addon
make sure renderer is set to cycles
click an object, and create a new node based material
get a view open to see the nodes for the material
in the right side panel (use N to show the shelf) you'll see the Octave Gradient Demo panel.
initially this will show all black ramp slots until you change the palette from the dropdown.
If you haven't already added a ColorRamp node to the current Material, that's OK the set gradient button adds a ramp for you (but it might not be visible, zoom out if not)


Is it possible to change the animation length of many Rigid Bodies? I have made a scene with many Rigid Body objects (1500 rectangular solids), which all operate correctly. However I now want to lengthen the animation period from the default 250 frames to a more reasonable range of around 2000. The issue I am having is the timeline continues like normal, but the Rigid Body animation hangs on the 250th frame. Is it possible fix this issue, and preferably be able to to change all of these objects at once?

Go to Properties->Scene->Rigid_Body_Cache.

Change the end from 250 to 2000


How to uninstall sensei format? I saw a tutorial on youtube that told something about the sensei format. I was totally unknown to this and wanted to try out what it was. So, I downloaded the addon and installed it, but when I wanted to remove it it won't go. So, I completely uninstalled blender, deleted the whole of the sensei format, even the zip file on my desktop, checked the c drive. And then reinstalled blender from the backup file that I had on my E: and installed it again but When I opened up the file this is the UI:

So getting no way out of it, I just loaded the factory setting and hit CTRL + U, in hope to find that the UI would be the same the next time I open blender, only to be disappointed that the UI is still as above, which was supposed to be like the default like this:

I search through the user preferences to see if the addon was there but it isn't there anymore however blender still remembers it.
How can I revert the changes that I made by my big mistake of installing the sensei format addon?

Besides the Theme I cannot see any difference, so let's fix that.

hit Ctrl+Alt+U to open User Preferences.
Go to the "Themes" panel and look at "Presets". Select "Sensei", if it's not there.
Hit the "-" button to get rid of it.
Hit "Restore to Default Theme"
Hit "Save User Settings"


Why are my render animation pictures after frame 100 only gray? after I finished my animation I rendered it and realised that is was i bit too fast. So I scaled all the key frames a bit that everything is a bit slower. My animation is now 20 frames longer but after frame 100 there is only a gray picture until the ending at frame 120. From 1 to 100 everything works perfect. What is the probem there? :)

This is my blender file: http://www.pasteall.org/blend/33182

You inserted the scene in the Video Sequence Editor but the clip length stayed at 100 frames. In the Post Processing tab in Render settings Sequencer is checked so its being taken into account when rendering.

Solution: Uncheck the Sequencer in Render Settings or re-add the scene in the sequencer so the strip is 120 frames long. I recommend option 1.


Boolean Operations - Why the fuzzy result after union of 2 objects? I am trying to join this cube.

With this cube with a Boolean Union modifier.

The result is always this fuzziness in the final mesh.  WHY?
I have checked for correct face orientation and Scale and Rotation.

Here is a file upload and screenshot of the Boolean as requested.

Below is a  successful joining of 2 intersected objects without fuzziness as I explained below.

You need to hide object used in Boolean Union operation.
As for now you have "two" objects in one place.

Remember to hide it also for render, or apply Boolean and remove it completely.


Align Object to footage without knowing Camera data I have a model, which represents a real world "machine". I now need to align the model in Blender to footage (taken with tripod, so it's static) from said machine.
The models scale is accurate.

The problem is, i don't have access to the Cameras data (Focal Length, Sensor Width, etc.).

If your footage contains horizontal and vertical features which are known to be parallel in the real-world 3D scene, then the Blam add-on will help you derive a matching camera location/perspective in Blender. You should then be able to make simple bounding-boxes in scene, and align your model to the bounding boxes.


Customizing shortcuts in 2.8+ vs 2.79 In 2.79 I have the following keyboard shortcuts assigned for Edit Mode:

Vertex Select: Cmd1
Edge Select: Cmd2
Face Select: Cmd3

Note: I'm using "Emulate Numpad", so I register a shortcut as Numpad 1 instead of 1, for example.
Here's what the key binding that controls that in 2.79 looks like:

And here's what I tried in 2.90 that isn't working:

I believe it has to do with the RNA field not existing in 2.8+ but I'm not sure how RNA works. What would be the way to do this in newer versions of Blender?

There are two problems that need to be solved:

The shortcut you're attempting to assign is already in use for the viewport navigation. You may want to change these so you're still able to use them with a different key binding.
The identifier for the operator is not correct, but creating a new shortcut isn't necessary since the mode selection already exists in the default keymap. You only need to adjust the key binding from the regular 1, 2 and 3 keys to the numpad ones.

In order to solve problem 1):

Open the keymap preferences
Switch the filter method to Key-Bindings.
Search for "Numpad"
Scroll down to find the 3D View section and adjust the shortcuts that use Ctrl + Numpad 1, Ctrl + Numpad 2, Ctrl +Numpad 3. (If on a Mac there will also be Cmd + Numpad 1, Cmd + Numpad 2, Cmd +Numpad 3, in which case either the Ctrl or Cmd set can be deactivated, freeing up some shortcuts.)

In order to solve problem 2):

Open the keymap preferences
Switch the filter method to Name
Search for "Select Mode", the identifier for the operator is mesh.select_mode.
Adjust the key binding to your liking.


How to perfectly copy uv texture to another side without having to make them overlap? I'm texturing a car and I want to copy the texture (that I've already painted on one side using Photoshop) from one side to the other, but I don't want the UV to overlap because I don't want the letters and the logo on the painted side to be mirrored. I tried using UVMagic to copy the texture from the faces but the addon just put seams on every lines and make the texture glitchy. Any idea how to do it?

I'm assuming you are using a newer version of Blender. I tested the following with Blender 2.90.1.
I used the setup below to demonstrate.

First you might want to copy your object. On the copy use overlapping UVs. In my case i mirrored the cube.

Then add another UV map to the object.
Next copy the old UVs to that map. You can do that by selecting both objects and press Ctr+L and choose "Transfer UV Maps". (Select initial object last, thats where the UVs are coming from). You now have you target and source UV layout on the same object.
Next go to the Texture Paint mode and choose the clone brush. Set the Mode to "Single Image"
Create an empty texture and choose the destination UV layout. Also tick "Clone from Paint Slot". Than choose your original texture map and one field underneath choose the original UV map.

Now draw over the mesh. you should see the texture beeing transfered from the original UVs to the new UVs. = )


Ideas on covering a whole mesh with (irregular) tiles, following the shape of the mesh? I realise this might be quite a complex thing to accomplish and that it might ideally be done with some scripting - but perhaps there are already solutions that can simplify this task, or just simply good ideas... so please bear with me, and let me know if you have any ideas regarding this:
I am working on a spaceship design and I intend to cover most of the ship with tiles similar to those used on the Space Shuttle orbiters.

I might be facing two challenges:

Generating tens of thousands of relatively irregular tiles as dynamically as possible as individual objects - based on the mesh of my ship. The concept you see in the picture of the orbiter (above) is pretty much what I want: Larger segments made up of mostly rectangular tiles meeting other segments at odd angles. Having them as individual objects is important because the animation requires for most or all of them to come off individually.
While being individual objects, the tiles need to share a painted texture as they should show decolouring of larger areas and streaks caused by reentry as seen on the orbiter in the image.

I obviously don't expect anyone to solve my problems for me, but any input, hints, pointers etc. from more experienced users are very welcome!
The current mesh is made up of individual metal sheets that are sculpted into shape as seen below.
My first guess would be to model another mesh of the ship where every tile is represented by one polygon. I think that would generally be an okay approach despite the significant time it will probably take. More procedural/dynamic ways of doing this would be appreciated!
But, assuming the above approach:

I'd assume there is a tool to turn each face into an individual object - are there any things to consider for maintaining the orientation of the texture I will have painted on the entire mesh before separating?
Every tile will need to be rounded in accordance with the ship. That could be accomplished with a subdivide before separating (not afterwards), but then I'd separate my mesh into groups of faces rather than individual faces. Does anybody have ideas on how to accelerate/automate that? Or perhaps much better approaches to begin with?

Two possible options:

use the Tissue addon in tesselate mode.  http://www.co-de-it.com/wordpress/code/blender-tissue

Tessellate tool allows the user to copy a selected object (Component) on the faces of the active object (Generator), adapting its bounding box to the shape of quad-faces. Once the Tessellate button was pressed, then more options will appear in the Operator parameters. Update allows you to update the active the Tessellated mesh according to Component and Generator changes. You can also change the parameters of tessellation.

use Instancing. In the shape of the ship select instancing faces:

Then select the tile, shift select the ship (so that both objects are selected but the spaceship is active) and press Ctrl+ P. Select "Parent to Object". The tile object shold become a space ship made of tiles.


How to choose between entering a Radius or a Diameter when creating a Circle When using Shift+A to add a Circle, you can specify the Radius of the circle in the tool panel. How can I choose between entering the Radius and entering the diameter?

It's not posible to toggle the Radius field to Diameter. However, as the diameter is twice the radius there is a direct relationship between the two - so the Radius is the Diameter divided by 2. Also, Blender is capable of automatically interpreting mathematical formula when entering values.

Therefore, to create a circle of, say, 30 units in diameter, simply type 30/2 into the Radius field and Blender will automatically calculate 15 as the radius.


Trouble getting my character to follow a curved path I seem to be having issues getting my character to follow a curved path I've set up. I've been playing around with it and nothing seems to work properly. Whether I parent the bones in Object Mode to the path using Ctrl + P, or adding a Constraint to the bones, my character either just walks on the spot, walks around the path in a diagonal position, or walks but then the animation stops. Even if I adjust the amount of repeated steps, the scale, the amount of frames etc. nothing seems to work. I think the axis are a bit messed up with my rig somewhere.

Can someone please take a look at my file and help me solve this? I'm completely at a loss how to get this working properly. The default frames for my walking animation is 40.

Thanks.

Put the origin of the curve at its beginning vertex (shift ctrl alt C > Origin to 3D Cursor).
Disable the different Follow Path constraints of the character objects (you don’t need them).
Switch your armature to Object mode, give it a Follow Path constraint, choose the curve as Target, enable the Follow Curve option.
Clear the Location of the armature with an alt G.
Rotate the armature the way it is supposed to be (R+Z+180).
Select the curve.
Open the Graph Editor, display the properties panel (N), open the Modifiers tab and deactivate the Generator (which is automatically created with the Follow Path but won't help you here).
On the Timeline go to frame 0.
Keep the curve selected and go to the Properties panel > Data > Path Animation, choose an Evaluation Time of 0 and and insert a keyframe.
On the Timeline go to the frame you want, and in the Properties panel > Data > Path Animation, insert a new keyframe in the Evaluation Time with the value you want.
In the Graph Editor, put your mouse over the graph and press T > Set Keyframe Interpolation, and choose Linear so that the movement along the curve is linear.

You can speed up the animation of the character along the curve with the Evaluation Time value.

You can speed up the walk cycle speed itself in the NLA Editor (right properties panel > Scale value).

But first, make sure first that no action is loaded in the Dopesheet editor, otherwise this action will play over the NLA strip.

Also, note that you can quickly edit the action of a NLA strip, selecting the strip and pressing Tab. The pin (on the left of the track) will allow you to see the animation with or without the NLA settings effect.


Transparent Alpha textures and Freestyle rendering (Using version 2.83)
When I use Transparent alpha and render image with Freestyle it keeps rendering transparent Edges and are visible, how do I make them invisible?

Move all objects that shouldn't have freestyle outlines to a new collection (you can select them, press M and create a new collection or choose an existing one). Then, in View Layer tab, inside Freestyle section, select the freestyle condition to also be based on a collection - then precise the new collection and choose exclusive to not draw over objects from that collection.


Has the Control Key + Rotation snapping increment been changed or dropped? Many sources describe holding the Control key down while rotating to control rotation by 5 degrees increments. I cannot get this keyboard shortcut to work in Blender v2.75. The increment button on the snapping menu does work, but the keyboard shortcut does not seem to work for me.

If you choose to rotate with 5 degrees precision (or another transform operation), you should hold Ctrl while performing transform operation; if holding Ctrl and Shift rotation will happen by 1 degree. Snap during transform should be turned off, but its option Increment should be checked:

Transforming without precision will be done in case of other snapping option selected.

If you turn on Snap during transform, you can perform transforms with precisions without holding Ctrl:

You may want to read about performing transforms with precision in manual.


Merging two cube meshes Learning Blender: so I have a cube mesh in edit mode. I duplicated its vertices and my mesh is technically two cubes now:

It may be redundant, but I would like to combine the two cubes to end up with something like this:

I've searched for things like "merge two meshes" or "combine vertices". In general, the posts I find are:

  Use CTRL + J

But I feel this answers a different question. It just doesn't work.

  Select the vertices, then press X, and select dissolve.

Doesn't work - dissolve removes the geometry since these are two different meshes (and I think it is suppose to be used on a single mesh).

Note: No, I'm not trying to make a rectangular prism (I could simply translate the cube's face). It's just an example - I might want to do this with two spheres etc.

There are many, many ways of going about this.

Possibly the fastest for this particular case:

W> Bridge edge loops
Edge select mode (⎈ Ctrl↹ Tab)
Deselect edge ring (⎈ Ctrl⎇ Alt⇧ Shift RMB)
⌦ Delete> Delete edge loops

For two spheres you might do something like this:


Why can´t I place a texture in the colour bar anymore? So I am watching the "Blender Beginners UV Unwrapping Tutorial", but cannot see how to add a texture to my material like in the color bar in the video
(there should be a dot to click on). I remember having done this before. Has the current version of blender changed so much or am I missing something?

This is what it should look like

and how it looks at my screen, i see no option for adding an imagetexture

You are using the wrong render engine. You want to be using cycles, but you are using Blender Render. At the top of the screen there is an option to change the engine. You can see in the first screenshot where it says Cycles Render.


Camera is offset from path it is following The camera is constrained to follow a path, and both the path and the camera are far from the origin of the scene. I can see that the camera is being offset from the path with the same offset it had from the origin of the scene, but I don't know how to reset that.

Use Alt + G to reset the location of an object. Alternatively, you can just set the location coordinates to zero in the N panel:


Some blender newbie problems https://www.youtube.com/watch?v=YuVJ7lP5Sfc&t
At the beginning of the video you can see that he adds a lot meshes.
How does he do that so fast? Because when I add two objects and then press Ctrl+J and try to sculpt, they do appear as one object but I still got some sculpting bugs (they cant fully "Connect").
In another section of the video (0:10), he somehow paints exactly on the mesh and turns it into a 3D object (the shoulder armor) and then adds a cylinder there.
Similar examples (1:48)

He is probably duplicating some objects with Shift + D in the beginning. You can also add objects quickly with keyboard - for example pressing Shift + A followed by M and M one more time will go through Add Menu then Mesh and then Monkey, you can type that quite fast. You can see the letters coresponding to the menu items in the menus underlined:

It's possible to create custom shortcuts for something that you do a lot as well.
If the object is constructed out of a lot of objects joined in sculpting, some sort of re-meshing is usually used to make a continuous surface that you can sculpt:


Helpful tutorials for Modeling, sculpting, and shading I have been using blender for about two years. And i am still lagging in molding, sculpting and shading knowledge would any one have some good wholesome and helpful tutorials?

I'm not a pro but any means but for me i find youtube really uselfull. i'm sure you are familiar, but the likes of Blender Guru & CGgeek. Longer video's help me learn from their workflow!


How do I create a procedural mask for mountains texture? I'm going to try to explain this as well as possible but feel free to ask any questions for clarification. I have mountains and plains (picture below) and I'm trying to create a procedural mask that will differentiate between the mountains and the plains by creating a mask vertically along the "Z" axis to pick at what height you want the mask.
You can see an example of what I'm talking about here.
The node setup in that video doesn't work in my instance. How do you achieve this effect?

Why not use object Z coordinates? You can use a ColorRamp or Greater Than node to control where the cutoff point is:

You mention in your question that the node setup in the video you linked doesn’t work for you, but you don’t mention why, so if this approach doesn’t work for you, either, please add more details to your question.


How would you make this lacquered texture on aluminium material? I am still kind of new to Blender, and would like a bit of guidance. I've got one of the models done, but I didn't get the texture right. The panel is made of aluminium and then lacquered for the gloss.
This is what I want to achieve:

This is what I got:

I used only the Principled BSDF Shader—pumped up the Clearcoat for that lacquer effect, but it doesn't feel the same as in real life shot.
What part am I missing? Better lighting?

Maybe just something along these lines?

But perhaps including, as @moonboots has suggested, some small-scale noise in the clearcoat Normal.


Where are the item dialogue boxes in OS X? I thought Blender would work the same on a Mac as it does on a PC, but I cannot seem to find the item 'dialogue boxes' that exist on the PC version. Anyone know how to bring up an item dialogue box in OSX version of Blender?

Press T to open the Toolbox.

N for the Properties

F6 to bring the poup-up (that shows the same options as the ones on the Toolbox).

If the keyboard shortcuts conflict with the ones in blender you can re-assign them using the User Properties (or better still by changing the preferences on your OS)


How to automatically switch to camera view after entering preview mode I'm making a small game in BGE and I have met a problem. I want this game to be played from a camera's view. But I have no idea on how to  automatically switch to camera view as soon as I enter preview mode. How do I do this? Is this even possible?

I really don't want to manually(Numpad0) switch to camera view when I go into preview mode.

WARNING: If you are a 100% python person, and hate my answer already, leave now, because, yes, we are using logic bricks.

You will need a "Scene" logic brick, on the "set camera" mode. Specify the camera and rig this to an "Always" sensor.

This works in a pinch, but it gives some extremely strange perspective depths, and I wouldn't recommend using it for this reason. The real way is to hit Num0 every time. Exhausting, I know.

Note: after further testing, it would appear that the weirdo bug is gone! :D I could be incorrect, but this would make this a valid method in releases 2.77-later at least. Happy blending.


Glass shader too dark I'm not sure why, but using the glass shader renders extremely dark.
I have the white set as high as it can go.

The room it's in is completely white, the roof being a white emission shader.

When the Glass Shader is applied to a whole, solid object like that, it will treat the entire object as very thick, solid cube of pure glass.

Although it looks odd, what you are seeing is physically correct, if you had a big thick piece of glass like that and a dark gray environment a gray plane as the only source of reflections. It looks odd because you never see glass like that in the real world.

If you add a solidify modifier to your cube, it might look more like what you were expecting. This will make the glass look like a hollow cube (like a fish tank).

If you add more lights or an environment texture, it will start to look more realistic still.


How to adjust brush hardness I'm using texture paint for the first time and I don't see any place to adjust the hardness of a brush. Do I have to create my own texture masks for the brushes?

Thank you.

In 2.8 it is called Falloff in the Brush options.


Hair mesh not moving with rig I'm trying to rig and animate a Hulk object I found off the internet. But, when I try posing the armature, the hair texture doesn't move with the rig. I'm brand new to Blender so please walk me through a solution step by step.

Here's a picture of the problem:

I've uploaded my blender file and assets here. Thanks in advance!

You have to go to Weight Paint mode and paint over the hair, or even better all over the head. While Bone.004(which is the head bone) is selected.


Blender plays a short .mp3 sound when it completes the render - HOW? I was looking into a really necessary function for me when using Blender. I need Blender to play a short mp3 sound when it finishes rendering.
I found this on the API:

bpy.app.handlers.render_complete

Callback list - on completion of render job

And this script .py (addon) sends email notification, but I was really looking for .mp3 playback of a sound. Say for example if you are away from the computer, then you´ll hear the render fininsh.
https://archive.blender.org/wiki/index.php/Extensions:2.6/Py/Scripts/Render/Notify_after_render/

But I don´t have a way to put this all together.
Could someone point me with another script?

The aud module

For a standard  the ubiquitous wave module to play ".wav" files would be a failsafe way to go.

However, Blender comes with the aud module which plays any format of sound that can be used in blender. My build supports:

>>> bpy.path.extensions_audio
frozenset({'.aac', '.oga', '.mka', '.eac3', '.aiff', '.aif', '.wav', '.mp2', '.ogg', '.flac', '.ac3', '.mp3', '.m4a', '.wma'})

Test script, edit the path to match path to audio file.

import bpy
import aud

path = "/home/batfinger/Music/CCR Chronicle, Vol. 1 - The 20 Greatest Hits/DISC/Creedence Clearwater Revival - Suzy Q. (Part 1) - 13.mp3"
# load the sound
snd = aud.Sound(path)
dev = aud.Device()

def finish_render(scene):
    dev.play(snd)
    return None

# clear others, assuming this is only one.
bpy.app.handlers.render_complete.clear()
# assign handler.
bpy.app.handlers.render_complete.append(finish_render)

Here is the way to stop the playback.

>>> import aud
>>> dev = aud.Device()
>>> dev.stopAll()


I don’t think cycles is working So last night I was trying to make a crystal structure like the one in ducky3d’s video about fantasy crystals. I am very new to blender so bear with me. The transparency doesn’t work and I never see the lights do anything either. I’ve tried switching to cycles but nothing happened at all. Maybe it has to do that my computer is a lump of sh*t because it only has 2GB RAM and 1.4GHz
and 64 GB of ssd. My computer could be the problem but I doubt it because eevee works quite fast for my computer being so bad. So I’m starting to believe that cycles, when I turn it on, just doesn’t turn on. Any help would be appreciated because I am very frustrated and tired. I spent all night trying to figure this out. Thanks!

EDIT

I textured the inner crystal just now but it's not showing up on the layout or final render. I am starting to loose my patience because I have textured the inside, didn't work. I tried to make the outside transparent, Didn't work. I really need help.

Here's what I want it to look like:

and here's my .blend file:

Welcome to Blender!  It's a big, complicated piece of software where lots of things can go wrong, and it takes a lot of practice to get used to it, so no real surprise that you had a tough night working on this.

In the posted .blend file, the "inner crystal" had no material, so maybe you uploaded it before shading it green and blue.

The "outer clear part of crystal" did have a reasonable glass material.  It looked like this in my Cycles preview, with a fuzzy version of the inner crystal just visible.  Did it look anything like this for you?

If so, the main problem with the "outer clear part of crystal" material is probably the high roughness which makes it look pretty opaque.  If I turn the roughness value down to 0.25 in the principled shader, add a blue emission shader material to the "inner crystal", kick the area light strength up from 1 to 50 (i.e. 5000 Watts), and add a couple duplicate area lights, also 5000 Watts, it starts to look better.

Here's a .blend file with the changes I made.  If you load this up, switch to the "Rendered" view, and don't see a blue crystal like the image above, then yes, something's wrong with Cycles running on your admittedly underpowered computer.

Note that it looks even better if I select both the inner and outer crystal and stretch them out on the Z-axis ("s" to size, "z" to size along Z-axis, and move the mouse to stretch it vertically before left clicking).  The longer crystal reflects light better.

Getting this scene working with Eevee would be tough.  Eevee doesn't do a great job with accurate handling of area lights and glass materials.  But, you could try the following:

In the Render Properties panel, switch your Render Engine from Cycles to Eevee.  Further down in the panel, click on the "Screen Space Reflections" checkbox, open that subpanel, and check the "Refraction" checkbox.
Click on your "outer clear part of crystal", go to its Material Properties panel, and scroll down to the "Settings" subpanel.  In that subpanel, change "Blend Mode" from "Opaque" to "Alpha Blend", and below that turn on the "Screen Space Refraction" checkbox.

Switch to the Render view, and you should have something like this:

It looks pretty ugly and underwhelming, though it does look kind of cool if you middle-mouse-button drag the view around.

Anyway, hope that helps.


Glare on transparent background using Cycles In a Cycles scene, I need to render glare around the warp engines, however, the resulting PNG always has the glare cut off when it leaves the body of the ship. This problem is present in the output PNG and is therefore not just limited to the viewer.
I know this is possible to overcome somehow with PNG as I have done it before, but I do not have the node setup anymore. Can anyone please point me in the right direction?
This is the node setup I have at the moment:

This is not my solution, I have this saved on my drive, but I cannot find the original post either.


How can I make objects fall at steady speed? I have two objects (same size, same geometry) falling from different heights; obviously the object in the higher position speed up and has a different behavior when hitting the ground, compared to the other object.

How can I keep the velocity constant at all times, until they hit the ground?

Set gravity to 0 and give them both same initial velocity

(also make sure to give em a lot of solver iterations/steps per second so physics calculate nicely)


Adaptive sampling leads to evidentiation of rendering tiles As you can clearly see in the picture (especially on the floor), after activating ADAPTIVE SAMPLING, I have now the tiles clearly visible in the render.
This happens after I raised the thresholds.
If I leave it to AUTO in its option fields, it ruins the whole image when using the denoiser and low samples.
In general I find this feature rather destructive instead than productive.

You will likely get better results by using either the Denoiser or Adaptive Sampling - instead of activating both at the same time.
The reason for this is that the Adaptive Sampling feature stops rendering an individual tile when the noise of those samples gets below a threshold, while the denoiser attempts to deal with any noise present over the whole render. By using both at the same time it’s resulting in varying levels of noise in adjacent tiles and the denoiser cannot cope with it, resulting in edge of tile artifacts.


Animation with Physics (Cloth | Collision) Problem

How can I make the fabric stop exactly where the tube thickens and prevent it from continuing its free fall to infinity and beyond

Example

I want the fabric to stop exactly when it reaches this area

Result of the animation with physics

what should be

Second Try

Cloth -  You've already found the settings that prevent the cloth falling through the wider section of the cylinder.  Your second query, re: stretching at the cloth's aperture...

Edit 17th July 2019 -

No stretch -  An alternative solution - (See below for the other)

Scripting might be able to circumvent Blender's physics from stretching the cloth's aperture but to do it from the desktop, it appears only a slight-of-hand workaround will avoid this.

The physics engine starts expanding the hole when it approaches the upper end of the pipe, so why not decrease the diameter of that pipe.  The hole will still expand but to a lesser degree.

Next we duplicate the pipe and strip that of all physics and animation so it's only scenery and therefore incapable of influencing the cloth.  That's then expanded in the X & Y axis' so it's the same height but fatter.

The original pipe (with physics) is made invisible but will still be seen by the physics engine and affect the cloth as before.

The end result is that the cloth will appear to be a snug fit at all times.

-===============-

Info - The cloth's wriggling is stopped by virtue of a swap with a duplicate of itself that's frozen at the switch-over frame, (the physics modifier applied).   Not recommended for beginners.  Post production in the VSE would be an easier way to achieve this.

-====================-

The earlier solution/suggestion -

It appears that inserting a hole in the cloth gives rise to unavoidable stretching at the aperture as it approaches the upper end of the cylinder.

A convincing workaround would be to add a mesh (non-cloth) ring or collar with the same material as the cloth.  That's then animated so it follows the cloth's descent.

Rather than add a new ring, the original cloth was duplicated and cleared of physics and animation at frame 1.

The outer faces are cut away, leaving the original material in what's left.  This should make it easier to match up should the cloth be textured.


How to have sharp shadows in cycles with HDRI Can you please tell me how to have sharp shadows in cycles with an hdri environnement texture, but without changing the lighting parameter of the hdri texture ?
For example in the picture below, I've got a simple plane with two meshes, the light comes from an hdri texture and I want the shadows to be sharper.
Thanks for your help !

When you use an HDRi as environment texture you are you are mapping an image in a giant sphere that surrounds the scene and emits light, so every pixel from the image contributes to the lighting in the scene.

As explained in the comments the sharpness of the shadows is directly related to the size of the bright elements on the image. An HDRi of a sunny blue sky will give you a sharp shadow, an image of an overcast or shady environment will give you softer shadows.
Other than controlling the intensity and placement of the image in the world, there are no built in tools to change the quality of the shadows.


Understanding scenes in blender. (linked objects) I have a problem understanding the scene setup in Blender 2.8.

I created a scene with animations (keyframes, follow path contstraints, nla tracks, etc).

Now I wanted to create a new scene, in which I want to reuse my main character.

But when I link it into the new scene, it comes with all the animations of the previous scene.
I tried already several Objects->Relations settings, but with no success.

I saw a tutorial (for an older version) with Link Object Data, which did the trick - if I understood the video correctly.
But unfortunately, this option is missing in 2.8

Is there a proper way to link only the object without its animations, so I can start the scene from scratch?

Thanks in advance

The way linked option is intended is to have a base file in which you perform modeling, rigging, skinning, texturing and everything referred to the "building" of characters, props, environments and so on.

Then instances of all theese objects can be linked into a new file in which you will perfom the scenes, animations, lighting, camera movements and so.

The idea is that if you decide later to modify something in one character, the edit will be reflected into all the scenes in which that character has been used.

So, for a "correct" workflow you can simply save a new version of your file, delete all the animations, and link from this new file.

I've read that the link function will be changed in future, to let edits also over linked objects (by now you can also use the simpler "append" function, which will not automatically reflect any new change in the base file).


Change start frame of a background movie clip? I added a "Background Image" and selected "Movie clip".
Now I am wondering if it is possible to change the start frame.

I am animating a character and I need the movie clip to start at a specific frame.

Movie Clip is a special data type in Blender. To change its properties you would have to go the Movie Clip Editor, open up the clip there, open the properties panel (N), go to footage settings and add an offset there in order to change the start frame.

However, if you only want to have a background video, I would advise you not to use the Movie Clip type. Instead, click on 'Image', and open up your video. There you can also adjust the offset in order to change the video's startframe.


Is it possible to animate a soft body object? What I'm trying to do is create a few bouncing jello cubes. I can make a jello cube. And I can scale it to make it bounce. I can't do both.
Scaling it requires Soft Body Goal to be enabled, but enabling Soft Body Goal glues it in place and prevents it from actually bouncing around the scene.

Bring in more of these objects, and you have another issue in that they don't want to collide. You can sort of fix that last issue by tacking on a Collision modifier but it seems a bit buggy. And I'm also back to not being able to scale the cube. As user3800527 suggested I tried tacking on a Rigid Body to that, but that just led to some really weird behavior.

As far as trying to make the soft body animateable, I've tried just plain animating the scale of the object as well as animating the Soft Body Edge Spring Length property, but those don't appear to affect the simulation while it's taking place. Soft Body Goal is able to slightly fix this, but when you turn that on you're trading that for the soft body's freedom of movement.

Here's an example blend file showing some of what I've tried so far, layers 1-3 have different things I've tried, and all of them have the bottom cube scale from 1 to 2 from frame 20 to 23. http://pasteall.org/blend/index.php?id=43836

So is something like this even currently possible in blender?

Yes this is possible

First create a floor cube large wide but not that high.
Make it a Passive rigid body.  (so it wont fall down its the floor)

Next a bit above it add a cube, subdivide it a few times.
First add rigid body collision (convex hull, source deform).
Next add softbody to this cube.

It will drop and woble on the floor.

oh and for better results use damping on soft body.
such cubes can bounche on eachother as well if you copy them shift D


Checking for closed mesh I'm using Blender to create meshes I want to fracture in UE4.
For this they need to be closed, otherwise their inner is not fractured correctly.
I'm creating a basic house from a cube. First I extruded the "door" inwards and made the vertices there so that it's closed. I exported it and it can be fractured correctly.
Now I tried to extrude two windows, but when I fracture them, they are fractured like it's not closed.
Anyone knows why or how I can check if it's closed?
The windows I extruded:

Other view:

Wireframe:

I created a facsimile of your scene to illustrate how this can be done. Here is what I start with.

Next, I create some non-manifold geometry so that I can later illustrate how to expose it. In Edit Mode, I select the edges highlighted below, and peform an Edge Split.

Next, while still in Edit Mode, I go to the Select menu, and Choose Select All by Trait > Non Manifold. This will select all geometry that is not closed.

Very handy. Here is the result.


Why is a PNG appearing transparent in solid view but not in rendered view? I am trying to make some eyelashes for a model but I don't want to use particles so I've resorted to using a PNG texture on a plane. However it only works in solid view. When I switch to rendered it messes it up completely.

I've tried messing with alpha clip/hashed or what have you and that's not worked and I am running out of ideas here. Here's a picture of the node setup I'm using.
And here is the texture I'm using.

I'm only using a diffuse texture because I don't know how to make opacity/alpha maps or whatever they're called.
Also sorry for bad formatting, I'm not used to this text editor. If you need me to elaborate then I will. This is all I could think of on the spot related to my problem.

You don't need the color as transparency,
and you don't need the last set of nodes.
Why would you have black transparency? It will make it opaque.

The  mix with a transparent shader should be at the end of the node chain.
Or you can just use the alpha input on the principled shader, as noted on the other answer.


Strange behaviour while I'm texturing an object using the projection painting technique I'm working on the projection paiting explained on this tutorial. My problem is that I have completed the tutorial and it seems that there are no problem,as you can see here :

but this is what happens when I close and reopen blender :

Something does not work. I tried to make two operations to fix the problem,but they didn't do it.

1) I gone under image/pack image as png and I packed the textures as png but it didn't work. Plus,sometimes the pack image as png option appears,sometimes not. why ?

2) I gone under slots/save all images but it didn't work

what can I do now ? thanks.

Image data is treated separate to 3d model data, you must save the image data as a separate action from saving blender's data.

If an image is saved as an external file, then you need to choose Image->Save Image in the UV/Image Editor. If this is the first time you have saved the image you also want to save the blend file so that you also save the location of the image.

If an image is to be saved as a packed image within a blend file, you need to choose Image->Pack Image, then save the blend file so the image is saved to disk with the rest of the blend file.

If you alter a packed image, you need to use Image->Pack As PNG to update the packed data, then save the blend file to save it to disk.

The Image->Pack As PNG menu option is only available when a packed image has been changed.


array modifier - gap even without offset applied Does anyone know why there is a big gap between the array objects even though relative offset is set as 1? I have checked the scale etc but can't figure it out.
Thanks

Object's Bounding Box

There's a lonley vertex who is altering your object's bounding box size.

The size of the geometry bounding box is what the array modifier takes into account for shifting the object with "Relative Offset" option enabled.

Just get rid of it and all should works fine.


Export armature animation + corrective smooth modifier? Here I have a rat rigged and animated,And I used a corrective smooth modifier.
But I am going to export this animation into unity,SO my question here,how can I export this animation including the corrective smooth modifier effect to and external app like unity?or can we do the corrective smooth by another way?

Answer is quite simple: you cannot. Corrective smoothness is very advanced effect that simply cannot be exported, nor baked at the moment.

Only way to bake that I can think of, anyway, would be (with e.g. a py script), for each frame, to make a diff between the mesh with and without CS modifier, and store that diff in a relative shapekey, and then animate all those skeys such that they each express at one frame.

But this sounds like an awfully heavy solution to me. And result is not much guaranteed even, since shapekeys are applied before the armature modifier (and the whole modifier stack), while Corrective smoothness modifier comes after the armature modifier…


How can I create a wall(mesh) from 2 profiles and a path that connects them? I've asked this elsewhere but have not got a solution yet. The image below show's what I am trying to achieve in Blender but I'm not sure if any of its built-in tools or addons can replicate this workflow. The suggestion's I've been given result in inaccurate geometry and I'm seeking a solution as per the below image.

Using Follow path constraint offset

Add a flat profile mesh on the xy plane, give it a follow path
constraint of -Z forward (face normal pointing out) and y up.
Set to fixed position. One end of curve will be 0 and the other 1.
Duplicate the profile mesh and move to another offset on curve.
Scale either end or both.  With both end profiles selected run the script below.
"Extrudes" segments time around the curve linearly interpolationg
from start scale to end scale. Makes a mesh object using the global
coordinates of the arranged profile.

EDIT: Update for 2.8x

The script:

import bpy
import bmesh
from mathutils import Vector, Matrix

context = bpy.context
scene = context.scene
dg = context.evaluated_depsgraph_get()
coll = context.collection or scene.collection

def offset(ob):
    return ob.constraints["Follow Path"].offset_factor

ob1, ob2 = sorted(context.selected_objects, key=lambda o: offset(o))
T = ob2.matrix_basis @ ob1.matrix_basis.inverted_safe()
ml2 = ob2.matrix_basis.copy()
start = offset(ob1)
end = offset(ob2)
segments = 10
d_offset = (end - start) / segments
me1 = ob1.data
me = me1.copy()
bm = bmesh.new()
bm.from_mesh(me)
# remove non boundary edges
#bmesh.ops.delete(bm, geom=[e for e in bm.edges if not e.is_boundary and e.link_faces], context='EDGES')
bm.to_mesh(me)
bm.clear()
# build the mesh by sliding ob2

def ring_fill(ring1, ring2):
    for e1, e2 in zip(ring1, ring2):
        bm.faces.new(e1.verts[:] + e2.verts[:][::-1])

bm.from_object(ob1, dg)
bmesh.ops.transform(bm, verts=bm.verts, matrix=ob1.matrix_world)
offset = start  # + d_offset
copy = ob2
copy.data = me
scale2 = ob2.scale.copy()
nring = len(me.vertices)
ring = [e for e in bm.edges if e.is_boundary]

for i in range(segments):
    offset += d_offset
    copy.constraints["Follow Path"].offset_factor = offset
    copy.scale = ob1.scale.lerp(scale2, (offset - start) / (end - start))
    dg.update()
    bm.from_object(copy, dg)
    bmesh.ops.transform(bm, verts=bm.verts[-nring:], matrix=copy.matrix_world)
    next = bm.edges[-len(ring):]
    ring_fill(ring, next)
    ring = next

# reinstate the end (much of the same)
ob2.data = me1
ob2.matrix_basis = ml2
dg.update()
bm.from_object(ob2, dg)
bmesh.ops.transform(bm,
                    verts=bm.verts[-len(me1.vertices):],
                    matrix=copy.matrix_world)
next = [e for e in bm.edges[-len(me1.edges):] if e.is_boundary]
# fill
ring_fill(next, ring)
# recalc normals
bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=1e-7)
bmesh.ops.recalc_face_normals(bm, faces=bm.faces)
ob1.select_set(False)
ob2.select_set(False)
# make new object and link to scene.
ext = bpy.data.meshes.new("Extrusion")
bm.to_mesh(ext)
extrude = bpy.data.objects.new("Wall", ext)
extrude.show_wire = True
extrude.show_all_edges = True
coll.objects.link(extrude)


Rotation and Scale have suddenly stopped working? I was working quickly, (making mistakes), and suddenly rotation and scale transforms stopped working. I think I hit some shortcut or button by accident. Translate still works though. I checked that the transforms weren't locked and such, to no avail. What could be the cause?

The cause is the manipulate object centers only button (Alt,):

When it is selected, scale and rotate no longer function normally.

Instead, of or rotating the mesh with the object origin, only the origin moves:


Window close button [x] ignores changes I am kind of new to Blender and have only tried & used the video editor.

However, I am so surprised that Blender just quits when I click on the Windows close button (the [x] in the window decoration bar), despite changes have been made to the current blender working context.

Is it too difficult to have this checked and pop up a dialog with something like "All changes will be lost. Continue?  [Yes] [No]"?

Also, when Blender crashes, catching signals allows the software to at least try to make an emergency save of the current blender working context, which can be loaded next time.

These kind of actions are common in most software that I use on my Fedora Linux system. I'm surprised that a mature package as blender does not do this. Does it have a specific reason?

R.L.

How to recover Lost work in Blender

Go to "File" -> "Recover autosave"
Use *.blend1 file - it is save before last save :-)
In splash screen use "Recover Last session" - open automatically saved project on Exit Blender.


How to rotate a mesh around another one? I have a certain combat airplane model and i need to create all the animations to be able to use it in a game. I've got this:

I need to rotate the elevator mesh (The one not selected) around the selected mesh. I've tried using the rotate tool but it always ends up moving the elevator mesh (rotating and translating around the center point/3d cursor) and that is not i want. I want the front of the mesh to go up and the back to go down, taking the little mesh as a pivot, so the mesh moves like an actual elevator would.

How should i go about this?

At a guess you want to select the elevator mesh then Shift-select the pivot or controller mesh. With the elevator selected and the control mesh selected and active press Ctrl P to parent the elevator to the pivot or control mesh. The first choice in the drop-down list should work: 'Object'.

However, do you need the pivot mesh? Perhaps you should use an empty object instead to control the rotation.

You can also move the center of rotation of an object. In edit mode select the front vertices of your elevator then ShiftS then U to choose "Cursor to selected". Tab out of Edit mode back into Object mode and then ShiftCtrlAltC to bring up the Set Origin dialogue and press shortcut T to move "Origin to 3D Cursor".

An absolute must-read is Witold Jaworski's excellent reference work Virtual Airplane which can be found on his site:
Virtual Aircraft

Here is a quick blend file showing one way to control a surface:
controlled_elevator.blend

Under the Properties tag you can lock rotation in the x, y, or z axis:

Under the Constraints tab you can limit the rotation of the controller (the empty):

As a follow-up, and keeping within the aeronautical theme, here is a link to a blend file of a variable pitch propeller, controlled with bones and drivers:

pitch_control_bones.blend


Red sheen on texture paint I'm not sure why, but there is a reddish sheen on my mesh whenever I texture paint. Sadly I won't be able to provide the blend file, but I can provide a picture of what it looks like. and some of my brush settings.

Nevermind, I figured out the problem, I had another material on that was affecting it.


Get mouse x/y position while not in game engine Is there a way to register a mousemove event that gets called whenever the mouse moves within the Blender window?

Yes, if you let a Modal Operator run in the background (its modal() needs to return {'PASSTHROUGH'} in order to not consume any events). An event object is passed as third parameter to modal(), which contains the mouse coordinates in window and region space, as well as information about the event itself.

You can react on mouse movements by checking the event.type:

if event.type == 'MOUSEMOVE':
    print(event.mouse_region_x, event.mouse_region_y) # remove 'region_' for window coords!

Have a look at the Operator Modal Draw template in Blender's Text Editor, it illustrates what you can do with the mouse coordinates together with a draw handler and OpenGL (bgl module).


How to make physically accurate silver in Cycles? I need extremely accurate representation of real world silver in my curren project.

We can approximate "close enought" in cycles, but this time i need it to be accurate.

Other commercial rendering engines have material presets that sampled from real world materials and provide very close approximation. I played around in Redshift, and it have things like IOR, absorption(k), edge tints, that i assume sampled from real world materials.

Cycles just recently go the principled shader, that includes fresnel effect in itself, before that we used handmade tricks to add fresnel to materials. Plus there is no predefined material presets, like other rendering engines have.

Is it possible to make a physically accurate silver shader at all in cycles? I know i can get close enought by adjusting metalness, roughness, adding slight wear etc. But i'm talking about getting real thing, with real values sampled from real world material.

I have one that uses RGB Curves, here are the coords,there are 4 points in the R,G,B and just 2 in color, hope it helps. If not LUXRENDER.

Red = P1(x 0.0, y .96) P2(x .55, y .96) P3(x .83636, y .95) P4(x 1.0, y 1.0)

Green = P1(x 0.0, y .94) P2(x .5, y .94) P3(x .85091, y .94) P4(x 1.0, y 1.0)

Blue = P1(x 0.0, y .91) P2(x .5, y .91) P3(x .81364, y .92) P4(x 1.0, y 1.0)

Color = P1(x 0.0, y 0.0) P2(x 1.0, y 1.0)


Is there a way to convert 2.7x files to 2.4x? I am doing some meshing for Fallout 3/New Vegas. For a while I would make the mesh in Blender 2.71 and then I would try to open up the same .blend mesh in Blender 2.49b (since that is what  making meshes for Fallout 3/New Vegas limits me to) to add in the collision meshes as well as export it to a NIF file, and make whatever changes I needed to in Nifskope.

When opening the mesh in Blender 2.49b, I get the message depicted below, and when I would hit okay and the file would open. Only the wireframe of the mesh would display rather than the actual mesh that should normally show up that's a shaded object.

I know 2.49b is old but is there something I could do with meshes edited in Blender 2.71 to make them usable in an older version of blender?

While a lot of new data may not translate well into 2.49 as ideasman42 explains, there is an option if you only want to transfer mesh objects.

When you use 'File->Save As' there is a 'Use Legacy Mesh Format' option that will ensure no n-gon data is saved. This allows 2.49 to open a simple mesh with face data intact.


Have a video sequence be driven by an audio track Let me start by stating that I have just recently picked up Blender to use as a Video Editor.  Given that my knowledge is limited on this software, I have came across an issue which I can not determine if it is from user error or if it is a bug.

The goal I have is to have a video sequence effect which is driven by an audio track.  By this I mean, as the audio becomes larger/louder the video effect should become more pronounced.

Now, I have done the following:

Created a new project.
Deleted the default sphere.
Created an empty sphere.
Created a single keyframe on the empty sphere's Z Scale.
Baked a sound to the F Curve of the empty sphere's Z Scale.
Added the same sound file to the Video Editing Sequencer at frame 1 channel 1 and extended the animation stop frame to match that of the sound file.
Added an image to the Video Editing Sequencer at frame 1 channel 2 and extended it to the same length.
Added an Effect Strip: Color to the Video Editing Sequencer at frame 1 channel 3. I changed the color to red and set the blend mode to Multiply.  I also extended it to the same length as noted above.
I then created a driver for the Opacity of the Effect Strip: Color.
I set the properties of the driver to take the value of the baked sound of the empty sphere's Z Scale.

When I scrub through on the timeline, I can see the desired results in the preview window.  However, when I render the animation, whatever the value of the Empty Sphere's Z Scale was on the last scrubbed frame is what the effect uses on all (non scrubbed) frames.  Notice in the following screenshot, that the driver is picking up the proper value's.  I'll show a few screenshots of what I am referring to:

What is interesting to note is if instead of creating a driver for the opacity of the effect, I create a new keyframe and bake the sound to the keyframe graph, it will render exactly as the above screenshot shows, which of course is what I am looking to do BUT would really want to do this via a driver instead.  The example here has led me to speculate that one of two things are true.  Either I am doing it wrong or this is just a bug.

Here are two links to a couple renders.  The first is rendered with the effect being driven by a driver linked to the Z Scale of the empty.  The second is with the sound baked directly into the visual effect's opacity keyframes.

Effect with opacity driven by a driver linked to z scale of the empty

Effect with sound baked to it's opacity keyframe

Anyone out there know what I'm missing or care to throw me a bone?

Issue resolved

Thanks to everyone for the assistance and to user2859 for another possible workaround.

The problem is:

The scene isn´t updated because the sequencer ignores the scene when it´s not visible in the final output. We might consider this a bug/limitation or a feature. I´ll talk to the core developers. So of course drivers that depend on the values of a hidden scene don´t work as expected.

A workaround:

If you don´t use the scene for output, render the scene so that the output is pure white and add the scene in the sequencer on top of every channel and use multiply as blend mode. Of course this increases the render time a bit. The key point here is that the scene shows up one way or another in the final render.


Bezier Interpolation I have a Bezier curve with three shape keys as shown above. All three have the same length. The animation with shape key evaluation time from 0 to 20 (with 'Relative' unchecked) is shown below.

As you can see the curve length changes continuously during the animation. I have tried all the shape key interpolation methods (Bspline, Catmull-Rom etc). But none of them keeps the length intact. Is there a way to ensure the curve length is not modified during the interpolation? In general, it would be great if you could suggest some way to influence the behavior of the shape key interpolation.

There is this question, which I thought had the answer. But it's referring to uniform distribution of points along the curve, so it's not related.

Someone may come along and correct me.. but I think this is impossible with Shape Keys.

Using Shape Keys, whatever the interpolation between vertex positions, the route from one to another is essentially a translation. The route that would preserve inter-vertex length has a large rotational component. The vertices have to travel along an arc around the right (possibly moving) center, not a straight line, or a curve not based on that center.

You could approximate that by using something like @moonboots' solution, and setting up a large number of linearly interpolated shape keys, (ultimately achieving a match by having one shape key per frame).


Is there a python plug in that can export Blender rendering data to a CSV File I am currently in the process of upgrading my animation equipment, and I want to track machine performance.  In order to do this I need to extract or export how long it takes to render an entire project.

The Data I want to track is:

How long it takes to render one frame
The time the Render Started
The time the Render Ended

I need an accurate way of doing this, doing it manually isn't an option especially when you have more than one machine to manage.

You can read the information from metadata written into the image (check what metadata to save in Metadata tab inside Render panel):

import os

string = ""
with open("PATH_TO_IMAGE", "rb") as file:
    byte = file.read(1)
    while byte and string[-4:] != "IDAT":
        char = byte.decode('utf-8', 'ignore')
        if char.isprintable():
            string += char
        byte = file.read(1)
file.close()

render_time_pos = string.find("RenderTime")
if render_time_pos > 0:
    time_string = ""
    i = render_time_pos + 10
    while (string[i].isdigit() or string[i] in ":") and i < len(string):
        time_string += string[i]
        i += 1
    times = [int(i) for i in time_string.split(':')]
    times.reverse()
    print("frame took %02d sec" % sum([a*b for a,b in zip(times,[1,60,3600])]))
else:
    print("render time metadata not found")


Why is this passive rigid body allowing objects to pass through it? I have an object falling to the ground and breaking into pieces, but my plane, which is a passive rigid body, allows many pieces to pass through it:

Why is this happening and how can I fix it?

You can add a collision margin on the plane (the passive rigid body).

Also, increasing the number of simulation steps per frame from the rigid body properties panel in Scene properties tab will give you better results.


How to get a square brush in texture paint? Is it possible in texture painting mode to change the shape of the brush from circle to square? I am using the anchored stroke. As it is, it uses a circle brush and fades the corners of the image texture making it hard for me to make carefully aligned brush strokes. Other strokes that I tried also do this.

Blender paints within a circular brush, you can use an image like a stencil when painting to get different shaped brushes.

When you create a image to be used for a brush there are a few things you need to keep in mind. When you have a square image, blender's brush will only paint within it's circle and that circle will be contained within the image dimensions, in practice I would also leave a little margin inside that circle as well.

Anything in the red area will not show in blender's brush, while the green area can be considered a safe zone for brush shapes.

To create a square brush using gimp you can create a 100x100 image and fill it with white then resize the canvas to 200x200 and click the center button then export to png.

Draw the shape you want in white and leave the non-drawing part of the image as transparent and save it as a png. Then in blender create a new brush texture as an "Image or Movie" and select your brush image. The transparent parts show as black in the preview, unlike normal transparent texture previews. You can use multi-coloured images as brushes, the colours will be mixed with the active brush colour based on the blend mode, so white will maintain the brush colours while other colours will tint the brush accordingly. Feel free to experiment with different alpha values for soft edges.

Texture masks work in a similar way but they don't mix colours like a texture brush, any colour info will only be used as a greyscale mask for the brush.

To get a crisp edge you will want to give the brush a sharp curve, this can easily be set by clicking the square preset button at the end.


hair/particles on a material I have a model with a boolean modifier to make a hole, the hole has a different material inherited from the modifier. Is there a way to add particles to this material only? Since it's from a modifier it doesn't have a vertex group.

Yes. But use Vertex group for that as usual
You need two vertex groups: one for the base mesh (should be empty), and one for the cutter (should be filled).

The tricky part is that vertex groups merged not by name, but by its index. So the first vertex group of the first mesh will be merged with the first vertex group of the second mesh, the second vertex group will be merged with the second, etc... And it doesn't matter that names your vertex groups have.
Once you get the "combined" vertex group, set it to the Density setting


How to get pack project status I was wondering if there was a way to get the status of the project, whether it's Packed or not in python, and in the case how to get that information, I checked the api but with little success.
Not have idea how to read current status by python Like to :
current project pack status get
About pack , unpack etc.

This is stored under the

bpy.data.use_autopack

value.

True: Autopack is enabled, False: Autopack is disabled.

Documentation is https://docs.blender.org/api/blender2.8/bpy.types.BlendData.html#bpy.types.BlendData.use_autopack