How to reset a Grease Pencil object's vertex colors This is my blend file. It has 2 GP objects. In object mode everything is colored correctly. If I switch from solid mode to Material preview or display render preview mode The GP Objects turn greenscreen green.
I've tried each of the 3 render engines. I've tried three versions on blender. I created a new file with a new GP object, which worked, then copied the green GP object into it... still green. What am I missing?

This is a fairly common and troublesome problem when working with grease pencil objects.
The issue is that, at some point while you had the GP objects selected, you entered Vertex Paint mode. Blender, assuming you were going to paint your grease pencil objects, created vertex paint data for them that now overwrites your material data for in material preview and renders.
Unfortunately (and in many cases problematically), there is no way to undo this with the default Blender interface (at least as of 2.83, and I don't believe recent versions have fixed that.)

You can, however, use a short python script to reset all your grease pencil objects.

Go to the text editor and click the + New button at the top to create a new Text datablock.

Use the following script, including a short function remove_vertex_paint() that removes vertex paint data from a grease pencil object. The two lines at the end will iterate through all grease pencil objects in your blend file and remove vertex paint data from them.
import bpy

def remove_vertex_paint(gpencil: bpy.types.GreasePencil):
    for layer in gpencil.layers:
        for frame in layer.frames:
            for stroke in frame.strokes:
                stroke.vertex_color_fill = [0.0, 0.0, 0.0, 0.0]
                for point in stroke.points:
                    point.vertex_color = [0.0, 0.0, 0.0, 0.0]

for gp in bpy.data.grease_pencils:
    remove_vertex_paint(gp)

Press the play button at the top of the text editor to run the script. Afterwards, you should be able to see your grease pencil materials in material preview and rendered mode again.

It's important to note that this will reset all grease pencil objects in your entire blend file, not just the one(s) you have selected, and not just the ones in the current scene. If you want to keep vertex paint data on some of the grease pencil objects, you need to replace the last two lines of the script and only call reset_vertex_paint() on the objects you want to:
remove_vertex_paint(bpy.data.grease_pencils['GPencil'])
remove_vertex_paint(bpy.data.grease_pencils['GPencil.001'])

And note that the names used here are the names of the grease pencil datablocks, not the names of the objects themselves:


B-Bones: How to get access to individual segments? What I need is to control bones of an armature by segments of a stretchy B-Bone in the same armature. To build what I had in mind, I would at least need the location and rotation of the segments.

If I had an idea how to fake the behaviour of a stretchy B-Bone (an equally subdivided curve with two handles), that would also be a solution.

What I tried so far:

Parenting the bones to the B-Bone. This doesn't respect the segments.
Using a mesh deformed by the B-Bone and Transformation constraints with vertex groups to control the bones. Doesn't work for the roll - which is important. Leads to cyclic dependencies because the mesh depends on the armature and the armature on the deformation of the mesh.
Using curves and Spline IK constaints to drive a bone chain. Doesn't distribute the curves tilt to the roll of the bones. Needs to be animated outside of the armature.

I made a small animation to show what I was trying to achieve, but I am basically out of ideas. The yellowish bones are the handles driving the B-Bone. The red bones should follow the segments (.gif unfortunately animated by hand).

Maybe there is a way to rebuild the behaviour of a B-Bone with some constraints or using a script that updates the bones while animating?

This is a very late answer, I didn't see in until now and if somebody had answered it, I would not have jumped in, since I am struggling with the same issue myself. But I might be a baby step ahead of you, so I thought I should share: You'll want to use a spline-ik constraint on the last bone of your chain, set the chain length accordingly (the selected bone included), as in the manual:
 https://www.blender.org/manual/rigging/posing/inverse_kinematics/spline_ik.html
You'll need a target curve. To control the curve you will need hooks, those can be bones, too, but whatever you do, don't use the same armature as the one controlling your bones because you will get strange effects: if you use bones as hooks, you'll need 2 armatures. I still need to work on the last part and I did have my trouble with tutorials, but I hope this was useful.


Too fast movement Blender 2.8 If I rotate with middle mouse button I move so much to fast. I rotate around a point somewehre. How I can rotate around the active object? Shift + F doesn't work. Thank you four our help.

In the user preferences edit - preferences you go to navigation, and then under orbit and pan check orbit around selection.  this will make you rotate around whatever object you have selected.

hope this helps.


Choosing recent files list at startup As a BSE user, I have to open many files from other users. The problem is that they're stored in the recent files list and my personal works are just disapearing.

I would like to choose a recent-files.txt when Blender starts, why not on splash screen, and be able to set one of them as default (when opening a file from explorer). Is it possible ?

The history file is managed by C code, see e.g. wm_files.c.

You could exchange the recent-files.txt by script maybe, then let Blender reload it by calling bpy.ops.wm.read_history() as seen in wm.py (everything else requires changes to the C code).

Example script that switches recent-files.txt and an also required recent-files-2.txt (you need to create this manually) and triggers a refresh of the Recent files list:

import bpy
import os

fp = bpy.utils.user_resource('CONFIG')
src = os.path.join(fp, "recent-files.txt")
tmp = os.path.join(fp, "recent-files-1.txt")
dst = os.path.join(fp, "recent-files-2.txt")

if os.path.exists(src) and os.path.exists(dst):
    os.rename(src, tmp)
    os.rename(dst, src)
    os.rename(tmp, dst)

    bpy.ops.wm.read_history()

You could also append to recent-files.txt, or re-write it completely. Just keep in mind that Blender ignores files that do not exist, and will remove them from the text file.


how to extrude an edge that stays connected with the face? I'm trying to extrude the face to create another wall. It works out well but the vertex and edge are not connected to the floor even though it's level. Anyone know how to extrude so it stays connected with the face? If it's even possible.

Thx

Screenshots:

I assume that your wall is orthogonal to the x-y-plane. Then there are several options to extrude the floor without loosing "connection" e.g. lifting your wall up.

If your plane is level you can easily lock the extrude to a plane by Extruding and then (while the extrude is active) press shiftz this will lock the movement to the x-y-plane. In case you want the extrude to be rectangular you can press y during the extrude to lock it to the Y-Axis. (This can be a powerful technique if you are comfortable with the different coordinate system orientations in blender) Blender_Manual

The other method is, as pointed out in the comment, using vertex snapping with the target being a plane. https://www.blender.org/manual/editors/3dview/transform/transform_control/snap.html%3E


Why is my imported object transparent when rendered? I imported a roblox mesh to blender, it looks fine when it's in viewport shading mode:

It looks like this:

But when it's in rendered viewport mode it looks like this:

It's like it's transparent. I want the bowtie, sword and face not transparent.

Check your materials and see if there's any alpha values applied on the objects. It does look like it comes from the materials


Is there a way to disable the grid in orthographic view? I'd like to ask about grid lines in orthographic views. Can we somehow disable them from drawing? Right now I have to turn on "Render Only" which is not the best solution.

Open the side panel by pressing N and on Display controls just bring down the number of Lines to 0


How do I calculate all motion before rendering? I am using pairs of empties, 'tracked to' each other to create a piston effect. I spent a long time getting the motion to work so that those empties are children of moving objects. It works OK, but the empties need to be reminded, almost every frame, to track it's counterpart. Is there a way to have blender calculate the motion of the scene so that these tracking constraints work correctly each frame? Any advice?

When the solver has trouble keeping up, like when tracking constraints get lost on a frame by frame basis - here's some advice. The fewer relationships between empties and meshes, the better. If your empty isn't tracking a mesh correctly or copying it's parent's motion correctly then make it's parent an empty. Surprisingly the increased number of empties doesn't make it harder on the solver, but rather makes it work better.


How to model a burger package with beveled edges? I am trying to model a burger box. I used a plane and extrude it for each side. After this was done, I fold the edges to fold the box. As you can see in the image below, it doesn't came perfect out of the box. I think the problem is that the angles of the beveled edges are not the same.
I start all over again, but thought maybe there are some good tips how to achieve a correct burger box. Especially for the angled corners as they should be aligned correctly to each side.

In reality, the paper bends to hold the box closed.
In 3D no bending occurs, the paper clips through instead.

Some pointers for modeling:

Model only one half and use Mirror Modifier to generate the other
Use Solidify Modifier to add thickness
Make use of Pivot points when rotating (Active element works well)
Use Custom orientations to rotate angled parts

Using Pivot Point > Active Element to rotate around selected vertex.

Using a Custom orientation to rotate an angled flap.


How to reconnect a split face to its mesh? I have accidentally pressed the Y key and have split a face from its mesh.

I can undo the action but I would like to know the actual command to do the opposite of split.

Merge tool options did not work (unless I am doing it wrong).
Object mode -> Join did not work.

Being in Edit Mode select the whole mesh (A), hit W-->Remove Doubles. Now you have a consistent mesh.

You may also use a Undo History pop up menu (press Ctrl+Alt+Z) and select the step you want to get back to.


background video for my camera has gone missing. help? I have a video set as my camera background but for some reason its cutting out mid video. Does anyone have an idea how to get it back?

it plays the frame before this one

Blender rendered part of my vid and replaced my background vid with this incomplete one.


Align a single object along Y axis I have one mesh, a tapered cylinder, that I wish to realign so that it is in the direct center of the world with it's length and middle on the Y axis. It is a duplicate of an object that was previously rotated, but for this iteration I need it dead center for future mirroring. Thank you.

I'm fairly new so please keep it simple :s

Go to edit mode on the object. Select which face you want to align with the world origin. Shift+s, 2 to set curser to center of face. exit edit mode to object mode. set curser to world origin. snap object to curser. then rotate object along which ever axis you need. see pictures.


clothing 2D pattern from Inkscape and simulate in Blender I am doing the project that, drawing 2D pattern in Inkscape, and export it as SVG file, then import to the Blender and simulate the cloth with the human model.
I draw the 2D patterns, and imported it into the Blender.
However, the patterns are not like vector object but just line shape.
How can I use 2D pattern as a vector object so that I can put it on the human model in Blender?
Thank you very much and if you need more information or detail, please let me know.

In inkscape the paths need to be filled, and be a closed path.
For a filled shape in blender:
In the Curve->Shape tab make the curve 2D and set the  Fill Mode to Both (Front and Back)

If your idea is to use it as texture on a material, then you need to convert the image to a a raster format (tiff or whatever other format you are confortable with) Blender cannot use pahts as texture.
If what you want is to create a shape and fold it or wrap it around objects, then SVGs will need to be converted to meshes.


linked mesh data without linking material data? I know I can make a linked duplicate with Alt-D
But can I unlink the material while keeping the mesh data linked?

So that if I go into edit mode and edit one of these tiles, they all get updated, but I can still change the color of each tile individually?

You can assign the materials on the object level instead of the data level. That way you can have linked mesh data and independent materials per object.


How to make tileable procedural noise texture? I'm trying to figure out how to make procedural noise textures tile. This is my simple setup so far, with a plane using 2 array modifiers (X/Y) and a single noise texture mapped from UVs:

However this doesn't really tile :S

UPDATE:
I've managed to get it tiling in 1D, using the trick of mapping UVs to a circle in 2D noise:

So now just have to figure out how to extend this to 2D (4D noise)

UPDATE 2
So I've played around a bit with adding 4D noise to blender, here is where I'm at:

I'm not quite sure about the interface to the node, maybe it would be better (easier to use) to just have a Tiling Noise node with a normal texture coord input.

Edit:
This answer describes achieving continuity by mapping 2D onto the surface of a torus. Now Blender has 4D textures, and you can avoid the distortion that introduces.

One way to avoid reflection as method of achieving continuity from u=1 to u=0, and v=1 to v=0, is to map u and v on the 2D tile from the surface of a torus embedded in the 3D texture space.
The parametric equation for the X,Y and Z of u,v on the surface of a torus, where u runs around the major circumference, and v runs around the minor circumference, is as follows. c is the major radius of the torus and a is its minor radius. u and v must run from 0 to 2 pi, or some variation giving a whole number of cycles.

X(u,v) = (c + a cos(v)) cos(u)
Y(u,v) = (c + a cos(v)) sin(u)
Z(u,v) = a sin(v)

Thanks to this answer on Math SE
Here's an implementation of that as nodes, expressing c as a multiple of a. The U and V nodes multiply the generated 0-1 X and Y values by 2pi.

whose output can be put through a mapping node for conveniently hunting down locations and rotations of the torus which give a desirable pattern..

with this sort of result:

There is a disadvantage of uneven scaling.. the inner radius of the torus is shorter than the outer, for u. For v, the radius is constant. But changing the ratio of c to a covers most anisotropy.
It's very possible that someone with better math than me comes along and improves / corrects this, but it's working so far.


How to populate UIList with all material slot in scene? 2.8 I make that script (Copy a piece from template UIList)
Now i can draw My box with inside the active object material but i want to populate that with all material in scene, i not undertand , how to.
Part of my script:

class MATERIAL_UL_extreme_matslot(bpy.types.UIList):

    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        ob = data
        slot = item
        ma = slot.material

        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            if ma:
                layout.prop(ma, "name", text= "", emboss=False, icon_value=icon)
            else:
                layout.label(text="", translate=False, icon_value=icon)
                elif self.layout_type in {'GRID'}:

                    layout.alignment = 'CENTER'
                    layout.label(text="", icon_value=icon)

Then for draw in panel:

class MY_PT_Panel(bpy.types.Panel):

    bl_label = "My label"
    bl_idname = "MY_ID_NAME"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "My Category"
    def draw(self, context):

    def draw(self, context):

        obj = context.object
        layout = self.layout
        row = layout.row()
        row.template_list("MATERIAL_UL_extreme_matslot", "", obj, "material_slots", obj, "active_material_index")

Im not sure if that is the best solution because i want to select material slot from that UIList panel.

Scene.material_slots

If I understand question you want to display all the materials used by all the objects in the scene.  Every bpy.types.Object has a material slots collection, a scene does not.
Added a material slots collection to the scene.
Used an old fashioned python property to populate Scene.materials from the non None materials on the objects in the scene.
def get_scene_materials(self):
    return set(s.material for o in self.objects
            for s in o.material_slots if s.material
            )
bpy.types.Scene.materials = property(get_scene_materials)

To use a UIList AFAIK need the list to be a collection, the index to be an int property.
The scene material slots is not populated automatically. If the set of materials in scene, does not match those in material slots a toggle button appears to repopulate the slots.  There are a couple of ways to make this automatic, but AFAIC are not worth the overhead.
The property Scene.materials will always return a set of all materials on all objects in scene.
bl_info = {
    "name": "Scene Materials",
    "author": "batFINGER",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "View3D > UI > Scene",
    "description": "List All Materials in Scene",
    "warning": "",
    "doc_url": "https://blender.stackexchange.com/a/141207/15543",
    "category": "Materials",
}

import bpy
from bpy.types import PropertyGroup
from bpy.props import (
    CollectionProperty,
    IntProperty,
    BoolProperty,
    StringProperty,
    PointerProperty,
)

def get_update_materials(self):

    update = set(s.material for s in self.material_slots).symmetric_difference(self.materials)
    if update:
        set_update_materials(self, True)
    return False

def set_update_materials(self, value):
    if value:
        self.material_slots.clear() # update (or get) instead?
        for m in self.materials:
            s = self.material_slots.add()
            s.name = m.name
            s.material = m

def get_scene_materials(self):
    return set(s.material for o in self.objects
               for s in o.material_slots if s.material)

class SceneMaterialSlot(PropertyGroup):
    def get_name(self):
        return getattr(self.material, "name", "")
    material: PointerProperty(type=bpy.types.Material)
    #name : StringProperty(get=get_name)

class MATERIAL_UL_extreme_matslot(bpy.types.UIList):

    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        ob = data
        slot = item
        ma = slot.material

        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            if ma:
                layout.prop(ma, "name", text="", emboss=False, icon_value=layout.icon(ma))

class SceneMaterialsPanel(bpy.types.Panel):

    bl_label = bl_info["name"]
    bl_idname = "SCENE_PT_materials"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Scene"

    def draw(self, context):

        scn = context.scene
        layout = self.layout
        col = layout.column()
        if scn.update_materials:
            col.prop(scn, "update_materials", toggle=True, icon='FILE_REFRESH')
        col.template_list(
            "MATERIAL_UL_extreme_matslot",
            "",
            scn,
            "material_slots",
            scn,
            "active_material_index")

classes = (SceneMaterialSlot,
           MATERIAL_UL_extreme_matslot,
           SceneMaterialsPanel)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.materials = property(get_scene_materials)
    bpy.types.Scene.update_materials = BoolProperty(
        get=get_update_materials,
        set=set_update_materials,
        name="Update Scene Materials")
    bpy.types.Scene.active_material_index = IntProperty()
    bpy.types.Scene.material_slots = CollectionProperty(
        type=SceneMaterialSlot)

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

    del bpy.types.Scene.active_material_index
    del bpy.types.Scene.material_slots

if __name__ == "__main__":
    register()

Edit.
Updated code to make it installable as an addon. (Add a filters to show only materials of selected / visible / etc objects in scene)
Related:
Your layout code was nuffed, see @p2or's fabulous answer to
Create an interface which is similar to the material list box
Notes:
Not sure how would correlate scene material index vs active object material index. Rather than using the list UI a more basic UI, with labels

    for m in scn.materials:
        col.label(text=m.name, icon_value=layout.icon(m))

or with operators could be considered.


Material Shader not fully applied to selected faces? Why? I am adding materials to my model but the bottom edges of faces do not show the colour/material even if the rest of its faces are coloured. Why is this?

As you can see by the picture, the grey area above the indent is part of the face of the red material but it is not shaded red along with the rest of the face. The indented section only coloured the middle red and left the top and bottom material-less. How do I fix this?

When you have more than one material on your object, usually you only have to select the faces you want to color and then press “Assign” in the material property panel.
Logically, you have the right (red) material in the list selected.
You can see every function you need on your screenshot.

Did that not work for you?


How to make all edges in the scene rendered by freestyle? Is there a way to mark all edges to be rendered with freestyle, without marking all edges as freestyle lines in each individual object one by one?

A simple python script can turn them all on/off

import bpy

for object in bpy.data.objects:
    if object.type == 'MESH':
        for edge in object.data.edges:
            edge.use_freestyle_mark = True

        #show the marked edges
        object.data.show_freestyle_edge_marks = True

Just paste this into the text editor, and press the hotkey ALTP, or the Run Script button to run it.

Then, to remove the marks, just change True's to False, and run the script and they should all be gone.


Area of mesh moving along bone despite not being weight painted I have made a simple character model and am adding a skeleton to it, so i can use it as reference and so i can get a feel for how rigging and weight painting are.

The white box (Shoulder_L) has weight and is the one linked to the bone that's within it, however for some reason some vertices in the right arm move when i pose the shoulder, despite not having any weight.

(The area within the circle is where the vertex that moves is located)

Blend File

The right arm and shoulder have weights form Arm_L bone that are causing the deformation.

You can clearly see it when in vertex selection masking and adjusting weights levels in the Weight Tools panel.

To fix that problem set weights from Arm_L on the right shoulder and arm to 0, or use Subtract Brush on that areas.


Forest by particle system and Tree addon? I try to make a forest.
I built some tree by the Sapling addon, but every each tree are 2 separated objects: the bole, which is a curve, and the leaves, they are planes. The leaves automatically are parented to the boles. I made group from these tree-boles.

In an other layer, I made a plane, subdivided. etc. and in the Particle system tab-Render-Group section i chose this group as source.
But only the boles are disappeared in the " forest". Why can I not see the "children" leaves?

I am doing that too and I fix it easily by checking the whole group option


Cannot access to addon preference value I have something like this in the my add-on __init__ file:

class MyPreferences(AddonPreferences):

    bl_idname = __name__

    num = IntProperty(name="Number", default=888)

    def draw(self, context):
        layout = self.layout
        layout.prop(self, "num")

I need to get this number from another file, and "MyPreferences.num" doesn't work. It returns a tuple, where the first value is "<built-in function IntProperty>" and the second value is a dictionary.

I can access the dictionary values, but the only ones available are "name", "attr", and "default", so if the user changes the property, I can't access the new value.

What should I do?

Something like this

addon = bpy.context.user_preferences.addons.get(addon_name)
if addon:
    prefs = addon.preferences
    print(prefs['num'])


best method to model a roofcorner I'm modeling a roof of a building. And I want to make a corner of the roof. Does anyone get an Idea what the best way is, to make such a corner? I just stacked them in one another and you can see the corner already, but can how I cut it perfectly now. So can anyone tell me what the best method is to model a roof corner or how I cut them the way they fit together. Thank you very much.

I found a good solution after some tests. I used the boolean modifier and used the different settings. Like that, I can separate the parts, and can then delete
them.

The finished model could look like this:


Preparing 29.97 and 30 fps video for VSE I have two videos I want to edit together, both are single long takes of the same event, taken from different angles with different cameras.  One is from an older Sony camcorder, 29 minutes long, 720x480, 29.97 fps; the other from an iPhone 6, 27 minutes long, 1920x1080, 30 fps.  Each has problems at various times, so I'd like to combine them with intercuts.  I understand that my first step is to convert the framerates to match. What's the best way to do this?  I've seen recommendations to use FFmpeg. With the frame rates so similar, is this overkill?  Thanks.

You will need to conform the footage to a single base rate. Although being very close, the values will be significantly off enough to cause sound slippage.

Regarding the Apple device, if from North America, I have extreme doubts that the footage is a base 30 rate. Typically most North American devices will list 24P or 30P and yet still be NTSC 24000/1001 and 30000/1001 respectively.

FFMPEG is probably a great entry point to conform any footage that requires such. Bear in mind that this may well have adverse effects on your footage as the frames in question may be dropped or doubled up depending on which target frame rate you are conforming to.


Blender particle hair coloring problem cycles render Im new to blender and I have a problem with coloring hair particles using cycles render. I used a vertex group to get the hairs sticking out of the scalp of the models head but when adding the colors the scalp is visibly colored as well and it looks really bad, is there a way to only color the hair and not the scalp?
Thanks!!]1

Well if you are simply trying to give the mesh object that has the hair particle system a different material than that of the hair strands itself, under the particle settings tab there is a section called Render where you can specify a different material for the hair strands than the emitter object.


What are the blue lines in a wireframe so, I've been working on a Blender file for a while, and I forgot what I did to make the wires turn dark blue, like so:

Anyone knows what this means?

It appears that you have enabled show weights under mesh display.

You can disable this in the properties panel while in edit mode by pressing N to open the properties panel, and locating Mesh Display and then unchecking the option.

Other blue lines can also be caused by having the sharp box ticked. Uncheck this if necessary too.


Mirroring an object along Z-Axis results in improper lighting Let me start off by saying, I am not certain if this is a Blender problem, or a problem with Roblox rendering. They're having no luck finding the problem there, so I'm coming here to see if it's something Blender-related.

I have a model which loads up in reverse of how I need it to be. The left side is on the right. So, in Blender, I have mirrored it, and flipped the normals.

The grey brick is a light source in these two screenshots.

I've tried extruding, I've tried using -1 Z size instead of the mirror function,  I've tried flipping and recalculating normals every way I can. But the lighting only looks right when I don't flip the Z axis at all, like so:

Is there a function in Blender that can fix this, or is it not a problem with the model, but the rendering program? (Blender's render shows no difference in lighting.)

I use Blender to create content for a game which makes use of a game engine which has a fundamental incompatibility issue with Blender. Where Blender defines the Z axis to be vertical, the game engine assigns th Vertical to the Y axis. It is worth checking to see if a similar incompatibility is involved here. Perhaps the render engine has reversed one axis (or more) so that where Blender interprets a positive value as meaning one direction, the render engine inerprets that same direction as a negative value.

I suspect that in your case if you orient your model so that the front of the car is at positive X, the Y axis in the render engine is oriented 180 degrees from the orientation in Blender. If this is the case, you may need to revise your workflow.


Items on top of cloth, and dragging the cloth to move those items [blend files attached] Using Blender 2.82a, I'm simulating items on top of cloth (which itself is on top of a larger plane) and then using the cloth to drag the items. I have a method that works reasonably well, but I'm wondering if anyone has advice on improving it or extending it to rigid objects. Here's the setup at a high level:

Create a flat plane at the bottom, with collision modifier enabled.
Create a new plane, sub-divide it, add the cloth and collision modifiers. Increase the number of quality steps.
Create three cubes so that they fall on top of the cloth. The cubes also have the cloth and collision modifiers. Increase the number of quality steps.
Following this tutorial, attach two armatures (and join them), and make them the parents of the cloth. Have the armatures move, so that two pinned points of the cloth move with the armatures.

Right now, the main hyperparameter that I have tuned which shows successful results is the Collision -> Softbody And Cloth -> Friction value:

This is for the cloth, not the cubes.

By default, the value is 5.0. Above, I changed it to 50.0. You can see the progression from the three GIFs with friction of 5.0, 15.0, and 50.0, respectively:

Here is the .blend for the above gif that uses friction = 50.0.

This setup seems to be working reasonably well. Now, I am wondering if it's possible to have rigid objects on the cloth. (The cubes have the cloth modifier.) If I make the following changes:

Make the middle block an active rigid body of type box, and remove the cloth and collision modifiers. Note: I also tried keeping cloth only, keeping collision only, and keeping both cloth and collision modifiers, none of which produced better physics.
Make the plane a passive rigid body modifier of type mesh, in addition to its collision modifier.

I get this:

Ah, but unfortunately now that the middle block is rigid, it no longer interacts with the cloth.  This is definitely hard to simulate with physics. Does Blender have a solution for this? Here is the .blend for the above gif.

A second question I have would be hyperparameter tuning. While I think tuning just this single friction hyperparameter work reasonably well, are there any others I should be aware of for testing purposes to produce realistic movements? The cubes, for example, are cloth and have their own friction hyperparameters, which might also need tuning, etc.

So, to summarize: (a) rigid objects on top of fabric, and (b) which hyperparameters to further tune? Thanks everyone.

Much like rigid body physics, the cloth modifier in vers,2.77a at least, won't allow the cloth to be animated or shapekeyed whilst the physics cache is active.
The cache's frame range can be set however (physics properties) so we turn that off at frame 140 when the cloth has settled down.
Whilst the cloth physics is still active, two 'cloth shapers' are underneath the table that physically 'lift' the cloth ends.  The cylinder moves to the right between frames 91 & 98, the other end's triangular cube, from frame 98 to 105.
Both lifters are given Collision Physics.  They don't interfere with other collision objects such as the table and are invisible when rendered.  (eye & camera icons in the Outliner)
In order to animate the cloth, we'd need to  "Apply" the cloth modifier at frame 140 when it's settled down and therefore 'freeze' it in it's current shape, allowing keyframed animation.
In this example we don't need to animate the cloth at all.  Instead we duplicate the table and get rid of the copy's inherited physics so it's just scenery.
The original table is made invisible in the Outliner and remains stationary to support the cloth.
At the frames where the cloth is supposed to be pulled to the right, we instead move the duplicate table to the left with the camera parented to it so the cloth appears to be pulled to the right.

As the falling cubes physics are baked we can add keyframes to simulate their inertia.  All three are parented to an empty so they can be moved as one.
Should there be other objects and scenery behind, simply render the tables, cloth etc. out with a transparent background and render that as one clip.  Render the background objects as another and mix them in the VSE.


Mesh partly shows wireframe upon texturing As you can see from the attached image, there is a problem with the texturing. I have not yet added a texture, but simply went into texture mode, and part of the mesh shows a wireframe as compared to being white like the rest of the mesh. This part is the "backside" of the cape; it doesn't show the the white color, whereas the "front-side" does. The cape is just a plane with many vertices. This also holds true for the inside of other parts of the mesh like the shirt, shorts etc. When I did add a texture image, the error still persisted. What is causing this, and how can it be resolved?

UPDATE:
Backface culling is disabled.
I am using blender version 2.69.

Thanks in advance.

You probably have enabled Backface Culling, either in the material's settings if you are in the game engine or in the viewport's shading settings:

Game engine material settings:

Viewport shading settings:

Disable it and you should see the texture of your object on both sides.

This is not a bug in Blender but an optimization technique which is used in games to reduce the GPU load. If you have a closed mesh you can not see the backsides anyway. Only if your mesh is not closed you need to draw both sides.


Activating Add-on, getting: ImportError: No module named 'bpy.utils.previews', 'bpy.utils' is not a package Add-on  Pro Lighting Skies Demo

This message error pops up when I follow the steps on how to download.  Somebody please help me.  I followed Andrew Price's directions on his website, Blender Guru, but it will not work.

You need to update to Blender 2.75. Versions prior to this don't have bpy.utils.previews which is used for custom ui icons and preview images. You will also need to install the add-on again, probably.


How to morph between shapes I am trying to make a keyframe pair where an object like this:
Becomes an object like this:
I tried to keyframe the two shapes with any frick keying set but it's either useless or "no context info available".
The initial shape is a plane that i extrude with Object Edit mode and then move two vertexs to make the end result. Anybody knowing how to fix this?

You want Shapekeys in this case.

First add a basis key as shown below.

Next, add a second key, and then go to edit mode, add edit the object to the second shape with the second key selected.

Here is the result:


How do I import a dxf? I am a noob with blender. Please be as specific as possible. College students have been doing this for me, but I am unable to understand them.

There are various dxf import / export plugins, but they are not enabled by default. One of these is specifically for Import (read carefully).

In the User Preferences window find the Add-ons tab.

Then when it's ticked, the .dxf import option becomes available in the File->Import menu


How to change the colors of a two-color texture? I want to create paperhanging for my interior scene, and I want the Pattern on my Wallpaper to be Black and everything else to be its normal color, I tried but everything I can make is exactly the opposite what I want.

Set up the nodes as pictured below. Add a RGB to BW node to make your texture work as a mask for two Diffuse shaders. Set up the colors for Diffuse shaders.

Flip the input sockets of the Mix Shader for a reverse result.


how to simulate 3dmax cellular map for displace like in video? found a very cool way to make nice rocks
https://www.youtube.com/watch?v=t0XQVS1qxZI
here a guy uses 3dmax with displacement with cellular map.
tried using voronoi in such a way, but i get wrong results. don't know what am i doing wrong here.

Please advice how to achieve this:

is it even possible to do in blender?

It sure is possible. I made a similar rock in a few minutes. You can check my settings from the image.

You can do this with one displacement map but for some reason I got better results with two. Put them underneath a subdivision surface modifier, and the displacement modifiers should have their strength reduced to the same number (.3-.5). The realism of the rocks comes from playing with the voronoi texture settings: size, and distance metric were most important. I found distance squared worked best. Also the color ramp can help level off any circular spots in the texture.

Hope that helps. Good luck!


Bundling python library with addon I'm making an add-on that uses the websocket library from python. Is there a way to include it in the add-on .zip file? Or do I have to add it to the site packages folder in blenders included python folder?

Blender includes pip on Windows since version 2.81, but not on other operating systems. Therefore, pip has to be installed through ensurepip.bootstrap() on Linux and macOS. This function can also be called on Windows, when pip is already installed. It will detect the existing installation of pip and won't modify it. Installing pip and Python packages through a script or an add-on may require that Blender is started with elevated privileges, for instance if Blender is located in C:\Program Files. Please note that this is generally not recommended for security reasons.
Important: ensurepip.bootstrap() calls pip during for the installation. pip sets the environment variable PIP_REQ_TRACKER which is used as a temporary directory. This directory doesn't exist anymore once ensurepip.bootstrap() finishes execution, but the environment variable PIP_REQ_TRACKER remains. This is a problem, because subsequent calls to pip will attempt to use the directory in PIP_REQ_TRACKER. It is necessary to remove PIP_REQ_TRACKER from the environment variables after calling ensurepip.bootstrap():
ensurepip.bootstrap()
os.environ.pop("PIP_REQ_TRACKER", None)

Once pip is installed, subprocess can be used to to install the required packages. The path to Blender's Python interpreter is bpy.app.binary_path_python. Installing a package, for example matplotlib*, would therefore be done in the following way:
subprocess.check_output([bpy.app.binary_path_python, '-m', 'pip', 'install', 'matplotlib'])

*matplotlib is used as an example, since I wasn't sure which websocket package you were referring to.

Important: It's common courtesy to not connect to the internet or install packages without the explicit consent of the user.
The following add-on has a button in the preferences that allows the user to install the required Python packages. If the dependencies aren't installed, a panel with instructions is displayed in place of the add-on's operators. This approach respects the user's privacy and doesn't install packages without their permission.
User Preferences

Instructions

After successful installation of dependencies

The import_module(module_name, global_name=None) functions allows to programmatically import modules based on their name and optionally specify a global_name under which the module can be accessed. For your own implementation it may not be necessary to use importlib and globals(), but it significantly reduces code redundancy if you need to import or install multiple modules. The installation of Python packages, as described above, is implemented in install_pip() and install_and_import_module(module_name, package_name=None, global_name=None).
Updates to this example add-on will be published on GitHub.
#    Copyright (C) 2020  Robert Guetzkow
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <https://www.gnu.org/licenses/>

bl_info = {
    "name": "Install Dependencies Example",
    "author": "Robert Guetzkow",
    "version": (1, 0, 2),
    "blender": (2, 81, 0),
    "location": "View3D > Sidebar > Example Tab",
    "description": "Example add-on that installs a Python package",
    "warning": "Requires installation of dependencies",
    "wiki_url": "https://github.com/robertguetzkow/blender-python-examples/add-ons/install-dependencies",
    "tracker_url": "https://github.com/robertguetzkow/blender-python-examples/issues",
    "support": "COMMUNITY",
    "category": "3D View"}

import bpy
import subprocess
from collections import namedtuple

Dependency = namedtuple("Dependency", ["module", "package", "name"])

# Declare all modules that this add-on depends on. The package and (global) name can be set to None,
# if they are equal to the module name. See import_module and ensure_and_import_module for the
# explanation of the arguments.
dependencies = (Dependency(module="matplotlib", package=None, name=None),)

dependencies_installed = False

def import_module(module_name, global_name=None):
    """
    Import a module.
    :param module_name: Module to import.
    :param global_name: (Optional) Name under which the module is imported. If None the module_name will be used.
       This allows to import under a different name with the same effect as e.g. "import numpy as np" where "np" is
       the global_name under which the module can be accessed.
    :raises: ImportError and ModuleNotFoundError
    """
    import importlib

    if global_name is None:
        global_name = module_name

    # Attempt to import the module and assign it to globals dictionary. This allow to access the module under
    # the given name, just like the regular import would.
    globals()[global_name] = importlib.import_module(module_name)

def install_pip():
    """
    Installs pip if not already present. Please note that ensurepip.bootstrap() also calls pip, which adds the
    environment variable PIP_REQ_TRACKER. After ensurepip.bootstrap() finishes execution, the directory doesn't exist
    anymore. However, when subprocess is used to call pip, in order to install a package, the environment variables
    still contain PIP_REQ_TRACKER with the now nonexistent path. This is a problem since pip checks if PIP_REQ_TRACKER
    is set and if it is, attempts to use it as temp directory. This would result in an error because the
    directory can't be found. Therefore, PIP_REQ_TRACKER needs to be removed from environment variables.
    :return:
    """

    try:
        # Check if pip is already installed
        subprocess.run([bpy.app.binary_path_python, "-m", "pip", "--version"], check=True)
    except subprocess.CalledProcessError:
        import os
        import ensurepip

        ensurepip.bootstrap()
        os.environ.pop("PIP_REQ_TRACKER", None)

def install_and_import_module(module_name, package_name=None, global_name=None):
    """
    Installs the package through pip and attempts to import the installed module.
    :param module_name: Module to import.
    :param package_name: (Optional) Name of the package that needs to be installed. If None it is assumed to be equal
       to the module_name.
    :param global_name: (Optional) Name under which the module is imported. If None the module_name will be used.
       This allows to import under a different name with the same effect as e.g. "import numpy as np" where "np" is
       the global_name under which the module can be accessed.
    :raises: subprocess.CalledProcessError and ImportError
    """
    import importlib

    if package_name is None:
        package_name = module_name

    if global_name is None:
        global_name = module_name

    # Try to install the package. This may fail with subprocess.CalledProcessError
    subprocess.run([bpy.app.binary_path_python, "-m", "pip", "install", package_name], check=True)

    # The installation succeeded, attempt to import the module again
    import_module(module_name, global_name)

class EXAMPLE_OT_dummy_operator(bpy.types.Operator):
    bl_idname = "example.dummy_operator"
    bl_label = "Dummy Operator"
    bl_description = "This operator tries to use matplotlib."
    bl_options = {"REGISTER"}

    def execute(self, context):
        print(matplotlib.get_backend())
        return {"FINISHED"}

class EXAMPLE_PT_panel(bpy.types.Panel):
    bl_label = "Example Panel"
    bl_category = "Example Tab"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"

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

        for dependency in dependencies:
            if dependency.name is None:
                layout.label(text=f"{dependency.module} {globals()[dependency.module].__version__}")
            else:
                layout.label(text=f"{dependency.module} {globals()[dependency.name].__version__}")

        layout.operator(EXAMPLE_OT_dummy_operator.bl_idname)

classes = (EXAMPLE_OT_dummy_operator,
           EXAMPLE_PT_panel)

class EXAMPLE_PT_warning_panel(bpy.types.Panel):
    bl_label = "Example Warning"
    bl_category = "Example Tab"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"

    @classmethod
    def poll(self, context):
        return not dependencies_installed

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

        lines = [f"Please install the missing dependencies for the \"{bl_info.get('name')}\" add-on.",
                 f"1. Open the preferences (Edit > Preferences > Add-ons).",
                 f"2. Search for the \"{bl_info.get('name')}\" add-on.",
                 f"3. Open the details section of the add-on.",
                 f"4. Click on the \"{EXAMPLE_OT_install_dependencies.bl_label}\" button.",
                 f"   This will download and install the missing Python packages, if Blender has the required",
                 f"   permissions.",
                 f"If you're attempting to run the add-on from the text editor, you won't see the options described",
                 f"above. Please install the add-on properly through the preferences.",
                 f"1. Open the add-on preferences (Edit > Preferences > Add-ons).",
                 f"2. Press the \"Install\" button.",
                 f"3. Search for the add-on file.",
                 f"4. Confirm the selection by pressing the \"Install Add-on\" button in the file browser."]

        for line in lines:
            layout.label(text=line)

class EXAMPLE_OT_install_dependencies(bpy.types.Operator):
    bl_idname = "example.install_dependencies"
    bl_label = "Install dependencies"
    bl_description = ("Downloads and installs the required python packages for this add-on. "
                      "Internet connection is required. Blender may have to be started with "
                      "elevated permissions in order to install the package")
    bl_options = {"REGISTER", "INTERNAL"}

    @classmethod
    def poll(self, context):
        # Deactivate when dependencies have been installed
        return not dependencies_installed

    def execute(self, context):
        try:
            install_pip()
            for dependency in dependencies:
                install_and_import_module(module_name=dependency.module,
                                          package_name=dependency.package,
                                          global_name=dependency.name)
        except (subprocess.CalledProcessError, ImportError) as err:
            self.report({"ERROR"}, str(err))
            return {"CANCELLED"}

        global dependencies_installed
        dependencies_installed = True

        # Register the panels, operators, etc. since dependencies are installed
        for cls in classes:
            bpy.utils.register_class(cls)

        return {"FINISHED"}

class EXAMPLE_preferences(bpy.types.AddonPreferences):
    bl_idname = __name__

    def draw(self, context):
        layout = self.layout
        layout.operator(EXAMPLE_OT_install_dependencies.bl_idname, icon="CONSOLE")

preference_classes = (EXAMPLE_PT_warning_panel,
                      EXAMPLE_OT_install_dependencies,
                      EXAMPLE_preferences)

def register():
    global dependencies_installed
    dependencies_installed = False

    for cls in preference_classes:
        bpy.utils.register_class(cls)

    try:
        for dependency in dependencies:
            import_module(module_name=dependency.module, global_name=dependency.name)
        dependencies_installed = True
    except ModuleNotFoundError:
        # Don't register other panels, operators etc.
        return

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

def unregister():
    for cls in preference_classes:
        bpy.utils.unregister_class(cls)

    if dependencies_installed:
        for cls in classes:
            bpy.utils.unregister_class(cls)

if __name__ == "__main__":
    register()


How to display a text value in the 3dview that shows the value of the width in the bevel modifier while I'm changing it? I wanted to draw a text value on the screen when I change the value of a modifier, for example I need the value of the solidify thickness to show up on the 3d view screen.

Finally did it, well it took some time but I got to forgot adding the answer.

blf.draw(font_id, str(context.active_object.modifiers["Bevel"].width))


How do you manipulate pose bones using python? I'm trying to render different images of hand gestures using python, but for some reason, I'm unable to get the hand armature bones to move. I'm using Manuel Bastoni for the model. http://www.manuelbastioni.com/

Here's the code that I have right now:

bpy.ops.object.mode_set(mode='POSE')
for bone in bones:
    x = bone.location[0] + random.uniform(-0.2, 0.2)
    y = bone.location[1] + random.uniform(-0.2, 0.2)
    z = bone.location[2] + random.uniform(-0.2, 0.2)
    bone.location[0] = x
    bone.location[1] = y
    bone.location[2] = z
    bpy.context.scene.update()
bpy.context.scene.render.filepath = outfile_name
bpy.ops.render.render(write_still=True)

I saw that in the python console, bone.location = (x, y, z) works perfectly fine to manipulate the bones, but it's not working here.

Please let me know what I can do to manipulate the pose bones through a python script!

Thanks!

I'd avoid using ops to set the mode to Pose Mode.

Access the bones directly through the hierarchy as it is exposed through the api.

import bpy
import random

armature = bpy.context.scene.objects['Armature']

for pose_bone in armature.pose.bones:
    x = pose_bone.location[0] + random.uniform(-0.2, 0.2)
    y = pose_bone.location[1] + random.uniform(-0.2, 0.2)
    z = pose_bone.location[2] + random.uniform(-0.2, 0.2)
    pose_bone.location[0] = x
    pose_bone.location[1] = y
    pose_bone.location[2] = z


Why my object is not illuminated so I have my basic scene and one object (girl) is not illuminated by light source I did not touched anything it has just a texture as material.
Edit:
Render engine is cycles the object is imported fbx

You are plugging a texture node directly into the output node.
You must plug the texture node into a shader node such as a Principled BSDF first in order to get the color information from the image to the output correctly.
Below would be the correct setup:

See this question for more information on closures.
Side note, you also do not have a camera in the file you provided. Add one and you will be all set :)


Lock Limit Location Constraint Out of Bounds Values From blender.org: https://docs.blender.org/manual/en/dev/animation/constraints/transform/limit_location.html
Says right there:
When an owner is grabbed and attempted to be moved outside the limit boundaries, it will be constrained to those boundaries visually and when rendered, but internally, its coordinates will still be changed beyond the limits.
My question: Is it possible to lock values from going any further internally?
If i move the object beyond the limits, means i have to move the exact amount back for the actual object to change position.
Thanks.

In the constraint's settings, there is a box labelled For Transform.  Tick that, and you can't move the object beyond the constraint's limit AND, the location is shown as no greater than the constraint's limit no matter how far you try to drag it.


Bezier Tube - How to Fill the Ends? Would like to fill the end of this Bezier Tube with the same radius as the sides, not a flat piece. How is this done?

The OP may make further edits

I would like the end cap to have a rounded over look and not be flat like the first example or hollow like the 2nd.

Do you mean just fill in the end? Put a tick in Fill Cap - see first picture.

Or do you want the tube like effect in the next picture?  Add a Solidify Modifier and change Thickness to what you want.


How to remove unwanted edge between adjacent coplanar faces? I have a wooden box with diagonal struts to make it sturdy (don't try to google, impossible to find):

And it seems okay, but in edit mode it has meaningless edges appeared after tapping A -> Delete -> Limited Dissolve:

How to get rid of these, they are increasing triangle amount with no point.

The 'meaningless' edges are not meaningless.

because, internally ..

A face is bounded by a single unidirectional loop of edges .. so..
An edge may not appear twice in the same loop

The red areas in first two examples above are not faces, as far as Blender is concerned. The last example qualifies to be 2 faces.

So in this case, Blender has held on to the minimum number of edges to preserve the faces around the frame of your crate. If you got rid one or both of those edges, (say, by deleting them ) the faces would have to go too.


Can't render with Displacement Modifier on - is it destroying the mesh? So Im working on a loop simulation of inside the body (in this case the bloodstream) and having trouble rendering it. Ive made a circle into a tube (like a very thin wide donut) then into a mesh and added a displacement modifier. I also put a sub surface modifier either side. Nothing too extreme on the settings. Based on (but modified) this tutorial by BlenderMeds. I had the same issue when following the tutorial without my modifications to make it a Loop.
https://www.youtube.com/watch?v=98wp3mfjquM

It looks fine in the viewport (not torn/broken) but I cant render. When I try to, there are big gaps with nothing, just grey. Then with the displacement modifier switched off it renders ok (but just obviously without the effect i want).

Sorry if this is a noob question. Ive tried and tried and searched around and cant find an answer!

Render without the displacement modifier

Render with displacement mod turned on

Render with displacement settings I want (doesn't show at all)

Tutorial blood vessel not rendering

I'll bet you have a duplicate of the loop from before the displacement modifier was applied rendering at the same time. Disabling the eye icon in the Collections panel doesn't stop rendering. Click on that funnel-looking-thing to enable more filtering options. You want the one for rendering, which looks like a camera. Disable that for the duplicate. You can also do that in the "Object" panel (orange square-shaped tab)

EDIT: Yep. Turn off that camera icon:


What is an example of when I can use the 'Clamp' option in the MixRGB node? In Blender Cycles, in Shader nodes, the MixRGB node has an option "Clamp" that says: "Clamp result of the node to the 0..1 range". I can't think of a scenario where the node would output a result that's outside of this range. There's already a factor slider to mix the two color inputs, and for each color input, the slider options are already clamped between 0 and 1.

What is a scenario of when the MixRGB node would output a result that's outside the 0-1 range (and therefore is a case where "Clamp" can be useful)?

The mix node can produce results outside of the 0-1 range. For example, white divided by (almost) black gives a very high value. Take a look at this node setup:

I took 2 mix nodes, set them both to add, gave them both an input of '1' (white), and subtracted the end result with '1'. The final result of the nodes without clamping is '1' (white), while the result of the nodes with clamping is '0' (black).


How to remove dead BMVerts from a list? I am trying to fix a bug in my script that happens in rare instances. I believe the bug occurs due to the very last thing the script is doing, which is:

bmesh.ops.remove_doubles(bm, verts=verts_to_weld, dist=0.001)

I think the problem is that verts_to_weld refers to a list of BMVerts that contains dead elements. This is because earlier in the script I use bmesh.ops.delete() to get rid of inner faces after using bmesh.ops.extrude_face_region(). So essentially my Remove Doubles is referring to some vertices that have been deleted earlier and don't exist in my bmesh anymore, but are still in the list. Is there a way to take the list verts_to_weld and remove any dead verts from that list? Thanks! Here's what my error looks like and also the print(verts_to_weld) at the bottom:

From the print output, it looks like the 'dead' vertices don't have any index associated with them. Did you try iterating through the list -  verts_to_weld -  and removing vertices with index == None? Or maybe print the index of all the vertices in the list and see what it is for dead vertices. Most likely it won't be an int.


Selecting specific control points on a mesh when using box selection Is it possible to select vertices/edges/faces that the selection only touched
not all of the them?

To select an edge you should switch to edge select mode and right click on the edge or by using CtrlTab. To select more edges hold Shift while pressing RMB.

See Documentation on Selecting


Blender weird shading I'm having this problem

If you notice que is this weird shading on the curve , how can I fix it? i dont really know what it is, I've already tried flipping the normals but nothing, what else can i try?
thanks!
P.S. the mesh was imported from unreal, because in unreal it shows this problem

Fixed it, if you are importing from blender to unreal, and get the degenerate tangent base problem ujst uncheck this

the first two options
P.S. sorry, my unreal engine is in spanish


How to efficiently merge geometry and get rid of internal shapes, etc? I have this object:

Think of what i'm doing as using prefab sections that are arranged to form  shapes. I know how to snap and rotate. I'd like to be able to do a simple 2d Union of coplanar polygons, can anyone show me how. Is there an add-on perhaps?

You could try to merge vertices for a cleaner mesh by enabling the following options:

After that select a vertex RMB and move G displaced vertices over another vertex to merge them a circle appears around the target vertex confirm merge by LMB.

You could also add the reference image as a background image (only visible in orthographic mode).

Method 1
Use extrusion modeling. Extrude single edges E, rotate them R scale them S and if required move single vertices.
This is what @atomicbezierslinger describes.

Method 2
Extrude one single vertex E along the contour of the reference image and add faces later F.


Array and curve modifiers behave strangely I'm trying to create a road from a plane and a curve which I obtained from converting a mesh. This mesh was at its turn obtained by using the shrink wrap modifier on two meshes. Explained in this question.

This is how the setup looks

I created a small plane at the lower left side of the path from top view, intended to be replicated along the path to form the road, as explained in this tutorial.

This is how the modifiers for the plane look.

And this is the monstrosity which I get when I select 'Road' as the Curve modifier's object

What I would like is that the plane would follow the path and create a road over the mountain. I tried playing with the settings of both modifiers but I'm not getting anywhere expected.

What am I doing wrong?

It was an origin related issue as suggested in the comments by MarcClintDion and cegaton.

What I did to fix it was:

Switched to edit mode with the curve selected;
Selected the first vertex of the curve;
Snap Shift + S > Cursor to selected;
Got out of edit mode;
Set Origin Shift + Ctrl + Alt + C >Origin to 3D Cursor;
Selected the plane;
Set Origin Shift + Ctrl + Alt + C > Origin 3D Cursor.

Not sure if steps 6 and 7 are necessary.

Additionally because the generated road was getting crazy cambers in some parts I went to the curve's properties and set Twisting to Z-Up.


Character Hands Stuck During Animation I'm having a problem with some of my animations. My character is an ape and I designed 19 animations. For two of them, sometimes my ape's hands get "stuck" in place, and the rest of the mesh contorts and distorts as it plays the animation. See screenshot - the left image is when it distorts, the right is when it plays correctly. Strangely, I'm able to fix this in Blender by switching back to certain other animations (not just any other animation - it only works with a few). Then when I switch back, the problem animations run correctly and the hands are no longer stuck in place. The big problem is - when I export my model and armature as FBX and import into Unity, those animations always play incorrectly with the hands stuck in place. I think this has to do with the IK bones (inverse kinematics) I applied to the hands at a certain point. But it's strange because this problem only applies to two animations out of 19. Any advice on how to fix this would be greatly appreciated. The file is too large to upload but I'll gladly send it via email (BrianKenny718@yahoo.com). Thanks!

You need to check 2 things: The keyframes of your IK controller bone, and the Influence value of the IK bone.

First enable the Only Include Channels Relating to Selected Objects button (arrow icon). It will allow you, in the Dopesheet, to only display the keyframes of the selected bones.
Now select the controller bone and switch from an action to another, you'll see that sometimes the controller doesn't have any keyframe at the beginning of the action, which means that, until the next keyframe, the controller will keep the position that it got at the end of the previous action, is it what you want?
Also, you'll see that for some animations you have keyframed the Influence value of the Ik bone, so for some animations it will be at 0 and the IK won't work anymore, and will remain off if you switch to another action that has no keyframe for this value, again if there is no new value keyframed at the beginning only the previous one from the previous animation will be taken into account. Again, is it what you want?

So to fix both these 2 problems you may need to create some keyframes at the beginning of the action: Keyframes for your controller and/or IK Influence value.


Bone weighting failed I have had my bone weighting fail before however all the solutions I have do not work for this mesh I have removed doubles separated loose parts and recalculated the faces.

I don't understand why it cannot be weighted it is a regular Female character

I have the model here
(

Can someone help me understand what the problem is so that I can deal with this if it happens again.

The problem lies on the eyes socket.

I could automatically weight the mesh with this procedure: i selected all eyes socket (the vertices not selected in the picture), pressed P for separate vertices into a new object, then automatically weighted the body. After doing this you can rejoin the two meshes, remove doubles, select the eyes socket and manually weight them.

Make sure you are working in the "basis" shape key!


How to unwrap a ring to straight gird? I want my texture to circle around the top of the ring.
Any solution to unwrap the ring to straight grid?

To get a perfectly straight strip, select 2 points on one side of a section of your unwrapped ring (preferably one that already has 2 "flat" edges - such as the one at the top). Set your transform pivot point to "Active element".

Scale the 2 points to 0 on whatever axis you are using (I used X) to make the points straight in line on this axis. Do this on both sides until you have a rectangle.

Now select the whole thing, keeping the "rectangle" selected. Press U for unwrap in the 3D viewport and select "follow active quads". This will make your selection into a strip.


Blender 2.75b fails to start on Windows 10 I am trying to install / start Blender on Windows 10.  It shows the console window (but no text in it) and never shows the application window.  The console window never disappears either.  This is odd as I have the same blender running on 2 other Windows 10 machines.  I've downloaded both the MSI and the zip file.  Any suggestions on how to debug this?  Is there a command line flag that will log application progress?

So the real answer here seems to be in Windows and the drivers.  The only solution I've found is that I can re-install the Operating System to get it to work.


Creating a single vertex on the cursor position How do I create a single vertex (not connected to another vertex) on the cursor position?

If you press the left mouse button while holding Ctrl you can add vertices at will. Any subsequent vertices created will be connected by an edge.

To create unconnected vertices only you would need to deselect the previous vertex.


How can I automatically generate vertex groups for an armature? I've been trying to find this on the Blender Wiki, but I can't seem to find the details. I knew how to do it one time but I forgot how to do so now.

How do you generate vertex groups for individual bones in an armature automatically?

If you first select the mesh and then the armature and use Ctrl + P > Armature Deform > With Automatic Weights, this will generate a vertex group for the part of the mesh that corresponds to the bone in the armature. (this is dependent on how many bones are in the armature and or how much geometry the mesh has)

You can then use either Edit or Weight Paint mode to tweak what parts of your mesh are affected by each group, to quickly select a group and see the selection, you can go to the Vertex Groups panel in the Object Data tab.

Additionally, you can also parent the mesh to the armature as empty groups..

and then select the bone while in Pose Mode, open the Specials menu with W or from the weight paint view header and choose Assign Automatic from Bones, this can give you a bit more control over how your groups are created as you can see it on the fly and edit it further.


Why 80 % of my model is missing when exported from blender and imported into unreal engine 4? The first image is in blender and the second one is in unreal engine 4. I parented the top half of the gun and the barrel of the gun to the bottom part of the gun. The top half of the gun is parented to an armature. When i export from blender i select the whole gun and ticked selected objects in the export window and then export. In unreal engine, only the top half of the gun is visible while the bottom half disappears. Please help and ask if you need more screenshots to help solve the problem.

In picture 1 you can see the animation is broken up into several files even though i only have 1 animation linked to one bone and another one linked to another bone.

The problem seems to be that the missing objects dont have a bone assosiated with them. Try assigning a bone to every object.


Lighting a volume with a bi-color point light I would like to light the center of a cylinder volume with a gradient light White -> Red -> Blue radially from the center to the border.

I created the cylinder normally and applied a volume material:

Then, I created the light as a point and applied a blend texture like this:

But I don't get the expected result (the center should be red then white) :

The tutorial where I have seen this method is tagged as outdated.

Do you think it's the reason for why it doesn't work?
Do you know how to make a colored gradient lighting of a volume ?

I'm using blender 2.72

I think your problem is with the scale of the mapping for the texture.
I made a test using an empty to control the mapping. Changing the scale of the empty or the size on the Mapping controls did the trick.


Weight Paint Disappears When I Select a Bone I'm on Blender 2.81 and I'm having an issue selecting bones while weight-painting. My Armature has been parented to my Player mesh with Automatic Weights. I have Edit-->Lock Object Modes off. Also, I use Left-Click select mode. Here's what happens...

In Object Mode, I select my Armature, then shift-select my Player mesh, then enter Weight Paint mode (see the first image). As you can see, the weights show up just fine, and my Armature has been automatically switched to Pose Mode. This is expected.
Next, I try to Ctrl+Left-Click (this also happens when I Shift+Left-Click) a bone on my Armature. What I expect to happen is that the bone is selected and the weights for that bone get highlighted. However, this isn't what happens. Instead, the weights all disappear and everything goes gray. (See the second image.) It looks like I'm still indeed in Weight Paint mode, but I can't see any weights.

I appreciate any help!! :)

UPDATE: Just posted here and replied here. This is definitely a community-known bug. Also, I just confirmed selecting bones while in weight-paint mode works on a Windows computer with a better graphics card (and I’m assuming also the latest drivers).

Instead of trying to have all of the bones and the object selected together, just select the bone you want to weight paint in pose mode, and then select the object Player or the object you want to weight paint. You do not need to have both objects selected together to weight paint.


Convert a 3d model into a simple 2d model I have a complex 3d model and I want to have a 2d model of it's front view.

This is my complex model:

I want to have a 2d model out of it to look like this but with minimum number of vertices, what I did below is that I set the scale of the model in y-axis to 0 but I don't think this is the right way especially that the number of vertices are still the same and still considered as a complex model:

I need it to still have simple faces as I will assign some vertex groups and different materials to each vertex group as shown below:

One way of doing this:

Set up your scene with an orthographic camera facing the model you want to "flatten".
In the User Preferences, under Add-ons, search for svg and enable Render: Freestyle SVG Exporter and Import-Export: Scalable Vector Graphics (SVG) 1.1 format.
Under the Render properties panel, check to enable Freestyle and Freestyle SVG Export, and under Output set the path to somewhere intuitive (I used the desktop).
In the Render Layers panel, under Freestlye Line Set, uncheck the "Edge Types" Sillhouette, Border, and Crease, and check only the edge type External Contour.
Render the image and an SVG will be placed on your desktop. Under File > Import select Scalable Vector Graphics and select the file on your desktop.
At the center of your scene, the flat monkey head is imported as curves. To clean up the imported svg, I took these measures:

Select all of the curves and use Ctrl + J to join.
Convert to mesh with Alt + C.
In Edit Mode, select all vertices and remove doubles.
Select all vertices and make an N-gon Face between them with F. (Not a clean solution, but should work for most 2D-object purposes.)
In object mode, set geometry to origin with Shift + Ctrl + Alt + C

Now you have a flat model of your mesh, with only the minimal amount of vertices and no extraneous faces or geometry.


Making little holes in mesh I'm quite the beginner with blender (just finished the donut) and I wanted to make a 3D replica of a radio that I have, but I have no idea how to make the little holes properly that it has in it.I assume the best way to make it is with the boolean modifier but it takes my pc like 30 seconds to calculate. Is there a better way to do this?

These are my modifier settings:

You could fake holes with normal or bump maps, but if you want to create real holes, create a plane, subdivide, select all except the borders:

Press CtrlB to bevel the vertices (go into the Operator box to select Vertices):

If you want more than 4 vertex holes, increase the amount of Segments and choose Shape > 1 to make them round:

In Face Selection mode, select one face and press ShiftG > Polygon Sides to select all the similar faces:

If you ever change the holes size, choose Transform Pivot Point > Individual Origins. When you're good, press i twice to inset each face:

Extrude down a little bit, then again twice, then give it a Subdivision Surface and Shade Smooth:


premultiplied alpha? I would like to know in blender (internal) if premultiplied alpha is the same effect of "alpha clipping" in the alpha blend mode?

I have found this :

"PREMULTIPLICATED ALPHA

The transparency information is stored in the alpha channel and also in the visible RGB channels, which are multiplied with a background color. The colors of semitransparent areas, such as smoothed edges, are tinted in the background color in proportion to their degree of transparency.

If white pixels have a value of 1 (figure) and black pixels a value of 0 (transparent background) and multiply them by the pixels of the RGB image, pixels multiplied by 1 will maintain their values while pixels multiplied by 0 , Will become black. The problem comes when it is a value between 0 and 1, that is, a grayscale.

When composing these types of images on another background is when problems often occur. These are evidenced in the contours where, due to antialiasing or other effects, some of the pixels are gray, thus they are semitransparent. When composing our images, that semitransparency will show the black pixels of the background. When in addition, the alpha image contains motion blur, the problem is usually much worse, since it increases the number of pixels affected by the premultiplication."

that is a theory ,but I would like to inherence in blender.

No, alpha clipping refers to the amount of clipping applied to the alpha channel in the viewport (that is, what gets transparent and what gets solid in a face with an RGBA texture).

"Premultiplied alpha" refers to one of the two possible alpha modes:

Associated or Premultiplied
Unassociated or "straight" in Blender.

These alpha "modes" define which alpha over formula has to be used for blending the plate over a background.

When alpha is "associated", the alpha-over operation will simply add the foreground plate to the background previously scaled by the foreground's inverted alpha.

When alpha is "unassociated" (straight), the foreground has to be pre multiplied by its alpha channel before the aforementioned operation, because the pixels with alpha 0 have RGB information that otherwise would be added to the background (and in the case of an unassociated alpha, it's not desired).

The term "pre multiplied" refers in the first case to the fact that the foreground doesn't have to be multiplied by alpha by the over operation, so it's considered as if it was already "pre multiplied".

For that reason, it's adivisable to avoid the term "pre multiplied" becuase it suggests that there was a multiplication (which actually didn't happen). Alpha is "associated" as if it was already "pre multiplied".

Associated alpha allows more nuanced compositing effects than unassociated, as it allows to composite pixels that are both transparent and luminous, therefore is usually the recommended format for VFX (and it's the format that renderers like Blender's internal and cycles produce).


Rotating Objects In the Direction I want I've been working on some weapons for my game, some of them having objects such as Crystals that will be rotating in game. I'm working on a staff which has 4 crystals, 3 at the top and 1 at the bottom. I want them each rotating in the direction that leads from the bottom vert to the top vert, meaning more of less the bottom and the top vert wont move much if any ( In the picture I selected the verts I'm referring to ). Its easy to get that to work on the crystals that are facing straight up and down, but some of the crystals extend outwards at around a 45 degree angle and thats before the weapons in the characters hand. I've probably spent 20+ hours trying to figure it out, many times I thought I was close or on the right track but always came up short. I've also created a dumbed down version of my staff and uploaded it so you can better see / understand what im referring to.

If I understood you correctly, you should select the crystal, under the Transform tab(N) go to Rotation, change XYZ Euler to ZXY Euler. Then press R to rotate and then Z twice to get it rotating around local Z axis.


Glass material becomes white (Cycles) I made some glasses for my character, and gave the lenses a glass material, which works fine, except for the fact that at some angles, when rendered, the lenses turn completely white. I don't think this is reflection, because it does not gradually turn white. One angle it's fine, and turn it ever so slightly and it goes completely white.

I have no clue what could be causing this.

EDIT: I have posted the Blend file on the Blend Exchange so you guys can check it out!

@EVERYONE I messed with the IOR slider on the glass material and now it doesn't happen anymore... I will still post the blend file in case but I think it's fixed!


How to change the orientation to resize? I don't know what I did, but now the resize follows the cursor, When I resize the object goes away. How can I change the orientation to the object again?

Note: I hid the cursor because I think this could solve this problem, it is at the world origin.

You've selected the 3D cursor as Transform Pivot Point, so you need to switch to Median Point for example:


How to export blender model to Metasequoia files(.MQO) That pretty much all, I need to export the model to this type of model for a papercraft designer program that only uses this file format. Is there any way I can export it to this format or any plugin I need to install to do this?

I found this plugin : meshIO, I've tried to install it and apparently it's working:

http://sourceforge.jp/projects/meshio/

After installation, you can export in .MQO file with file -> export


Can I resume retopologizing a mesh in Retopoflow after exiting the tool? I'm learning how to use Retopoflow 3.0.  I've found that after exiting the tool by pressing the tab key that there seems to be no way to activate the tool again and resume editing my retopology mesh from the point where I left off - so it looks like you have to do your retopology all in one shot.  This makes it hard to deal with sculpt errors that you don't notice until you're well into your retopologizing job.
Am I wrong?  Is there a way to continue from where you left off?

I ran into this problem as well. You have to be in edit mode to re-enter Retopoflow.
With the RetopoFlow mesh selected in edit mode, press the diamond button to start RetopoFlow or open the menu and pick any of the RF options.

So, thankfully there is no need to retopologize all in one go.


How do I fill a texture with another texture? I created a small tileable texture in blender. Now I need to fill a larger texture with the small texture.

I need to use the above texture on a large plane so it tiles.(like tiles) But when I use the fill brush it only fills a color, not the texture. How do I solve this?

Sorry if the question is not clear. Thanks in advance.

Easiest way how to blend textures is mix them together using "Colors" -> "MixRGB"  node in node editor:

Second option is use external image editor Like GIMP, Krita, Photoshop etc.
For fast and easy workflow you can set path to your image editor in

"File: -> "User Preferences" -> "File" -> "Image editor"

Now you can send your texture to your external image editor from Blender UV/Image editor by

"Image" -> "Edit externaly".

If you finish editing in external Image editor, just overwrite original image and In Blender Image Editor use

"ALT+R" for reload your edited image.


Make material local? I have linked a group of meshes. The geometry needs to be linked in case I want to update the imported architecture model later, and keep all my new materials setting and attribution. (I model in Sketchup, render everything on blender.)
And then, all I want to do is to replace the materials of the linked meshes with new materials, but I can't do that?
I just want to have access to the greyed out drop down material menu in the material properties panel, then replace this linked material with another one in the entire scene, but I can't? Why? It's just a replacement of the material, I'm not altering any data!
The only way I found is by changing the material in question from data to object.
But this solution requires me to change this for EVERY object one at the time
and the "icing on the cake", it transform the material to single user
so when I link a scene with 300 meshes, and some materials that have 120+ users, I'm just screwed...
What am I supposed to do?

Changes via Script in Blender Render and Cycles [data to object]

Many of the changes can be done by Python Script.

You can make a selection of the objects a create a group.  The selection can be done manually by clicking on the 3D View .  Perhaps by spelling of name if that happens to be your case.

import bpy

#tested in blender render and cycles render lightly
def data_object_mat(groupname):
    for x in bpy.data.groups[groupname].objects:
        print(x.name)
        o = bpy.data.objects[x.name]
        m = o.material_slots[0].material
        o.material_slots[0].link = 'OBJECT'
        o.material_slots[0].material = m

#create a group with the name below in quotes or change the name
data_object_mat("MatGroup")

# this script does zero error checking and expects specific data to exist
# backup your file, create a discardable copy, use at your own risk
# you are responsible for any damages

The above script is still being tested. It is a starting point after you have created a group with the name in quotes.  The Script iterates through the group and is intended to perform the desired actions.

Consider use only on a discardable copy of your file.  Standard disclaimer.  Backup your files every hour and use Scripts at your own risk.    Scripts are put in the text editor window and executed. This is not a tutorial on any topic, because at the moment I do not have time. You may choose further research.

The image above shows the Run Script button and a group.

You may need to change your search to ... Python Script to [data to object] material.  You may also look at Material addons in the User Preferences.  Please improve my search suggestion.

If time is of the essence, for the above you may choose to do it manually.

Multiple Materials to One Material

copy linked materials nodes to local material

I saw something I believe here at BSE an question which brought up a material matching in the form of a Script.  I believe it reduces multiple matching materials into one material.
That script may be on the [Related column] on this same BSE page,

copy linked materials nodes to local nodes.

Above image shows some material addons.  I have not researched these.  The documentation button seems to link to non existant files.


Why doesn't my unwrapped model appear in the UV Editor? I'm trying to unwrap a cube (I know, super complicated). I've got the seams marked, the UV editor open in a 2nd window, and all the geo highlighted. When I tell the cube to unwrap nothing happens. That's pretty much the long and short of the problem. Now I've been working off this one file for a couple weeks now, saving it off the original file and continuously cloning geometry. It's entirely possible I did something, pressed a button, something.

Any thoughts.

To unwrap UV's, you mark any seams you want, select the faces you want to unwrap, press U and select one of the unwrap options while in edit mode.

Only selected faces (or those surrounded by selected vertices/edges) will be unwrapped. Only selected faces will show up in the UV editor.

Also UV's aren't displayed in the UV/image editor if the Render Result is displayed in the UV/Image Editor. You need to select an image or click the X to close the render result to see UV's.


How to fix hair particle shading/topology issue? There is no way to describe the issue, that's why I'm just going to show the rendered image:

Those are 4 planes with no modifiers, the same dimensions, the same particles, and the same material. The only difference is the topology. All planes are hidden - only the hair is visible.

Number 1 is a simple plane

Number 2 is a plane with loop cuts (Ctrl + R)

Number 3 is extruded (I started with a small plane and made it bigger with extrusions)

Number 4 is the same as Num.3 but the cuts are made with "Knife projection"

Numbers 1 and 2 are good, the issues are in 3 and 4
All faces have the same normals. I tied recalculating the normals, I also tried flipping them - nothing worked.
Just in case anyone asks - I'm making a big project and the model with the hair is very complex (I used extrusions, knife projections, and more) that's why I need to fix it without retopologizing the whole mesh. Because the project file is big I made this .blend file with the planes where I recreated the same issue.
Here is the .blend file:

I'm not sure I entirely understand it, but what I think is going on is that the hairs are set to have "children" and blender is applying a slight rotation to the kink direction of the child hairs via the "Amplitude" value of the kink curl. Setting the value to 0 removes the strange patterning, as does changing the kink type to "nothing", "radial" and "spiral". The other options still show artifacts. I still can't fully explain it, but at least this should make it "go away", if that's what you're after.


Possible to remove part of a rigid body bake? very new to blender so forgive me if this turns out to be a dumb question.
I have a scene where I used a rigid body simulation of some falling objects interacting with some geometry, was very happy with the result and baked the simulation.
I want to add to this scene now. But to do that I want to remove part of the bake of ONE of the falling balls. So that I can then add a new rigid body simulation of this 1 ball so that it can interact with new geometry I'll add to the scene. The rest of the falling balls can keep their baked simulation as they happen to fall exactly the way I want them to.
Is there some way of doing this? I have the feeling that I can't remove part of a bake, but I was hoping someone could point me in the right direction on how to solve this.

I see two possible solutions here.

You can bake animation to keyframes, and then remove the part of the keyframes that you don't need.

Also, you can create a new object, that will use copy location / rotation / transformation constraints for mirroring baked transformations into a new object. Ones it is done, you will get the ability to set off this constraints by animation influence value from 1 to 0


Symmetry in sculpting I have a object that looks like this:

But when I change the wiew angle it looks like this:

How do I make it symmetric from both numpad1 and numpad3 wiew?
(So it looks like st image from both sides (round))
I know that I am pretty bad with explaining.....

Radial Simmetry

At the moment you are using only X simmetry. If you would like to sculpt the same thing in multiple directions, you should go for radial simmetry.

Just try to increase the number of Z iterations in the Simmetry panel:

You could also activate both X and Y simmetry to achieve a perfect mirroring on those axis too.


Using VSE. Rendered video and now nothing is showing up. I've been using the VSE for awhile now and have yet to encounter this problem.

I finished editing my video and clicked render animation. Everything seemed to be going fine. After the video finished rendering I went back through to watch the rendered video and it was just a black screen with no sound. Image overlays I had added to the video would still show up at the appropriate times, but no video or sound.

I tried reloading the file and restarting Blender, but neither of these things works. Can anyone give me any advice? It took me 3 hours to finish editing this video and now it's just gone.

In order for overlays to actually overlay existing video, you need to add an effects strip to tell Blender how to mix it. Generally I use the alpha over strip, but there are other options like alpha under, add, subtract, etc).

Otherwise, the VSE takes the top most strip and uses that. Without the effect strip all you'll see is the overlay and nothing but black.

Now if you had some B-roll or stock footage or images that will cover the whole screen, then you wont need a effect strip. Just make sure it's in a higher channel than any other video channel.


Position an object's origin point to the face below (python)? So I'm doing a script that uses these planes where the origin point needs to be right above the object below it.

From

To this

So the object's position changes to be above the plane/face

A script could do this for multiple objects I looked into this and there is snapping which I found snap to center to work great. It keeps the origin on the place.

However you have to be relatively close for it to snap. I would like it to just snap on the nearest face below it regardless of how far it is.

The ideal thing I'm trying to achieve is basically where you place these planes in orthographic top down view (where Y isn't changed)

Once snapped they go from this:

to this:

Where these origins meet the face below it.

Another option I've tried was using the floor constraint where I would adjust the height so the objects go closest to the object that is the target. This did not work however as i suppose it's based on the bounding box rather than the faces of the object.

If anyone has any idea how I should execute this, that would be great!

This likely needs more testing but should do what you want. This is currently set up for explicitly moving objects on a 'work layer' to the selected faces of a target object in the z direction. Currently if multiple faces are capable of being snapped to the max movement limit should help to limit but be sure to test before saving your file.

import bpy
from bpy.types import Operator
from bpy.types import Panel
from mathutils import Vector
from mathutils import geometry

bl_info = {
    "name": "Blank1",
    "author": "Your Name Here",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "View3D > Tools panel 'T' > Blank1 > Blank2",
    "description": "",
    "warning": "",
    "wiki_url": "",
    "category": "",
    }

def makeprop():
    bpy.types.Scene.my_tolerance = bpy.props.FloatProperty(
        name="bpy.types.Scene.my_tolerance",
        description="",
        default=5.0,
        )
    bpy.types.Scene.my_worklayer = bpy.props.IntProperty(
        name="bpy.types.Scene.my_worklayer",
        description="",
        default=0,
        min=0,
        max=19,
        )

def delprop():
    del bpy.types.Scene.my_tolerance
    del bpy.types.Scene.my_worklayer

def get_index_selected():
    obj = bpy.context.edit_object
    me = obj.data
    myfaces = []
    if obj.type not in ['MESH']:
            return myfaces
    for f in me.polygons:
        if f.select:
            myfaces.append(f.index)
    return myfaces

def GetTargetVert(target, object, tol):
    me = target.data
    bpy.ops.object.editmode_toggle()
    bpy.ops.object.editmode_toggle()
    my_target_faces = get_index_selected()
    for face in my_target_faces:
        x_max = -1000000.0
        x_min = 1000000.0
        y_max = -1000000.0
        y_min = 1000000.0
        face_verts = []
        for v in me.polygons[face].vertices:
            face_verts.append(v)
        bpy.ops.object.editmode_toggle()
        bpy.ops.object.editmode_toggle()
        W_mat = target.matrix_world
        my_line_a = object.location
        my_line_b = object.location + Vector((0, 0, -5))
        vert_index = me.polygons[face].vertices[0]
        my_plane_co = W_mat * me.vertices[vert_index].co
        my_plane_no = W_mat * me.polygons[face].normal
        for v in face_verts:
            l_co = me.vertices[v].co
            loc = W_mat * l_co
            if loc[0] > x_max:
                x_max = loc[0]
            if loc[0] < x_min:
                x_min = loc[0]
            if loc[1] > y_max:
                y_max = loc[1]
            if loc[1] < y_min:
                y_min = loc[1]
        print(
            'x_max %.2f x_min %.2f y_max %.2f y_min %.2f' % (
                x_max, x_min, y_max, y_min))
        print(
            'obj_x %.2f obj_y %.2f' % (object.location[0], object.location[1]))
        if ((x_min < object.location[0] < x_max) and
            (y_min < object.location[1] < y_max)):
                collision = geometry.intersect_line_plane(
                    my_line_a, my_line_b, my_plane_co, my_plane_no)
        else:
            collision = None
#            print('not in x,y range')
        if collision is None:
            print('no collision available between %s Face[%i] and %s'
                  % (target.name, face, object.name))
        elif abs(collision[2]-object.location[2]) < tol:
            print('collision found between %s Face[%i] and %s'
                  % (target.name, face, object.name))
            print(collision)
            object.location = collision
        else:
            print('collision out of range between %s Face[%i] and %s'
                  % (target.name, face, object.name))
#            print(collision)

def align_objs(context):
    print("-"*20 + "align objects button pressed" + "-"*20)
    scene = context.scene
    target = scene.objects.active
    tol = scene.my_tolerance
    my_layer_objs = [
        ob for ob in scene.objects if ob.layers[scene.my_worklayer]]
    for obj in my_layer_objs:
        if (not obj == target) and (obj.type == 'MESH'):
            GetTargetVert(target, obj, tol)

class AlignOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.align_operator"
    bl_label = "Align Operator"

    @classmethod
    def poll(cls, context):
        return (context.mode == 'EDIT_MESH')

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

class VIEW3D_PT_Solve_Intersect(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Intersect Face"
    bl_label = "Intersect"

    def draw(self, context):

        scene = context.scene
        layout = self.layout
        row = layout.row()
        col = layout.column(align=True)
        box = col.box()
        box.label(text='Move target & collision objects to work layer')
        box.label(text='Active Layer : %s' % scene.active_layer)
        box.prop(scene, "my_worklayer", "Work Layer")
        box.label(text="Set the max movement")
        box.prop(scene, "my_tolerance", "")
        box.label(text="Enter edit mode & select target faces")
        box.label(text="Press the align objects button")
        box.operator("object.align_operator", text="align objects")
        box.label(text="Collision info available in console")

def register():
    bpy.utils.register_class(VIEW3D_PT_Solve_Intersect)
    bpy.utils.register_class(AlignOperator)
    makeprop()

def unregister():
    bpy.utils.unregister_class(VIEW3D_PT_Solve_Intersect)
    bpy.utils.unregister_class(AlignOperator)
    delprop()

if __name__ == "__main__":
    register()

Edited:
removed use of bmesh
corrected target face vertex positions to reference world position
additional check for collision withing the target face min max x,y
coordinates