Empties are not transforming Hi,
I was following this tutorial https://www.youtube.com/watch?v=K02hlKyoWNI&t=495s for camera to path.
There was a shorcut Alt+G to centre and object. Since I did the same there was some disconnect between the empties on screen and their co ordinates. As in image the camera empties is visually at the centre but the camera frame is at the co-ordinates.
Same is for the light. It physically appears at centre while it's co ordinates are different.

The same goes for any future empty I create. It is very annoying.
I have tried Blender reset and Re install but nothing is making this go away.
Please help resolve it.

The Bug team resolved it. Apparently the Viewport was not updating.
I had to install the new graphics card drivers and it started working fine.


can you have two brushes in dynamic painting? Not getting the other brush to function , my question is that can you have two brushes in dynamicpainting painting the same canvas. ?

Yes, you can.
... "any" number of mesh objects (set as Brush) should work for the same Canvas object.

Blender Manual for more info check Dynamic Paint
When you have any issue, it is always good way to open a new file and test it with maximum of default setups, if still issue "Load factory settings" and test again.
BTW answering given Q didn't move you forward and didn't solve your issue ... try to edit your Q with something more specific that we can solve for you :)


Why can't I intersect these 2 objects? I've created these 2 objects and want to create a new object that represents the area where they intersect. I'm really confused as to why I cannot do it. I practiced on a cube and a cylinder in a new file and it work as expected. How do I find the issue with these objects?

You can check out the file in question.

You have doubles , flipped normals and ngons in your meshes.

Select the object named mask, enter edit mode and do the following :

-select all vertices , press w and remove doubles.
-recalculate normals with ctrln

result :


NurbsPath and Beveling a BezierCircle Good evening,

I am fairly new to Blender. I have been unsuccessfully attempting to create a curved cylinder (i.e. a pipe) to follow a curve path. When I go to Geometry > Bevel > Object > Bezier Circle (applying it, as all the videos and guides say to do) I end up with the image below. For some reason whenever I move the vertex point(?) it does not move the piping around like all the video guides do. Instead, it extrudes the object and creates the monstrosity you see in the image.

Far left object is the path with the Bezier Circle applied. (Path next to it is pre-bevel application).

As you can see in the path (far right) with the bezier circle applied, it works fine, so long as I do not attempt to move the pivot points [vertex point?].

Basically the goal is to create a path that I can then apply the object bevel (circle) to it. Creating what looks like a pipe.

Checked out the file and was first rather surprised by how fast any slight movement of a point from the curves made a mess. Then if you think about it, small movements resulting in a very big mess very fast ... there is something wrong with the translation of action and reaction  .. yes the scale.

I checked and pretty much all curves even the circle (responsible for the size of the pipe diameter) had it's scale not applied. Or shall i rather say it was scaled in object mode, which is something pretty much everyone does and regrets later, more so when working with curves.

This:

Shows that the circle was scaled and the new scale was not applied, which for a straight path does not result in anything other then a thinner pipe.

Fixing this:

Press Ctrl+A -> "Scale"
Go in edit mode
Afterwards open the Sidebar with N and find the Transform panel, usually the top one.
Under Mean Radius it should be standing "1", but due to the previous steps it got changed to "4.123", set that back to "1" like so:

Circle profile fixed.

Now to the curves/paths.
There are a few things that need adjustments:

First it looks like this

The scale needs to be corrected, BUT here you need to be careful, as to not change the scale with the bevel object included!
Thus in the options, remove the Bevel Object resulting in this:

Now there are 2 things marked, rotation and scale. While we could just apply those, it would nip us in the butt afterwards, so believe me and do the following.
We have to leave the rotation alone! Applying it would mess with the sizes of the path internally.
And regarding the scale we have to do it manually.
Go in the Transform panel and change the value of the X-scale to 1. Just keep in mind it was 25.
After adjusting the scale the path will become very short 1/25th to be precise, so go in edit mode and press A selecting all elements, followed by S and then type in 25 followed by Enter. Resulting in the old length, without all the trouble.

Here is what would have happened if we had applied the scale or rotation or both, changing the path dimensions, thus causing more things to fix:

I know all can be fixed somehow, but let's fix to not have to fix the results, if you know what i mean ;)

Here how it does look now:

Now there are some settings you need to deactivate that only show their effect in edit mode, assuming that you want to have the pipe start and end with the path/curve and not generate a circle (endpoint connects to the startpoint, responsible for some of the weird shapes).

Deactivate the Cyclic U and Bezier U to get something like this:

As you can see the path is having it's normals along it's entire length, means with the Bezier circle applied as Bevel Object you now get something like this:

With this all done you can now move the points and get the expected results like shown here:

Ok long story short, scale is very important to pay attention to, if you want to adjust the sizes, it's recommended to do so in edit mode. Rotations i would also consider to adjust edit mode, as it can also cause issues, especially with the profile curve.

The other curves may have one or more of the same issues, but i believe if you followed the steps you should be able to handle those yourself now. Just beware, there you need to scale only in one direction.

When done, it should look like this:

All the steps you could have saved yourself by starting over with scale in mind, but since we are supposed to learn from mistakes, i believe it's good to know how to fix things and understand what caused the problem along the way.

Happy Blending.


By using the CLI on Linux, can I make a running blender instance save its current scene to file? I have a desktop machine that has been baking a physics (rigid body) simulation. I am now from another computer, and I have ssh access to the remote one. In the remote /tmp folder the last autosave is from before "bake" was invoked.

Is there a way to send a signal in order to make the existing blender instance save its current scene to file, or to trigger its autosave?

No. Blender accepts cli options when starting that can include a python script to automate tasks but once started it no longer accepts commands from the cli.

The autosave, if is hasn't been disabled, should save a temporary copy, even the unmodified startup file will regularly autosave a temporary copy. If your autosave file is old then it may indicate that the copy of blender is no longer running.

If you can't get back to the machine (or get someone else) to close it properly then the only option I can think of trying is x11vnc that can connect to an existing xorg desktop. See if you can download a copy to your home folder and run it without admin permissions.


Is there a way to append to an external blend file? I know that bpy.data.libraries.load() allows me to append data from an external file to my current blender instance, but is there a way to do the reverse? Take something (let's say the default cube) and append it to an external file using the Python?

My exact need is to take a node group from the current blend file, and append it to an external blend file.

In Blender 2.78, bpy.data.libraries.write() will be an option to use, which will allow any datablock from the blend file to be saved to an external blend file.


Derformities in mesh: This is what happens after I Shade Smooth + Subdivision Surface I'm a beginner in Blender. I'm currently following a tutorial for a character mesh, and I'm following it very closely. I ran into an issue with the foot. To close the sides of it with a face, I was trying to use Grid Fill, but it wouldn't let me (I can't remember the error message). I had to fill it with triangles, and then have them changed to squares so that geometry was even with the rest of the mesh.
Everything looked fine, but then I applied Shade Smooth on the mesh and added a Subdivision Surface modifier, and this happened to the ankle (what's below the red line in the image):

Ok. I think I found the problem. There were additional Vertices at certain parts of the ankle, hidden like. I must have Extruded or something. I Merged these Vertices, then applied Shade Smooth and Subdivision Surface and the deformity is now gone.


Rig Cable connected to head and body I need your help. I have a model that has a cable attached to the back of the head and body. I want the bottom part of the cable attached to the body to follow the body bone and the top part attached to the head to follow the head bone, deforming the bone chain and stretching as the head rotates.

Does anyone know how to do this?

You should use the Stretch To constraint:

Build your cable, create an armature, with a small bottom bone, a central bone as long as the cable, and a small top bone that you unparent.

Select the armature, go in Edit mode, in the Properties panel > Object Data > Display, choose B-Bone. Select the central bone and in the Properties panel > Bone > Bendy Bones, segment your bone (for example 6).

Switch to Pose mode, keep the central bone selected, in the Properties panel > Bone Constraints give it a Stretch To constraint with the same armature as Target and the top bone as Bone.

Back in Properties panel > Bone, enable Use Custom Handle References and in the In and Out fields choose the bottom bone and the top bone so that the central bone will bend properly.

Parent the cable to the armature With Automatic Weight.

Move the top bone, the cable should follow.

What you could do to give it the right bend is to put an empty at the exact same position as the top bone, give the top bone a Child Of constraint, then move the empty to where it is supposed to be in the back of the head and parent it to a bone.


How do I set up freestyle to exclude outer lines? I have a question about the freestyle tool.
What can I do so I can only see the inner lines, and not the outer lines.
Inner lines means when there is an interaction with a different object. But in a way that there won’t be any outer lines showing.

Here is how you do it...

The logic is: "Crease" AND NOT "External Contour"

You get the NOT by using the X on the side.

Do you need more explanations about this please tell.


Align empty to normal with object matrix world rotation? I want to align an empty (Arrows) to a selected face normal with the empty's Z axis aligning to the normal direction (and location which I have working). When the target objects rotation is 0 it's fine... but if I rotate the target object and then select a face I can't work out how to add the object's matrix_world rotation to the empty's matrix_world rotation (I'm thinking this should be easy but can't solve it atm)... here's the code so far. (Add an Arrows Empty named 'Empty' and select one face on an object). any help greatly appreciated.
import mathutils
import bmesh

obj = bpy.context.edit_object
mw = obj.matrix_world.copy()
loc, rot, scale = obj.matrix_world.decompose()

bm = bmesh.from_edit_mesh(obj.data)

# select one face - testing
for f in bm.faces:
    if f.select:

        f_location = mw @ f.calc_center_median()
        print("location: ", f_location) #correct

        DirectionVector = f.normal

bpy.data.objects['Empty'].rotation_mode = 'QUATERNION'
bpy.data.objects['Empty'].rotation_quaternion = DirectionVector.to_track_quat('Z','Y')
bpy.data.objects['Empty'].location = f_location

#bpy.data.objects['Empty'].matrix_world.to_euler = rot

import bpy
from bpy import context
from mathutils import Matrix, Vector
import bmesh

obj=context.object
mw = obj.matrix_world
me=obj.data
m = mw.copy()
mi = m.inverted()

def create_rotation_matrix_from_face(mx, face):
    normal = (mx.to_3x3() @ face.normal)
    tangent = (mx.to_3x3() @ face.calc_tangent_edge_pair())
    binormal = normal.cross(tangent)
    rot = Matrix()
    rot[0].xyz = binormal
    rot[1].xyz = normal
    rot[2].xyz = tangent
    return rot.transposed()

#apply all transforms
me.transform(mw) #Transform mesh vertices by a matrix
mw = Matrix()

bpy.ops.object.mode_set(mode='EDIT')
bm = bmesh.from_edit_mesh(obj.data)
for face in bm.faces:
    if face.select:
        mat_rot=create_rotation_matrix_from_face(mw, face)
        loc=mw @ face.calc_center_median() # > vector
        mat_trans = Matrix.Translation(loc)
        break

mat=mat_trans @ mat_rot
bpy.ops.object.mode_set(mode='OBJECT')
empty=bpy.ops.object.empty_add(type='ARROWS', radius=1)

scale_empty=context.object.scale.copy() #scale will change after the matrix modification (next line)
context.object.matrix_world @= mat
#empty size
context.object.scale=scale_empty #original size
#or
#context.object.scale=obj.scale #size of the object x,y,z

#apply all modif back
me.transform(mi) #all zero loc rot scale
mw = m #back to start matrix
me.update()


Bone rotation deforms mesh in weird way I've made this tiger head rig, and started adding teeth. When I started to rig those teeth (as separate objects), I noticed they did not move with the head bone in a similar fashion. This was the case, however, until I noticed that the jaw/mouth itself was deforming when the head bone rotated, making the teeth not stay within the head. It does this for any direction.

^Every bone appears to be linked.

^Viewed straight-on appears normal.

^Rotating head makes it slack-jawed.

^Weight painting seems fine to me (but I'm very new). I also painted the teeth, but they don't deform strangely in the same way.

File Download

The jaw-lower bones are acting to deform its jaw.

I cleaned some weights in jaw and all works fine now.

See the image below, the bone selected and some cleaning in law:


UV mapping , when colouring the outer corners of the canvas , other faces are affected which are not unwrapped O.K here goes
I've got a simple plane , which is subdivided in 64 equal parts (8*8)
I select the inner 16 faces and unwrap them , in the object data tab I give it a name , lets's say "this one"

Now , in the (cycles) material editor  I create a mix shader ,which consists of a simple diffuse shader and a texture map that will have the image for the selected inner faces )
The texture map get's its coordinates from the UV map node( set to 'this one '') .
Now , when going into the image editor /view mode we can see our selected /unwrapped inner faces and start drawing .
I make sure that the unwrapped  uv,s are centered in the image editor , surrounded by enough empty space
As expected , only the inner faces are affected and thus coloured

Here's the thing , as soon as I draw in one of the corners of the image editor (just a tiny 1 pixel dot is enough)  ,all  the other faces are also affected which are not unwrapped at all .
How come ?
So my question is ,are the corners of the image editor some kind of boundary ?

If you unwrap any part of a mesh, a uv map is created. In a UV map all vertices in a mesh needs to have a UV coordinate. Blender gives not yet unwrapped vertices the coordinate U=0.0, V=0.0 (bottom left corner).

Since all your corner faces share the same uv coordinate they will get effected in the same way.

You could use the Face Selection Masking for Painting and give the corner UVs enough space on the UV map to not get effected by the unwrapped faces. Another way would to give the corner faces a different material.


Rigid body animation with constraints and relationships I want to drop a Padlock object that not only bounces the main body of the lock but has an open lock that also swivels when it hits.

I can't do this with a parent child relationship since it isn't calculated in the simulation...  any ideas?

It sounds like Rigid body constraints are what you want.

For a padlock you most likely want a Hinge constraint, to allow rotation on only one axis.

Creating a Rigid Body constraint

3D view > Tool Shelf > Rigid body tools:

This is the easiest way (currently) to create RB constraints. (Select objects and press Connect. all selected objects have to be Rigid Body objects to do this.) This will create an empty that represents the constraint. (Constraint settings are in the physics panel)

A quick setup,
frame 1 and frame 50:

Note that the orientation of the empty refers to the orientation of the "hinge" (what direction it's allowed to rotate in.) by default the hinge will be allowed to rotate around the local Z axis of the empty.

Result:


How to make a cycles light emisson object invisible to the camera? In my scene it is required to position the lights close to the main object like this:

How I can make the light source invisible to the camera?

In the object properties, you can turn off Ray Visibility of the 'emission object' for the camera:

As of Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

As of Blender 2.8x, Ray Visibility panel is now part of the new Visibility Panel:

You can also run this script to toggle the Camera Ray Visibility for selected objects (updated for 2.8x):

import bpy

for obj in bpy.context.selected_objects:

    # toggle mesh lights
    if obj.type == 'MESH':
        for slot in obj.material_slots:
            if slot.material:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

    # toggle light types
    if obj.type == 'LIGHT':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera


Object showing up strange in render an object in my scene looks fine in all other views but shows up weirdly transparent/ invisible in the render? I've tried everything I could find online about invisible rendered objects but none of them worked. I'm a bit of beginner so this could be something obvious

Below is object next to a cube for comparison. it renders fine while the object seems to sort of be there and obstructs the cube but is the color of the background. This only happens in cycles render.

solid viewport:
Right now I can only theorize it might have something to do with grouping/ duplication, as I used a modifier to make the object symmetrical during modeling.
Or it could be a material setting I haven't learned yet?

Link to the blender file (sorry about that!):
https://www.dropbox.com/s/tzf2v0i57iu8tku/fruit%20basket%201.blend?dl=0

You have enabled Shadow Catcher the object.

Select it, go to the object properties in the Properties area, uncheck Shadow Catcher.

Shadow Catcher objects will appear as a transparent mask except for the shadows.

  [The shadow catcher enables] the object to only receive shadow rays. It is to be noted that shadow catcher objects will interact with other CG objects via indirect light interaction. This feature makes it really easy to combine CGI elements into a real-world footage.

Manual Page


Can't add objects to collections I'm a super-beginner to this (and 3D animation in general) so please forgive me if this is a really obvious things I'm missing as I work my way through tutorials for Blender 2.8, but I can't find the answer anywhere. I'm trying to learn how to use collections, but whenever I create a new object, it just goes into the "objects" collection (in orange). I've tried dragging and dropping it into the "Scene Collection" bin (nothing). I've tried creating a collection within "Objects" and nothing pops up. I've tried creating a collection under "Scene Collection" which worked, but then I couldn't drag anything into it. Everything is stuck in Objects.

I even tried creating a new scene and adding an object and Blender just creates a collection called "Objects" that is the same as all the other scenes. In every tutorial I've watched, folks are able to create collections and drag objects into them, can't figure out why I'm stuck.

Your Outliner is currently set to display the Scenes. Switch to View Layers and you will be able to add objects to the collections that are in the current View Layer. In order to do that, select one the collections in the Outliner before adding the object.


Particular nodes are missing from node editor I am looking for the Mapping Node but it is not available under the Vector nodes menu or any other menu. I have Blender 2.77 which cooresponds with the manual version in the above link.

I also cannot find the Texture Coordinate or Gradient Texture.

Likely I am doing something wrong.

Wrong node tree type

Blender has three built-in different node tree types: Material, Composite and Textures. They have some nodes in common, and some not. The ones you are looking for belong to the second group.

All the nodes you mentioned belong to the Material node editor, you can see that from the path of the page in the manual you linked:

Just switch from the Composite type editor to Material type editor and you should be able to find them.


Delete specific fcurve in python Hello all blenderheads !
i'm trying to write a simple tool to split a frame in piece with the great animated render border addon ! so far so good, all's working but i need a way to delete the created keyframes of the border render, i can't figure it out !
so far i've got :

for scene in bpy.data.scenes:
for fcurves in scene.animation_data.action.fcurves:
    if fcurves.data_path.startswith("animated_render_border"):
        fcurves.animation_data_clear()

The startswith method work to change interpolation of the keyframe, so my problem comes from the

fcurves.animation_data_clear()

I tried several other ways, nothing works... any idea out there ?
Thanks you all !

As you know the scenes animation fcurves are found in

fc = bpy.context.scene.animation_data.action.fcurves

The fcurves list has a remove method -

fc.remove(fc[0])

Which leads to changing your code to

for scene in bpy.data.scenes:
    fcurves = scene.animation_data.action.fcurves
    for c in fcurves:
        if c.data_path.startswith("animated_render_border"):
            fcurves.remove(c)


How to deform multiple mesh objects with one manipulator? Simply put:

I'd like to be able to manipulate the shape of more than one side by side object at a time. Like a rubicks cube reshape all the cubes with one manipulator.

Thank you

Further discribed:

How can I take two objects side by side and reshape them together (one or both), as they reshape together their borders are kept side by side.
So the end result is still two objects side by side but now they are both or one have a different shape.

You should be able to do this with an armature.

Here a simple Rubik's cube like mesh object parented to an armature.

The second cube is a linked duplicate.

The cube blocks on the face that rotate have been assigned to a vertex group, as we can verify in Weight Paint Mode.

After creating your armature make sure the bone is in the right place and has no rotation issues. You can lock the transforms so it doesn't rotate in undesired ways.

When parenting the cube to the armature Set Parent to "Armature Deform with Empty Groups".

Ensure that the groups and bones have matching names.

Here's the .blend from the screen shots in case I forgot to explain anything:


Moving this IK bone just a little causes the leg to twist up After a lot of fiddling, I got the first of 6 mechanical legs, each with several joints and ending in wheels, working the way I wanted. I thought it had been so hard because of some simple oversights. Now I'm not so sure.

After copying the setup for the first leg to the second leg, even a slight movement of the IK bone causes it to twist like a dead spider leg. The axes of rotation of the joints are limited through the IK section of their bone properties. The first leg doesn't have a range set on the axis each joint is free to move in, but it still works very well. I can even tweak the joints individually so the bend is distributed over the joints the way I want. I don't understand why the other one is so different. I have looked for something different and don't see anything.

What is making this go so wrong?

I don't know if it will solve all your problems but I guess you need to:

Deparent the second leg controller.
Move up a bit the central limbs so that it knows how to bend the legs.

Please tell me if it's enough to fix your problem.


How come my object doesn't show up after rendering? Basically my problem is, I can see the objects and player model perfectly fine in editing, but as soon as I render the image, the screen goes black. How can I fix this? I am new to blender so screenshots will help.

I want to tell you the answer is easy when I look at the image you posted. Your camera is facing the background and not the character. When you hit render you render what the camera sees and not the current view in the viewport. That's why you don't see anything. Select camera and press Numpad 0. Your view will be moved to the camera view. Now you'll see that character is not visible. Go to the bottom panel of 3D view and press View -> Navigation -> Walk Navigation. Now use the keys WASDto move your camera around until it looks at your character, and then press LMB(and not RMB otherwise your camera will reset position). Now you can press F12 to render and your character will be there.
If you still don't see it, then you need to add a lamp to your scene.


Rendering multiple borders by a script I'm working on a script that divides rendering into parts using borders and then renders random selection of parts.

An example script looks like that (it actually renders all parts):

import bpy

scene = bpy.context.scene

scene.render.tile_x = 16
scene.render.tile_y = 16
scene.render.resolution_x = 800
scene.render.resolution_y = 600
scene.render.resolution_percentage = 100
scene.render.use_border = True
scene.render.use_crop_to_border = True

n = 4
m = 4

cnt = 0
for i in [x * 1.0/n for x in range(n)]:
    for j in [x * 1.0/m for x in range(m)]:
        scene.render.border_max_x = i + 1.0/n
        scene.render.border_min_x = i
        scene.render.border_min_y = j
        scene.render.border_max_y = j + 1.0/m
        cnt += 1
        scene.render.filepath = "res_{}.png".format(cnt)
        bpy.ops.render.render(write_still=True)

The script works as expected but I have noticed time penalties by rendering this way. From logs I can see that the bpy.ops.render.render() command is "synchronizing" and "updating" the scene every time executed.

Is there a way to do a scene preparation for rendering once?

Pawel,

Not really an answer

even though the code below looks like a significant rewrite, it's mostly just for generic OS use...
What I had noticed running through the script below (which is likely causing the sync & updating issues you're referring to) is that the renders are generated based on the segmented window throughout the entire animation sequence, then moving to the next segmented window and running through the entire animation sequence again.
As such any interpolation of animation & raytracing, etc will be recalculated not only frame by frame, but each segment frame by frame.

If you watch the console while running this you should see what I mean.

    """
This script:
Verifies, the active blend file is saved
Generates a folder for the active blend file where it is saved
Generates sub folders for each scene
Renders for each scene
All naming is based on names used in blend file (blend file name, scene names, object names)
For different render options change the true/false option at ~line 52 & blender menu options
"""
"""
http://blender.stackexchange.com/questions/47530/rendering-multiple-borders-by-a-script
"""

import bpy
import os

filepath = bpy.data.filepath
osdir = os.path.dirname(filepath)
osfile = os.path.basename(filepath.replace('.blend', ''))

selected = bpy.context.selected_objects

list_of_all_scenes = bpy.data.scenes
scene = bpy.context.scene

n = 8
m = 8

if bpy.data.is_saved:
    for scn in list_of_all_scenes:
        bpy.context.screen.scene = scn
        if not os.path.isdir(os.path.join(osdir, osfile, scn.name)):
            os.makedirs(os.path.join(osdir, osfile, scn.name))
    for scn in list_of_all_scenes:
        bpy.context.screen.scene = scn
        cnt = 0
        scn.render.tile_x = 16
        scn.render.tile_y = 16
        scn.render.resolution_x = 800
        scn.render.resolution_y = 600
        scn.render.resolution_percentage = 100
        scn.render.use_border = True
        scn.render.use_crop_to_border = True
        for i in [x * 1.0/n for x in range(n)]:
            for j in [x * 1.0/m for x in range(m)]:
                scn.render.border_max_x = i + 1.0/n
                scn.render.border_min_x = i
                scn.render.border_min_y = j
                scn.render.border_max_y = j + 1.0/m
                cnt += 1
                bpy.context.screen.scene.render.filepath = os.path.join(osdir, osfile, scn.name, scn.name + "_cnt(" + str(cnt) + ")_frame(" + str(scn.frame_current) + ")_auto")
                bpy.ops.render.render(animation=False, write_still=True, use_viewport=False, layer="", scene="" )


Create a working microscope in Blender? I am modeling a microscope, and am wondering if it is actually possible to make the microscope would so that it functions like a light-refractory microscope in real life. (Not an electron scanning microscope).
I.e. it has glass material lenses to refract light and magnify objects .1mm in real world size. Is this possible in Blender, and if so, how could I do this?

What I essentially want is to actually use a series of lenses to magnify an object in .1mm real world size instead of using a separate render.

In one sense, I am asking if it is possible to create an object in Blender at .1mm (microscopic level) real world size, and be able to use a working modeled microscope to be able to see it through a camera's lens.

I'm not looking to be practical about viewing a microscopic object, so that's why I don't want to just make a separate render of it, so I want it to be physically light based.

Just for fun, you can also get good results with Cycles.

Glass shader with IOR = 1,6 (same as Crown glass used in microscopes)
And a rather simple microscope setup.

Original image with a tiny Suzanne

Magnified using a microscope

Diagram of used setup

Notes:
Cycles, 100 samples + Intel Denoiser
I'm sure better results can be achieved by playing with the lens setup.
Bottom line, it works :).


Script for simple finance calculations in blender? I am working on an infographic-animation that features simple revenue cost profit finance projection tables. I would like to be able to enhance this complexity with larger tables for scenario variables that change as the animation moves forward without mass edits.

Is there a calculator table script?

Ben Simonds has an addon (based off work by Bassam Kurdali) that can animate text in a variety of ways. The script is available at github. There is also a short example video of what is possible.

Bassam's original script of a simple typewriter effect is somewhat simpler -

# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

# <pep8-80 compliant>
import bpy
from bpy.app.handlers import persistent

bl_info = {
    'name': 'Typewriter Text',
    'author': 'Bassam Kurdali',
    'version': (0, 1),
    'blender': (2, 65, 0),
    'location': 'Properties Editor, Text Context',
    'description': 'Typewriter Text effect',
    'url': 'http://urchn.org',
    'category': 'Text'}

"""
Typewriter Text Animation For Font Objects
"""

def uptext(text):
    '''
    slice the source text up to the character_count
    '''
    source = text.source_text
    if source in bpy.data.texts:
        text.body = bpy.data.texts[source].as_string()[:text.character_count]
    else:
        text.body = source[:text.character_count]

@persistent
def typewriter_text_update_frame(scene):
    '''
    sadly we need this for frame change updating
    '''
    for text in scene.objects:
        if text.type == 'FONT' and text.data.use_animated_text:
            uptext(text.data)

def update_func(self, context):
    '''
    updates when changing the value
    '''
    uptext(self)

class TEXT_PT_Typewriter(bpy.types.Panel):
    '''
    Typewriter Effect Panel
    '''
    bl_label = "Typewriter Effect"
    bl_idname = "TEXT_PT_Typewriter"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = 'data'

    @classmethod
    def poll(cls, context):
        return context.active_object and context.active_object.type == 'FONT'

    def draw_header(self, context):
        text = context.active_object.data
        layout = self.layout
        layout.prop(text, 'use_animated_text', text="")

    def draw(self, context):
        st = context.space_data
        text = context.active_object.data
        layout = self.layout
        layout.prop(text,'character_count')
        layout.prop(text,'source_text')

def register():
    '''
    addon registration function
    '''
    # create properties
    bpy.types.TextCurve.character_count = bpy.props.IntProperty(
      name="character_count",update=update_func, min=0, options={'ANIMATABLE'})
    bpy.types.TextCurve.backup_text = bpy.props.StringProperty(
      name="backup_text")
    bpy.types.TextCurve.use_animated_text = bpy.props.BoolProperty(
      name="use_animated_text", default=False)
    bpy.types.TextCurve.source_text = bpy.props.StringProperty(
      name="source_text")
    # register the module:
    bpy.utils.register_module(__name__)
    # add the frame change handler
    bpy.app.handlers.frame_change_post.append(typewriter_text_update_frame)

def unregister():
    '''
    addon unregistration function
    '''
    # remove the frame change handler
    bpy.app.handlers.frame_change_post.remove(typewriter_text_update_frame)
    # remove the properties
    # XXX but how???
    # remove the panel
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()


Problems adding animation I am trying to animate emission. Dope Sheet selected as editing context. But when i'm opening action editor - its empty. When inserting Location, Rotation etc. keyframes, they appear properly in action editor. Animation runs okay, but i can't save it. What i've missed?


High Poly bake to low poly I'm just playing around with Cycles, trying to bake a normal map onto a low poly mesh.  After a bit of trying, this is the best I could do, however, it's clearly not correct.

I'm not 100% sure how to improve it.  I've been reading about cages, but after messing about with larger/smaller cages, it didn't seem to make much difference.

Maybe I've UV unwrapped it incorrectly, or perhaps there is something I'm overlooking?  I'm still reading up on how to do this properly, however I'm a little confused.

Any input or advice would be greatly appreciated.

Thanks

Update:
Blend file is available here:

not sure if this will help. However when baking is giving me issues I reset the unwrap with: U then select reset while in edit mode. delete doubles with: w remove doubles in edit mode. Press control N to recalculate normal's in edit mode.Then finally re unwrap using smart project. then bake, it usually fixes any issues I have.


Rigid Bodies dancing around I have active rigid bodies on top of a passive rigid body. When I play the animation (no keyframes involved) the active rigid bodies start dancing around. See this GIF.

Firstly, you should ensure that you have Applied Scale to each of your objects (Ctrl+A, select Scale). Then, you can improve the accuracy of the simulation by increasing the Steps Per Second and/or the Solver Iterations settings on the Rigid Body World panel of the scene properties. See also Why my active rigid bodies are vibrating Continuously?


Issue Filling Hole in Mesh I'm following an apple sculpting tutorial and at some point, I seem to have accidentally deleted a vertex along with the four adjacent faces. I filled this hole using the methods I've learned thus far (used F to fill between vertices and Ctrl+R to add one vertex in the middle)
The apple now looks fine in edit mode, but when I switch to object mode, the faces appear to be triangulated. Furthermore, when I apply a subdivision modifier as instructed in the lesson, an unsightly patch appears where I filled the hole. Merging vertices by distance had no effect. The normals are not reversed. I'm using version 2.91 if that information's relevant.

When you have a hole like this, don't press F to fill, otherwise you'll have one unique face and then you'll need to use J (join) or K (knife) to recreate 4 different faces and they won't even be correct, you 'll need to pull the central vertex to get the right curve:

What you should do instead is selecting 3 vertices on each side:

Then CtrlF (Face) > Grid Fill to fill, and tweak the parameters in the Operator box (bottom left of your 3D view) if necessary:


My Textured paint became plain color when I render in Cycles First of all I Marked Seam and Unwrapped my model and I started to texture paint but the Render is plain light grey color , I also sculpted it but I don't think that it causes the problem .. Here are some pictures to show , the problem.

the texture needs to be assigned to a material on this object to be visible on the render , and to start using the nodes editor :

select the object
in the material tab click New button to create new material
click use nodes

in the node editor press  Shift+A➝Texture➝Image texture
in the texture node select you image ( the one you painted )
connect the texture node to the shader node ( click and drag the dot to the other one )


Textures look extremely weird So apparently the textures look weird on the phone model I'm trying to make. I just want it on the screen not on the whole phone. How do you make the image texture stay on one face but not on all faces? Its hard to fix it for me.

It comes from the UV, named so because XY is used for 3d localisation and UV is just a planar representation of the unwrap on a model. So work your UV correctly through the UV editor, in this case you should just select all the faces for the screen and press U then 'unwrap' or 'unwrap from view' if your are in front of the object in a precise way as when selecting the view with numpad numbers. Also when you are done with that you can select the other faces and assign a different material to it.


Snap objects to floor I'm a beginner in blender scripting, in How to place any object on the 'floor' of a scene?, @MACHIN3 wrote this simple but smart code. Can you explain me the meaning of every line?

import bpy
context = bpy.context

for obj in context.selected_objects:
    mx = obj.matrix_world
    minz = min((mx @ v.co)[2] for v in obj.data.vertices)
    mx.translation.z -= minz

In the same question the topic of how can integrate this code in Blender as a button is very interesting, can you help me with this? Actually I'm working with tutorials, Manuals, etc. but I'm afraid my knowledge is not enough.

My answer in

[1]How to place any object on the 'floor' of a scene?

My addon append one item in Object>Snap menu


Return the current release of blender on command line Is there a way to poll the blender download website to return the current release candidates paths for blender.

At the time of this writing there is a release for both 2.79 and 2.80 so i would like a way to, from command line, find out that the downloads currently available are:

https://builder.blender.org/download/blender-2.79-e6acb4fba094-linux-glibc224-x86_64.tar.bz2
https://builder.blender.org/download/blender-2.80-430cf7e15eef-linux-glibc224-x86_64.tar.bz2

without having to scrape the download html page to extract the full names

Using akira's idea, you could use wget --spider to search the web page for links without downloading them. Then you could use something like awk or python to filter the output for the desired urls:

% wget -r -np --spider https://builder.blender.org/download/ 2>&1 | python -c "import sys; print(''.join([line.rsplit(' ', 1)[-1] for line in sys.stdin if all(term in line for term in ['http','linux'])]))"
https://builder.blender.org/download/blender-2.80-430cf7e15eef-linux-glibc224-x86_64.tar.bz2
https://builder.blender.org/download/blender-2.80-96f762500ef9-linux-glibc224-i686.tar.bz2
https://builder.blender.org/download/blender-2.79-e6acb4fba094-linux-glibc224-x86_64.tar.bz2
https://builder.blender.org/download/blender-2.79-e6acb4fba094-linux-glibc224-i686.tar.bz2


Modify a blend file via console outside of GUI I have built a little 'smart' robot using a Raspberry Pi and Arduino. Currently it can move around, sense obstacles, determine if it can pass, etc. My biggest problem so far is that it is completely "in the moment" and doesn't remember that there was a wall on its left once it's not sensing it. I'd like it to remember there was a wall on its left and so on so I thought, maybe I could use Blender for its visual memory!

Is it possible to add/manipulate meshes in a blend file outside of Blender via Python? My robot's code is in Python but I suppose if I have to use C for it, I can just write a Python wrapper. I don't expect to generate high detail meshes or anything like that, just cubes so I can inspect what obstacles it's remembering.

You can also build bpy as a standalone module using cmake, and use it in a python script with import bpy
This is pretty similar to doing blender -b -P customscript.py


How does BGE handle Python class definitions? I have a game (toy) that works in PyGamek, and I'm trying to port it to Blender. I'm very familiar with both Blender and Python individually, but not together.

In this case, I have a class called "Critter." Each critter knows how to do things like drawSelf() and chooseNewOrientation() and predate(other_critter) and getPredated(other_critter) other fun things like that.

What is the "Blenderic" method for me to implement this class in BGE?

It seems like each OBJECT (mesh) is the parallel to an instance of the class, and that has worked well enough. But I suspect that if I just define the class in a script and attach it to an object (even a single object that never gets duplicated), the class will get defined every frame... which I'd like to avoid, obviously. Right now, I have individual functions in a script on each critter, and that works well enough so long as those are static functions (or would qualify to be static). I'm not sure how to handle things like class member functions/variables. I.e. it'd be nice for each critter to have a "self.diameter" that can tell the "self.drawSelf()" function how big this instance is supposed to be.

So, what's the best way (conceptually) to handle the equivalent of a class in BGE that can spawn instances of itself, which know about members?

There are a couple of ways. Here is a simple one:

Write your class e.g. Character.

Character object knows the game objects of the character.

class Character():
    def __init__(self):
        self.skeleton = None
        self.leftHand = None
        self.rightHand = None
        ...

# builder
character = Character()
character.skeleton = scene.objects["Armature"]
character.leftHand = scene.objects["Hand.L"]
...

The game objects might need to know the Character object too:

character.skeleton["character"] = character
character.leftHand["character"] = character

This way you get a cross reference. When you know one of the game objects you can get the according character:

character = gameObject["character"]

When you know the character instance you do not need to dig through the properties anymore.

You could create a factory that establishes these cross references. This keeps this "management" code away from the character's behavior.

You can dynamically exchange references. E.g. the character grabs a book. So you can assign the book to the right hand. You character eats the apple it holds in right hand, you can remove the link between the apple and the right hand, then you can end the apple.

Be aware the BGE events are always applied to game objects (such as collision, ray ...). As said you can get the python character via property.

myCharacter = owner["character"]
hitObject = sensor.hitObject
hitCharacter = hitObject["character"]


Bevel Start End on Circle Curve, Blender 2.83 not working The Bevel Start End does not work on closed curves.
I need to partially bevel a profile on a circle.
The circle curve added by Add->Curve->Circle is closed.
Duplicating a vertex and manually re-building an open circle results in a numerically inprecise curve.
How can I open the Circle curve without loosing a segment and end up with a mathematically exact circle?
Thanks

Either Blender is rather non-intuitive, or I'm missing something obvious.
The fastest way I found:

Add a bezier circle and make it non-cyclic (Alt + C)
Rotate the end vertices to form a 3/4 circle
Extrude one of the ends and complete the circle


Why does my rig make my arm skinnier? When it's in the normal position with the arms down, the arms are normal and muscular.  But when I make it into a t-pose, my arms get skinnier but everything else stays the same.

Be sure to apply (CTRL+a) scaling, before you assign your bonen armature to the mesh. This is a common fault, which people forget todo when they start with rigging.

If after you still have such a problem, it might be caused by the weight paint of the bone, the more easy way to solve that might be (depending on mesh) to add some helper bones to keep things in place how you want it.


Hair dynamics stops working after particle edit Hair defaults to sticking straight out, and the dynamics moves it from there. I'd like to comb it to something more reasonable so the dynamics don't have to do as much work. The problem is that once I change something, the dynamics stop working entirely. How do I fix this problem?

Hair dynamics can use edited particules, something is stopping the normal process.

As you edited the particles, you're probably in particle edit mode.

This mode allows you to edit your particles but does not allow simulation
Go to object mode to start your sim.

Your simulation should be playing correctly with edited particles.


Save objects into separate blender files What I'm trying to do is fairly simple but I've found no way to do it. I want to store each object in a scene into a separate blender file. Here's my code:
import bpy
import os
destination_folder = "destination_folder"

for idx, obj in enumerate(bpy.data.objects):
    ctx = bpy.context.copy()
    ctx['selected_objects'] = obj
    file_name = 'file_number' + str(idx) + '.blend'
    bpy.ops.wm.save_as_mainfile(ctx, filepath=os.path.join(destination_folder, file_name))

The problem is that the operator bpy.ops.wm.save_as_mainfile() doesn't have the flag "selected" as many others wm operators do. Any idea? I think context override is a good idea but I'm struggling to do it

Saving multiple objects as separate Blender's files can be done by using BlendDataLibraries (https://docs.blender.org/api/current/bpy.types.BlendDataLibraries.html)
import bpy
import os
destination_folder = "destination_folder"

for idx, obj in enumerate(bpy.data.objects):
    ctx = bpy.context.copy()
    ctx['selected_objects'] = obj
    filename = 'file_number' + str(idx) + '.blend'
    filepath = os.path.join(destination_folder, filename)
    bpy.data.libraries.write(filepath, set(ctx['selected_objects']), fake_user=True)

This code snippet will save the object in a blender's file. To load then the data in the visible user interface a second snippet can be run on the opened saved file:
collection = bpy.data.collections.new('collection')
for obj in bpy.data.objects:
  collection.objects.link(obj) #link object to collection
bpy.context.scene.collection.children.link(collection) #add collection

This second script creates a collection and loads all the objects in the Blender file into it and (in some sense) sets it visible/active


Grid: disable auto subdivision Is there any option or an addon that would disable auto grid subdivision when zooming in viewport?

Basically I just want the grid to always behave the same as it does in orhtographic view - stay to the specified scale, never subdivide on its own and ideally offer a couple of hotkeys to alter the grid scale quickly.

I found the "Minimum Grid Spacing" parameter in the options, but it seems to have no effect no matter how high or low I set it.

Subdivisions option in the Display rollout controls how the grid subdivides while zooming in the preset orthographic view:

  Subdivisions
   Controls the number of sub-lines that appear in each cell of the grid. In aligned orthographic views the level of subdivision depends on the zoom.

To stop the grid from subdividing at all set amount of subdivisions to 1. You might want to adjust Scale option to make the grid less big:

Note that this won't work in any other unit system except for the None which is by default, because both Metric and Imperial already have predefined spacing between grid cells so they aren't adjustable.


How to change an operator's icon from a timer event I have a panel with a play button, which starts a timer. Every time I click on the button, it changes from play to pause and vice versa:

class PlayPanel(bpy.types.Panel):
    is_playing = False

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

def play_panel_draw(context, layout):
    row.operator("Play", text="", icon='PLAY' if not PlayPanel.is_playing else 'PAUSE')

Now, I want to change the icon also when the timer stops. How can I do that? In the draw function I'm passing the context and the layout. How can I pass them from the timer class?

The correct way to add a property to a class in blender is by using bpy.props, in your situation that doesn't help as adding bpy.props doesn't work with panels.

The solution would be to add your is_playing property to the scene and use that for your operator icon choice.

def play_panel_draw(context, layout):
    scn = context.scene
    row = layout.row()
    row.operator("scene.play", text="", icon='PLAY' if not scn.is_playing else 'PAUSE')

Here is a sample addon to demonstrate.


python, add vertex group to modifier i want to add a vertex group by it's name (vgroup22) to a surface deform modifier.
the code should look kinda like this:
bpy.data.objects['Body.p.2'].modifiers["Surface Deform"].vertex_group ??????

thx for taking a look

found the solution (blender 2.83.3)
bpy.context.object.modifiers["Surface Deform"].vertex_group = "vgroup22"

didn't know, that every action is displayed in the "info" window and the code can simply be copied.


Boolean Difference - What am I doing wrong? I've read several questions and answers and none seem to apply to me. I want to make a wall with a cutout for a door. Using Blender 2.8, here are my steps:

Create a new 'general' file
The starting cube will be my wall. Since I live in a backward country, I don't do meters. Instead, I'll type units as inches. So I scale the cube to 4.5 m in the X direction (the wall is 4.5 inches thick), 120 meters-as-inches in Z direction, and oh, let's say 240 inches in Y so that it's 10 feet tall and 20 feet wide.
I move the Z location of the wall to 120 so that a Z of zero is the floor
Great! I have a wall!
Make a door with Shift-A, add Mesh->Cube
Scale it to 6, 30, 80 to make a door 30 inches wide, 80 inches tall, and thick enough to use as a boolean difference object. Set the z-location to 80 to bring it up to the floor
I select the first cube and Add Modifier. Select Boolean, difference, and the doorway object
Click Apply
Select the doorway differencing object, hit G and X to move in the X direction to move it out of the way to see the hole in the wall, and...
There is no hole in the wall. Why?

I'm 100% certain that this is user error. I just don't know what error I'm making. Can anyone show me my mistake?

First off, you can set the unit system to imperial instead of metric under Scene Properties > Units > Unit System > Imperial, and set the Length to Inches.

When you're using real system, do not change the scale value. Instead, press N and go into Dimensions. Here you can set the values. You can see the difference between scale and dimensions in this picture. You can also type in other Imperial units, such as ft. This will automatically put it into feet. Math operations such as *(
multiplication) or / (division). It's really handy.

Now add the cube. Again, use the dimensions panel to get the correct size of the door. Go into side view by pressing 3 on the numpad, press G, hold CTRL and bring it up to the floor. For the door zoom in so you can see the smaller squares and do the same. Make sure you're using the increment under snapping settings.

I tried exactly what you've done and ran into the same issue. Yet the solution is pretty simple! With the door selected, press TAB to go into edit mode, select the bottom face and drag it down by pressing G, then Z and dragging it down a little bit. Then press TAB again to leave the edit mode and press S and X to scale it on the sides.

... but that's just in case you come to something like this again. Otherwise the simplest solution would be to make it thicker and move the bottom a little bit right when you're scaling the door! :P

Then repeat what you did - add the Boolean modifier, select the door as the cutter, operation to Difference hit apply and you're done! You can now also delete the door if you want to.

If you also want to fix the topology after boolean operation (which I would highly recommend), select the corner of the door hole and the corner of the wall and press J. Repeat this on each side so you have quads all around the mesh. We don't want any ngons there!

Hopefully a bit longer and more detailed reply was worth it. Happy Blending! :)


How to prevent the file browser from showing folders before files? I've set my file browser to sort by Modified Date, but it always shows all of my folders (sorted by date)  before any files (sorted by date). So when I want to choose a file, which is the whole purpose of the dialog, I always have to scroll past all the folders.
Is there any way to get the file browser to intermingle files and folders, sorted by date?
Bonus question: is there any way to permanently move the Volumes and System lists to the bottom of the file browser's left panel?

As far as I know there currently is no way to sort folders mixed with files.
As a workaround you can temporarily hide all folders from view.
Open the filters popover, then from the file types untick the Folders entry.


How can you curve the faces of a hexagon? I'm quite a noob at Blender (this is for 2.8 by the way), and I was hoping somebody could help me figure this out. I've been trying to make a 3D hexagon with the side faces curved inwards to sort of look like a six sided star, but I can't quite figure out how to do it. I've tried to delete the top and bottom faces, loop cut the side faces, add an empty plane axes, and then add a simple deform modifier to the side faces with the empty as the origin, but that didn't quite work out properly. The idea was that it would curve all faces in equally and then I could add the top and bottom faces back.

Here's kind of the shape I want. It's not quite symmetric since I'm not very good at drawing things, but I'd like for the actual result to be symmetric. Thanks for any help!

create a simple hexagon
Edit mode, subdivide as many times as you need for details but an odd number to get a vertex centered on each edge.
Select the central vertex
turn on proportional editing, spherical mode
scale down all selected vertex while adjusting the proportional editing effect radius.


M key function changed while working in 2.83.0 you can move objects to other collection with the M key.
But while I was working it changed to this:
When I press the M key it says:remove from local view. And objects set to display as bounds are visible in rendered view.
Others set to textured are invisible.

Local view, accessed by pressing "/" on the numpad, isolates the view to only show selected objects. Think of it like hiding all of the layers in something like Photoshop, but leaving only the one you're working on.
When in local view, move only lets you leave local view. Most likely because it puts the object in an isolated collection.
You can get around this though, by splitting your view, which should have the rest of the scene, then you can move normally while your mouse is hovered over the section with the rest of the scene.
You can even add objects to your local view by selecting all in local view, and adding the objects you want to the current selection from the view with the whole scene. Then just exit and re-enter local view.


Can python access control points of Hue modifier? I am making a chroma keyer in the VSE and wondered if it possible to access the control point data of the Hue Sat modifier? I would like to build a GUI for easier control of the curve slope but cannot find a reference to these values.

They seem to have coordinates but no data structure, perhaps this is because you cannot animate their value. But I only want to make interacting with them easier (like the points of a  ramp or blend texture).

You can access the 'Control Points' via CurveMap attribute of the respective Hue Correct Modifier:

>>> h, s, v = bpy.context.scene.sequence_editor.active_strip.modifiers['Hue Correct'].curve_mapping.curves
>>> print (h.points, s.points, v.points)
>>> [p.location for p in s.points]  # print saturation vector control points
>>> s.points[3].location[1] = 0.001 # assignment (y location)

To update the representation of the Curve within the UI call CurveMapping.update() after any assignment. However this does not update the Viewer, so toggling the 'visibility'  of the modifier is probably the easiest and fastest way to update the Curve and refreshing the Viewer at once.

Desaturate blue(s)

import bpy

scn = bpy.context.scene
act_strip = scn.sequence_editor.active_strip
hue_modifier = act_strip.modifiers["Hue Correct"]

# get the mapping
# .../bpy.types.CurveMapping.html#bpy.types.CurveMapping
mapping = hue_modifier.curve_mapping

# get the curve maps
# .../bpy.types.CurveMap.html#bpy.types.CurveMap
hue, sat, val = mapping.curves

# iterate through saturation control points
for count, point in enumerate(sat.points):
    x, y = point.location

    # desaturate blue
    if 0.55 <= x <= 0.7: # check if x is within the blue range
        point.location.y = 0.01

    print (count, point.location)

# direct assignment via index operator
#sat.points[5].location[1] = 0 # desaturate blue

# update the curve
# ../bpy.types.CurveMapping.html#bpy.types.CurveMapping.update
mapping.update()

# force viewer update (optional)
hue_modifier.mute = True
hue_modifier.mute = False

Custom curves

To apply a custom Curve iterate through CurveMap.points and assign a Vector((x, y)) to each Point.location (0-1 float range). The following operator allows to reset the number of points as well as the point locations to the default values for demonstration purposes:

Click to enlarge

import bpy
from bpy.props import BoolProperty, EnumProperty
from bpy.types import Operator
from mathutils import Vector

def reset_curve(curvemap):

    default_points = [Vector((0.0, 0.5)), Vector((0.125, 0.5)), Vector((0.25, 0.5)),
                     Vector((0.375, 0.5)), Vector((0.5, 0.5)), Vector((0.625, 0.5)),
                     Vector((0.75, 0.5)), Vector((0.875, 0.5)), Vector((1.0, 0.5))]

    if len(curvemap.points) > len(default_points):  # remove waste
        n = 0
        while len(curvemap.points) > len(default_points):
            curvemap.points.remove(curvemap.points[n])
            n += 1

    if len(curvemap.points) < len(default_points): # generate missing points
        n = 0
        while len(curvemap.points) < len(default_points):
            curvemap.points.new(0.1, 0.5)
            n +=1

    # set values to default
    for c, point in enumerate(curvemap.points):
        point.location = default_points[c]

class ResetHueCorrectOperator(Operator):
    bl_idname="sequencer.reset_hue_correct"
    bl_label="Reset Hue Correct"
    bl_options = {'REGISTER', 'UNDO'}

    # properties
    def modifier_callback(self, context):
        sel_strip = context.scene.sequence_editor.active_strip
        hue_modifiers = [(str(c), item.name.title(), '') for
            c, item in enumerate(sel_strip.modifiers) if
            item.type == "HUE_CORRECT"]
        return hue_modifiers

    mod = EnumProperty(name="Modifier", items=modifier_callback)
    hue = BoolProperty(default=True, name="Hue")
    sat = BoolProperty(default=True, name="Saturation")
    val = BoolProperty(default=True, name="Value")

    @classmethod
    def poll(cls, context):
        spc = context.space_data
        act_clip = context.scene.sequence_editor.active_strip
        return (spc.type == 'SEQUENCE_EDITOR' and act_clip.select)

    def execute(self, context):

        # get the active strip
        sel_strip = context.scene.sequence_editor.active_strip

        # tagging the area for redraw to update the curve edits
        context.region.tag_redraw() #context.area.tag_redraw()

        #for m in sel_strip.modifiers:
        m = sel_strip.modifiers[int(self.mod)]

        # get the mapping
        # .../bpy.types.CurveMapping.html#bpy.types.CurveMapping
        mapping = m.curve_mapping

        # get the curve maps
        # .../bpy.types.CurveMap.html#bpy.types.CurveMap
        h, s, v = mapping.curves

        # reset hue
        if self.hue: reset_curve(h)

        # reset saturation
        if self.sat: reset_curve(s)

        # reset value
        if self.val: reset_curve(v)

        # update the curve
        m.curve_mapping.update()

        # toggle modifier visibility to update the viewer
        # -> way faster than sequencer.refresh_all()
        m.mute = not m.mute # respect the state
        m.mute = not m.mute

        self.report({'INFO'}, "Successfully reset {}".format(m.name))
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        sel_strip = context.scene.sequence_editor.active_strip
        if bool([m for m in sel_strip.modifiers if m.type == "HUE_CORRECT"]):
            return wm.invoke_props_dialog(self)
        else:
            self.report({"INFO"}, "strip has no hue correct modifier")
            return {'FINISHED'}

    def draw(self, context):
        row = self.layout
        sel_strip = context.scene.sequence_editor.active_strip
        if len([m for m in sel_strip.modifiers if m.type == "HUE_CORRECT"]) > 1:
            row.prop(self, "mod")
        row.prop(self, "hue")
        row.prop(self, "sat")
        row.prop(self, "val")

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

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

if __name__ == "__main__":
    register()


Smooth bevel edges using non destructing Boolean I have a main mesh which has a subsurface modifier applied to it. I also made some random shapes which also have the subsurface modifier to it. I used the non destructive Boolean method, and it made clean difference cut within the main mesh. The problem I'm having is, the surface of the edges are too sharp, although if you you can notice the inner depth of the cut does have smooth corners, only the surface has the sharpness. I found how to bevel the edges using a bevel node, but it requires Cycles Render, I mainly use EEVEE, because my PC isn't up to date, and cannot render with Cycles. Is there any way getting smooth edges within EEVEE?

To bevel all sharp edges, you can use the Bevel modifier.

Put Bevel Modifier after the Boolean Modifier and set Limit Method > Angle
To avoid 'tight geometry' that would limit the Bevel, you can create a large N-Gon using the Decimate Modifier (try different delimit methods).
Make sure no tight geometry on your mesh limits the Bevel (in your case there is some)


Euler formula for geometric modeling faces, holes I don't know if I'm in the right place to ask this question!

I have two 3D modeling and I want verify the Euler-Poincaré Formula on them that include face,holes, vertex, etc. Anyone knows about that?

It is not entirely clear what you are asking, but the Euler formula is
V - E + F = 2 (1-g), where g is the number of holes (the genus).
Perhaps you also have cavities? Then look at this San José State exposition.


Cleanly Combine Two Landscapes I used the landscape generator to create two mountain ranges.. They go edge to edge and have a weird clipping effect. I want to join them together and have the vertices joined cleanly and look normal. How could I go about this?

You can combine two landscape using the bridge tool.

Select one of the landscape in object mode and move it away from the other slightly.

Select both landscapes in object mode
Join the two object together, Ctrl J

In edit mode select both edge loops between the landscapes.

bridge them together using the bridge tool, W -> Bridge Edge Loops

Number of Cuts: adjust this so that the generated polygons look square
Interpolation: Blend Surface, has the best look for bridging terrain
Smoothness: adjust this to your liking

Final Result


Why i cant punch a hole through the mesh? With the BoolTool Addon why i cant punch a hole. Why its making a groove. I check the orientation of both the faces. Scale and rotation are also 1 and 0. Any suggestion whats going wrong. Thanks

This is essentially a shading issue: use autosmooth in the property panel. That will avoid the rendering to be annoyed by the normals of the faces created by the boolean.

To fix the little tube that goes bad, just shift it a bit.
Also the tubes are opened at the bottom. They should be closed.


Make an extruded circle along a path into a solid object I'm trying my hand at 3d printing with blender. Right now I want to create an object that has a 3d curve - so it's essentially a horizontally placed cylinder curved around the Y axis on the whole object, and then curved along the Z axis for the last third of the object. I've found I can model exactly what I want by creating a curved path, then extruding a circle along the path.

However, I haven't found a way to 'apply' this transform so that my 2 objects become one editable object where I can close off the faces and select and edit nodes. Can anyone tell me of a way to do this? I also tried having a straight cylinder object and applying the curve modifier, but found that only worked along one axis, and attempting to use 2 curve modifiers on the same object gave funny results.

You can join two meshes by using Ctrl+J, however make sure they are both a mesh before attempting this. As Reactive said, you can convert a curve into a mesh using Alt+C > Mesh from Curve/Meta/Surf/Text. If it is using a modifier, simply press the Apply button before joining the meshes.


Green color wash over render output when rendered on server When I render my project locally, it get the following desired result:

When rendering on an Amazon server though, I get this greenish result:

This is not observed in a simple test scene containing the default cube.

To eliminate possible causes, I only rendered a single layer and disabled compositing. The exact same files are used on the local system and the server, and both have blender 2.79 installed. On the local machine, I installed according to the official manual, on the server I used the blender package from this ppa: launchpad link

The console output is as follows:

ubuntu@computer_name:/media/BlenderProjects/monument_valley$ blender -v
libdc1394 error: Failed to initialize libdc1394
Blender 2.79 (sub 0)
ubuntu@computer_name:/media/BlenderProjects/monument_valley$ blender -b *.blend -o ~/frame_###### -s 55 -e 55 -j 1 -t 0 -a -y
libdc1394 error: Failed to initialize libdc1394
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: alsa_open_playback: Could not open playback device 'default': No such file or directory
modprobe: ERROR: could not insert 'nvidia': No such device
modprobe: ERROR: could not insert 'nvidia': No such device
Read blend: /media/BlenderProjects/monument_valley/monument_valley.blend
Dependency cycle detected:
  aquaduct_lower_bool_operand depends on aquaduct_lower_bool through Parent.
  aquaduct_lower_bool depends on aquaduct_lower_bool_operand through Boolean Modifier.

Dependency cycle detected:
  sim_outflow_2 depends on sim_domain_2 through Parent.
  sim_domain_2 depends on sim_outflow_2 through Fluidsim Object.

Fra:55 Mem:42.05M (0.00M, Peak 42.05M) | Time:00:00.09 | Mem:0.00M, Peak:0.00M | Scene, RenderLayer | Synchronizing object | aquaduct_lower_bool
Fra:55 Mem:42.95M (0.00M, Peak 62.33M) | Time:00:00.14 | Mem:0.00M, Peak:0.00M | Scene, RenderLayer | Synchronizing object | ida_path
[...loading of assets, ray tracing progress, no errors]

Note that there are no errors related to color management. I wouldn't worry about the nvidia or alsa errors as I render on the CPU and don't use sound. Is the libdc1394 error cause for concern?
There is no lamp with the greenish tint. The scene has 2 emission materials with a greenish tint, used on another layer. (see the storyteller objects in the attached blend file) The amount of usage of these materials is as expected. In the Render Layers settings, I selected the main Render layer and ticked the exclude box for the scene layer with the objects which use that material.

This is not caused by the remote server, amazon, the CPU, the GPU, 1394, or some weird vudu curse. Any computer that is not your local machine will render the images green, because the file has not been been saved correctly to render in a different computer.

Your file is using images as textures, but the images are not packed into the file, or are stored in a place that is not available in the remote computer.

Images used as textures are not stored as part of the blend file unless you explicitly pack them.

Missing textures will render pink.

So where is the green coming from?

The texture you are using for the world is using a hue/saturation/value node that turns the missing texture's pink texture to cyan-green.

You need to pack the images so that they become part of the file. Else the blender project will have no access to them on a remote computer. As an alternative you need to create a folder that holds the images using the same path as in the original computer, so that blender can load them.

Read: Why are all the textures in my file pink?

And: Why is that when I open up my file in blender, the reference picture is gone


How to take an animation off an object thats parent to another so basically I have a camera and an object (health bar) parent to it. The camera has animations within its movements, both the camera and health bar are parent so they stay by each other of course. But I want only the camera to work with the animations and the health bar to sit still.
Any suggestions?

If I understand correctly you are looking for a heath bar that follows the camera's location but not all the little rotations caused by animations. You may be looking for the child of constraint.

With these settings as the camera rotates on the x and y axis (like during a run animation) the cube does nothing. However, transform and rotation on the z axis by the camera affect the cube allowing it to always still be in view.


How to avoid gradient banding while using a video sequence editor? I rendered a 80 frame test animation in jpeg format. Used Blender to create the movie. The output format is mp4. The bottom image shows the first of the rendered image on the left extreme. The image at the center in the snapshot from the video rendered using those frames. The last one on the right is the snapshot of the video rendered as another video (did it to combine multiple videos).

How to avoid these gradient bands?

PS:This is regarding rendering of video using video sequence editor. I tried out increasing dithering value till 2, but still the bands are appearing in the rendered video

Sadly, there isn't enough information in your post to provide you with a conclusive answer. However, the following should help to illuminate some of your issues.

Background

When you are rendering to a codec, the codec shifts the color encoding scheme from RGB to another format typically. In most instances this is a YCbCr schema, which provides one channel for luminance, and two channels to describe the color, or chromaticity, of the pixel value.

Most codecs are designed for low bandwidth and small file sizes. In order to achieve this, they will compress and scale portions of the data to make the result fit into the designed constraints. Within the realm of YCbCr, our visual systems have learned to pay more attention to luminance over chrominance. In codecs where data size is an issue, engineers leverage this perceptual trick and more greatly compress the chrominance, or the Cb and Cr planes, as compared to the luminance plane, or Y.

Knowing that typically all three planes are compressed in a codec, and coupling that with understanding that the Cb and Cr planes are even more greatly compressed, we can begin to understand why posterization occurs in encoded formats. The more greatly compressed the stream, the greater degree of posterization.

Ultimately, even when given a well encoded RGB image at eight bits per channel, an encoded motion picture format will more often than not degrade this acceptable level of encoding to a point where it may be unacceptable given some contexts. Gradients are one example that will exacerbate this phenomena.

So how to avoid posterization? The most ideal way is to encode to an uncompressed RGB display referred still image format, and then leverage an external encoding tool that permits you to control the YCbCr stream details. With a decent set of encoding parameters including bitrate and compression level, you should be able to pull the posterization into acceptable levels for eight bit motion picture presentations.

Enough of that, what damn codec?

So even if someone is telling you to try a "lossless" encode, while it will try to maintain accuracy, will still include a conversion to YCbCr and likely some scaling at the very least, which will not be lossless when comparing to the source RGB format. If you use a codec that remains in the RGB domain, you are avoiding one transformation, but even then, you will be likely quantizing your image.

Remember too that not all codecs may be decoded at all or correctly when your content arrives at the destination you choose, so use caution. This includes middle layer services such as YouTube, Vimeo, etc., that will more than likely re-encode your material yet again, subject to another entire set of mistakes and encoding problems.

With the above caveats, the following options direct out of Blender will likely be closer to what you were hoping:

HuffYUV. HuffYUV can deliver both YCbCr and RGB formats. I actually patched this portion of the code to remain in the RGB domain and as such, it will be closer to what you are seeing in the 8 bit display buffer output from Blender.
FFv1 will be a lossless encode, with the above caveats of YCbCr transforms and quantization. Test to be sure.
H264 lossless should be a losseless encode, with the above caveats of YCbCr transforms and quantization. Test to be sure.

If anyone would like help on how to test if an encode went correctly, it would be useful if a new question was posted. This would allow for a proper response.


Weird glow in render I've made a Yooka model from Yooka-Laylee as part of a college assignment, but I've noticed a weird glow either below the top lip or on top of the bottom lip. I'm currently using a Toon Shader and I've messed around with the Size and Smooth settings. It does the same thing just using a Diffuse shader. I've even tried positioning the light source, but it doesn't help. Any ideas? Also, what could I do to get rid of that green reflection from the eye? The cornea uses a glass shader and, again, I've tried messing with the properties but it's not helping.

Thanks

The glow simply comes from a lamp you let inside the head, lighting up strongly everything inside and bleeding outside. Delete that lamp and you'll be fine.


Execute Python script between rendering animation frames I've attached a function to the frame change handler:

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

All works fine when I drag the slider on the Timeline. But when I render with the "Animation" button, it doesn't work. I found that:

Blender offers only a limited set of API functions while rendering. (See also the answer by Jerryno to another question: Accessing screen areas from render handler) Is there any form of documentation, why this is the case and which functions can be accessed while rendering, and which cannot?
Blender doesn't wait for a script updating the scene before it advances to render the next frame. Is there by chance a API call that makes Blender wait for a script to finish before rendering on?

If the answer to both questions is "no", is there maybe a script that offers animation rendering with manual frame advance, like this:

Render the first frame, apply postpro etc, write it to correct file
name
Go back to the viewport, advance a frame
Render next frame, apply postpro* etc...

*With postpro(duction) I mean apply everything what the compositor would do in the the regular rendering pipeline, if compositing is switched on.

You can loop through frames and render each one and do whatever you want before rendering the next one like this:

import bpy

s=bpy.context.scene

s.render.resolution_x = 512 # just for my example
s.render.resolution_y = 512

for i in range(s.frame_start,s.frame_end):
    s.frame_current = i

    s.render.filepath = (
                        "C:\\temp\\" # some path
                        + str(s.frame_current ).zfill(3)
                        )
    bpy.ops.render.render( #{'dict': "override"},
                          #'INVOKE_DEFAULT',
                          False,            # undo support
                          animation=False,
                          write_still=True
                         )

    # Do whatever you want here
    # Changing render resolution is one of the things imposible to do with
    # handlers while rendering an animation so let's do that

    if s.render.resolution_y == 512:
        s.render.resolution_y = 256
    else:
        s.render.resolution_y = 512

The problems start if you want to see the render happening in the UI. If you uncomment 'INVOKE_DEFAULT' it breaks everytihing because the script is unable to know when the started render finishes. People have tried to work around that, but things get ugly from here. See this question if you want to pursue this.


Ways to animate edge loops sliding along a torus knot I'd like to animate a torus knot, making the edge loops (selected below) move forward along the knot:

The method I'm currently trying is edge sliding all of the loops forward as a shape key, then animating the shape key. After the slide, the mesh should look unchanged, however the edge loops are on top of where their neighbour used to be.

A simple edge slide on the loops doesn't slide them all in the same direction; some loops slide forward, and the others backward.

Is there a way to slide all of the loops in the same direction? Is there a better approach to achieving this animation effect?

Sadly you can not do this directly, however you can achieve the same result fairly easily. Begin by selecting one longitudinal edge loop, and pressing P > By Selection. Now (in object mode) delete the old mesh. Next select the new edge loop mesh, and press Alt+C > Curve from Mesh/Text.

Now you can create a cylinder, add an array and curve modifier, and you have the desired result. You may need to scale and adjust your cylinder mesh slightly to fine tune it.

Simply animate the mesh's position (on the Z axis) to animate the edge loop sliding effect, and add your wireframe modifier to complete the effect.

And this is what the final result will look like:

The array modifier has been disabled to show the animation more clearly.


How to make quick 2d animation with blender? Npr I don't know much about blender at all but I want to make 3d animations but wanting it to look 2d. 3d animations that try to look 2d are clearly 3d and I know it can be done with npr and freestyle but I don't know where to start. How do I make a 2d toon animations on blender? Something that can load in blender quickly. I'm assumeing that there's a way to make animation quickly with blender by using some trick of turning the 3d to 2d.

The reason I'm asking is cause rendering takes way to long and wondering if a sort of "2d" render would help. Even if itshe just line art if it renders faster. Takes a minute to render a image of toon style Suzanne.

I don't have special sharers or nodes. I don't even know how to use nodes yet, but is it even possible to make quick animations? Sorry for my hard question I been looking for the answer for weeks now.

I am not really sure if this will answer your question, but I have done 2D animation before using blender 2.79 and now its much easier now with blender 2.8, because Eevee can render out your project in seconds.

What I do is that I import the cartoon 2D images as textures on a 2D plane with the same shape of the object or character, and then setup the camera as orthographic to see the plane in 2D, then make a rig for that plane and animate it, after that render it out with eevee, 1 frame renders in less than a second.

I am explaining all that in a step by step 2 video tutorial you can check it out and see if this method will help you out.

https://www.youtube.com/watch?v=CD-RM2SMek0&t=314s


what are the things that can be done with python and cannot be done manually? I am unable to learn python as I am not interested in that,but many people are saying that it is useful for effective usage of blender.so,what should i do now?

You can't without a code select all object shearing different instances of the same material (f.ex. material, material.001, material.002 and so on). You can't remove custom shapes from all selected bones at once.So in general it's easy to perform actions on many objects at once and automate some actions, you perform a lot with python. I don't think it's absolutely essential to learn python to be a great Blender artist though. There are tons of people, who will gladly drop you some snippets of code to help you achieve stuff you can't without it.


How to paint Weight Black to Weight Blue? My question here is how can I get the part in black to blue. (see the images)
I don't know exactly what the weight black does but I think that it disturbing the natural weight paint.

When I paint with any value or even 0.05, the Vertex works like was painted with 1. And I think is because that are the black color on.

The Weight Tool "Clean" expands the black, and paint with Brush:Mix with Blend:Substract (and other combinations) turns black also.

Paint in the parts blue gets the good results with varied values. Diferent in the black 0.0/1.0

For any more clarification about it, ask me please.

Try switch 'Show Zero Weights' to none ...at least to get rid of the black.

I think 'Clean' might be confusing the issue...

I can't see your brush settings but I paint with auto - normalize on, and find 'Smooth' the most useful of the Weight Tools for fixing.

The manual itself is also full of good info.


No Australian mirror on download page I'm from Australia so obviously i would want the Aussie mirror. But when i go onto the downloads page there are only the US, German and both Netherlands mirrors. Please help

You can download Blender from any mirror you want. Australians can download from US, US can download from Netherlands, etc. If there's no Aussie mirror, just pick a different one.


How to deactivate a UI element in an add-on? In an add-on I would like to have a property adjustable via its UI element, but when I have a second elements enabled I want my first element to be disabled : only show the information without being editable. It there a way to make a UI element read-only ? (grayed out / disabled / visible but un-editable).

Try:

col = layout.column()
col.enabled = False
# Use col.prop, col.operator, etc. Everything you add to this column will be faded

col.active is also possible, it will grey out the column but the props will still be editable (this is probably not something you want)


Most common node set up for textures Was wondering if there was a common, base style set up of nodes for use in Cycles as a good basic starting point to just experiment with from with respect to textures and materials. I realize that it probably depends on what you are rendering, however, I just though maybe there was 3 or 4 you almost always want to include in a certain order for best results generally.  Also, why would one want to use nodes in blender internal to do textures and materials? Couldn't you just do the same thing using the modifiers panel and properties panel?

Let's break that down.

  Was wondering if there was a common, base style set up of nodes for
  use in cycles as a good basic starting point to just experiment with
  from with respect to textures and materials.

Yes, there is. Typically your surfaces are some sort of mix between a glossy reflection and a diffuse. Therefore most materials have

A mix node
A diffuse
A glossy

Some materials (basically metals) conduct electricity. They have the property of having a more mirror-like reflection towards the edges and more diffuse reflections towards the center. To model this effect in Cycles one typically used a layer weight or fresnel node feeding into the mix factor.

To find out more about this real world mimicking type of material, have a look at these tutorials by Andrew Price.

  Also, why would one want to use nodes in blender internal to do
  textures and materials? Couldn't you just do the same thing using the
  modifiers panel and properties panel?

Whatever material related work you do through the modifiers and properties panels escapes me. However, the use of nodes in the internal renderer engine allows for some extra effects like mixing two existing materials of different types (think halo and write for example). Related: Mix two materials in the Blender Internal Materials Nodes. Overall it's use cases are indeed quite rare for the average user.,


Fading Colours in Blender Render I'm trying to fade one colour into another colour in blender render without using cycles render. Someone please tell me there's a way.

You can animate the Diffuse color parameter :

Put your mouse over the color selector, press I to insert a key. The color selector should be highlighted in yellow to show that a key is present.

Move a few frames forward, change the color, then insert a new key.

(You can do the same with almost every parameter)


Weight painting / vertex groups questions I have a bear mesh that is the combination of meshes from different files/different “versions” of this bear. Some parts of the mesh are disconnected/overlapping.
I have tried different armatures on this mesh and am now trying to use a “basic human meta-rig” to control the mesh. My questions are about how vertex groups in this mesh are working. In the “vertex groups” section, I do not know how all of the groups got there: are they from past armatures related to the same mesh? Are they from libraries that are shared across different meshes/files?
The basic human meta-rig did a good job controlling the mesh but had a few weight-painting issues. Because this vertex groups list was disorganized and I could not quickly navigate through it for weight painting I decided to delete all vertex groups and re-parent the basic human meta-rig. (However, it seems to me that entering weight paint mode with the armature selected, then shift-clicking bones, is a more efficient way to do this - do you agree?)
After deleting all vertex groups and re-parenting the basic human meta-rig, it did a much worse job controlling the mesh. I needed to go back to using the mesh with its disorganized list of vertex groups to get the meta-rig to work again. This made me think that somehow the meta-rig was working with previous vertex groups. Is this correct, or am I missing something?
Finally, I tried a different version where I used a basic human meta-rig and corrected all weight painting issues. In pose mode, the armature controlled the mesh exactly how I wanted it. Then I clicked “generate rig” and parented the mesh to the rig, went to pose mode, and found that the rig’s control didn’t correspond to the meta-rig armature’s control. Why is this?
In general, do you think that using a meta-rig the most efficient way to control a mesh like this? I would like to be able to easily animate simple movement - walk/run, dance, sit, swim, etc. I will appreciate any insights on how to better animate and understand these concepts. Thank you.
LINK TO FILE:

You should follow some tutorials on rigging, like Darrin Lile's or Sebastian Lague's, it's better to first learn from scratch in my opinion.
Before parenting it's always better to make sure that the transforms (scale, rotation) have been applied, and that the normals of your mesh are correctly flipped.
For the vertex groups, when you'll parent the mesh to the armature With Automatic Weight, it will automatically create as many groups as you have bones, and the groups will have the names of the bones that control them. If the mesh already has some vertex groups from previous operations, it will keep them as long as their names are different but it won't interact with the parenting, so you should not have to care about that but you can always delete them if you prefer.
If you parent With Empty Groups, it will create as many groups as you have bones, but it won't affect any vertex to these groups, you'll need to do it either with the Assign button or in Weight Paint mode, this is the best method when you parent non organic objects like machine, robot, etc. as it let you define what part is supposed to be controlled by which bone and doesn't create any gradient influence.
For the armature, you can use the ones you currently have, except it seems incomplete, you should have a root bone, your lower legs or lower arms should have IK constraints, you should have the targets and pole targets for these constraints (you already have targets for your legs though), and make sure that these bones (root, targets, pole targets) have their Deform options disabled (which is not the case for your leg targets).


Is it possible to tetrahedral a mesh in Blender? I have a mesh and I want to tetrahedral it (create a volume inside this big surface, important for the volume rendering), using a script in Python.
After days of research, I found someone who suggested the TetGen software, or the GAMer library. I found something about the FEM method and the Delaunay algorithm...But now I just have a big confusion.
Probably the problem is my ignorance of this subject.
This is my script (it doesn't work) and my mesh (it is only an "empty shell").
import bpy
import bmesh
from mathutils import Vector
from bmesh.types import BMVert

# The mesh and its related object
obj = bpy.context.active_object
me = obj.data

# Access to BMesh data and ensure lookup tables
bm = bmesh.new()
bm.from_mesh(me)

# Geometry to extrude
bm.faces.ensure_lookup_table()
faces = [bm.faces]

# Extrude mesh with Bmesh
for f,triangle in zip(faces,me.polygons):
    newGeom = bmesh.ops.extrude_face_region(bm, geom = f)

    # Move the extruded geometry with translate operator
    extruded_verts = [v for v in newGeom['geom'] if isinstance(v,BMVert)]
    up = triangle.normal
    bmesh.ops.translate(bm, vec = up, verts = extruded_verts)

bm.to_mesh(me)
me.update()

In your code, you should replace:

faces = [bm.faces] by faces = bm.faces[:] because you want an array of face, not an array with one array of faces.

geom = f by geom = [f] in consequence

Though, using bmesh.ops too many times will lead to poor performance.
You can extrude all in one operation and loop over the result for just shifting the coordinates:
import bpy
import bmesh
from mathutils import Vector
from bmesh.types import BMVert

# The mesh and its related object
obj = bpy.context.active_object
me = obj.data

# Access to BMesh data and ensure lookup tables
bm = bmesh.new()
bm.from_mesh(me)

# Geometry to extrude
bm.faces.ensure_lookup_table()
faces = bm.faces[:]

# Extrude once
result = bmesh.ops.extrude_discrete_faces(bm, faces = faces)

for face in result["faces"]:
    up = face.normal
    #Shift the vertices without bmesh.ops
    for v in face.verts:
        v.co += up

bm.to_mesh(me)
me.update()

Which gives:


How can i center axis on the object? How to center the axis(yellow) on my object(blue)?

Option 1:

Select your object (not edit mode)
Press Ctrl+Shift+Alt+C (Yes, 4 keys at once)
Select "Origin to Geometry"

Option 2:

Select your object and go into edit mode
Press A (maybe twice) to select your whole mesh.
Press G to grab your selection and move it to your Origin.
(If you only want to move it straight down press Z to stick the movement to the Z-axis

Note that if you want to move your object around in your scene you should not do that in edit mode as the origin (the thing in the yellow circle) doesn't move with it. Otherwise you end up with the problem you hae right now.


Does instancing work with boolean modifier? I am looking at trying to create a flexible system that allows me to place hole patterns on part I am making. Basically it is a riot shield and I want  a hole pattern on it.
I am trying to use instancing to create the hole pattern but it does not do anything. So I have a plane called shield1. I have another plane with subdiv modifier called holes1. I have a small cylinder parented to holes called cyl1. Holes1 has instancing set to vertices. When I try to add boolean modifier to shield1 using the instanced holes1 nothing happens.
So does instancing even work with booleans or modifiers?
example .blend file:
https://www93.zippyshare.com/v/1eSm1urQ/file.html

If you don't mind a destructive approach you can convert all instances in real objects and use them in the boolean.
With the instance object selected Ctrl+A>Make Instances Real to convert all instances in actual objects, Shift+Select an Object to make an active, Ctrl+J to turn all instances in one object and use this as the boolean object.


How to put a Linear Workflow in practice with Cycles Most of you probably/hopefully heard of the Linear Workflow before. I've been doing a lot of research lately in regard to this topic and I am happy to say that I think I finally understood the theory of it. But my problem is that I am not really sure how to make use of it in practice now.

This is an image that shows the difference between linear and non-linear workflow:

Images from greyscalegorilla.com

To sum all this up, linear workflow helps you to get better and more realistic render results.

What I want to know is, how do I work in Blender with this technique? I read about Gamma Correcting my image textures before importing them into Blender.

Is it necessary to do that in Photoshop or can I simply add a gamma correction in the Node Editor? And, when do I add the final Gamma adjustment to my render, in post processing? It's just not clear to me at this point.

Here are some resources about the issue:

http://www.loramel.net/blender_minutes/2009/01/linear-workflow-in-blender/
http://greyscalegorilla.com/blog/tutorials/what-is-linear-workflow-and-how-can-it-help-your-renders-look-better/
http://www.pixsim.co.uk/downloads/The_Beginners_Explanation_of_Gamma_Correction_and_Linear_Workflow.pdf

By default, Blender is a scene referred radiometrically linear reference space model.

This means that, when Cycles is selected as the renderer, values are radiometrically linear ratios that extend from zero to infinity.

The subject of color, color management, scene and display referred, and other such topics is immensely vast, far too vast for a simple answer here.

The short answer to your query however, is that Cycles is already a scene referred renderer, and no special effort is required to enable this aspect. More specifically, if you load an sRGB display referred image as a texture, it will be automatically linearized to display linear. While not scene linear, this permits textures to behave within a scene referred system.

Upon loading images in common formats such as JPEG, TIFF, PNG, etc. you should not adjust your image nor adjust your output. The linearization happens at the architectural level, and is correctly formatted for output.

To fully harness a scene referred model though, one should begin to round out their knowledge of color. A wonderful entry point might be the Visual Effects Society paper written by Jeremy Selan titled Cinematic Color: From Your Monitor to the Big Screen.