Algorithm of Blender's Proportional Editing- verts outside radius Hi anyone knows why vertices outside the radius get influenced too during proportional editing? The .gif is in right ortho with smooth falloff. Note: Verts outside the radius are the bottom left vert connects to 5654, the vert on the right of 5887,the vert on the right of 5881, the vert on top of 5827, the vert on top of 5928.

The radius displayed is an indicator of influence from each of all selected.

A single vert selection only shifts other verts within the radius  Suggest the radius of influence applies from each vert.

Simple test on grid eg select two verts outside circle, appears to confirm this.

Notice with two verts selected on grid, both outside the displayed radius of influence, move verts of within the radius of influence of each.

Each vert that moves is within the radius distance of a selected vert.

In your question image no vert is being moved that is not within the radius of another selected vert.


How to set absolute bounding box dimensions of a group of selected elements (vertices, edges or faces) In Object Mode you can change the absolute Dimensions of the selected object, which are connected to the object's relative Scale.

With some elements (e.g. vertices) selected in Edit Mode you can use the Scale Tool to resize the bounding box of the selection, changing the individual elements' position.

Is it possible to set the dimensions of that bounding box in absolute values? I would have had expected it to be in the Edit Mode transform properties panel, but it only shows the bounding box' origin position.

Example: I want to set the tabletop in the image below to a particular size by setting the selected geometry to, let's say 0.75m x 0.75m.

If there is no built-in way to do this, do you know a suitable Add-On?

Here is a script that I wrote to accomplish this. It simply calculates the bounding box of the selected vertices, then scales in such a way that the new dimensions become what you set the values to be.

Here is the add-on that was requested in the comments:

https://github.com/ekaj2/MeshTools

To download from GitHub, simply click the green Clone or Download button, then choose "Download ZIP". Once you have the zip downloaded, unzip, then load the .py file with Blender's add-on tool in user preferences.

Here is the add-on that I wrote (I would recommend downloading the add-on from GitHub to ensure you have the latest updates).

# Copyright 2016 Jake Dube
#
# ##### BEGIN GPL LICENSE BLOCK ######
# This file is part of MeshTools.
#
# MeshTools 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 3 of the License, or
# (at your option) any later version.
#
# MeshTools 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 MeshTools.  If not, see <http://www.gnu.org/licenses/>.
# ##### END GPL LICENSE BLOCK #####

import bpy
from bpy.types import Panel, Operator, PropertyGroup, Scene
from bpy.utils import register_class, unregister_class
from bpy.props import FloatProperty, PointerProperty

bl_info = {
    "name": "Mesh Tools",
    "author": "Jake Dube",
    "version": (1, 0),
    "blender": (2, 78, 0),
    "location": "View3D > Mesh > Transform > Set Dimensions",
    "description": "Sets dimensions for selected vertices.",
    "category": "Mesh"}

def calc_bounds():
    """Calculates the bounding box for selected vertices. Requires applied scale to work correctly. """
    # for some reason we must change into object mode for the calculations
    mode = bpy.context.object.mode
    bpy.ops.object.mode_set(mode='OBJECT')

    mesh = bpy.context.object.data
    verts = [v for v in mesh.vertices if v.select]

    # [+x, -x, +y, -y, +z, -z]
    v = verts[0].co
    bounds = [v.x, v.x, v.y, v.y, v.z, v.z]

    for v in verts:
        if bounds[0] < v.co.x:
            bounds[0] = v.co.x
        if bounds[1] > v.co.x:
            bounds[1] = v.co.x
        if bounds[2] < v.co.y:
            bounds[2] = v.co.y
        if bounds[3] > v.co.y:
            bounds[3] = v.co.y
        if bounds[4] < v.co.z:
            bounds[4] = v.co.z
        if bounds[5] > v.co.z:
            bounds[5] = v.co.z

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

    return bounds

def safe_divide(a, b):
    if b != 0:
        return a / b
    return 1

class SetDimensions(Operator):
    bl_label = "Set Dimensions"
    bl_idname = "view3d.set_dimensions_mt"
    bl_description = "Sets dimensions of selected vertices"
    bl_options = {'REGISTER', 'UNDO'}
    bl_context = "editmode"

    new_x = FloatProperty(name="X", min=0, default=1, unit='LENGTH')
    new_y = FloatProperty(name="Y", min=0, default=1, unit='LENGTH')
    new_z = FloatProperty(name="Z", min=0, default=1, unit='LENGTH')

    def invoke(self, context, event):
        bounds = calc_bounds()
        self.new_x = bounds[0] - bounds[1]
        self.new_y = bounds[2] - bounds[3]
        self.new_z = bounds[4] - bounds[5]
        return {'FINISHED'}

    def execute(self, context):
        bounds = calc_bounds()
        bpy.ops.object.mode_set(mode='EDIT')
        x = safe_divide(self.new_x, (bounds[0] - bounds[1]))
        y = safe_divide(self.new_y, (bounds[2] - bounds[3]))
        z = safe_divide(self.new_z, (bounds[4] - bounds[5]))
        bpy.ops.transform.resize(value=(x, y, z))

        return {'FINISHED'}

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

        box = layout.box()
        box.label("New dimensions:")
        box.prop(self, "new_x")
        box.prop(self, "new_y")
        box.prop(self, "new_z")

def add_button(self, context):
    self.layout.operator(SetDimensions.bl_idname, icon="PLUGIN")

def register():
    register_class(SetDimensions)
    bpy.types.VIEW3D_MT_transform.append(add_button)

def unregister():
    unregister_class(SetDimensions)
    bpy.types.VIEW3D_MT_transform.remove(add_button)

if __name__ == "__main__":
    register()


ParticleInstance modifier doesn’t list any particle systems I’m trying to create some low poly fur. I’ve created a plane with an image of my fur texture on it. I want to use a ParticleInstance modifier to create the hair geometry since this will allow me to bend my hair geometry along the hair shaft (and the default particle system modifier does not). However, when I add the ParticleInstance modifier, the drop down box where you need to select the particle system is empty even though my model does have a particle system on it. How do I fix this?

Looks like I needed to add the ParticleInstance modifier to the hair model, not the monkey model.


Data gets orphaned when grouped into a collection (2.8+) Has anyone come across a similar situation where creating a collection using ctrl-g (call it 'Collection 2') then removing that object's 'Collection 1' now results in that object needing to be restored from the Outliner's orphan data view?

Afaict, there is no documentation on how to restore orphan data, but I found out through trial and error that the only way to do so(and without needing to do a referring link to another .blend file which can access orphan data with 'fake user' still attached), would be to use two Outliner views, 'View layer' and 'Orphan data', then do a drag and drop from the latter to the other view.

https://developer.blender.org/T66086

I reported this as a difficult restore task to the blender bugreport as it is not documented on how to do this anywhere..

Adding a new collection with Ctrl-G does not send it to the scene (and is expected behaviour), but users even in this case should also be aware on how to actually "restore" this new collection that is now residing in the outliner's 'Orphan data' list.

A user could be work with other collections, remove them, but leave just 1 collection still left intact, and so that last collection may not have been added to the scene, and that object just disappears without telling the user where...  Perhaps the developers can help improve in this area.

What do you guys think? Is this a bug or a supposed missing feature?

thanks for your feedback.

This is not classified as a bug, but rather a usability issue.
Anyone wanting more details can read the developer discussion here.
I hesitate to quote excerpts from that discussion in this answer, since the design will almost certainly evolve and change. But there seems to be some disagreement about how some of the functionality from previous versions of Blender should be carried over in 2.8 onward with regard to collections.
For now, users are better off using the M key when adding objects to a new collection.
More information about creating collections and adding objects to them can be found in the Blender Manual.


strange modeling issue in simple modeling (blender 2.80Beta) I am getting this weight artifacts on some edges while modeling a simple horse - I have tried deleting the the whole patch and redoing it but it keeps coming back - could anyone tell what I am doing wrong?

Here is the Blender file (2.80Beta)

Yes it was a normal issue. Got resolved by recalculating the normal (Shift+N in Blender 2.80)

This thread describes it in detail:
Why are some faces in my mesh darker?

Thank you Duarte!


How do I radial gradient shade an open object? Not a plane or a sphere.
Like the attached blend file.
Either, for example, white at both ends, black in the middle or black at both ends, white in the middle.
A gradual gradient from one to the other side, linear from left to right, up, down, doesn't matter, or from the outside of the object in, or the inside of the object out. Saving it as an image wouldn't accomplish the same objective.
When I try, Radial doesn't seem to do it.  Neither does quadratic sphere. Nor gradient texture.
Most of what I've seen applies to closed objects like spheres, or flat, or flat surfaces, like planes.

A simple gradient texture would do this. Use a gradient texture (I used spherical) with object texture coordinates (add the object you want the coordinates to come from in the Texture Coordinate node), and a *Color Ramp (Ease interpolation* would probably give the best result) to adjust the contrast as a mask between two shaders as shown below:

Click to enlarge
Also, it is important to apply scale to see correct results.

This should give you a result like this:

Here is the modified file:


Animation Node Multiple Dimension Value I can only manipulate one dimension attribute in animation node. If a single one is activated, like dimensions.x others; dimensions.y or z are just ignored.

I would like to manipulate all of them, so how can I do it?

Dimensions - is a vector value. You can get vector value from 3 different floats by using combine vector node:


Bake Simple Deform animation into mesh for Unity3D export? I'm trying to use a .blend file with a keyframe animation on the angle of a Simple Deform modifier in Unity3D. Unity3D however does not know how to handle modifiers and hence cannot play the animation.

How can I bake/save the animation to the .blend file so that Unity3D can play it?

There's not much ways to do that… Only one I can think of is applying enough 'keyframes' of your deform animation as shapekeys (you can copy modifier, apply as shapekey the copy, go five frames later, copy, apply as shapekey the copy, etc.), and then in Unity (or Blender), create an animation interpolating between those shapekeys. But this will be rather painful to set up I’m afraid.


How to eliminate, remove or mute audio from video strip Am new in Blender.
In video editing mode I added a video strip that is with sound. I saw mute audio button in other video editors. But in Blender, there is none though in strip menu there are mute strips worked for non-visibility but not muting the audio that comes with the video I added. Any help. I searched for this problem here, but don't found any solution. Thanks in advance.

You can just delete the sound strip by selecting it and pressing X or hide it by selecting it and pressing H on your keyboard. Both works fine, though if you want to use the sound later the hiding method is obviously better, cause you can easily unhide it again if needed.


I have an incoherent and chaotic UV map my UV map is completely incoherent, pieces are spread all over the map without bigger sense, on the left is my model when all I wanted to color were eyebrows and nose

I first modeled my model, then I tried to add textures, but then I realized she has no eyebrows, co I join them, I wanted also modify a bit her nose to be easier to color

When I return to textures, eyebrows were added ON the map, causing this weird coloring

I would like to know if there's a way to re-create the map so the pieces won't lay on one another
I didn't apply the mirror and sub-surface modifiers and my model has every part (like eyes, scarf, T-shirt etc.) in an another "layer" (that thing on the top right). I'm writing this if it can help.

I'm a lil concerned, it's my first 3D model and I don't want to re-model the whole thing :/

Ok.
First step: delete the map (make a backup copy of the .blend file first).

Then you should try the several unwrapping options. If you don't find one that make a good map, you could try unwrapping the mesh in more steps (some faces per time). For example you could map the two symmetric halves separately.


Exporting Animations via blend files - Common Asset Duplication Thanks for reading.
I want to export to unity with a flow that retains my previously imported assets and connections etc. I already have my unity project and have imported by .blend file. Now when I go back to blender to do some more animations I re-export another blend file. Now inside both of these blend files are my mesh, materials etc, which means when I import them into unity they are duplicates, or even worse slightly different (if I've changed the mesh).
So my question is how do I organize my export blend files, so I can avoid having duplicate assets, and at the same time all my animations work ?

For anyone else getting started with Blender >= 2.8.3, there are many animation features.
The best seems to be to use :
The dope sheet editor to capture an animation that has several objects being animated as a single animation.
The animation editor to capture multiple animations for a single character/game object ie idle1, idle2, walking.
When you import these assets into unity as fbx files, you can split the animations anyway you like, but the best I found seems to be splitting them into fbx's that contain the meshes and armatures that the animations are applied to, so have an fbx for a single game object and its animations, then one fbx with any animations that cross single objects, including again all the meshes and armatures.


Filmic to linear math? I know the math to convert sRGB and REC709 to linear, but does anyone know what is the (approximative?) math for filmic to linear?

Or is there a way to use OCIO configs in python to convert any picked color to be converted to linear, independently of the color profile you are using?

Thanks!

You can use the OpenColorIO Python library to transform a Filmic log encoded image back to scene referred linear.

The base log is a simple normalized log base 2 format, with ten stops down from middle grey and six and a half stops up.


Cycles Preview Render takes too long When I use in Cycles the Cycles Preview Render (Z) it takes way longer to render than in the normal Render (F12). E.g.the standard cube needs in normal Render (F12) 1.2 Seconds to Render but in the Preview Render (Z) over 12 Seconds! So working in Blender does not make fun. OpenCl is activated.

Im working on a iMac with an i5 7600k and an Radeon Pro 580.

Thanks in advance
Matti

You have 2 different sampling ratios, available in the Properties menu > Render > Sampling > Samples:

the Preview is the ratio used when you work your scene
the Render is the ratio used when you launch a definitive render of your scene (either single image or animation when you click the Render or Animation button on the top of this Render menu).

You can decrease the Preview quality so that it takes less time to render when you work, for example 3 may be enough.

The Render ratio depends on what you want as a definitive result, you can begin with 100

In the next version of Blender (2.8), the Eevee render engine seems much faster than Cycles, it will generate a high quality image in real time, but the result will be slightly different


Armature symmetrize wrong position I have a problem with my armature. if I symmetrize the other side of the armature is outside the model.

If I drag it inside the model and do weigth painting the side I draged is all wrong and deformed. what am I doing wrong?

Here's the beld file

The symmetrize will use the armature's origin as the axis center, to fix your problem you could for example align the armature's origin to the dog's origin:

Make sure that dog's origin is centered to its geometry (Object > Set Origin > Origin To Geometry).
Select the dog object.
ShiftS > Cursor To Selected.
Select the armature object.
Object > Set Origin > Origin To 3D Cursor.
Go in Edit mode, symmetrize again.


How to draw Inputs from Geometry nodes modifier in a panel I am trying to draw the inputs of the Geometry Nodes modifier to a panel, and I tried doing this
import bpy
from bpy.types import (Panel)

class DRAW_PT_ModInputs(Panel):
    bl_label = "Draw Modifier Inputs"
    bl_idname = "DRAW_PT_ModInputs"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.label(text = "Geometry Node inputs here")
        row = layout.row()
        GeoNodesModifier = context.active_object.modifiers.get("GeometryNodes")
        if GeoNodesModifier:
            row.prop(GeoNodesModifier.Input_5, "Density Max", text="Density")

classes = [DRAW_PT_ModInputs]

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

def unregister():
    for cls in classes:
        bpy.utils.register_class(cls)

if __name__ == "__main__":
    register()

and that gave me error AttributeError: 'NodesModifier', object has no attribute 'Input_5' and in another attempt I tried this row.prop(GeoNodesModifier['Input_5'], "Density Max", text="Density") but this is also not working and it gives error -
TypeError: UILayout.prop(): error with argument 1, "data" -  Function.data expected a AnyType type, not float

and this is how my Geometry Nodes Modifier looks like -

and this is my Geometry Node tree -

I needed help regarding drawing the inputs from the Geometry Nodes modifier in my customized panel.
Thanks in advance!

The modifier input value is treated like a custom property.
If you right click over the data field in the modifier and select "copy datapath", pasting will reveal
modifiers["GeometryNodes"]["Input_5"]

Indicating it is a custom propoerty of the modifier named "Input_5".  A custom property naeed "prop" on object ob is shown in UI as
UILayout.prop(ob, '["prop"]')

Hence in this case.
    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.label(text = "Geometry Node inputs here")
        row = layout.row()
        gm = context.active_object.modifiers.get("GeometryNodes")
        if gm:
            row.prop(gm, '["Input_5"]',  text="Density")

Note
Check out the style guide under which the modifier instance variable would be named akin to geom_modifier (I like using gm to reduce the verbosity) Camel case is used for class names. A variable named GeoNodesModifier will consistently be a type in any official blender UI code


Animation with cloth modifier renders as a static element I'm new. I created this simple scene, but I can not render it. Rendering happens, but the flag stands still. What am I doing wrong?
P.S. I`m trying to use Cycles Render.
Here is link to my "project":
https://www.dropbox.com/s/svxa7va3dd54s74/untitled.blend?dl=0

Select your flag object and fix the modifiers order by moving the cloth modifier to the top. Then you go to the Physics tab, press "Free All Bakes" and "Bake All Dynamics" (at Cloth Cache section). After the baking finishes you should be able to render the animation.

From Blender documentation (emphasis mine):

  Once the object is designated as Cloth, a Cloth modifier will be added
  to the object’s modifier stack automatically. As a modifier then, it
  can interact with other modifiers, such as Armature and Smooth. In
  these cases, the ultimate shape of the mesh is computed in accordance
  with the order of the modifier stack. For example, you should smooth
  the cloth after the modifier computes the shape of the cloth.


What are these rectangle areas and how do I remove them I'm still a massive noob at blender and I have somehow gotten these large rectangles that are made of black dotted lines to appear all over my blend. What are they and how do I get rid of them?

It looks like you have enabled the display of Texture spaces for some of the objects in the scene.

You can disable it for each object separately by un-checking Texture space under Display from the Object panel in the Properties window.


When sculpting cloth nothing happens, object turns dark I'm new to Blender and I'm following Blender Guru's tutorial on YouTube (https://www.youtube.com/watch?v=HlrgFS8AMMU at about 11:59).
So far everything has worked according to plan. First I added a cloth physics to the couch cushion with 5 pressure and 0 gravity. Then I tried out the cloth sculpting brush on a flat plane to make sure it works, which it did. I selected my object (couch cushion) and moved to sculpt mode. The object turns dark grey, and sometimes I get a warning that says "object has non-uniform scale, sculpting may be unpredictable." When I use the brush and try the space stroke method or line as the tutorial suggests, nothing happens. I checked my settings to make sure they look the same as they do in the tutorial, and they are.
I have no idea why it is acting up.
Any help would be great, thanks.

"object has non-uniform scale, sculpting may be unpredictable." --> so you need to select the object in object mode and press CONTROL+A and then select SCALE.
in this way you reset the scale of the object. It has to be 1:1:1 (check it pressing N on the viewport and go under Item's tab)


Particle system "shoot at an object" Thank you for your time reader!

I want a particle system to shoot (laz0rs) at an object (in this scenario a plane / ground).

So far I learned that keyed physics is the way to go.
I got three Objects now:

Ground / target plane (particle system with no physics)
Shooter cube / emitter (same particle system)
Helper cube / (particle system with keyed physics)

But I cant manage to rotate particles toward the "target"

Does someone have an advice for me? :)

You can use the rotation tool in the particle system. Set this to 'Velocity / Hair'. This way, the particles will always face the direction they are going.


Align vertices in straight line in the uv image editor I am in the UV Image editor.  I am trying to align each row of vertices in the x axis.  When all the rows are aligned, I would like to align each row on the Y axis. Is there a combination of key strokes I can use in the image editor to accomplish this?

You can select all vertices in a row by using alt+ RMB on an edge;

You can align selected vertices on the x axis with the following keystrokes (one after the other, not all at once);

s, x, 0, enter

Same for the Y axis, select with alt+ RMB

s, y, 0, enter

(those are zeros, not the letter o)

Continuing this process, you can align the desired vertices on x...;

Then y...;


Compute object's foreground mask in screen coordinates For a research project I am using Blender's Python API to generate some simple random scenes. In addition to the generated renders, I need to acquire a 'foreground mask' in screen (image) coordinates of all the objects in the scene. See below for a simple example using one object:

I would like to know the best way of approaching this problem using the Python API. I several helpful discussions:

How to find image coordinates of the rendered vertex?
How to convert coordinates from vertex to world-space?
https://blenderartists.org/t/3d-coordinates-to-2d-coordinates-in-camera-coordinates-pixels-not-screen-region/561513

Using these sources I have written some code that extracts the object's vertices and convert them to screen coordinates:

world_matrix = obj.matrix_world
modelview_matrix  = camera_obj.matrix_world.inverted()   # currently not used
projection_matrix = camera_obj.calc_matrix_camera(       # currently not used
    scene.render.resolution_x,
    scene.render.resolution_y,
    scene.render.pixel_aspect_x,
    scene.render.pixel_aspect_y,
)

render_scale = scene.render.resolution_percentage/100
render_size = (int(scene.render.resolution_x * render_scale),
               int(scene.render.resolution_y * render_scale))

for v in obj.data.vertices:
    loc = world_matrix * v.co
    screen_coords = bpy_extras.object_utils.world_to_camera_view(scene, camera_obj, loc)
    pixel_coords = (round(screen_coords.x * render_size[0]),
                    round(screen_coords.y * render_size[1]))

However, this gives incorrect results but I am not sure what goes wrong. Here is the corresponding output with the yellow points indicating the valid screen coordinates from the code above:

Besides being incorrect, the logic to check whether a vertex is actually in the field of view is missing. I am wondering whether there are some built-in functions that I can use to achieve my goals. For example, I found that Blender Game Engine has the function bge.types.KX_Camera.getScreenPosition which looks like what I need. Unfortunately, it seems like I cannot import bge when using Blender in python-only mode without IDE. Another possibility may be bpy_extras.view3d_utils.location_3d_to_region_2d.

EDIT: I modified the code a little to position the camera in the origin (0,0,0) and then the above code gives the correct result when the object's scale is (1.0,1.0,1.0) and rotation_euler is (0,0,0). However, when I scale or rotate the image the above code does not return correct results. What is the correct way of converting the NDC coordinates to device coordinates? Below is are the example outputs with object's scale 1.0 and 1.2 (full modified code can be found here). I am also still wondering whether this is the way to go, for a simple cube this may work but for more complex meshes this method may become cumbersome.

Any pointers in the right direction are highly appreciated!

bge.types.KX_Camera.getScreenPosition: https://docs.blender.org/api/2.78a/bge.types.KX_Camera.html#bge.types.KX_Camera.getScreenPosition
bpy_extras.view3d_utils.location_3d_to_region_2d: https://docs.blender.org/api/blender_python_api_2_75_3/bpy_extras.view3d_utils.html?highlight=3d%20view

I was not aware of Blender's ability to render the scene depth map. This is exactly what I need to obtain the foreground mask. The code snippet at the link below produces the desired results, specifically when setting the map.size value to a very low number, e.g. 0.001.

Render depth map to image with python script


Can't change shapekey values on a linked mesh? So, I need to show the same human body in a few different states (like "smile" and "frown"). Yay shapekeys!

Unfortunately, when I link this object from the asset file to the rendering file, I have to make the mesh a local copy in order to change the "weights" of each shape key for each instance of the body that I want. I.e. one body using "frown" and another using "smile" would have to use different settings, and each have to be local (can't remain linked to the original mesh).

Furthermore, each body in my scene that needs to use one of the shapekeys has to be its own copy, it can't be an instance of the other bodies in the scene without them all sharing the same shapekey settings. I.e. "frown" and "smile" can't even share a mesh in the same file, without also sharing the amount of "frown" and "smile" that they use.

This is a problem, because anytime I update the original mesh, none of the changes propagate to the other models (because they aren't linked anymore, they're local). So, I have to go relink, make them local, and set the shapekey values for each one.

What I'd like to happen is to link the same object multiple times, and set each one to use different shapkeys, that way I only have to update the single, original mesh, and all the rest get the updates. For example, if I want to change the shape of the arm, I want that change to be the same regardless of the shapekey, so I'd like to just make that change once. Right now, my options are to use separate objects instead of shapekeys (and hope that I can perfectly copy any changes between the separate objects), or to continue like I have been and reset all of the bodies anytime they need to get a change that I made to the original.

Anyone know a way to make this simpler? Is this what proxies are for? Or is this just not doable in Blender?

It makes sense that shapekeys belong to the mesh, but it doesn't make sense (to me) that multiple instances of a mesh can't be using different shapekeys at the same time.

You could use a combination of an armature and drivers. After you link in your object you make a proxy of the armature which allows you to pose the armature in the new file and still get updates from the source file.

Once you have the shapekeys setup, create an armature and add a bone to be used as the controller. Go back to the object and in the shapekey list right click on the shapekey value you want to drive (or select the key and right click on the value underneath) and select Add Driver.

To define the driver you switch the graph editor to display drivers and show the properties sidebar by pressing N. You may need to click the value name in the list for the driver details to show.

Then you can choose the armature and the bone and have one of it's transform values used as the value for the shapekey value. In this example I am using the x location of a bone called DriveKey1 to control Key 1. Now as I move the bone along the x axis the shapekey is turned on/off.

I also chose Sum Values for the driver type. Scripted expression can give you more control but also can be disabled through blender's auto execution setting. Using Sum Values gets around this.

With the option to set custom bone shapes and use constraints to limit movement, it is rather easy to create a clear visual controller that you may have seen with some rigged characters.

Tutorials on rigging a face often show this technique when setting up mouth and eye controls.


Smoke banding in render We're a small studio using Blender for VFX work.  I have a large simulation of a building on fire and noticed that the smoke is banding in the upper left corner as seen in the attached picture.  The bake alone took 3 days, so I would like to avoid re-baking if possible.  Does anyone know if there is a render setting that might fix this?

You can try the Cubic volume interpolation method and Distance sampling. Settings supported on CPU only:

Distance sampling: Best for dense volumes with lights far away.
Cubic: Smoothed high quality interpolation, but slower.

Linear vs Cubic:

GPU support for Cubic interpolation is added in 2.8 version:

Commit 2d92988f6bc4 & f61c340bc15e: CUDA and OpenCL rendering support for cubic interpolation with images and volumes.


Exported UV image in Blender 2.82 has opaque background? In Blender 2.79, UV images have transparent background. But in 2.82, they have gray, opaque background. Opacity setting in the export dialog only changes how light or dark the background is. Feature or bug? For now, I have to manually remove the gray background to work with it.

In Render Properties, under Film, check Transparent.


How to extrude a curve in 2 dimensions I am a complete noob to Blender, but have been using python for many years. I am trying to create a bunch of "wavy horseshoes" to make a 3d model (which I am intending to print with a 3d printer arriving later this week).

Through a bit of internet hunting and some back of the envelope maths, I have come up with:

import bpy
from math import cos, pi, radians, sin

def Wave(distance, amplitude, speed, start):
    return amplitude * sin(speed * distance + start)

def Point(x, y, distance, amplitude, speed, start):
    return (x, y, Wave(distance, amplitude, speed, start))

def WavyHorseshoePoints(amplitude, speed, start):
    points = []
    for i in range(4):
        points.append((1+i,0,i))
    for theta in range(15,180,15):
        rads = radians(theta)
        points.append((5+5*sin(rads), 5-5*cos(rads), 4+rads))
    for i in range(4):
        points.append((5-i,10,4+pi+i))
    return [Point(x, y, d, amplitude, speed, start)
            for (x,y,d) in points]

def MakePolyLine(objname, curvename, cList, base_x, base_y, base_z, extrudery):
    curvedata = bpy.data.curves.new(name=curvename, type='CURVE')
    curvedata.dimensions = '3D'
    curvedata.extrude = extrudery

    objectdata = bpy.data.objects.new(objname, curvedata)
    objectdata.location = (base_x,base_y,base_z)
    bpy.context.scene.objects.link(objectdata)

    polyline = curvedata.splines.new('NURBS')
    polyline.points.add(len(cList)-1)
    for num in range(len(cList)):
        polyline.points[num].co = (cList[num])+(1,)

    polyline.order_u = len(polyline.points)-1
    polyline.use_endpoint_u = True

def MakeWavyHorseshoe(base_x, base_y, base_z, amplitude, speed, start, extrudery):
    MakePolyLine("WavyHorseshoe", "WavyHorseshoeCurve", WavyHorseshoePoints(amplitude, speed, start), base_x, base_y, base_z, extrudery)

for object in bpy.data.scenes['Scene'].objects:
    print(object.name+" is here")
    if object.name.startswith('Cube') or object.name.startswith('WavyHorseshoe'):
        bpy.data.scenes['Scene'].objects.unlink(object)

MakeWavyHorseshoe(0,0,1,1,1,0,0.2)

Now I have the curve I'm looking for, more or less, and the extrude has given it vertical height, but I'm looking for it to be 3-dimensional and have a "thickness". How would I go about this? Apologies if this question is trivial.

The easiest way would be to add a solidify modifier.  If you don't want to actually go through the mouse clicks the python would be

mod = objectdata.modifiers.new("2d is for weaklings", 'SOLIDIFY')
mod.thickness=0.1


No smoothing group information was found when importing obj file in UE4 When I try to import my obj file in Unreal I keep getting this error.

"No smoothing group information was found in this FBX scene. Please make sure to enable the 'Export Smoothing Groups' option in the FBX Exporter plug-in before exporting the file. Even for tools that don't support smoothing groups, the FBX Exporter will generate appropriate smoothing data at export-time so that correct vertex normals can be inferred while importing."

I never got this error when I used Blender 2.78b, so I make models in 2.8 and after that I import obj file to 2.78b and export as obj again with same settings with this Unreal doesnt show any error messages.

But I dont want to go 2.8 then 2.78b then Unreal.

Right now when I export a obj file I chose this boxes.

Selection Only : Depends

Animation : No

Apply Modifiers : Yes

Include Edges : Yes

Smooth Groups : Yes

Bitflag Smooth Groups : Yes

Write Normals : Yes

Include UVs: Yes

Write Materials : No

Triangulate Faces : No

Write Nurbs : No

Polygroups : No

Objects as OBJ objects : Yes

Objects as OBJ Groups : Depeds

Material Groups : No

Keep Vertec Order : No

Set Smoothing under the Geometry tab to Face in the FBX export settings when exporting.


How to rotate a 'non-active' object with python? I have a laptop model and I want to be able to control the rotation of the screen through python. I have a basic menu with a slider. I had an armature and a bone and I got that working but it only worked when it was selected and in pose mode, however I want to be able to control it regardless of whether its selected or not. So I removed the bone and separated the screen from the body. But now its the same thing, I can only get the screen to rotate when it's selected...

This is the line of code that rotates the screen:

bpy.context.object..rotation_euler[0] = (self.screen_rotation * 0) + ((1 - self.screen_rotation) * 1.58825)

How can I make so I can rotate the screen without it having to be selected?

You could lookup the object by its name:

o = bpy.data.objects["Cube"] # Cube represents the name of your object

and manipulate the rotation

o.rotation_euler[0] = (self.screen_rotation * 0) + ((1 - self.screen_rotation) * 1.58825)


compositng: when I use an alpha over node only one layer shows up I have a render in cycles that I want to use as a still shot but I'm having trouble with compositing layers. I have three separate layers all showing different objects, but when I use an alpha over node only one layer shows up

in-case this is a simple problem I'll keep this post short, but if anyone need's SS then I can provide them

thanks

Link to Blend File: http://puu.sh/pvqXT/3fe1d73a82.zip

Your image renders properly when you select "Transparent' within the Cycles 'Film' section.... In the Blender file available for download, it is unchecked...

When checked, this is the result I get... and nice sparks!

Sorry... was not sure if it was in or out....  Is this as you intended? See Gears6 blend file... if this is correct, the issue was in the node tree.... but, if not, I misunderstood. :)


Blender 2.80 object won't show in render (.blend attached) I'm using Blender 2.80. Object shows in outliner and in viewport, but won't show when I render. I've been struggling for over a week now, what am I doing wrong?

Here is the file, the problematic object is called "WHYWONTRENDER".

Your object has been flagged not to render

Use the Filter drop down to show the options

Now enable Render on your object.

This is catching a lot of people out in 2.8.


Dyntopo creating spikes or stretched sculpt result on mesh When I try to sculpt with dyntopo on a sword it creates really weird results while it works just fine on other meshes. Any idea what causes this?

I made a quick test and it might be also that your object has other scale than 1,1,1.

The solution is to have your object selected and in the object mode press Ctrl+A and select Scale from the Apply menu.

Here I have more than 15 for the Z scale of a cube and the dyntopo sculpt result with the same settings as yours is quite stretched, like yours.

After applying the scale to 1,1,1, dyntopo behaves way nicer, again with the same dyntopo settings as yours:


How to re-organise messy uvs on texture image I have imported a glTF model of coral reef. It is good but has a huge polycount. I have a created a low poly copy but when I look at the uvs and texture image of the high poly import the uvs on the texture image are disjointed.

This is the high poly model

This is the image texture for that model

If I want to change the colour or quality of a portion of the model, it is almost impossible to do it because the uvs are not organised together to make changes to the image texture easy (in an external photo editor)

Say I want to change this portion of the model

the corresponding uvs are arranged in the image like this

Is there a workflow that will re-arrange the uvs more stragetically so I can make improvements to the quality of the image and then apply it to the low poly mesh.

many thanks

RichardC

*****UPDATE*****

I have found an acceptable solution, particularly based on Arthur's advise below.

I baked the texture image from the high poly to the low poly mesh. The secret is to UV unwrap 'Projected from View' having positioned the high poly mesh at the correct perspective/angle. The results as follows.

The low poly model in object view (right) and the new image baked from the high poly mesh:

The low poly model in edit mode with vertices selected (right) and those vertices shown on the new texture image (left).

This now makes alteration in a specific area of the image easier to identify in an external photo editor.

It won't get any better than that. This mesh is complex with a lot of small details. So either UVs will be stretched either they will be disjointed. In this case, it is usual to paint directly on a mesh and not on the UV islands.

There are some solutions. Paid or not. This particular one is not ready, but it is about Blender: https://www.youtube.com/watch?v=PLUoLQUK3-s Usually this stuff is done manually, which won't pay off in this case. I suggest to leave it as it is.


How to merge two or more groups to one using Python API? Having a large amount of objects in several groups, not being instantiated, I would like to merge them all to a single group. What is the most efficient way to do it using Python API?

EDIT

A minimal example would be:

Create a scene with two cubes, add them to Group1, save the file as file1.blend.
Create a new file with another two cubes, add them to Group2, save the file as file2.blend.
Start a new file and load groups from both using

with bpy.data.libraries.load('file1.blend', link=False) as (data_src, data_dst):
    data_dst.groups = data_src.groups
with bpy.data.libraries.load('file2.blend', link=False) as (data_src, data_dst):
    data_dst.groups = data_src.groups

What is the most efficient way using Python API to merge Group1 and Group2 to a single group?

After trying some more elegant methods and failing, this is a brute force solution to what you're trying to achieve. It essentially appends all the objects from the provided list of files (without their groups), and then adds all the objects into one group called 'merged'. It's can probably be solved more elegantly with groups, but since this worked for your example, I stopped trying to find other workarounds.

import bpy
from os.path import join

for g in bpy.data.groups:
    g.user_clear()
    bpy.data.groups.remove( g )

baseDir = "path/to/blendfiles"

allObjects = []

files = ['f1.blend', 'f2.blend']
for f in files:
    fPath = join( baseDir, f )

    objects = []
    with bpy.data.libraries.load( fPath ) as (data_from, data_to):
        for name in data_from.objects:
            objects.append({'name': name})

    bpy.ops.wm.append( directory = fPath + "/Object/", files = objects )

mergedGroup = bpy.data.groups.new('merged')
for o in bpy.data.objects:
    mergedGroup.objects.link( o )


Long hair collapses with soft body physics in animation I need to animate a long poly hair and would like it behave a little more like nature, so when I move the head it "follows it's path."

I used a Lattice Modifier with Soft Body Physics to simulate the effect. But as you can see it's collapsing on itself, making it look awful. Would anyone able to help me fix it please?

Braid Lattice Anim 2.blend

Probably the first thing people find when they enable soft body is that it all collapses in on itself. You need to stiffen it up a bit to have it maintain it's structure.

The first thing I would do is enable Stiff Quads and turn up Bending to 3, damp to 20 (under soft body edges) and damping to 12 (under soft body goal).

You will need to experiment more to get it right but that should get you closer.

You might find this video helpful in explaining some of the options.


I can't select a single bone in object mode I have been trying to attach the hat to the head bone for almost over 3 hours now and i just can't get it to work.

When i look up tutorials on youtube their bones are grey and available to click on a single bone in object mode, when i click on a bone it selects every bone and the bones are as in the picture (They are not selected in the picture). I think that has something with my problem but i have no idea how to solve it.

I think you are looking for the PoseMode.

The ObjectMode selects always the complete Armature.
In the PoseMode you can rotate, manipulate and add contraints to the bones.


How to set world sky environment for use in libgdx? I'm making a game using libgdx.
I have to set a sky to my game , using models or another way.
I looking how to make sky in blender .... I'm so confused. I need help.

For example I've made a sky using a sphere, and applied a skydome image. But in libgdx it is only visible from the outside, when I go into sphere it appears black. I mean the only outside picture seems

You would need to flip the normals, they are pointing outward, go to Edit Mode with your sphere selected. Select all A, from the mesh menu select Normals / Flip Normals

After that you normals should look like (display of normals can be activated by the highlighted button):


I started rendering a new animation after completely rendering one before. How do I retrieve that older render? This has happened multiple times, but I would render an image or animation, but would accidentally re-render the image or animation.

How do I go to the UV image editor and find the older render?

If you wrote over other files there isn't much you can do other than doing some kind of forensics and trying to recover your files with Data Recovery software (and that is way beyond the scope of this site).

On the other hand there are a couple of things you should do to prevent this from happening again:

-. Uncheck the Overwrite box on the output tab.

-. Don't use an animation (AVI, Qucktime, h264, Xvid, MPEG) format as output.

-. Render your animation as a series of images (PNG, Tiff, DPX, OpenEXR) and compile as video once you have rendered all your frames. This way, if the computer crashes you'll only loose the current frame but will keep all of the frames that have been rendered already.

-. Save different image sequence/animation renders to different folders under the Output file-path. This will let you save newly rendered sequences while preserving older ones for later analysis.


vertices jump about when dragging I am retopologising a mesh using shrink wrap modifier, but some of the vertices jump about when being dragged for alignment:

For example if I press G and drag the vertex below to the right a bit it, it will jump to the right hand end of the mesh.

Any ideas what is going on here,

Regards

Thanks for your responses hawkenfox / cegaton,

I have looked further into your suggestions.
As requested more info in screen shot with 3DView status bar.

Note: "Snap during transformation" NOT enabled.
"Type of element to snap to" is Increment, also tried "Face" as you suggested but no luck.

I am new to the shrinkwrap modifier and its settings.
I'm not sure what or where "Snap onto Self" and
"Project Individual Elements on the surface of other objects" are.
Here are the Modifier settings:

I have used this method on another mesh without any problems and only certain vertices on this mesh seem to be a problem.

I hope this helps

Regards

Yes, the shrinkwrap tool is used with the "bsurface" and grease pencil tool to speed up the retopology process. ;o)

You must have set your "Type of element to snap" to vertex or segment and have your "Snap onto Self" turned on. Check that Type of element to snap to is set to face. You can leave "Snap onto Self" on and turn on "Project Individual Elements on the surface of other objects"


Matching grass to terrain How could I match my grass to the terrain instead of being just flat? I'm watching the video by CG Geek and he changes the order of the modifiers but mine just makes the grass go everywhere.

This is mine

Here is the file https://mega.nz/#!ep0xCQaa!E2EziQYLgkIpqCqDO6GR1nKE4KOKUUwUEo0ZgLKXra0

Firstly you need to enable Use Modifier Stack in the particle system settings, so that the particle system uses the final derived mesh instead of the original base mesh.

From this point onwards the Particle System will start read the modifier stack and behave accordingly, so you have to have the stack order in mind.

You have two Displace Modifiers in place so i you want the grass to sit on the deformed terrain it can only be emitted after the deformation. Change the modifier order accordingly.

After that check your object scale and apply it with Ctrl+A , non uniform scales often cause issues, otherwise you will get weird results.


Extrusions causing problems in edit mode When I extruded vertices in edit mode, for some reason one of the sides of my 3-D model (the textured-looking side to the right) is creating a lot of errors.
First off, it automatically sets extrusions on the x-axis.
Secondly, it doesn't allow me to extrude planes into 3-D shapes.
Thirdly, I can't increase the height of vertices without it creating a new face.
Finally, it renders those automatic textures to create a grainy black texture in render mode.
I attached an image with the solid object (top) and the rendered object (bottom).
Note: I did not set any textures or alter the lighting on the model. Also, the left gray side is working perfectly fine without errors.

First, the "grainy black texture" is z-fighting. Some where you have overlapping faces.

The automatic extrusions on the x-axis is from the normal value of the face you are extruding from. You can after hitting E press Z and that will disable the guide along the normal.

I'm not sure what you mean by "it doesn't allow me to extrude planes into 3-D shapes." If you select a face in face select mode(change the selection mode with CtrlTab) then press E you will have a 3D shape.


How does one set a stretched stencil image back to original scale? I found out the hotkeys for stretching my stencil on the x axis (shift+rmb+x), now I would like to remove the scaling and put the stencil image back to its original dimensions. Strangely I haven't been able to find the quick key or the button in menu to do this, does such a thing exist?

I guess you need to go in the N panel > Tools > Brush Settings > Texture > Click on Reset Transform. It looks like scaling the way you did doesn't affect the Size values, which doesn't seem logical...


Texturing multiple chessboards Let's say I'm going to be doing an instructional animation showing 100 different chessboards/positions (all at once, at one point). The chessboards are just planes of 8x8 faces.  The pieces will just be textures.

My question is how to structure the materials.

Originally, I thought of having all the 12 piece types on one image, and using a separate UV map per chessboard, and if a queen was at c3, then move 'c3' in the UV map to be over the queen.  However, this turned out to be rather messy, and not maintainable so I'm starting again.

The "brute force" method is to do all the work in Gimp and have 100 textures of a full board.  That is of course not efficient with 100 1024x1024 board textures.

Another idea is to use a different material per 'face', so then have 14 different materials (6 piece types 2 colors, 2 blanks)  and apply a different material to each square.

Note that I would also like to be able to show different positions on the 'same' board at one point, so having some way to animate between different squares having different pieces is a goal.

Is there an obvious way to do this that I'm missing?

It seems you are trying to do illustration work on a 3D modeling tool.

Inkscape could be a much more adequate program for this. You will get the additional benefit of clean, unpixelated vector graphics.

If you want to do it in Blender then I'd say take advantage of its powers.

Model a clean board as a separate recyclable object. Texture it using a procedural checker texture as Dontwalk mentioned (one less image texture and unwrapping needed); then duplicate it around your scene as desired.

Then model your chess pieces also each as a separate recyclable objects and place them on each board instance at the planned position; even if they are just a bunch of simple flat planes or circles.

You can take advantage of easy independent positioning for each, and use snapping for precise placement, no need for dozens of different textures. You can still use image based textures for each piece if you prefer, but taking advantage of modeling might produce better results depending on what visuals you are looking for.

This way, you wont have duplicate textures, needless duplication of information and manual work painting each scenario as a pixel based image in a painting program.

If you are looking for plain flat colors and simple visuals you might not even need formal rendering and can quickly capture images directly from the OpenGL viewport preview.


Why aren't these faces extruded as the tutorial video? I was following a YouTube tutorial, and when the presenter "hit 's' and scale forward...", they looked like the first screenshot below. But when I did that, the direction that those faces were extruding to were different as the second and third screenshots below. Notice the bottom low faces; they are extruding upwards, instead of downwards as the tutorial. Why is it so? The blender project file is here.

You have a lot of overlapping vertices which seem to be effecting the scaling operation.

To remove these:

In Edit mode select All of the model.
Open the Vertex menu.
Select the Merge Vertices.
Select the By Distance option.

At the bottom of the screen you will see how many vertices have been removed.

Now re select the 8 faces, and they will scale as shown in the video.


How to render transparent background for png image texture with eevee? I have placed an image texture (on a plane mesh) using a png image that has a transparent background. The transparent background appears as the default material on the plane instead of being transparent. How do I get the transparent areas of my image to display as such? I need to do this specifically in EEVEE.

Here is the proper setup for a texture with an alpha (transparent) channel in EEVEE. Take note of the blend modes I highlighted in red on the right - these are necessary (anything but opaque).


Is there a way to have faces with equal thickness? When I extrude a face in an angle, the thickness is different according to the angle that the face is extruded. Is there a way to have faces with same thickness? Here is what I mean -

The blue lines are showing the lenght from one edge of the face to the other. They are all the same lenghts. I can acomplish this only by using tricks and it takes me time to do it. When I do it traditionally, I would rotate the edges on every extrusion and of course, the faces are no equal -

What do I have to use to achieve equal thickness of faces?

This is a good place to use a Solidify modifier:


half animal has a mirror. Can I move the tail from one side to the other? I have modeled with a mirror. Now I want to do the tail. The tail has to move from one side to the other but I can't because half animal has a mirror.

When I try to move the tail from one side to the other, this is the result.

Is it possible?  Can I take off the mirror just in the tail?

Another alternative is to keep the mesh symmetric with the tail in the center, and then add an Armature with bones to control the tail and then pose the armature to make the tail off-center.

The order of the modifiers (mirror and armature) are probably important.

Edit:  is a .blend file illustrating the technique and proving that it is possible to pose a mirrored mesh without applying the mirror modifier (leaving it as a modifier).


How to connect nodes very fast using shortcut? In Compositing nodes window there is an option to quickly connect the selected node to a viewer node using some kind of keyboard shortcut. I can't remember what it was. The only thing I remember is, that you have to hover the cursor over the active node's output (as shown below), press RMB or LMB and some kind of shortcut. Thanks for help in advance.

One other thing is interesting to me. When I hover the cursor over the selected node's output and press SHIFT+Right-click it become highlighted. What is this kind of selection for?

Ctrl+Shift+Left-Click on the node and it will connect to the viewer node. If no viewer exists, it will create one.

You can also select two different nodes and press F to connect them automatically (they will try and connect from the first output to the first input if they are available).

The Shift+Left-Click (or right-click as you mentioned) on the node socket output allows you to select which specific node sockets are connected when using F. This means you can also Shift+Left-Click on the target node socket to select which input it will connect to (by default it will connect to the next free input on the node).


Eyebrows not fully rotating with head The eyebrows and the rest of the body is one object. The eyebrows, eyelashes and eyes are not connected to the body. The eyebrows is the only part that doesn't fully rotate with the head when moving the head bone, where the eyes and eyelashes does, even though the eyelashes is fully weighted on the head bone like the other loose meshes. It seems like the eyebrows rotates around a different axis as the head when moving the head. This only happens with the head bone, the eyebrows rotates perfectly with the neck bones. I used rigify. Thanks for the help. Much appreciated!
The head bone I mention is "spine.006" in the blend file.

File on Google Drive

Select the eyebrows, on the right of the Vertex Groups list there's a dropdown menu, click on Remove From All Groups, then assign to the group called spine.006.


Video Texture on a complex surface If there is a noob forum I can post to in the future, please let me know, I am just learning Blender.
I was hoping to play a video clip on a surface other than a flat plane (for example a sphere or the face of an extruded text.  Can you point me to an resource for doing this?  Thanks.

I was a noob last year, so don't worry about it.  We are all learning here.
Here is how I achieve a light projection effect in Cycles.  I use a spot light with the following settings.  Hope it helps.


How to find out the exact Frequency of F-Curve Modifiers I want to create harmonic looping animations using the built-in functions for F-Curve modifiers.
Example: move an object back and forth along the z axis in a sine motion.
In order to make a perfect loop, i need to figure out the exact frequency of the built-in sine function. The docs don't mention the frequency at all and the value to change the frequency "phase multiplier" is rather obscure to me.

It looks like the base modifier is set to f(t) = sin(t) . That is to say, f(0) = 0, f(pi/2) = 1, f(pi) = 0 and f(3*pi/2) = -1

So the frequency is 2 * pi (The curve repeats itself every 6,283185307... units).
If you want to tweak the frequency, say you want a cycle every 10 frames, multiply the phase by 2 * pi and divide by 10.


How do I fill an area with faces lined up in a grid? I need to change these polygons into a mesh with the same amounts of edges going the opposite way so I can end up with a mesh that I can curve edges upward and indent the heel and ball of foot area downward, sort of making it look ergonomic. Subdivide adds an diagonal edge but also vastly increases the edges where I already have enough. Suggestions?

Delete all of the top faces.

Select the top loop edge ring.

Press CtrlF and select Grid Fill (or use the menu: Mesh->Faces->Grid Fill)

, playing with the settings until you find a result that you like:

NOTE:  For this to work you need a continuous loop with an Even number of vertices. An Odd number of vertices will report a "must select two edge loops" error.


Loop at intersection of two objects (script) I'm looking for a Script or Add-on for Blender 2.79 that creates verts and a lines where two objects intersect.

Practical example:

I need loops where the mountains intersect with the grass and where the grass intersects with the water for many purposes:

Hitboxes around everything preventing player from leaving level (Extrude loops upward)
AI boundaries where Ranged AI should not walk (Water)
AI boundaries where Melee AI should not walk into / see player
Boundaries for generating Vegetation using the Particle System

Image below is a part of the scene.

Some people recommended boolean and knife tools. It doesn't work out of the box, but I figured out a way and put it in a seperate answer below.

Bmesh bisect plane.

Here is a script that bisects one mesh with a plane and creates a new  mesh object with the intersecting edges.

In test example

Grid is a 100 x 100 grid displaced with a cloud texture via a
modifier (not applied).
Plane is a single face default plane, named "Plane".
Move plane to desired location and run script.
New object "Bisect" has the edges of the bisection only.

Still of result, since I hit stop on gif to quickly

2.8 version

import bpy
import bmesh

context = bpy.context
dg = context.evaluated_depsgraph_get()
scene = context.scene
ob = context.object
plane = scene.objects.get("Plane")

if plane and ob:
    pmw = plane.matrix_world
    face = plane.data.polygons[0]
    plane_co = pmw @ face.center
    plane_no = pmw @ (face.center + face.normal) - plane_co
    bm = bmesh.new()
    bm.from_object(ob, dg)
    bmesh.ops.transform(bm,
            verts=bm.verts,
            matrix=ob.matrix_world)

    x = bmesh.ops.bisect_plane(bm,
            geom=bm.faces[:] + bm.edges[:] + bm.verts[:],
            clear_inner=True,
            clear_outer=True,
            plane_co=plane_co,
            plane_no=plane_no,
            )
    # new object
    me = bpy.data.meshes.new("Bisect")
    bm.to_mesh(me)
    ob = bpy.data.objects.new("Bisect", me)
    context.collection.objects.link(ob)

2.7x version

Result of running in 2.79 on modified grid, using a one face plane object named "Plane"

import bpy
import bmesh

context = bpy.context

scene = context.scene
ob = context.object
plane = scene.objects.get("Plane")

if plane and ob:
    pmw = plane.matrix_world
    plane_co = pmw.translation
    face = plane.data.polygons[0]
    plane_no = pmw * (face.center + face.normal) - pmw * face.center
    bm = bmesh.new()
    bm.from_object(ob, scene)
    bmesh.ops.transform(bm, verts=bm.verts, matrix=ob.matrix_world)
    x = bmesh.ops.bisect_plane(bm,
            geom=bm.faces[:] + bm.edges[:] + bm.verts[:],
            clear_inner=True,
            clear_outer=True,
            plane_co=plane_co,
            plane_no=plane_no,
            )
    # new object
    me = bpy.data.meshes.new("Bisect")
    bm.to_mesh(me)
    ob = bpy.data.objects.new("Bisect", me)
    scene.objects.link(ob)


How do you control an edge loops direction? I need to learn how to control edge loops.

I want to get this edge loop to go downward to the bottom faces but instead its tailing off to the side.

I love box modeling but I keep finding myself stuck in these types of situations where im either focusing on the edge flow and sacrificing how the model looks or ill use the knife tool to cut up nice looking shapes but then have to solve the edge loop puzzle I made for myself.

Is there a way I can understand how to solve these issues myself or a tool that can help set edge flow more easily? Maybe like the poly strip tool from RetopoFlow but instead of adding geometry on top of a different mesh its making cuts top of it instead?

https://s3.amazonaws.com/markets-rails/uploads%2F1533048649070-rf-2.0_polystrips.gif

Edit: I was looking for a more general answer on 'How do you control where the edge flows' I don't normally leave engon. This was something I slapped together really fast as an example. Heres something I use more often.

How would you get this edge loop to turn where you need it to without messing up the shape of the face? This kind of thing happens a lot.

I know it's not an answer you are waiting for, but maybe use subdivision for edges of those bottom faces, and then move points with "vertex slide"? And then connect vertices with edge making?


Melt Cup together with handle How to seamless connect a handle to a cup?

What i have done:

I add a Nurbs-Cylinder and close the bottom. (The cup).
I add Bezier-Curve formed like the profile of a handle.
I add a Bezier-Circle formed like the intersection of the handle.
Set the Bezier-Circle as Bevel Object.
Resize the nodes of the Bezier-Curve.
Render

The Handle touches the cup just a little bit.

How to Seal the handle with the cup?

You could use the bridge function of the loop tools add-on if you have it enabled. You can find it under user  preferences> add-ons if you don't. In the attached gif I used a curve for the handle of my cup, and a cylinder for the cup itself. Press  Alt+C  to convert the curve object to a mesh object, then  Shift and RMB to select both objects. Then press  Ctrl+J to join your meshes. Now you can delete the unnecessary faces, and bridge the appropriate edges. To do so, use  Alt+RMB  to select your first edge loop, then Shift+Alt+RMB to select your second edge loop, and click bridge under the loop tools options.


Glossy Shader not working to create realistic texture as I wanted it too I'm trying to use the glossy shader to create that realistic effect on real world objects, but it seems as though if the glossy shader is not working as I please.
This is what it looks like:
I'm trying to give it a white reflection over the orange, but I'm not sure if i have to put something into the glossy shader, but I don't know.
Thanks if you know what i should do.

To get a nice reflection you'll want to add

More light
Materials, especially glossy or refractive materials, are hugely dependent on the surrounding light sources. Try adding a nice big mesh light (or area lamp) for the material to reflect
Fresnel
Light tends to reflect off of materials more at glancing angles, and reflect less when hitting a surface straight on. If you look at your top-down reference picture/texture, there is hardly any visible specular reflection ("specular" refers to perfect or mirror-like reflections, such as the sharp white highlights)

To simulate this, add a Fresnel node, plug your bump/normal map into it, and connect it to the Mix factor of the mix node which is mixing in your glossy shader.

This will make a big difference, especially on surfaces with lots of small variations in angle.

In this example I slightly complicated things by giving the rind a lower IOR than the rest. A more simple setup could just connect one of the fresnel nodes straight to the mix shader (both selected). However given that the rind and fruity parts of the orange have quite different optical properties, you probably do want to simulate that in some way.

Note that an actual orange is quite complex, with the fruity parts being translucent with a visible internal structure. To properly simulate one, you might want to model the slices and rind separately and use a translucency, SSS or volume shader (somewhat similarly to this).


what triggers extend non manifold errors? after highlighting my entire mesh, if i click any of the other options and not that one, nothing lights up as non-manifold, but as soon as I click "extend" as active, the entire mesh comes up as non-manifold.

Selecting Non-Manifold parts of your mesh, will select vertices or edges that are not part of a solid shape.

The extend option will add the chosen verts/edges to the current selection. As you have selected all before doing the search, this will just keep everything selected while turning it off will select only non-manifold edges, which could mean no selection.


Does anybody know how to paint multiple meshes using scripts? I use this code here:

mat = bpy.data.materials.new(name="Red")
tex = bpy.data.textures.new("red", 'IMAGE')
img = bpy.data.images.load("D:\\red.png")
tex.image = img
slot = mat.texture_slots.add()
slot.texture = tex
for obj in bpy.data.objects:
    obj.select = True
    bpy.context.scene.objects.active = obj
    obj.data.materials[0]=mat
    mesh = obj. data
    face_list = [face for face in mesh.polygons]
    for face in face_list:
        face.select = True
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.context.tool_settings.mesh_select_mode = [False, False, True]
    obj.active_material_index = 0
    bpy.ops.object.material_slot_assign()
    bpy.ops.object.mode_set(mode='OBJECT')
    obj.select = False

Then I switched to 'Texture Paint' Mode. And I found only the last mesh I processed was shown painted. I want them all painted.

Can set the material directly with obj.active_material.  The material index will be obj.active_material_index.  The material can be set directly to the faces with face.material_index.  Note I've used the scene.objects collection, and only looked at mesh type objects.

Test code below.

Textures fine, commented out re filename.

import bpy

context = bpy.context
scene = context.scene
#  reuse Red material
mat = bpy.data.materials.get("Red")
if mat is None:
    # create
    mat = bpy.data.materials.new(name="Red")
    mat.diffuse_color = (1, 0, 0)
    #tex = bpy.data.textures.new("red", 'IMAGE')
    #img = bpy.data.images.load("D:\\red.png")
    #tex.image = img
    #slot = mat.texture_slots.add()

mesh_objs = [o for o in scene.objects if o.type == 'MESH']

for mesh_obj in mesh_objs:
    mesh_obj.active_material = mat
    mesh = mesh_obj.data
    for face in mesh.polygons:
        face.material_index = mesh_obj.active_material_index


Curving an edge of a polygonal mesh in blender I'm trying to replicate this bat:

https://www.amazon.in/DSC-Scorer-Kashmir-Willow-Cricket/dp/B014R90AJA/ref=sr_1_11?s=sports&ie=UTF8&qid=1544122892&sr=1-11&refinements=p_n_pct-off-with-tax%3A2665401031

This is what I've done till now:

Now I want to curve the edges in a way similar to the reference image. How do I do that?

Beveling the corners isn't what I want. I need the highlighted edge to be curved similar to the path curve alongside it:

Is it possible you've simply got too many polygons at too early a stage to get smooth curvatures easily?

This illustration may not be exactly what you're looking for, but shows the kind of variation you can get from a Bevel modifier and subdivision:

Shows the mesh. A 2-segment  Bevel modifier is assigned, by weight. The weights on various edges are adjusted to increase/decrease the intensity of the crease after subdivision (The lower the weight, the sharper the crease, relative to the base bevel width set in the modifier)
Shows the Bevel modifier applied: what it's actally done
4,5 Show the result after 2x Catmull-Clark Subdivision.

I haven't gone all the way here - you could apply the Bevel, and go in to tweak the topology to remove any residual pinching, etc.


Rigging: Limiting motion on one axis to when the object is in a specific position on another I have modeled a child's toy robot.  It has a wooden block body with some slits cut it it:

The head is connected to the body by an elastic string, not shown, but the head sits like this:

So the first problem I'd like to solve is to constrain the head to only moving along the X axis when it is positioned at (or near) 0 on the Y axis, but also allow it to move on the Y axis when it is positioned at (or near) 0 on the X axis.
I have no idea at all how to put together drivers and or constraints to support this.  Any suggestions would be appreciated.

In my setup there are 3 bones, one controls the body, one controls the head and one marks the center loc of the head. Center and head are child of the body. Head bone has been rotated on x axis -90 degrees, to match world orientations, and has z loc locked.
Head bone has two limit loc constraints, one for X axis, one for Y axis.
Their influence is driven by two similar drivers.
The first driver has two variables, transform channel kind, evaluating Y loc of the head bone and Y loc of center bone.
I've named the variables with the same name of the bones, but they can have any name you want.
The expression says: absolute value of difference between Y loc of head and Y loc of center is > 0.1 (you can vary this value).
If the condition is true 1.0 is the output, if false 0.0.
The second driver is the same but controls limit Y loc, evaluating X loc.
Every constraint and driver has to be set in local space, in order to work even when the character is rotated, translated and scaled.
In the first limit loc constraint you can add a limit y loc from -1 to 1 (and the same in the second for X loc), in order to prevent the head going outside the body boundaries.


Why am I missing the UV Map option on certain Normal Map Vectors in Blender 2.8? **I make content for a game called Trainz 2019. I'm currently working on a fictional train. How the textures are add works like this:
An image texture to the base color, a parameter texture to roughness, and an image texture connected via a normal map vector to normal. But for some reason, on select surfaces, the UV MAP option is missing in the Normal Map vector. It won't let me select anything and on some surfaces where I already applied a material, the UV Map option is red and if I click on it, the option disappears. The textures have to be added this way, or it'll trigger an error in-game, so I need to figure out why the normal map disappears and how to get it back.
I've tried quitting out of Blender 2.8 and re-opening it, I've tried deleting the material and starting from scratch, I've tried restarting the computer, but still the vector won't work on select surfaces.
**

Your UV map is probably missing, check in the Properties panel > Object Data > UV Maps. If you don't see any UV map, you need to unwrap your object again so that Blender knows how to project the image on your object.


How to animate surface fluctuations I have experimented with Blender before making some simple low poly landscapes.

I found this example online:

The scene I am trying to animate is very similar to the example above but a low poly mountain range. How can I achieve this effect?

You can use a Displace Modifier and an Empty to move the coordinates of the Texture doing the displacing. This produces the "swimming through" effect. Use the Strength slider to adjust how subtle or pronounced you want the effect to be. Keyframe the Empty as needed to get the speed you want.

You can also change your Texture Type and Size to best fit your mesh density:

Rotating and Scaling the Empty produce interesting variations on this effect. Play with it. :-)

One more thing: Here's another way to do it with the Empty coordinates using a driver, so you don't even need to keyframe. If you type #frame into an input field then the value will move with the frame. Then you can change it to frame/20, frame/30, etc. for finer increments (slower change). This method uses Python, so you can "Reload Trusted" or enable "Auto Run Python Scripts" in Preferences.


Mesh disappears when Soft Body physics enabled I'm using Blender 2.79 and trying to apply Soft Body physics to a mesh, in this case the Monkey mesh.

I have enabled "Soft Body Edges" and set Edge as a Collision options. I also want to enable Soft Body Self Collision, but when I do and simulate the physics the mesh completely disappears.

Is there a setting that I'm missing?

This is easy to replicate by simple adding Suzanne to the scene, enabling Soft Body and enabling Self Collision - and the issue seems to be specific to Suzanne (the other primitives don't exhibit the problem). You can tell something is very wrong by checking the Dimension of the mesh (in the Properties panel (N)) on the second frame - it jumps immediately to some very high values :

The problem appears to be due to the geometry of the mesh - specifically Suzanne's eyes. The eyes are not connected to the rest of the mesh and actually overlap. This is resulting in particularly odd results with the self-collision - presumably as the overlapping vertices repel each other with almost infinite force.

To avoid the problem, in Edit mode (Tab) click a vertex on one of the eyes, hold Control and press Numpad + a few times until the whole eye is selected. Move the eye away from the head. Repeat for the other eye - so that both eyes are no longer overlapping the head.

Now run the simulation and it should behave normally.

I got some interesting results by just moving the eyes a little way away from their original locations. This, presumably reduced the repulsion forces to much smaller values, while still being too close for a stable simulation, resulting in Suzanne being pulled apart rather than being completely obliterated (I think the eyes are being repelled backwards at high speed through her head while the head is being launched forwards) :

So, in summary, the problem is due to overlapping geometry/vertices. Fix the geometry to avoid such problems.


What is a Duplivert, or a Dupliframe, internally? I've been using Dupliverts, and Dupliframes without fully understanding their internal representation in Blender. (i.e. which Data Blocks are linked,and  which are copied, how parenting is related to all this)

I would like to know what CtrlShiftA.. 'Make Duplicates Real' is actually doing - what the difference is between Duplicates, and the instances that result from the execution of that command.

I'll put here the data structure diagram for reference:

The material can be linked to Data (default) or to Object

The Object is just a container for the Object Data within, which is a separate datablock inside Blender, that can be used by any number of same type Objects.  Similar like a Material can have multiple users.

There are different ways you can make copies:

Duplicate Object CtrlD - duplicates the object and by default also the mesh. What is duplicated and what is instantiated can be set in User Preferences under Editing:

Duplicate Linked AltD - duplicates the object, but links the rest (like leaving all checkboxes from point above unchecked). In case of mesh object makes a mesh instance - shares only 1 mesh between them - object data is not duplicated
Duplivets, duplifaces, dupliframes:

tells Blender to use own object data (verts, faces, animation data at all frames) as transforms for copies of parented object(s)
the copies are instances of the parented object(s), nothing is duplicated, not even the object

Dupligroups

same as before, but whole group of objects is instantiated
makes only 1 copy using own's object transformation, doesn't make much sense to use enything else than Empty Object.

Particle/Hair systems:

transforms are taken from particle data

Linked object/group:

same as with Dupligroup, but links from another .blend file.

When you Make Duplicates Real CtrlShiftA, only the first relation in the chain changes from instances to real duplicates. You can now set different modifiers, materials (if you link them to object), constraints, etc. for these now real objects, but they still keep just one mesh linked between them - exactly same like a mesh instance.

To turn them into full duplicates use Make Single User U > Object & Data: this creates a mesh duplicate for each object, turning them into full copies (ctrl-d) effectively and you can now edit each copy's mesh data independently.


Text appears as string of boxes When I use the text tool, my letters always appear as boxes on the side menus and do not appear in the render area. In fact, whenever I type in blender I just get a string of boxes.

How can I fix this?

It appears that you may be using an international font, while not having enabled them beforehand. Go to this question for more details.


"no object or images found to bake to" error When i try to bake my model it come up with the error message
"no object or images found to bake to"

You have to create an image first. To do so click new in the UV Image Editor. Create your image and with it selected click bake. This only works in Blender Render like that. If you want to bake in Cycles you'll have to create an Image Texture Node in your material, don't connect it to anything, select your image and bake with the node selected.


Is it required converting videos to an image sequence before doing motion tracking? Some tutorials online recommend converting a video to an image sequence in Blender before using the motion tracking features. See https://www.youtube.com/watch?v=InIuTtt7W3E?t=135, which explains that doing it directly to a video works but does not save correctly i.e. next time you re-open the project you'll find the video is out of sync.

I find this hard to believe, that something as simple as this is broken in Blender.

Can anyone elaborate on why this is the case with Blender?

You don't necessarily have to convert video to an image sequence.
While it is possible to decode and track without having to use an image sequence, some videos will work and some will result in errors, depending on how they are encoded.
Blender is not broken, but can only work with video that is encoded with certain specific parameters.
Video encoded with intraframe compression will work fine. Each and every frame containd all of the information, so it does not depend from the
information  of previous frames or any of the frames that come after it (same as with an image sequence).
Video encoded with interframe , or long GOP compression, will likely yield errors, since the information needed to decode each frame is dependent on adjacent frames, and only the differences are calculated. In other words, there is a key frame that has all the information, for the next few frames only the differences are calculated, but to decode those frames you need to reference the keframe everytime.
Also, if the video is encoded using any kind of variable framerate (some phones use this to make small files, as well as some screen recording software), then it needs to be re-encoded and conformed to a uniform and stable framerate, before being imported in blender.
Blender will not do on-the-fly framerate conversion or temporal interpolation in any way.
For more information read: http://www.leckman.com/articles/codecs_05.html


How can I completely remove Blender from my Mac? Rather than continue spending time on an issue I can't resolve, I want to completely wipe Blender from my computer and reinstall it as if I'm installing it for the first time.

Steps I tried:

I selected "Load factory settings", but Blender stayed the same.
I dragged the Blender folder and zip file to the trash and Securely Emptied Trash, but when I downloaded and installed a fresh version from the Blender site, Blender still had my old settings.

Still, Blender opens with all my old settings. How can I remove all traces of Blender and install it totally new?

Check the OSX sections in the Blender manual, it lists all the default paths where Blender stores data / scripts after you install them.

https://docs.blender.org/manual/en/dev/advanced/blender_directory_layout.html?highlight=directory

If you remove Blender from all those places, and then reinstall, you'll be ready to rock again.

__

Blender, like almost all programs, must store persistent information like preferences, themes and scripts somewhere on your hard-drive. This is information you don't want to lose when you update Blender to a newer version. Normally that's exactly what you want, but if the stored information contains some weird content ( like in your case ) you can do a purge by removing all references to Blender from the directories listed in the link above. Blender will add those directories back again if it needs to.


Pressing "W" turned my cursor into a circle I was editing a curve for hair, and pressed W to bring the specials menu and Subdivide it, but instead everything but the curve I had active dissapeared, and my cursor turned into a circle like the one from the circle select mode.

I'm guessing they changed the specials menu and I'm inside some unknown to me function, but I'm not sure how to turn everything back to normal.

In the new default Left Click Select keymap:

right click (RMB) is what opens the menu for context-based special actions (Subdivide, Remove Doubles, etc),

while instead
W cycles through the Selection tools from the Tools shelf

So now you've got Subdivide on RMB, and you can get your pointer back by hitting W 3 times.

If you want to go back to Blender 2.79 Right Click Select keymap, you'll find this option in Edit > Preferences > Input > Select with.

The reason why everything else has disappeared is that you are in Local view (read that little (Local) in the Viewport's top left corner). I'm not sure how you entered this mode, and the W stuff is completely unrelated, but you can exit it using / or View > Local View > Toggle Local View


Update target with new same name object+suffix added I have a script that automatically adds an empty as a target of a constrain which works as it should be, but when I run again the script it adds another empty with the suffix .001 and what I would like to is that the target updates automatically with that new empty with the suffix .001 and so on.
Is that possible?
import bpy

empty_name = 'MyOwnEmpty'

o = bpy.data.objects.new( empty_name, None )

bpy.context.scene.collection.objects.link( o )

o.empty_display_size = 4
o.empty_display_type = 'ARROWS'

for x in bpy.context.selected_objects:
    objs = x.constraints.new(type='COPY_LOCATION')
    objs.use_offset = True
    objs.target = bpy.context.scene.objects.get(empty_name)

When Blender creates a new object, if one of that name already exists then it adds the suffix to make it unique. You can pickup that name immediately after creation via the 'name' property.
In your case you simply need to use o.name in place of empty_name :
import bpy

empty_name = 'MyOwnEmpty'

o = bpy.data.objects.new( empty_name, None )

bpy.context.scene.collection.objects.link( o )

o.empty_display_size = 4
o.empty_display_type = 'ARROWS'

for x in bpy.context.selected_objects:
    objs = x.constraints.new(type='COPY_LOCATION')
    objs.use_offset = True
    #objs.target = bpy.context.scene.objects.get(empty_name)
    objs.target = bpy.context.scene.objects.get(o.name)


Linting Blender Python in VSCode I use Visual Studio Code (VSCode) as a dev environment for Blender addons.  I installed the ms-python.python extension, and enabled the language server for pylint linting.

But, it doesn't know about Blender's various built-in modules:

What's the best solution to this?  It would be ideal if I can enable strict checking on bpy and friends.  But I would also accept if the best answer is just to configure the linter to ignore certain unresolved imports.

For this specific case you could try the Fake BPY module, which seems to be designed to solve this:
https://github.com/nutti/fake-bpy-module


Why does my texture looks pixelated? And How can I fix it? when I apply my texture it looks like this, it also happens when I try to paint. Can someone help me?

Texture looks like it is fine but it looks more like it is a shading problem.
In edit mode select all the faces and under the Shading/UVs click smooth.
Your texture could be pixelated because of image compression JPG are bad PNG are good


Mesh bend as it follow curve along path With mesh (stairs) following the curve path. Few stairs are in align rest as it goes up the stairs bending. Rotation scale applied. Tilt is also 0. Whats going wrong. Any suggestion or help Thanks.

The Tilt of the vertices are at 0° (3D View > N panel) so it's not the problem. You need to select the curve and choose Twist Method > Z-Up. That said the object is still not completely vertical. If it's too noticeable you need to switch to the Instancing method: Give the Array and Curve modifier to a vertex instead of your object, enable the Instancing > Vertex of this vertex, and parent your object to the vertex.


How do you do an island select? According to this video tutorial, on blender 2.71 to select just one of two objects that have previously been joined (with control + j), you hover your mouse over the object, and press L. ( Thats a lowercase L )

However, this does not do an island select, but instead pops up a menu, none of which do what is expected.

How do you do an island select on blender 2.7x?

As you have joined the two objects, they are now one object. In order to edit/select the geometry of an object, you must be in edit mode.

You can press ↹ Tab to toggle edit mode, or set the mode via the selector in 3D view > header:

Once in edit mode, L works as expected:

Note that you can also select geometry connected the selected geometry with ⎈ CtrlL:


How to draw grease pencil on a surface (blender 2,75)? I used to draw grease pencil on surface normally on older blender versions but now I cant find the option to do that,how can I draw on surface on the new blender grease pencil?

Add a new Grease Pencil datablock in a properies window (N). In Tool Shelf (T) change the stroke placement to Surface. Hold  D and then press and hold the LMB button to draw. Disable the X Ray option if you don't want to see the strokes through the object. To erase, hold  D button and then press and hold the RMB.


Set bone constraints via python API Is there any way to add bone constraint through python api?
For example, I have two armatures:

armature1 = scene.objects['armature1']
armature2 = scene.objects['armature2']

Next, I select bone from each of armatures:

selected_bone = armature1.pose.bones["neck"]
target_bone = armature2.pose.bones["neck"]

And now I need to add a bone constraint for selected_bone to copy rotation of target_bone. Does python API have such method?

Here is a quick example adding a copy rotation constraint to the active pose bone (in your case selected_bone), and giving it as a target the pose bone "Bone" from armature object "Armature.001" (target_bone).  Notice you use the bone's name for a subtarget.

import bpy
#context & scene for testing
context = bpy.context
scene = context.scene

#active pose bone as example
bone = context.active_pose_bone
bone2 = None
# other armature other bone
arm2 = scene.objects.get("Armature.001")
if arm2 is not None:
    bone2 = arm2.pose.bones.get("Bone")
# give it a copy rotation constraint
if bone is not None:
    crc = bone.constraints.new('COPY_ROTATION')
    #give it a target bone
    crc.target = arm2
    # note subtarget uses name not object.
    crc.subtarget = bone2.name


Mesh deforms after automatic weights (IK and pole vector) Blend : https://gofile.io/?c=4od4mq

My self made rig completely deforms after automatic weights. I've altered the rotation of the IK bone, in pose mode and reset the rotation of the bones with alt+G. When I created the bones, I did not pay attention to rotation axes. Did I mention I did not took the time to rename the bones?

What I might think is the problem is the legs, of the original mesh were not completely in T Pose.
Furthermore, the lower part of the mesh breaks after the process, which is caused by other problems.
I Followed this tutorial
https://www.youtube.com/watch?v=PM8mOq9RiNE

I think that’s the main problem is that you need to correct the Pole Angle of your IK bones or they are going to rotate crazy once in Pose mode, -90° for both right and left IK.

Also in Edit mode you need to bend the knees bones a bit forwards so that they’ll bend correctly in Pose mode. And join the 2 pole targets to your main armature. Make sure some bones (controllers, pole targets, root) won’t deform the mesh: Select each of them and disable their Deform option. And it looks like you have a lot of overlapping vertices, so altM > Merge By Distance and play with the parameters.


some faces are darker with fine normals I'm having problems with this face. It is darker than all other faces with fine normals and flat shading. How should I fix this?

here the highlited areas seem to be wrong, especially the whole plate on top

You use a good few materials on certain objects and i first thought that might be the reason, removing them one by one brought me to the bad one.

Problem :The material, "platne white+color?", is the reason, more specifically the "Normal Map Node" which is set to "Tangent Space".

Solution: Changed to "Object Space", all was fine, see the video below.

Little extra:
Since i always check for wrong normals when there are issues, please bear with me, as i mentioned in the comments already. Your scene has 2 objects with a few of each that i would strongly advice to correct the normals from. May not have been an issue yet, but i's generally a very good idea to keep them blue(correct) to have no issues later with renders. Glass reflection and refraction as well as subdivision as well as maybe materials can all be affected.

I put a little video here to show you the bugger and the way to correct the normals, just in case you didn't know yet.

By fixing the material, all objects that used the same material got corrected as well.
Also the material preview can give an indication that something might be wrong.


How to handle distortion at the poles of a UV sphere? I've been working on this helmet today just messing around, completely new to blender. I used a UV sphere to achieve the shape but its lead to an issue I don't know how to fix. I've tried cutting it, smoothing it, adding subdivisions and nothing has removed this. Any help would be appreciated.

One way is just to add extra supporting geometry around that part:

Another way is to use a quad-based style of cap:


Solidifying a T-Junction I'm trying to model the pacman maze in 3d. I'd like to use a solidify modifier so that I can easily change the thickness of all walls at the same time, however I'm having trouble with parts of the maze where the wall forms a T shape.

If I add subsurf modifier then the artifacts are even more obvious:

this method may not give you a good mesh but it looks OK :

add a Edge split modifier before the solidify modifier
set the solidify modifier offset to 0.0
other modifiers are added to smooth it out

here is a cross junction :

solid view

after Bevel and Subsurf modifier :


Bevel not working, still got a flat face! I have this going on with bevel, anyone know whats causing it?

I created this shape by copying edges from the main object then filling in the faces.

I've tried CTRL + b and the modifier, I've created vertex groups, adjusted the weight, checked the normals, just can't get it to bevel.

I'm new to Blender.

This looks to me like you have double vertices, i.e. several vertices in the same location, making two corners of that face loose. How you got those double vertices I can't say for certain, but most likely a mistake during extrusion. To check, go into edit mode, select that face and move it away slightly to see if something like this happens.

If it does, restore it to how it was before you pulled the face away, by hitting CtrlZ as many times as needed, then select everything by pressing A as many times as needed.

Then for 2.80 hit CtrlV followed by M then B to merge vertices by distance, i.e. merge vertices that are close to each other.
For 2.79 hit CtrlV followed by D (if I remember correctly, some builds used R instead of D), to remove doubles.

You'll need to do this before beveling.

The following should appear in the lower left corner of your Blender window, to let you configure the distance by which to merge vertices. If the dialog is closed, open it be clicking the little arrow to the left of the title "Merge by Distance". Leaving it at the default will likely be fine. This is for 2.80. Unfortunately I don't have a 2.79 install, but a similar dialog should appear if that's the version you're running.


difficulty playing back in VSE I'm new to blender.  I imported my videoclip (1080p, 60 FPS).  It's a relatively short clip but I ran into two issues:

1) Playback is incredibly choppy, though it's much faster on Kdenlive.  Is this a software or hardware limitation?
2) There's a 4 second limit to playback.  I realize I may be ignorant here with respect to my knowledge about how to use the VSE.

Unfortunately the playback rate of the VSE is not it's strongest side, however there are a few things you could try to optimize performance:

Select your clip and in the Sidebar make sure that Blend Mode is set to Cross.

Still with the clip selected in the Menus select Strip > Add > Movie > Set Render Resolution

In the View menu, switch Show Cache off.

If none of this improves the rate enough, then add your clips to a folder, and use the Velvet Revolver add-on https://github.com/tin2tin/blender_velvets/blob/master/Blender_2.80/velvet_revolver.py to batch generate proxy files, and then use it for switching between proxy and intermediate files.

Try first to generate proxies which are the same size as your original files, but using the h.264 codec in Velvet Revolver, but if that doesn't deliever a good rate, try lowering the resolution.

On 2. You'll have to change the preview range in Menu > View > Range


Is it possible to blur an Input value in the Cycles material node editor? I saw this question on how to blur an image texture, but how can I blur a defined input like a Fresnel input? When you set the Fresnel node to a value less than 1, it becomes sharp. However the color distribution is ideal for what I want. I just can't figure out how to adjust or even add a blur to that output.

I also could see this being very useful for other inputs, like the Wireframe node. You can get the wireframe lines very easily, however the transition has no way to be controlled currently.

Unfortunately you can't. The answer you linked works by adjusting the mapping coordinates, but this isn't possible with the fresnel node.

Perhaps if we knew more about what kind of effect you were trying to get we could think of an alternate approach..


Rendering Grease Pencil animation? What is the workflow for rendering/exporting grease pencil animation? Seems that the new updates for 2.78 are intended to make the grease pencil a production ready tool for making 2D animation in 3D spsce. There must be a way to render, right?

One way is to render with opengl, using the menu or the icon:

but this can't be enough in some cases...


How to mathematically define a torus in a volume Using the node editor and Cycles, how can I define a material that looks like a torus? This is useful in order to render a really smooth torus, without needing to a bazillion vertices.

This can be achieved by using the following node setup:

The formula which I implemented in order to achieve this can be found in the Wikipedia article for Torus. Note that this only works for tori whose big radius is greater than or equal to it's small radius.


Snap entire selection to the 3d cursor in edit mode Is there any way to snap an entire selection to the 3d cursor in edit mode?

Shift+S > Selection to Cursor snaps each individual vertex to the cursor, so the shape is lost:

If you grab a recent build of Blender of r58453 or greater (2.7x up), you can use Shift + S > Selection to Cursor (Offset)

The official commit can be found here. I could not find any documentation but it's pretty intuitive.