A person who designs type calls the width of the individual bits of a character design a "stroke". I know of two ways to deal with the problem you are trying to solve, that is changing the width of the stroke. The first is to use a different font. If you are wanting the general shape of the characters of the font with a different width stroke, you can sometimes find a different font designed like that from the outset. There are different words used as modifiers to font names to indicate variations from standard font design. The words "light" and "medium" are two of the terms used in a font name to indicate the font has the same sized characters with a thinner stroke, and these terms are sometimes modified further by "ultra" or "extra". On the opposite end of the spectrum, the words "heavy" and "bold" are used to denote fonts where the characters are the same size, but have thicker strokes. While it is not germane to the question originally posed, for sake of completeness of the answer, "light", "medium", "heavy" and "bold" refer to the width of the stroke, and the width of the overall character itself is generally relatively constant. There are fonts where the stroke size is relatively unchanged, but the overall width of the character is changed. When the width is smaller, the word "condensed" is used, and when the width is larger, the word "extended" is used, and "ultra" or "extra" may be applied to these as well. So "Helvetica light" is a font with narrower stroke sizes in the character; "Helvetica extra bold extended" is a font with wider characters, and a wider stroke. It should be noted that in use of type, the overall height, as measured from the bottom of a descender (like lower case p, j, q, or y) to the top of an ascender (like lower case l, b, and d") is more or less constant across all fonts, although certain dimensions within the font, such as "x height" may a vary from one font to the next.

So, if you want a font with a narrower stroke, the best bet is to determine this in advance, and obtain a light version of the font you wish to use, if it is available. That would be my default choice.

But, if for some reason I wanted to change the stroke width of a character, the way I would proceed is to do each character by subsections. In the case of the "e", what I would do first is to select all of the vertices forming the inside of the curve of the character, and with setting the pivot point at "median", scale these vertices outward by the desired amount. Next, I would select the vertices forming the top of the bar of the e, and instead of scaling the bar, I would move the upper part of the cross bar so that the bar is proportional to the relationship between the bar and the circular part of the letter before you started changing it. Assuming that you are using the Text facility in Blender, if the changes you want to make will result in a different overall height of the font, I would achieve this by changing the font size using the "size" entry bar in the Font panel of the Font object data editor of the Properties editor.

Note that in nearly all fonts, the horizontal bits of the font, like the crossbar of the e, the cross of the t, &c. are uniform, but vertical and diagonal strokes making up characters are not uniform; The upper case "M" "W" and "X" almost always have two different widths of strokes. This difference in stroke widths forms an essential part of the identity of the font, so the "X" may need to be done in two steps.


I'm having trouble getting my texture paint to show up in render/material preview

At the material preview the things get really brighter and the colors that you used are shades of white. I think your problem is because of this.


How to align pivot points with pivot points of different objects

You can use 3D cursor to set your object origin.

Select your desired object, shifts to set cursor to selected.

Select back your object, search set origin (or menu > object > set origin). Origin to 3D Cursor


Can i duplicate this Hallway then join it on end of current hall at a 45deg angle as a continuous (short video of render in post)?

Here's a way you could do it.

Duplicate the hallway, select the duplicate, go into edit mode, select this face:

and then press A to select all faces. This is now the active face.

Change your snap settings to Vertex and make sure Active and Move are selected.

Press G and then X or Y depending on how the hallway is aligned, then either press CTRL if snapping is disabled or enable snapping with shift+tab. Drag the duplicate hallway until it snaps to the original hallway.

Press 2 to go into edge select mode, select the edge pictured below, and press shift+s, the choose Cursor to Selected.

Change your pivot point to 3D Cursor.

Change snapping back to increment and rotate the duplicate hallway around Z by 45 or 90 or whatever degrees.

Now you have lots of options. Here are two. In object mode select both hallways and then go into edit mode. Select the inner edge loops of the hallways and select Bridge Edge Loops from the right-click menu or from the Edge menu dropdown. Do the same for the outer loops.

Alternatively, you could use the spin tool.

You could add additional offsets to the hallways to make the curve more gradual, or whatever.


Importing the FBX

Use File>Import>.fbx to open hen_bin.fbx
Select the mesh and enter Edit mode.
Go to UV/Image editor and click on the little photo icon to the right of the word "Image". The icon will say "Browse Image to be linked" when you hover over it.
Choose the image from the list that appears "Map #1949".
Change your 3D view port to show textured materials (Alt + Z) and you should see your texture appear some what, but with blocky shading issues.
Finally, with your chicken selected, go to "Object Data" and turn OFF auto
smooth. It should look very nice.

Changing the camera view:
Have you tried fly mode?

Press NumPad 0 to look through the camera.
Press Shift + F to enter fly mode. You can look around with the mouse, and can fly around with WASD, QE, and speed up or slow down fly speed by scrolling up or scrolling down with the mouse.
When you find the view that you like, simply left click OR hit
Enter.
Your camera is set!

Rendering a Transparent PNG

In Render settings under "Shading", change "Alpha" from the default "Sky" to "Transparent".
Render
F3 to open save image dialogue
Save as PNG with RGBA (using panel buttons on the left)

Happy icon making!


bmesh.ops.scale how to scale vert selection relative to active edge, but not along the edge vector?

Intersect point with line.

Rather than use the bmesh scale operator, another technique using the method

mathutils.geometry.intersect_point_line(...)

  Takes a point and a line and returns a tuple with the closest point on
  the line and its distance from the first point of the line as a
  percentage of the length of the line.

To find the radial from each vertex to the axis of scale ie the active edge. For each vertex v in selection, find the closest point o to the line defined by the edge . Translate the vert along vector v.co - o
from the point o by a scale factor.

Quick code, the verts of the edge could be removed from the selection. Since they are on the line there will be no (except error tolerance) transformation anyway.

import bpy
import bmesh
from mathutils.geometry import intersect_point_line

context = bpy.context
ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)
scale_factor = 2
edge = bm.select_history.active
# if isinstance(edge, bmesh.types.BMEdge):
verts = [v for v in bm.verts if v.select]
for v in verts:
    o, pc = intersect_point_line(v.co, edge.verts[0].co, edge.verts[1].co)
    v.co = o + scale_factor * (v.co - o)

bmesh.update_edit_mesh(me)

Result of running on default cube, with active edge and its diagonally opposed edge selected


What seems to be different colors on some faces than on others is a function of the direction of the normals of the faces, and the location and energy level of the lamp(s). Faces where the normals of the faces are oriented so that you are looking at them head on in line with, or close to in line with the location of a lamp in the scene will have a more intense hue than faces that are oriented so that you seem to be looking at them on an oblique angle, or at a point that is distant from the line between the location of the lamp and the part of the image you are viewing.

To get a more uniform color on the material, you may need to either change the lamps, add additional lamps to the scene, or both. Depending upon the scene, you might want to change the default lamp to type "sun", change it's elevation ("z" axis value) to something larger, perhaps 500 or 1000 Blender units, and change the energy to a higher value, too. Start, perhaps, with and energy of 250.


The first thing that comes to mind is that Blender might get bogged down by the number of steps you have performed which it stores in RAM, in order for you to Undo your actions.
The default value for this is 32 steps, and you can change this in your Preferences:

As you can see, you can also set a memory limit to these steps.
There is no paid or pro version of Blender. There is no bad programming to pester people who don't pay for this software, there is no planned obsolescence - it's free and open source.


Hi there, I checked your file and you had a few weird things going on... In order of importance.

You had too many emission objects with different values, the problem here is that some meshes are very small and have a high emission value (strength).

I fixed it and replaced all emission materials with only 2, one for the houses and the other for the electricity rays. I think i screwed up your animation there :(

also the world background was only contributing noise to the scene because of the texture you applied to it, and the background was basically black so I just removed the texture and made it all black and saved some render time.

Other than that the scene looks fine.

Some optimizations I made...
Organized your scene since It has a lot of objects. using "3D view:Layer Management" comes with blender, just turn it on.

I also used Branch Path Tracing and saved a ton of time rendering.

I noticed you have a crazy high resolution at 60 fps if you are going to render an animation just double check the settings and make sure that's what you really want, if you are using a GPU to render change the tile size back to 256, if you are using a CPU keep it at 32... that's the size I used to render your image.

Good luck with your project!

https://drive.google.com/file/d/0B7Is78yvd9nWa2wtVHVaT21Hb28/view?usp=sharing


Blender outliner what are the differences between the little green men?

The green man icon with the square indicates (and when clicked accesses editing of) the skeleton, rig, or Armature. It is about the number of Bones in the Armature, their relationship to each other, and their base position and rotation. (So even though it is the armature icon, an armature has a base pose, because it cannot not have one.)
The green man icon that kinda looks like its running indicates (and when clicked accesses editing of) the Pose, or poses (That means poses that are different from the base pose of the Armature).
When you click on the pose icon, edit a pose (for instance move an arm up), and then click the armature icon, you should see (and be able to edit) the armature (in its base pose, with the example arm back in its base position, like it hasn't been moved).
But if you then click on the pose icon again, you should see the edited pose (with the arm moved up) again.
I have come across situations though, where editing the Armature resulted in loss of the pose (at the current frame). But you can save your pose by either adding a keyframe for the bones in the Armature, or save the bone position and rotation in the Pose Library.
I advice the latter; then you can always keyframe them later if needed.
Select your armature, go to Pose Mode. Then Properties > Object Data Properties > Pose Library > New. Then select the Bones for which you want the position an rotation saved (or simply select all of them) and click Add Pose (the little Plus icon). Now you can reload the pose by clicking Apply Pose (the little magnifying glass icon).


update text after edit mesh with handlers

The error NameError: name 'self' is not defined is pretty self explanatory, you are using self as a variable name and it has not been defined at the point you are using it. self is a variable name normally only used within a class definition while you are trying to use it in a module function.

self is normally defined to point to the object that the current function belongs to. In the context that you are trying to use it, it will be the first argument sent to the callback function, meaning it should point to the object that will be handling the callback.

I think to achieve what you want, try adding a variable to the scene object that holds a list of data that draw_text_callback draws (See the example for CollectionProperty), your update_scene maintains the list and draw_text_callback goes through it to draw what it needs to.

The second error is because you can't add another parameter to the function used for scene_update_post as it must match the single argument prototype that is defined to be used.


A convenient way to do this doesn't seem to be available. But you can lock the camera to the view and then change the camera's position.

Press Num0 to view the scene from the active camera
(optional) Press Home to maximize the camera region in the viewport
In the 3D View's properties shelf select View > Lock Camera to View

Zooming with the mouse does not change the camera's focal length but its position. You should be able manually change the “zoom level” by scaling the camera towards / from the object that you're looking at.

As far as I can tell the camera scale is not considered for the values of Depth of Field, but as a precaution one can enable transformation lock for the scale value of the camera.


the outliner does show it, and it corresponds with bpy.context.scene.active_layer


Is there a way to display a multi-lines message in panel / popup?

Example using an UIList based on the answer of Create an interface which is similar to the material list box? and my modification for Displaying text inside an addon Panel to get some kind of log window as part of a popup. I've removed all superfluous operators and added a CUSTOM_OT_popup operator calling invoke_props_dialog in its invoke method as well as a check method for proper drawing:

# ##### 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 #####

bl_info = {
    "name": "log-uilist-dev",
    "description": "",
    "author": "p2or, brockmann",
    "version": (0, 1),
    "blender": (2, 80, 0),
    "location": "Text Editor",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development"
}

import bpy

from bpy.props import (IntProperty,
                       BoolProperty,
                       StringProperty,
                       EnumProperty,
                       CollectionProperty)

from bpy.types import (Operator,
                       Panel,
                       PropertyGroup,
                       UIList)

# -------------------------------------------------------------------
#   Operators
# -------------------------------------------------------------------

class CUSTOM_OT_actions(Operator):
    """Move items up and down, add and remove"""
    bl_idname = "custom.list_action"
    bl_label = "List Actions"
    bl_description = "Move items up and down, add and remove"
    bl_options = {'REGISTER'}

    action: EnumProperty(
        items=(
            ('UP', "Up", ""),
            ('DOWN', "Down", ""),
            ('REMOVE', "Remove", ""),
            ('ADD', "Add", "")))

    list_item: StringProperty()

    def invoke(self, context, event):
        scn = context.scene
        idx = scn.custom_index

        try:
            item = scn.custom[idx]
        except IndexError:
            pass
        else:
            if self.action == 'DOWN' and idx < len(scn.custom) - 1:
                item_next = scn.custom[idx+1].name
                scn.custom.move(idx, idx+1)
                scn.custom_index += 1
                info = 'Item "%s" moved to position %d' % (item.name, scn.custom_index + 1)
                self.report({'INFO'}, info)

            elif self.action == 'UP' and idx >= 1:
                item_prev = scn.custom[idx-1].name
                scn.custom.move(idx, idx-1)
                scn.custom_index -= 1
                info = 'Item "%s" moved to position %d' % (item.name, scn.custom_index + 1)
                self.report({'INFO'}, info)

            elif self.action == 'REMOVE':
                info = 'Item "%s" removed from list' % (scn.custom[idx].name)
                scn.custom_index -= 1
                scn.custom.remove(idx)
                self.report({'INFO'}, info)

        if self.action == 'ADD':
            if self.list_item:
                item = scn.custom.add()
                item.name = self.list_item
                item.coll_id = len(scn.custom)
                scn.custom_index = len(scn.custom)-1
                info = '"%s" added to list' % (item.name)
                self.report({'INFO'}, info)

        return {"FINISHED"}

class CUSTOM_OT_clearList(Operator):
    """Clear all items of the list"""
    bl_idname = "custom.clear_list"
    bl_label = "Clear List"
    bl_description = "Clear all items of the list"
    bl_options = {'INTERNAL'}

    @classmethod
    def poll(cls, context):
        return bool(context.scene.custom)

    def invoke(self, context, event):
        return context.window_manager.invoke_confirm(self, event)

    def execute(self, context):
        if bool(context.scene.custom):
            context.scene.custom.clear()
            self.report({'INFO'}, "All items removed")
        else:
            self.report({'INFO'}, "Nothing to remove")
        return{'FINISHED'}

# -------------------------------------------------------------------
#   Drawing
# -------------------------------------------------------------------

class CUSTOM_UL_items(UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
        split = layout.split(factor=0.2)
        split.label(text="%d" % (index))
        #split.prop(item, "name", text="", emboss=False, translate=False, icon=custom_icon)
        split.label(text=item.name) # avoids renaming the item by accident

    def invoke(self, context, event):
        pass

class CUSTOM_OT_popup(Operator):
    bl_idname = "custom.call_popup"
    bl_label = "Log Window"
    bl_options = {'REGISTER'}

    @classmethod
    def poll(cls, context):
        return True

    def execute(self, context):
        return {'FINISHED'}

    def check(self, context):
        return True

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

    def draw(self, context):
        layout = self.layout
        scn = bpy.context.scene

        rows = 7
        row = layout.row()
        row.template_list("CUSTOM_UL_items", "", scn, "custom", scn, "custom_index", rows=rows)

        row = layout.row()
        add = row.operator(CUSTOM_OT_actions.bl_idname, icon="ADD", text="Add Log Line")
        add.list_item = "Error %d" % (len(scn.custom))
        add.action = 'ADD'

        row = layout.row().operator("custom.clear_list", icon="X")
        row = layout.row()

# -------------------------------------------------------------------
#   Collection
# -------------------------------------------------------------------

class CUSTOM_objectCollection(PropertyGroup):
    #name: StringProperty() -> Instantiated by default
    coll_type: StringProperty()
    coll_id: IntProperty()

# -------------------------------------------------------------------
#   Register & Unregister
# -------------------------------------------------------------------

classes = (
    CUSTOM_OT_actions,
    CUSTOM_OT_clearList,
    CUSTOM_UL_items,
    CUSTOM_objectCollection,
    CUSTOM_OT_popup
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    # Custom scene properties
    bpy.types.Scene.custom = CollectionProperty(type=CUSTOM_objectCollection)
    bpy.types.Scene.custom_index = IntProperty()

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)

    del bpy.types.Scene.custom
    del bpy.types.Scene.custom_index

if __name__ == "__main__":
    register()

Note: the naming of the classes and variables might be off a little.


Having problems baking normal texture for large object

Turns out it was just running out of RAM (and it's a lot more than 500k tris, maybe 50m tris). I decimated the whole thing, which took a long time, and then I could bake -- just barely.


How can I make a plane always look at camera?

I think I know what you're talking about (cause I'm a huge fan of these kind of oldschool 3d-imitating games :)). You may use a Damped Track constraint.

Select the plane, go to Constraints header, select a Damped Track constraint and set the Camera as a Target. Then select an axis you want a plane to lie on.

If you move the plane in any direction it'll always face the camera. Remember that you may also decrease the Influence of this constraint for different results.


Is OpenCL possible within Blender either via cycles or internal?

Blender Internal
BI never had any kind of GPU rendering support, and as development on BI has stopped, probably never will.
Cycles
Cycles only supports cuda at the moment, due to issues with amd/ati drivers. (also see the wiki)
However, there are some experimental tests using the "leaked beta version of what might be AMD's next official drivers" which you may want to try.


This gave me a hint:
How to scale two objects to fit together

Widdle Blender needs an additional help by giving it an "active" vertex (selected faces to vertex selection, shiftselect 2x one of the edge vertices) and then scale with snap set to active.
For some reasons the simple snap: closest does not work...


What shaders are used in the example below to achieve the same effect?

The simple shading can be achieved with "Toon BSDF" for the material and the "Freestyle" mode in the scene settings.


How Do i add colour to this image texture?

i think you can do it like in this example. your uv maps must be wrong unwrapped tho.


check whether `trace()` collide a face at back or front side?

This is really @cppBeginner's answer to his own post.. (see commentary on OP).
The backfacing() function can be called on the implicit shading point in an OSL script, but is not available as an attribute returned in a message from a script-cast ray.
But many mesh and object attributes can be returned by OSL's trace(). See getmessage ("trace", ...) in the OSL specification.. this page of Blender source might help with types, etc.. (but that's only a grep, I don't strictly know how it ties in. Maybe someone can edit to flesh that out.)
These attributes include geom:trianglevertices,  which is an array of three 3D points: the coordinates in World space of the corners of the render-triangle containing the shading point. They appear to be in order, so the cross-product of two edges can be taken to find the direction of the triangle's normal, as defined by the mesh.
#include "stdosl.h"
shader Hit_Backfacing
(
    vector RayDir = vector(0.0),
    output int Hit = 0,
    output int Hit_Backfacing = 0
){
    if (trace(P,rayDir)){

        Hit = 1;
        vector triNormal = vector(0.0);
        point  triVerts[3];

        getmessage("trace","geom:trianglevertices",triVerts);
        triNormal = cross(triVerts[1]-triVerts[0],triVerts[2]-triVerts[0]);

        Hit_Backfacing = dot(triNormal,rayDir) > 0;
    }
}

In this example, the sign of dot-product of that normal and the cast ray direction tells us whether the triangle we hit faces us, or not...

The large plane carries the illustrated material.


I can't see a point in which to connect my nodes (Solved, wrong node)

"Cool, thanks. Yeah, it's the wrong node type so just put down a math node instead of a value node. – brockmann Jan 24 at 11:49 "


Install this addon

After installation you can find this addon in toolshelf -> tools -> multi object editing

How to use

Go to toolshelf -> tools -> multi object editing and Click on Enable Multi Edit mode

Select the objects that you need to edit same time.

Now go to toolshelf -> tools -> multi object editing and select Multiedit enter as soon as you click your are in edit mode and now you can edit the mesh which you have selected before.

After editing Press Tab to be in object mode. When you click the objects look join to separate them.

Go to toolshelf -> tools -> multi object editing and select Multiedit exit


Can someone explain why my models hips are doing this after subsurf modifier?

Looks like you have some extra geometry in the hip area. Try using Remove Doubles or fixing it manually.


Texturing the sides of a cube (without UV mapping) only appearing correctly in Rendered View?

I am not optimistic that there is a way to "solve" this without using UV maps.

If it is any encouragement, understand that many people before you have converted minecraft data into 3D data sets:  http://www.purplefrog.com/~thoth/minecraft-webgl/two.html ; and they used UVs.

I can't remember why I wrote this, but it is python code that makes up a UV map based on the position of the vertices relative to whichever of the XY, YZ, or XZ planes they are most aligned with.

Here's a copy inline:

import bpy
import bmesh
from math import *
from mathutils import *

def set_uvs_for_face(bm, fi, uv_layer):
    face = bm.faces[fi]
    normal = face.normal
    dx=abs(normal[0])
    dy=abs(normal[1])
    dz=abs(normal[2])

    if (dz > dx):
        u = Vector([1,0,0])
        if (dz>dy):
            v = Vector([0,1,0])
        else:
            v = Vector([0,0,1])
    else:
        v = Vector([0,0,1])
        if dx>dy:
            u = Vector([0,1,0])
        else:
            u = Vector([1,0,0])
    for i in range(len(face.loops)):
        l = face.loops[i]
        l[uv_layer].uv = [ u.dot(l.vert.co),
                           v.dot(l.vert.co)]

def set_uvs(mesh, name=None):

    if name is None:
        if 0<len(mesh.uv_textures):
            uv = mesh.uv_textures[0]
        else:
            uv = mesh.uv_textures.new("cubic")
    else:
        uv = mesh.uv_textures.get(name)
        if uv is None:
            uv = mesh.uv_textures.new(name)

    bm = bmesh.new()
    bm.from_mesh(mesh)

    uv_layer = bm.loops.layers.uv[uv.name]

    for fi in range(len(bm.faces)):
        set_uvs_for_face(bm, fi, uv_layer)

    bm.to_mesh(mesh)

#
#
#

mode = bpy.context.mode
if 'OBJECT' != mode:
    bpy.ops.object.mode_set(mode='OBJECT')

obj = bpy.context.active_object
set_uvs(obj.data)

if 'OBJECT' != mode:
    bpy.ops.object.mode_set(mode = mode)


More than one playaction() in same BGE script

You can run actions simultaneously by setting them on different layers.

However, playing the same action will result in weird overlapping issues.  For example, when the loop starts at frame 30, it will inherit the positions etc set in the previous frames.  The first action will appear to do nothing.

You'll want to use separate actions and different layers.

obj.playAction('name_of_first_action', 0, 20, layer=0, play_mode=bge.logic.KX_ACTION_MODE_PLAY)
obj.playAction('name_of_other_action', 30, 42, layer=1, play_mode=bge.logic.KX_ACTION_MODE_LOOP)

And if you need to stop it later:

obj.stopAction(layer=1)


Adding objects to an animation/0 sized object is still being rendered

To be clear I have searched for an answer for a while. And I have found out that there are quite a lot of solutions to this. Of these, however, 3 options are used the most. Here they are:
#1 Moving the object out of the camera field view (in a single frame).
This is probably the most easy solution of these 3. All you have to do is insert a keyframe where the desired object is in the camera field. Then just move on to the next frame, change the position of the object, so that it is no longer visible in the view of the camera. And on the end just add another keyframe. Voila! Here is the effect of removing/adding objects to the scene. I chose to go with this solution.

#2 Hiding the object in viewport (in a single frame).
The solution that is being used also really often. This option uses Hide in viewport option, which is available in Scene Collection. Basically add new keyframe, switch to the next frame in your animation timeline. Toggle visibility of the object off and add another keyframe. That's it.

#3 Changing material/texture during animation (in a single frame).
It works pretty much same like all the options listed above. The only difference is that you do not change location or visibility of the object, but you change material/texture of it.


How can I merge objects while maintaining the materials in Sverchok?

We have not such node yet, and object in function. because was no needs.
Simple per polygon approach is here:
https://gist.github.com/81d278ada5a769c91d0a1fe9351dc53f
But in your particular case we can add index to shift materials, not universal solution:
https://gist.github.com/21a427f325312daa5086e635505430cf


In case of mesh already bent, whose volume should be preserved, it can be too complicated to use Lattice modifier. Lattice can be edited with using Curve Modifier, but the last one may not be applied to it. And the results in this case will be rather unpredictable and bad looking (for example).

You could edit Lattice by yourself in Edit mode, but why ? A good reason not to do that is that you won't be able to use provided curve as a desired shape.

A workaround is to create rig for the mesh.
You add armature, extrude it (I began from right to left). Then you parent mesh to armature (with Automatic weights will suit your needs) and grab / rotate bones as you'd like:

I used curve as a reference according to which I edited the bones:

Download file here.


Straighten loop edges on a rounded object

You can use the Knife Project tool, to cut a new edge loop.
It will perfectly follow the object's curvature.

Add a plane and position it where you want the cut
Select the plane first and then your object
Go to edit mode and use Knife Project with Cut Through checked.

Note: The cut depends on your current view - front/side orthographic works best.

As Robin Betts kindly pointed out, it's better to put the cutting geometry outside of the object, which allows to cut multiple edges at once.

Projector parallel to viewing plane...

Here, a grid with its faces (only) deleted

.. so multiple edges cut simultaneously.


Emissive material not visible through glass on Eevee?

I've found glass shaders to be not so useful in EEVEE, so I save them for Cycles if I need them. Instead, try using a node arrangement such as this. I tinted the glass green to show that it's actually tinted, and I put a light bulb (on the front side) to show it's actually glass (reflective AND transparent). Pay attention to the blend modes on the right.

Hope this helps.


Why are bones not connected both in rest and pose position?

Actually, when you are in Pose mode, the Rest Position put the bones at the same positions as in Edit mode. If you switch back to Pose Position you'll let all the Bone Constraints (and perhaps keyframes) act on your bones.

In your case, why, in Pose Position, is the calf bone in another position than in Edit mode (or Rest Position)? Because it has an IK Constraint and you can see the influence of this constraint, it will make the bone stick to its target, which is called "leg_ik.l".

So if you don't want your basic Pose mode to be this one, you need to stick your "leg_ik.l" to the tail of the calf (but in the process it will move some other bones so you will have to bring other corrections).


Adding an image in the image editor through python

Color is a parameter of bpy.ops.image.new():

bpy.ops.image.new(name="Untitled", width=1024, height=1024, color=(0.0, 0.0, 0.0, 1.0), alpha=True, generated_type='BLANK', float=False, gen_context='NONE', use_stereo_3d=False)

bpy.ops.image.new in API


Imported video's audio has different play time when watching in vlc

Okay so I finally figured it out!

I thought this would have only mattered if the recorded video was defined as a variable frame rate video, and things were broken even after explicitly converting it to a constant 30fps.  But lo and behold, I changed that setting to AV-Sync and everything works beautifully!

Hope this helps anyone else looking for the answer to this problem.


Maybe you should try to rig with the Stretch To constraint, I give here an explanation for an arm (method #2), it's exactly the same for your pen case, except you'll need several bones all around the object. Also you may want more than 2 segments if the deformation is more complicated:

You may also want to try Spline IK but it's a bit tedious, so if Stretch To works fine, then use it.


Solved, I started a new file, appended the High res, Low res and the cage objects, and it worked as it should be, I don't know why this happened though.


This answer is about selecting the leaves.

Select and hide  H  the icosphere and the wood (tree without the leaves).

Now select all the leaves  A  and give them a material.

In Relations Tab click in Object Data >> Link Data.

Now you can select all the leaves by its material.

See the image below.


It's a grease pencil layer. You can delete it in the Properties Panel (press N in 3D View to open/close). Select the Armature and click on the "x".


How to Pack/Place Lipids in Blender using Python script?

An animation of the lipid molecules can be generated using the rigid body collisions.

The steps to reproduce this animation are:

Use the particle system to place the molecules initially.

Add a flat surface to place the molecules on.

Use the particle system to place the molecules on the surface in a regular grid. Using a regular grid will prevent the molecules from intersecting each other.

Setup the display to use the lipid geometry for rendering.

Convert the particle system into individual objects.

Press the convert button for the particle system modifier.

Convert the lipid molecules into rigid bodies.

Select the first lipid molecule in the scene.
Add the rigid body physics to the object.

Select all lipid objects.
Deselect, then select the first lipid molecule again.
In the left hand panel of the 3D viewer, select the Physics tab, and click on 'Copy from Active'. This will copy the physics setting to all of the lipid molecules.

Add a mesh to act as a container for all of the lipid molecules.

Add geometry. The geometry should be larger than the initial placement of the lipids. The height of the container should be slightly larger than the height of the lipids. The top and bottom of the container will help keep the lipids from moving up or down.

Set the container as an animated rigid body. So the interior of the container keeps the lipids in place, the 'Shape' needs to be set to 'Mesh'.

Change the direction of gravity to point towards one of the container walls. This cause all of the lipids to pack in a horizontal direction.

Animate the container with noise. This will make the molecules randomly move about.

Insert a keyframe at the start of the timeline.

Modify the animation graphs with noise. This will cause the walls of the container to move around and bounce into the lipids. This will cause the lipids to bounce around during the animation.

Animate the result!

The finished blend file is located at blend-exchange file


What do the new popover "Normals" in 2.80 do? How to use it?

It seems normals can be set with tools like Set From Faces, Average Normals, Point Normals to Target or Smoothen, but Set Strength or Face Select in the Mesh->Normals menu does not work at all unless Weighted Normal Modifier is added and Face Influence in it is enabled. Those Face Strength settings are the same as in Properties Editor's Active Tool and Workspace tab and they are for Set Strength in Mesh->Normals menu:

Keeping in mind how absolutely ridiculous and unnecessarily complex this functionality is, I would be surprised if it makes it into 2.80 release as it is now. Hopefully it will change to something a lot more logical.


Create a profile with a Bezier Curve.In Object Mode > SHIFT + "A"> Curve > Bezier.

Then in the Object Panel > Convert to Mesh from Curve *(Need to be in Object Mode).

Tab into Edit Mode select all of the vertices by pressing "A" then extrude by pressing "E" and then the letter of the axis you want to extrude in. For me it was "X" "Z".

Place your cursor here and press ALT +"R". You can adjust the angle Before you do anything else.

Repeat for the bottom changing the angle to a negative value.

I believe in real life those are tapered. Select the top ring of vertices and go into Proportional Edit Mode and scale to taste. I used Linear Falloff.


Simple Deform animation isn't playing when exported as FBX

The FBX file format does not support deformations.  You will need to find a different way to export that data.


How exactly does Blender perform a simple deformation?

By following the file history I can find that it was originally developed in the soc-2008-jaguarandi branch. The original documentation for it is here but I don't see any explanation of the algorithm used and there are no comments on papers used.

If you could find a copy of the gsoc application it may have a description of the algorithm.

It's also possible that you could contact jaguarandi who may still remember how it works.


The main difference is that annotations are meant to be notes, or sketches for reference only. There is no way to render them and cannot be animated.
Grease pencil objects are renderable, and can be animated. They are designed as a "hand drawn" animation tool in a 3D environment.


How can I make a hole in a hole in a hole?

Add a UV Sphere SHFT+A > UV Sphere with 48 Segments and 32 Rings.

TAB into Edit Mode and select 97 verticies on the top and press X to delete them.

Select one vertex on the side and press X to delete it.

Select the vertices that make up the edge of the newly created hole and press SHFT + ALT + S and drag the mouse to round them.

EDIT: I noticed that after add a SubSurf Modifier when I was finished that there was some puckering around the hole on the side. In order to fix this with the newly rounded still selected press E + SHIFT + X and Extrude in just slightly.

Add a default Torus by pressing A > Torus. Scale it down by pressing S.

Select a vertex on the side of the Torus and press X to delete it.

Select the vertices that make up the edge of the newly created hole in the Torus and press SHFT + ALT + S and drag the mouse to round them.

Add the hole in the Sphere to the selection and press Space Bar type in "Bridge" and select "Bridge Edge Loops.

Press 1 to go into Front View and delete the vretices on the left half and on the bottom half.

Add a Mirror Modifier check the box next to "Clipping" And Z

Select the vertices that make up the edge of the hole at the top of the Sphere and press E + Z to Extrud them down on the z axis.

With some Loop Cuts in the shafts and some Proportional Editing and a  Subsurf Modifier and Smooth Shading.


What is the best way to import images as texture, then render out at original size?

I don't think there is a better way than your method, there is no direct relation between pixels and blender units, and the rendering process will always compute new values from the texture's pixel data and adjust depending on the camera's view angle.

If you know what the label's print dimensions are ,you can set the DPI of the  image in the addon's import options, which is great since it also preserves the aspect ratio.

If you want to load the image in the UV directly with the correct aspect ratios ,just set the display aspect ratio to the image dimensions , there is also a visual tool to check which faces are being stretched, but none to check up/down scaling sadly.


Linking external data back to the blender file after moving

You could pack the Blender file before giving it away.  Packing basically copies all the external files which the .blend file refers into into the .blend itself.  To pack external files go to file > external data > pack all into .blend.


With fluid sim it is important to ensure your settings reflect the desired physical properties - in particular the Time and the Real World Size - in order to get convincing behaviour from the fluid.

Assuming you’re rendering 250 frames at 25 frames per second you should set End time to 10 (10 seconds for the whole simulation).

Also, it appears that your mesh is some kind of large scale water conduit but your Real World Scale is only 0.5 metres - set it to something more applicable for the scale of your simulation (it defines the real world dimension of the longest dimension of your domain).

Once you have this set you may also need to re-adjust the rate of flow from your Inflow to match the new scales.

The Time and Size setting will affect properties such as effect of gravity, surface tension/viscosity, friction, etc. Which will affect the behaviour of the fluid.


The fact that I used the mouse coordinates which have not been correctly calculated depth. I solved this problem with the help of rey cast . I take instead of the mouse, position the cursor of the blender

import bpy
import bmesh
import bgl
import blf
from bpy.types import Operator
from bpy_extras import view3d_utils
from mathutils import Vector, Matrix, kdtree

def main(context, event):
    """Run this function on left mouse, execute the ray cast"""
    # get the context arguments
    scene = context.scene
    region = context.region
    rv3d = context.region_data
    coord = event.mouse_region_x, event.mouse_region_y

    # get the ray from the viewport and mouse
    view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
    ray_origin = view3d_utils.region_2d_to_origin_3d(region, rv3d, coord)

    ray_target = ray_origin + view_vector

    def visible_objects_and_duplis():
        """Loop over (object, matrix) pairs (mesh only)"""

        for obj in context.visible_objects:
            if obj.type == 'MESH':
                yield (obj, obj.matrix_world.copy())

            if obj.dupli_type != 'NONE':
                obj.dupli_list_create(scene)
                for dob in obj.dupli_list:
                    obj_dupli = dob.object
                    if obj_dupli.type == 'MESH':
                        yield (obj_dupli, dob.matrix.copy())

            obj.dupli_list_clear()

    def obj_ray_cast(obj, matrix):
        """Wrapper for ray casting that moves the ray into object space"""

        # get the ray relative to the object
        matrix_inv = matrix.inverted()
        ray_origin_obj = matrix_inv * ray_origin
        ray_target_obj = matrix_inv * ray_target
        ray_direction_obj = ray_target_obj - ray_origin_obj

        # cast the ray
        success, location, normal, face_index = obj.ray_cast(ray_origin_obj, ray_direction_obj)

        if success:
            return location, normal, face_index
        else:
            return None, None, None

    def KD(face_index):
        # self.me = context.active_object.data
        me = context.active_object.data
        #bm = bmesh.new()
        # bm = bmesh.from_mesh(me)

        bm.from_mesh(me)
        bm.faces.ensure_lookup_table()
        print(face_index)
        print(len(bm.faces[face_index].verts))
        size = len(bm.faces[face_index].verts)
        bm.faces.ensure_lookup_table()
        kd = kdtree.KDTree(size)

        for i, vtx in enumerate(bm.faces[face_index].verts):
            kd.insert(vtx.co, i)
        kd.balance()

        loc = context.scene.cursor_location

        print(loc)

        dist = kd.find_range(loc, 1)
        print("Mouse Local = ", loc)
        # print("index = ", dist[0])
        for i in dist:
            for j in i:
                context.scene.cursor_location = j
                break
            break
        bm.free()

        return dist

    # cast rays and find the closest object
    best_length_squared = -1.0
    best_obj = None

    for obj, matrix in visible_objects_and_duplis():
        if obj.type == 'MESH':
            hit, normal, face_index = obj_ray_cast(obj, matrix)
            if hit is not None:
                hit_world = matrix * hit
                scene.cursor_location = hit_world
                length_squared = (hit_world - ray_origin).length_squared
                if best_obj is None or length_squared < best_length_squared:
                    best_length_squared = length_squared
                    best_obj = obj

                # now we have the object under the mouse cursor,
                # we could do lots of stuff but for the example just select.
    a = KD(face_index)
    if best_obj is not None:
        best_obj.select = True
        context.scene.objects.active = best_obj

class ViewOperatorRayCast(bpy.types.Operator):
    """Modal object selection with a ray cast"""
    bl_idname = "view3d.modal_operator_raycast"
    bl_label = "RayCast View Operator"

    def modal(self, context, event):
        if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:
            # allow navigation
            return {'PASS_THROUGH'}
        elif event.type == 'LEFTMOUSE':
            main(context, event)
            return {'RUNNING_MODAL'}
        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.space_data.type == 'VIEW_3D':
            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "Active space must be a View3d")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()


Converting Matrices to translations and back changes geometry in Animation Nodes

A matrix represents a translation, a rotation and a scale.

When you create matrices on a circle, each will have a different translation and rotation. When you decompose the matrices and only use the translational part to create the new matrices, the rotation is lost in the process.

Instead of using the Translation Matrix node you could use the Compose Matrix node. This way you can use the rotations of the old matrices in the new ones as well.

If you just want to move every matrix a little bit, I recommend to use the Offset Matrices node instead of doing all those conversions yourself.


How to achieve a realistic display with bright colours?

The problem you have here is that the output from the Image Texture is connected to both the Base Color and the Emission inputs of the Principled shader node. The Emission will produce the effect of the glowing screen while the Base Color will also produce an image of the glowing screen - in addition to the Emission but based on any incident light. This means you are effectively including your 'screen' image twice - once for emission and again in response to any light hitting the surface - so it appears "too bright".
The solution here is to either just use an Emission shader node in place of the Principled shader (Principled is arguably overkill for this situation) or simply disconnect the Base Color and set it to black (or a suitably dark color) to represent the screen when it is 'off'.


I solved the issue by flattening all the faces and vertices of the side i wanted and i “mark sharped“ all the border edges


Bake mesh to plane results in flipped image

Seems like the uv shell of the plane is flipped. Try scaling the shell in the uv editor in -X.


Rigging, moving feet affects the main body

So have the feet be controlled by the armature and nothing else? To do that you would have to go to pose mode and right click + shift on the bones that are for the foot, and then right click on that foot. Then press ctrl + p to parent it and click on automatic weights. If you had a single bone for the foot, you could avoid weight paint altogether and just click bone instead of automatic weights. I am not very good at weight painting so not gonna talk about that.

Also, currently the feet are a single model I think? If you are using the mirror modifier like I think you are, then apply it and then go to edit mode with tab. Then press p and click by loose parts. this will separate the feet into separate models which you can then select once you have left edit mode. To make these easier to move, you should probably go to object - transform - origin to geometry from the little pop out menu near the bottom of the screen.


Okay, I found out the problem, It was too big so I needed to scale it down.


How to get the mouse position outside of the window on Modal Operator

The following script will check if the mouse is outside the 3d_view window, not Blender's window. It's not exactly what you asked for, but I hope it'll help:

def click_outside_3d_view(event):
    area, viewport = get_3d_area_region()
    return not (0 < event.mouse_region_x < viewport.width and 0 < event.mouse_region_y < viewport.height)

def get_3d_area_region():
    for window in bpy.context.window_manager.windows:
        for area in window.screen.areas:
            if area.type == 'VIEW_3D':
                for region in area.regions:
                    if region.type == 'WINDOW':
                        return area, region

***** Edit *****

I'm not completely sure, but it seems that the mouse_region_x/y are relative to the original region that the operator was running in.
The following code is more foolproof:

def click_inside_3d_view(event):
    for area in get_3d_areas():
        if 0 < event.mouse_x-area.x < area.width and 0 < event.mouse_y-area.y < area.height:
            return True
    return False

def get_3d_areas():
    for screen in bpy.data.screens:
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                yield area


Change multiple specific nodes in multiple materials (with python?)

Good news - that's relatively easy:

import bpy

sel = bpy.context.selected_objects

for obj in sel:
    try:
        for slots in obj.material_slots:
            for nodes in slots.material.node_tree.nodes:
                if nodes.type == 'EMISSION':
                    nodes.inputs[0].default_value = (1,0,0,1) # change RGBA if needd
                    nodes.inputs[1].default_value = 100 # change strength
                    #print(nodes.label) # for testing
    except:
        print('Something wrong with ' + obj.name) # Maybe an object not capable of having materials or empty slot

You can copy/paste this into a new text block int the Text Editor and hit Run Script with the objects that have the materials you want to modify selected.


Your eye mesh has a UVWarp modifier. I don't know how to fix your problem with the current image, but another way around is to rework this image so that you have enough margin of white.


rotation driver - skipping backwards after 90 degrees

Use a single property driver variable

Using the transform channel type of driver variable with Eulers makes it ripe for gimbal lock.

Could someone please explain gimbal lock?

If instead single property is used

The equivalent of

driven_needle.rotation_euler.x = driving_needle.rotation_euler.x / 10

it will work as expected, so 90 degrees becomes 9, 180 -> `18'  and so on.


Viewport shading hotkey? Wireframe toggle?

Answer as per users @Emir and @R-800:
Shift+Z to toggle Wireframe on and off, but it's just plain Z to bring up the pie menu.


I don't think Blender can do this directly. You could rotate the nut 45 degrees, switch Blender to local coordinates, and then move along one of those axes.


Going through each part of the question, one by one:

Post-processing and compositing are pretty much the same thing. Post processing is generally more color oriented, and compositing is a bit more VFX oriented (keying etc. ). But for all intents and purposes in blender, they are the same thing, and done at the same time, in the same place.
Yes, you can key frame nearly every single property value in the compositor, the key is just to choose the right ones when working with colors, or odd things can happen...
Yes, you'll do the compositing/post-pro last, You can do it all in blender, or use different software, like Adobe After effects, or the now 'free'* Fusion 7. For the color stuff (Post-Pro), you could use After Effects, Adobe Speed Grade, or DaVinci Resolve. Most of this software isn't cheap, which is why I recomend doing it in blender, which for the large part, has a fully capable feature set.

*Non commercial, with some non-key features removed, the full version costs about $1000


I did something and now my viewport is view is odd

You have enabled a Clipping Region (Shortcut Alt + B - easy to do by mistake). You can clear it by pressing Alt + B again.


Here is condensed heavily edited sample add-on an artist requested t use blender as the middleman to mass convert vertex colors data from custom data source, the latter being removed as its not related to the question.

The color value was selected using FloatVectorProperty, specifically with subtype COLOR. This also has the advantage that if exposed through the UI is visualised by the nice UI Color wheel/hex-widget.

The code is split into properties.py and ui.py as this is done for ease of maintainance and separation of concerns, ie storage and display. You can store the custom property anywhere you want I choose object as per the question, the same applies for where the ui appears.

You can also combine it into one script, just need to change registration from module to class and supply each class name.

I generally use a properties group when working with multiple properties, but you can just define a single custom property to attach.
properties.py

import bpy
from bpy.props import FloatVectorProperty, StringProperty, PointerProperty

class ObjectProperties(bpy.types.PropertyGroup):
    @classmethod
    def register(cls):

        bpy.types.Object.custom = PointerProperty(
            name="Custom properties",
            description="Custom Properties for Objects",
            type=cls,
            )

        #Add in the properties you want
        cls.hexwidget = FloatVectorProperty(name="Hex Value",
                                        subtype='COLOR',
                                        default=[0.0,0.0,0.0])

        cls.test_string = StringProperty(name="Test String",
                                        default="I am a string")

    @classmethod
    def unregister(cls):
        del bpy.types.Object.custom

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

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

This module has specific registration handling as we prefer to get rid of custom info if the addon is not install, design decision.

Here is the UI which will display the value stored in the defined property
ui.py

import bpy

class UtilityPanel(bpy.types.Panel):
    bl_label = "Utilites Panel"
    bl_idname = "OBJECT_PT_utilities"

    bl_space_type = "PROPERTIES"
    bl_region_type = "WINDOW"
    bl_context = "object"

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

        box = layout.box()
        row = box.row()
        row.prop(context.active_object.custom, "hexwidget")
        row = box.row()
        row.prop(context.active_object.custom, "test_string")

__init__.py for completeness

#--- ### Header
bl_info = {
    "name": "Custom Property: Color",
    "category": "Object",
}

import bpy
import bpy.props

from <folder_name> import ui, properties

def register():
    properties.register()
    bpy.utils.register_module(__name__)

def unregister():
    properties.unregister()
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

When enabled the add-on adds a custom propertygroup to each Object, which can be altered or expanded as you need.


Compositor Problems when working with alpha over and blur nodes

It's not a bug, it's the expected behaviour, what you need is to use the "Z combine node". In my example I've set layer 1 into render layer1 only, and L 2 into RL 2. As the blur increases the size of the icosphere, i've added a dilate/erode node on the Z channel of render layer 2.


First you need to fix your mesh a bit.
You have a lot of duplicate vertices. Go to edit mode, select all and then > M > By DIstance
Your mesh also has uneven parts so: Add the modifier and Then, Uncheck "even" and make the thickness smaller.


Is there a way to make Armature follows Mesh?

If you really need it, you can parent both mesh and armature to an empty, and then use the empty to move both (but it's more usual to leave the mesh in a 0,0,0 location in object mode, and move it using the armature controls only).


Project files (.blend) created with newer versions of  Blender generally can't be opened by older versions. Blender isn't designed to be forward compatible.


I found this on the blendernation site:

  Blender supports all the major fonts supported by the freetype library, including PostScript Type1 and Type3, TrueType, and OpenType. However fancy OpenType features such as automatic ligatures aren't supported and it seems Blender doesn't even support things like built-in kerning metrics either.

So, you may find an .OTF that works. But if you're pressed for time, convert it to .TTF, or one of the other abovementioned, with e.g. http://www.freefontconverter.com


How do I get the material's base color alpha work as transparency in the shader?

Base color value can be used as a driver of transparency. It is depending on shader if it can read and interpret that information. Principled shader is one which can. Diffuse shader won't be able to do it without mixing it with Transparent shader and driving Mix shader factor.

If you open color picker of Principled BSDF and set its alpha to 0 and color to white                  you will get only white material because shader renders it as basic diffuse surface by default.

If you set Transmission value of the shader to 1 allowing it to happen shader will use alpha channel and will make your material as allowing light to come through it.

However at this point it will refract light because by default shader's IOR value is set to 1.45 (common case of usage for interface between air and glass). Set that to 1.00 so no refraction happens and light comes straight.

Roughness value can be also taken down to 0 so it doesn't try to create rough surface. Object will still cast shadow of course; you will need to add more complex node setup or to disable shadow in material setitngs.


The Normal Map Image node was plugged into the wrong input. It was in normal but height appears to have fixed it. Thanks to moonboots2 for the answer.


The orientation of his right arm bones is bad:

In Edit mode select all these bones and ctrl R 180 to rotate 180° on their axis. Then, in Pose mode, go in the Properties panel > Bone Constraints > IK, you'll have to correct the IK Pole Angle -> 180°.

Or, simpler, in Edit mode, select all the left arm bones and go on the bottom menu bar > Armature > Symmetrize. Then, in Pose mode, go in the Properties panel > Bone Constraints > IK, you'll have to correct the IK Pole Angle -> 180°.

Now it works fine.


Instead of using three separate spheres, use one sphere and extrude it (E):


All sorts of ways, making your own measuring sticks, temporary edges or loose vertices to snap to, etc, etc, but here's an example for putting holes in a tube at measured Z positions using the cursor...

Make a section with a hole, and in edit mode with all selected,
ShiftS > 'Cursor to Selected':

ShiftD duplicate the section.
In the Properties Region, 3D Cursor panel, set the Cursor to the desired Z
The duplicate section should be selected...  ShiftS again > 'Selection to Cursor (Offset)

Rinse, repeat ...
CtrlE > 'Bridge Edge Loops' to fill the gaps

If you mean from other edges, you can place the cursor at the median of any selection of elements in Edit Mode, and you can enter arithmetic expressions in its location fields.. so if the cursor was at, say, 1.414, you can just add a "-0.5" to the end of the existing value to get your offset.


This can happen when your normals are flipped on part of the mesh.  Pretty common with Mirror operations.
The problem is that the Subdivision Surface Modifier is interpolating between the inside and the outside of the mesh, at this point, so for the vertices in between they are returned to their original positions.

To diagnose problems like this you can check face orientation overlay in this menu.

Typically you want the blue side facing the camera.  If you see any red you can tab into edit mode, select all your mesh and press Alt+N or go to the menu Mesh -> Normals -> Recalculate Outside.


What is the parameter order of a quaternion constructor?

You can figure it out easily in the py console:

q = Quaternion((1,2,3,4))
print(q.w, q.x, q.y, q.z)
# -> 1.0 2.0 3.0 4.0, so it's WXYZ

The mathutils module is not python source btw., the Quaternion class is written in C and located here:

  BlenderSVN\blender\source\blender\python\mathutils\mathutils_Quaternion.c


How to add bezier curves (start and end) to a 'follow path' animation?

It is possible that there is an easier way than this as I am still learning Blender --

Use the offset on the Follow Path Modifier instead of Animate Path to control the movement. Then in the Graph Editor for the object you are controlling on the path you will have a curve to work with. Hope this helps!


Volumetrics in EEVEE working in viewport but not in final render

I found a workaround. On your viewport, disable all your overlays and switch to Render View. Click View, then Viewport Render Animation. You can increase your render preview sample equal to the final render too. I did that before when Blender crashed when using conventional render.


Depth map with distance along the camera Z axis

You can achieve this using cycles' camera data node.
One of the outputs on this node is the view vector, which can be separated to x, y and z.

Using a simple node setup you can display only the Z distance from the camera in grayscale values.

In the example below I used the light falloff node to enhance the contrast (the Suzanne model is rather small and all the distances were small as a result, something that produced a low contrast whitish image, before contrast was added).

EDITED: replaced the seprate RGB with separate XYZ (does the same thing, but this demonstrates what's happening more clearly) and added an invert node so that farther values are darker (which is more intiuitive).


Weight Paint not going away where needed

It's easier to paint weights if you mask your selection. In Edit Mode select the vertices you wish to work on, and then in Weight Paint Mode press M...

Back in Edit Mode you can also check the Vertex groups and manually remove unwanted vertices...


Change diffuse color for all selected objects in scene with python

You don't have to access the material index, since you have access to an object's active material. This will do what you're aiming for:

import bpy

r,g,b = (0.1, 0.5, 0.7) # Set color RGB value

# Iterate over all the selected objects
for o in bpy.context.selected_objects:
    # Set the active materials diffuse color to the specified RGB
    o.active_material.diffuse_color = (r,g,b)


I was in a similar situation recently. Most online advice was "select one quad and then use the Follow Active Quads thingy", but that wasn't an option for my model.

What helped me was the Cylinder Projection unwrap method, with Direction set to "Align to Object" and both the "Correct Aspect" and "Scale to Bounds" checkboxes checked:

If the holes in your model aren't important and don't actually need to be in your UV map, make sure to deselect them first.


There are two ways to solve this problem. The most prominent problem is that it appears you need to increase the number of samples in your render settings (Render > Sampling > Samples). There are two values, respectively, the render and the preview samples. The default for rendering is 128 samples, and that is way too low to use in any render. The sample number is the number of paths to trace for each pixel. The higher the number, the more clear and less fuzzy your render will be, but the longer your render time will be. I would recommend changing that number to 1500 to start, and keep increasing it until you find a good balance between quality and render time.

If the above method increases your render time too much, you can try the denoiser (Render Layers > Denoising). The radius is the "sample size" and that can stay at default for the most part. The strength is the amount of denoising. Enabling denoising will allow you to reduce the number of samples, and save you some render time. I personally don't use denoising too much, as it can reduce the overall detail of your render. However, it can be a lifesaver if you don't have a beefy computer.

So basically, find a balance between render samples and the denoiser (optional) to find a quality that you like with a reasonable render time.

To learn more:

Samples- https://docs.blender.org/manual/en/dev/render/cycles/settings/scene/render/integrator.html#sampling

Denoising-
https://docs.blender.org/manual/en/dev/render/cycles/settings/scene/render_layers/denoising.html


Why do my models have black fuzzy bits on them?

It looks like "z-fighting" -- when you have multiple polys that are overlapping (normals facing the same direction) and very close to each other... and then your camera is far away, then the renderer has a hard time figuring out which pixels of which poly to draw first, and you end up with erratic drawing that ends up looking like that.

Are you layering polys that way?


Linking lights to single parameter in Cycles

OK, so my options now are:
1) place the lights on a separate layer and set their intensities then use the filmic response options to determine 'exposure'. As long as the lights are accurately calibrated to all lights in the scene, this will work.
2) master parameter drivers as Jerryno indicated above. Probably the most technically correct option.
3) Set a master light first, apply any textures, then use alt D to make copies. These take their data from the original light. I just tested it and it works just fine. Make sure to name the light before making copies if using multiple lighting sets.


Looking for a usable solution for Z-pass aliasing

Use this shader as an override for all your materials in Render layers and render a perfect Z-depth pass that is pixel-perfect anti-aliased like your final render:

It shades the geometry based on distance from camera and renders fast (only 1 emission shader, you can omit the black emission).

It is basically similar to the mist past, but let's you do more magic for example with transparency if you need.


I now feel silly. Turns out I was wrong and the obj export script does work as expected. Instead, the object was being recentred by another script I was using afterwards (obj2opengl.pl). The solution was to use the -noMove switch when running this second script otherwise the default is to "move [the object] to the center of its vertices"

Thank you for the comments, it helped me realise the true problem!


From the information available on the Mira-Tools Wiki page:

Download the zip archive for the development version.
Unzip the downloaded file.
Copy mira_tools/blender/addons/mira_tools folder into your user addons folder.
Refresh Blender's add-ons and enable the add-on "MiraTools".

Apparently the ZIP they ship contains all kinds of data, it's not just a Blender add-on. This means that you cannot install it via Blender itself, but have to do it manually. Their issue #22 also complains about this.


How to create an array of objects with offset in python

Currently your duplicating an object and moving it by -(2a + 1.5) units on the x axis. This doesn't give you a offset between the objects as objects are still exactly 2 units away of each other (because a changes by 1).

You should multiply formationArrayX with a, instead of adding it. To get something similar to the screenshot you posted, increase formationArrayX to something like 3. You also don't need offset2 then.

Also note, that your current code duplicates all objects you added before in each step. Only the last one created is offset, all others stay at the initial position. This is because the duplicate operator duplicates all selected objects and you don't un-select objects after translating

EDIT: This answer was only valid for an earlier version of the opening question. Code has been changed since then.


How to create our own procedural texture like the default ones in blender

The 'built-in' texture nodes generate their textures mathematically and so most of them can be recreated using Maths nodes - building your own textures is no different.

For example, the Wave Texture can be created by using a Sine function based on the input coordinates :

Or the Checker texture recreated as follows :

Gradient textures follow similar principles - for example, a horizontal gradient :

The Noise, Musgrave, Magic, Brick, Sky textures can similarly be reproduced using maths.

Even something akin to the Voronoi texture can be recreated as detailed in this and this answer.

The Point Density and Image/Environment textures are an exception since those require additional input (the image or point cloud) - although in the case of the Point Density you could theoretically use Combine XYZ or Value nodes to set each of the point coordinates and maths nodes to calculate the proximity to each of those points - but it would quickly become too cumbersome to be practical as the number of points increases.

The 'built-in' textures will always be more efficient that doing these things using maths nodes but they can still be used in combination with each other and additional maths nodes and coordinate manipulation to generate interesting textures.

For further examples, see here and here.


How to model and blend same like the image

I would do it with some bevels:

Create a cube. Mirror it on the X and Z axis.

Inset the front face with i and b for boundary. Pull it on the Y axis and extrude it.

Select the angle edges, and ctrlB to bevel.

Slide the new edges with GG so decrease the roundness on the back block angles.

Inset faces, add edge loops to sharp the angles...


how to fix a rig when weightpaints still dont work

May be you have hidden bones or bones in hidden layers?
If not, try to unmarks "Deform" for bones which you don't want to be deformers.


Is it possible to specify a complex rendering area in Blender?

You could put your model on a renderlayer and then model a plane with a custom shape hole on another layer and then tick exclude and mask for that layer on the model-layer.


Start with a box and subdivide (W > Subdivide) it to give yourself more geometry to work with.  Then select the corner edges of the side you want to make circular and hit Alt+Shift+S (scale to sphere) and type 1 (to make it scale it 100% to a sphere).  You will then have to scale it in a little (with S) to whatever size you want.  Repeat the process with the lower edge loops and <100% amounts to get a nice smooth interpolation (do it more than I did in the below GIF to get a higher resolution curve).

To get the rounded edges you can use a Bevel modifier with the limit method set to Angle.  Play with the threshold angle and bevel amount to get the desired look you want.


Try what was answered in this thread:

https://blenderartists.org/t/can-a-modal-operator-use-snapping/1175190


The bevel object, used to bevel a curve, follows the curve's scale.

So if the scale of the curve is not homogeneous, the bevel object will appear unevenly scaled itself. To correct that, use CtrlA then 'scale' to keep the shape of the curve, and set all scaled directions equal to 1.


Final:

Steps:

Subdivide a Plane (W > Subdivide) as much as you need, keep in mind to have vertex in the center of a Plane. So you will need odd number.
Select vertex in the center.
Turn on Proportional Editing (you can switch trough different falloffs to get different results).
Scale down (S) and increase Proportional Editing influence size - MouseWheel.


Bump node in Cycles, with an OSL script -- am I doing it wrong?

Add a Texture Coordinates node, and possibly a vector Mapping node and feeding that into your scripts Vector input.

Even for generated coordinates I've seen better results using a texture input and mapping node for vector input over default coordinates received within osl scripts.


Is it possible to copy and paste vertex weight?

In Weight Paint Mode you can set Weight by pressing Shift + K.

Toggle Vertex Selection Masking to select the vertices

Set the Weight (use @joshsanfelici technique to copy vertex value)
Press  Shift + K to set weight


Play a sound, then another when the first is finished?

Here's what I ended up doing: there's a property time that I did not know about: Timer. I then set a property sensor to track this "Timer" value, but the "equal" eval type did not work, I had to use "interval" and set my interval using the right n.000000 notation. By precisely tuning the Minimum value, I managed to get a sample-perfect intro+loop sequence.


Is it possible to create an animation in Blender 2.8, using Python, that it's not tied to any object?

There is a related question here (Is it possible to create instance with different scale animation data but the same mesh with python?), but I will expand on it:

Once a new action has been created, and an Fcurve for it, using keyframes_insert does not work (it produces the error pasted in the question). Using `keyframes_points.add(count=X), does work, and later the frame number of value can be set with:

keyframe_point.co = (frame_number, value)

For example (taken from the link above):

def random_scale_action():
action = bpy.data.actions.new("RandomScaleAction")
data_path = "scale"
# (frame, value) for keyframe point
for axis in [0, 1, 2]:
    # new fcurve
    fc = action.fcurves.new(data_path, index=axis)
    # add a new keyframe point
    # OPTION 1: IT WORKS!
    fc.keyframe_points.add(count=2)
    for kfp in fc.keyframe_points:
        kfp.co = (uniform(1,100), uniform(0, 1))
    # OPTION 2: does NOT work, and produces the error pasted into the question(above)
    fc.keyframe_insert(data_path, index=axis, frame=uniform(1,100))

return action


Blender Reads Some Videos' Frames Incorrectly (duplicates + skipping)

Blender is very picky about source codecs. Try creating a proxy with timecode (bottom VSE Clip menu).
You could also try turning on MPEG preseek in the Strip Properties menu by entering a frame value higher than 0. This enables Blender to cache a portion of the source making it easier to decode. It may slow performance of playback

If that doesn't work try converting the media to a codec that Blender prefers. Make sure that the codec that you use has a fixed frame rate. Variable frame rate screen captures will fail.


You can avoid the ambiguity of the situation by explicitly setting the object's mode to what you want in each stage:

class QuickOrigin(bpy.types.Operator):
    bl_idname = "quick.origin"
    bl_label = "Set Origin"
    bl_options = {'REGISTER'}

    def execute(self, context):
        if context.object.mode == 'OBJECT':
            bpy.ops.object.mode_set( mode = 'EDIT' )
            return{'FINISHED'}

        bpy.ops.view3d.snap_cursor_to_selected()
        bpy.ops.object.mode_set( mode = 'OBJECT' )
        bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
        bpy.ops.object.mode_set( mode = 'EDIT' )
        return{'FINISHED'}


First of all, the bevel node is only available in the development version of Blender. It is not in 2.79b, the manual just contains docs pre-written in anticipation of 2.8. You can download a build of this at builder.blender.org, but be aware these are development builds, not finished releases. However, at the time of this writing, the "master" branch contains only non-invasive changes eventually planned for Blender 2.8. THERE IS A PLAN TO COMBINE THE "MASTER" AND "BLENDER 2.8" BRANCHES IN THE FUTURE. While the "master" nightlies currently offer 2.79 with some extra Cycles functionality, that will not be the case forever.

So assuming that merge hasn't happened yet, or you're reading this in the future when 2.8 has a stable release, the bevel node is located under Add Node > Input > Bevel. The bevel node modifies the mesh normal along mesh edges to approximate a smooth edge. This does not modify the underlying geometry and can even bevel between intersecting meshes, so long as they are all a single object:

(for performance reasons, it will not bevel intersections between separate objects)

The "radius" control adjusts the width of the bevel (it is a world-space distance in meters, same as the bevel modifier when in "width" mode). The "samples" control adjusts how many rays are traced to find nearby edges. More samples reduces the noise in the bevel effect at the cost of reducing performance.

The bevel effect is a essentially a procedural normal map, so it comes with all the limitations of bump/normal maps vs actual geometry. This answer about bump vs displacement maps has some examples: What is the difference between the displace socket and a bump map?

The bevel node can also be used as a simple curvature/edge detect shader by taking the cross product of its output and the mesh normal.  This is vaguely similar to the "pointiness" effect. However, it is calculated per-shading-sample rather than per-vertex, meaning it is "infinite" resolution regardless of the underlying mesh. This may be useful in some cases. It has a much steeper performance cost than pointiness, however.


First of all, to unwrap only a part of the model you have to select the faces first and then unwrap them with whatever method you want, if you select everything it's going to unwrap everything.

I think the main problem here is that when you painted the texture, the UVs where placed in a certain manner and by unwrapping again after you were done painting you basically moved your UVs so the colors you painted before are not corresponding anymore to your model. I've put these two images below to explain better what I mean: I moved two vertices on the UV and the whole front face looks very different, this is basically what I think happened when you did the second unwrap.

At this point I see two ways you can solve your problem, either you adjust the UVs yourself by moving, scaling etc. or you keep the UV like that and paint another texture for it (create a new image just to not overwrite the one you have, you never know), maybe by painting directly on your model in Texture Paint mode. I know it is a pain to do something like this all over again (I've been there) but as far as I know these are the quickest options you have.


You got transformation orientation switched to Gimbal, change it back to Global.You will find this setting on the bottom toolbar in 3D view.


How do you access the object that a PointerProperty points to?

bpy.types.Scene has a property targetObject that is a PointerProperty. That means instances of bpy.types.Scene have a property targetObject that is a bpy.types.Object (or None).
# This prints the targetObject for the current scene
print(bpy.context.scene.targetObject)


I found that for some reason, blender, even though absolutely nothing uses it since I have a dedicated Graphics Card, wants me to have the integrated intel graphics enabled on my CPU. Not sure why, but it works just fine so long as I have that enabled through the BIOS.


What is the python script for the Rip tool

Run the below script
Select an edge
Hit the spacebar and write "Rip Edge" as shown below

import bpy
bl_info = {
    "name": "Rip Edge",
    "category": "Edit",
}

class EdgeRip(bpy.types.Operator):
    """Rip Edge"""
    bl_idname = "edit.ripedge"
    bl_label = "Rip Edge"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        bpy.ops.mesh.rip('INVOKE_DEFAULT')
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()


Turning multiple materials into one texture

Baking is the way to go. If you're in blender internal, baking is very straightforward. If using Cycles it is a little more complex but can give great results. Create an image for each map that you need, open that image and select the node in the Cycles node editor, then bake the map you need in the bake panel. It can combine the diffuse map from multiple UV projections, procedural materials etc.