Delete face(s) along axis with python I'm trying to delete, as in This Example, but Faces instead of vertices along a particular axis. So, as an example (see image) this cube's face that I have selected would need to be deleted along the x axis using python. From the above link (following mostly the 3rd answer), I don't understand how they're setting which axis to delete by, or how to do the operation for faces.

My code is is different, because my needs are different than the example. It doesn't throw an error, it just doesn't do anything
    def _debug(vert):
    n_selected = len([v for v in vert if v.select])
    n_deselect = len([v for v in vert if not v.select])
    print('\nlen vertices = {}, {} selected, {} not selected'.format(
            len(vert), n_selected, n_deselect))

    x_thresh=0.0
    vert = bpy.context.object.data.vertices
    _debug(vert)
    for v in vert:
        if v.co[2] < x_thresh:
            v.select = True
    _debug(vert)
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.delete(type='VERT')
    bpy.ops.object.mode_set(mode='OBJECT')

bmesh version
If choosing answers from that question would recommend editing the answer of @CoDEmanX
Test script, removes all faces which have all vertices with an x coordinate less than zero.
import bpy
import bmesh

ob = bpy.context.object
assert ob.type == "MESH"
mat = ob.matrix_world
me = ob.data

if me.is_editmode:
    bm = bmesh.from_edit_mesh(me)
else:
    bm = bmesh.new()
    bm.from_mesh(me)

bmesh.ops.delete(
        bm,
        geom=[f for f in bm.faces if all(
                v.co.x < 1e-6 for v in f.verts)
            ],
        context='FACES'
        )

if bm.is_wrapped:
    bmesh.update_edit_mesh(me)
else:
    bm.to_mesh(me)
    me.update()

To remove faces with a normal pointing in the -X direction
bmesh.ops.delete(
        bm,
        geom=[f for f in bm.faces if f.normal.angle((-1, 0, 0)) < 1e-6
            ],
        context='FACES'
        )


How to have a custom floatproperty based on the selected face? (Knowing that it is not possible)2.8 Reading here and I saw that there is no possibility of having a custom property based on a selected face, but in blender I think you can do "Hackerate" and fly over this problem. I think for example, creating a FaceMap,or a temporary vertex group and to base the properties on these objects bpy.types, I am probably wrong, but I would like to have an opinion from some fan of these experiments. I would create different problems with these methods I believe, has anyone got to try it?

Have float property registered in a class like:

class MY_PT_Panel(bpy.types.Panel):

bl_label = "blah"
bl_idname = "blah"
bl_space_type = "blah"
bl_region_type = "blah"
bl_category = "blah"

def draw(self, context):
    ob = bpy.context.active_object
    ###how to get property ?
    layout = self.layout
    row = layout.row()
    row.prop(##??##, 'my_float', text="")

class Myproperty(bpy.types.PropertyGroup):
    my_float: FloatProperty(default=0)

def register():
    from bpy.types import ##best type##
    ##best type##.faceproperty = bpy.props.PointerProperty(type=Myproperty)

I read about bmesh method but not understand if that information they are right for me : https://docs.blender.org/api/blender_python_api_2_78_release/bmesh.html

I have also seen looked at among the bpy.types. in the python console there is also bpy.types.SelectedUvElement
and bpy.types.UVLoopLayers
Assuming there is a uv, would I have the ability to customize the face property based on an uv layer?

Edit:
I would like to clarify that the use of the selected face is clearly useful in edit mode and on the use of a FloatProperty slider, so I would like the values on each face to remain recorded once interacted

To make me understand better, I would like to get this property as you would with a bpy.types.Object

like to in register:

from bpy.types import Object

Object.example_property = bpy.props.PointerProperty(type=Myproperty)

Mesh data layers

Mesh components, faces, edges and vertices, can have custom data layers. A float can be assigned to each face in a mesh with custom face float layer

In object mode the index of the active face is me.polygons.active  and in bmesh the active face is bm.faces.active, which will be None if no face is active.

Here is a simple test script.  Run in object mode. Adds a custom float layer, and sets the value of the active face to 5. Switches to edit mode, prints the layer float value of the active face.

import bpy
import bmesh

context = bpy.context
ob = context.object
me = ob.data

# add a float layer to faces
float_layer = me.polygon_layers_float.new(name="float_layer")

# set the value of the active face to 5.0

float_layer.data[me.polygons.active].value = 5
bpy.ops.object.mode_set(mode='EDIT')

bm = bmesh.from_edit_mesh(me)
# get the float layer
float_layer = bm.faces.layers.float.get(float_layer.name)

af = bm.faces.active
if af:
    print(af[float_layer])

UV is also a mesh layer, associated with face loops (each uv face has its own set of 2d coordinate verts, whereas mesh faces, if connected,  share verts with other faces at edges)  For an example see Text Editor > Templates > Python > Operator Mesh UV

Property and Panel

Since the property attains to a mesh, possibly a good idea to make it a bpy.types.Mesh property.

Have made an edit mode bmesh property on the panel. The poll method will set it, and clear it when in object mode.  The mesh needs a "float_layer" as explained above. Run the code above to add a face float layer to the active mesh object

The poll method is required to attach a live edit bmesh to the panel when the object enters edit mode (polls).

import bpy
import bmesh

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Mesh properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "data"
    ebm = dict()

    @classmethod
    def poll(cls, context):
        if context.mode == 'EDIT_MESH':
            me = context.edit_object.data
            fl = me.polygon_layers_float.get("float_layer")

            if fl:
                cls.ebm.setdefault(me.name, bmesh.from_edit_mesh(me))
                return True

        cls.ebm.clear()
        return False

    def draw(self, context):
        layout = self.layout
        me = context.edit_object.data
        layout.prop(me, "float_value")

def set_float(self, value):

    bm = HelloWorldPanel.ebm.setdefault(self.name, bmesh.from_edit_mesh(self))

    # get the float layer
    float_layer = bm.faces.layers.float.get("float_layer")

    af = bm.faces.active
    if af:
        af[float_layer] = value
        bmesh.update_edit_mesh(self)

def get_float(self):
    bm = HelloWorldPanel.ebm.setdefault(self.name, bmesh.from_edit_mesh(self))

    # get the float layer
    float_layer = bm.faces.layers.float.get("float_layer")

    af = bm.faces.active
    if af:
        return(af[float_layer])
    #bm.free()

def register():
    bpy.utils.register_class(HelloWorldPanel)
    bpy.types.Mesh.float_value = bpy.props.FloatProperty(get=get_float, set=set_float)

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

if __name__ == "__main__":
    register()

Script designed for 2.8 can confirm also runs in 2.79


Particle system disasters if I edit the mesh im animating my 3d character and im wondering why when I delete any vertices from the character mesh, the particle system attached to that mesh goes all over the place.
Any ideas?

I'm assuming this happened with hair particles that were combed? Particle rely on faces and vertices, if you have 101 vertices and you delete no. 40, 41-100 have to change their index. Since the particles are linked to the indices, they go berserk.
The short answer: Don't do that. If you really need to remove geometry, use a mask modifier after the particles system.


When you have accumulated vertices in the corner of a low poly mesh? I'm trying to improve my modeling to keep it clean and low poly.

I've run into this situation before and I don't know how to best solve it. I have extra vertices accumulated in one spot where I don't need them. Is there a decent way to disperse the vertices, and avoid pinching or making the mesh unnecessarily complex?

Should I just merge them and create triangles?

You can solve this easily and with a clean topology by keeping it all quads.
Just create a "quad corner" around the radial part, where quads meet at a three-edge vertex.

Start by extruding one of the "center edges" from the radial part so it meets the adjacent one. Then extrude one of the remaining ones, and place it so the quads meet at the center and match perfectly (Use Ctrl snapping to aid in precise placement if necessary).

Repeat the process for the opposite edge , you can quickly create a new face between the two existing edges by pressing F.

You you then end up with a two edge gap you can easily bridge to the remaining edges with the Bridge Faces operator, B key.

Don't forget to W > Remove Doubles at the end, to merge together all newly created geometry.

For more info consult this comprehensive Topology Guide


Truncated Icosahedron I am attempting to create a truncated icosahedron (soccer ball) as specified in a tutorial. The tutorial shows this mesh being part of the Solids that are in Add-ons. Mesh>Solids>Archimedian>Truncated Icosahedron (see screenshot at 1:06 in tutorial). When I enable my add-ons, I do not see the same ones that he does. He's using v2.68 and I'm using v2.74. Have I done something wrong, or has it changed between versions?

In Object Mode hit Shift+A shortcut to add a new object, and in the menu select Mesh>Icosphere with number of subdivisions set to 1.

Then change to Edit Mode, select everything, hit Ctrl+Shift+B shortcut to bevel the vertices and input 0.35 as the amount of bevel and hit Enter, or in Bevel operator panel change amount type to Percent and change Amount to 33.333%

Result:


How can I add another animation to what I've already done? I made a simple animation of a mesh crumpling (while not as good looking as a piece of paper, it'll do) and I want to set it on fire when it reaches the end of the animation (crumpled ball). I tried looking up explosions but that seems to have a similar effect with vastly more difficult results. I don't want to have it on fire the whole time, just when it reaches the crumpled ball phase. I am a beginner. I've watched some videos and tried to add the fire+smoke to my mesh but it turned it to a wire frame and I'm not even seeing the Fire+smoke.

Make sure you watch a tutorial for the version of blender you are using, 2.8+ changed up a lot and older tutorials might not work right or be hard to follow. Also when you do get your sim working you should be able to keyframe certain aspects of your fire+smoke emitter to make it look like it catches rather than constantly burning.


How to get back to normal animation timeline after using NLA Editor My Model in Frame 1 is at the end of vertical plane. On Frame 240 he comes near the camera.

I did basic walk animation in Frame 1 and went to Action Editor->Clicked F->Clicked X to close it.Then opened NLA Editor, clicked my saved action(metarigAction.001)-> NLA track opened.Pressed N-> Increased Repeat to 3.0 from 1.0

After that came back to frame 1 and clicked the bone(which control whole model) Inserted keyframe(location) then transferred the bone to frame 240 again location keyframe

My model was successfully able to walk from frame 1 to 240

However if I try to animate after 240 its not animating. Example After reaching frame 240 I am going to frame 280 and lifting my model hand to salute.If I insert Keyframe and if I check the animation

What happen mean the last saved position(salute) is coming exactly from frame 1 to frame 240.No walk animation. It look like some1 pushing it in the last saved position from beginning to end.

Normal Timeline

NLA Editor Image at frame 1,240

How to get back to normal animation after frame 240 i.e. I want to use the normal animation timeline. Please assist.

Below Image is saved metarigaction at frame 1(just a walk from frame 1 to 80,u can c only 3 keyframes in timeline)

Below Image is after NLA Editor starting frame at 1 and ending at 240.

I want this action NLA(Walk cycle) to be there till frame 240 and then need normal animation timeline.

After NLA When I tried to change back to metarigaction,normal timeline(4th image from top) is coming but animation missing as stated earlier.

How to get back to normal animation timeline retaining NLA action and proceed further as normal?

At frame 240

At frame 241

adding a keyframe, you've started creating an action.

 To get back to "normality" :
open dopesheet

In dopesheet, go to action editor

here you can edit or remove your action

If you're editing an action (hello) animating the same bone(s) as the other one (walk cycle), the action above is the only one that will do something. The action below is "muted" (at least the part that uses the same bone).


How can I add emission node to volume scatter to create cloud light using point density texture node? How can I add emission node to volume scatter to create like this

using point density texture node? I tried a lot of way but I have not found any solution. I know this node may be looks very complex. But also a way to understand  how to process cycles nodes. If you could help me, I'd very appreciate it.

Have 2 different set of volumes (one very short of emission particles) and the other one to occlude it with a much denser but scattered point cloud. Might work after some texture maths (substract, divide)


Why is my object pink in Texture Paint mode? The Structural_Material base color image selected in the UV window is the paint slot I'm trying to use. However, I can't paint anything because my model shows up pink. Anyone know why?

Please don't flag this as a duplicate of a question that is completely different, thanks. There are a number of reasons why a texture might be missing to cause something to show up pink in Blender lol.

try to add a image texture node in the node editor then select in the node your chosen image.

let me know if it works.


Easy way to snap then merge a piece at the end of an array I'm fairly new to Blender and I'm trying to make a railing on a roof top.

I made the base shape, added array modifier then applied it.

My problem arose appeared when I had to make the ending of the railing. I copied one of the tall supports and moved it to the end.

I don't know how to make it snap to the bigger shape and then merge the edges so it's one seamless shape. I tried turning on snapping during transform and selected edges, faces and vertices but that didn't help, it didn't snap to the correct place.

Another thing I'm wondering is if the method I used to create the thinner bars is correct. I subdivided the top bar in sections, insert and extruded the bars but I didn't merge/fuse at the bottom, is that OK?

On the Array modifier you can use another object as start or end cap;


How do I update an Addon for 2.8 I have an Addon I'd like to use, but when I would install the .py file, theres a message on the far right saying I need to "upgrade to 2.8x...". The addon seems to be added into my Addons list, but when I search for it in Blender, it cannot be found.  Is there anything I can do to use this addon?

Unless you're comfortable reading and writing Python, you won't be able to do anything but wait for the addon creator to do it.

2.8 changed the API quite a bit, but this addon may or may not use the parts that changed. So updating the addon might be as easy as changing a few lines, or as difficult as a complete rewrite of several parts of the script.

Your best bet is to use it in 2.79 for now and link/append it in.


How to properly bake action for armature I just learned bake action with rigacar. I thought it would be the same for rig-ify .I click armature to be baked, go to the last layer (where I think are the def bones not really sure). I select all then - object mode.  I used space bar to bring up search bar and then type bake action, I select everything in the menu except the last one (overwrite bla, bla) then I click bake "pose". I click bake and it bakes animation but when I try to delete any of the other bones that I don't need anymore  the whole armature and character deletes with it..How do I this correctly for sending off animated character to render farms?  Thank you for taking the time to answer this.

This is the correct layer for selecting deforming bones in Rigify, they all have the "DEF" suffix on their name.


obj.rayCast() not working as intended In the game engine, I've got a function which uses rayCast in asteroids. It doesn't work as intended, as even with x-ray turned on, it often doesn't see through objects without the desired property:

def shoot(self):
    for n in self.cont.triggers:
        if n > -0.5:
            if self.ammo == self.maxAmmo:
                self.c.actuators["ShootSound"].stopSound()
                self.c.actuators["ShootSound"].startSound()
                self.laser = self.fxScene.addObject("laserbeam", None, 10)
                self.laser.worldPosition = self.pos
                self.laser.orientation = self.ang.to_track_quat("Y", "Z")
                self.ammo = 0
                target = self.obj.worldPosition + self.obj.worldOrientation * mathutils.Vector([0, 1, 0])
                hitObj = self.obj.rayCast(target, self.obj, 300.0, "asteroid", 1, 0)[0]
                if hitObj is not None:
                    hitObj["pyObj"].smash()
                exp = explosion(0.2, self.obj.worldPosition, self.fxScene)
                self.scene["explosions"].append(exp)

The problem is that often, even when cast through objects, it returns None. This happens more often when explosions get in the way of the rayCast (despite not having the property), so I moved them to another background scene to test. It's now more reliable, but still often returns None when it shouldn't.

Any ideas as to what's going on? I'd be eternally grateful.

As is standard for my dyslexia, I misread the number of arguments. Don't make my mistake, kids. X-Ray was actually turned off.


How can I tell if a bone property has a keyframe on the current frame using python? I need to be able to tell if a bone property has a keyframe on the current frame. I.e. the property box is yellow and not green.

I know you can evaluate an fcurve but how do you tell if it's a keyframe?
Is there an easy way to do this?

There is no easy way, but you could extend the Object type by a method:

import bpy

def is_keyframe(ob, frame, data_path, array_index=-1):
    if ob is not None and ob.animation_data is not None and ob.animation_data.action is not None:
        for fcu in ob.animation_data.action.fcurves:
            if fcu.data_path == data_path:
                if array_index == -1 or fcu.array_index == array_index:
                    return frame in (p.co.x for p in fcu.keyframe_points)
    return False

bpy.types.Object.is_keyframe = is_keyframe

# TEST
ob = bpy.context.object
pbone = bpy.context.active_pose_bone

# True or False
ob.is_keyframe(20, pbone.path_from_id("location"), array_index=2)

frame can be int or float, 20 will match a co.x of 20.0, but not a subframe like 20.1. If you want to check for full frames, use round(p.co.x) in the is_keyframe() function.

Talked to ideasman_42, and he may check on adding a native method to retrieve F-Curve and Keyframe objects more easily.


inequalities using math node Using math nodes I generated that pyramid like shape, but I want to impose inequalities.
The equation for the following pic is 9-8|x|-y=0 but I want to impose inequalities to the equation where 0.75<|x|<1. How do I integrate the equation  with the given inequality?

this is the current output

and this is the current node setup.

The final output has to look something like this

I used the Node Expressions add-on (available via https://baldingwizard.wixsite.com/blog/node-expressions) to create the nodes from the mathematical expression, using the following expression :
Val1 = abs(y-(9-8*abs(x))) < Threshold, Val2 = and(abs(x)>0.75, abs(x)<1), Combined =Val1 * Val2

This creates two sub-expressions (Val1 which returns 'true' if y is close to '9-8|x|' and Val2 which is true if 0.75 < |x| < 1.0) and a Combined output which is true if both sub-expressions are true.
This produces the following result :

Blend file included


How can I import a rigged model(Facial controls included) from SFM to blender? Decompiling from Crowbar and using Source Tools, I got a the model into blender, and using nodes assigned the textures, but no matter what I try I get one of two outcomes,

-the model is imported with no bones

-the model is imported and the bones are visible, but they don't move the model when used.

Any help would be greatly appreciated

Attached:List of files received after decompiling via crowbar

Try exporting it from the external application into a format Blender supports such as:
.dae
.abc
.fbx
.bvh
.ply
.obj
.stl
.svg
.glb/.gltf

Then in Blender: Go to File, Import - select the matching format, locate & import the file.


How to correctly bake glossy/reflection from camera POV? As seen in the comparison below, before, it looks right in the camera view; however, the glossy baking result appears to be projected from the normals instead of POV. I have been able to find very little information on the wiki about this.

Is there any way to keep the glossy baking result the same as the rendered image (from specific POV)?

Notice the reflection on both the ball and the ground.

Before:

After:

Blender uses the normal as the camera ray vector when baking. While it's not possible to change this, it is possible to change the surface normal.

The trick then is to calculate a surface normal that produces the same reflection vector from the camera ray as the original surface normal would have from a custom camera position. You could do this with either a bunch of Cycles nodes, or with a OSL script:

shader osl_reflection_normal(
  vector FakeCamPos = 10,
  int IsCameraRay = 1,
  output normal ReflNormal = N)
{
    if (IsCameraRay)
    {
        // Normal pointing from FakeCamPos to here
        normal fakeCamNormal = normalize(P - FakeCamPos);

        // Reflect fakeCamNormal across the surface
        normal fakeReflection = reflect(fakeCamNormal, N);

        // For some reason I points towards the camera? Otherwise we'd use -I
        normal incidenceNormal = normalize(I);

        // The average of the incidence normal and the fake reflection normal gives us a normal that reflects one to the other.
        ReflNormal = normalize(fakeReflection + incidenceNormal);
    }
}

You'll want to plot in the camera position for FakeCamPos, and supply the "Is Camera Ray" from a Light Path node. The output goes into the Normal input of the glossy shader.


Lock views in orthographic mode Is there a way to lock orthographic views in Blender 2.8?

Kind regards,

Andre

You can disable automatic switching to perspective from orthographic via preferences:

Menus → Edit → Preferences → Navigation → Orbit & Pan → Auto Perspective (remove tick).

I personally make use of Quad View, which splits the viewport into four regions: Top Orthographic, Front Orthographic, Right Orthographic and User Perspective. Also handy to enable "box" mode so any zoom / pan done in one area is synchronised with the others:

Menus → View → Area → Toggle Quad View
Sidebar → View → Quad View → Box


background images and scaling Im following a tutorial online but im at a stand still in the video tutorial when he uploads a background image the measurement is 5.000 by default when I upload the same image my measurement is 32.8 were both using the imperial units for measure so I don't know what the problem is can someone help me get my default measurements to 5.000

you can edit that number just to whatever you like..


Why Set origin to 3d cursor won't work? I've got an object, and want to work on mirror modifyer with it, but I have first to change it's origin point. So I put my 3D cursor where i want to set the new origin point.
But when i do:
Object/Origin/Set Origin to 3D cursor
the origin point doesn't move.

Is there a way to unlock this?

Edit: and I found that in the same scene I've got 2 objects, one I can move in object mode, and this particular one I cannot move it neither can I select it (in object mode)

Here's why :
In the Object context, the selectable property in the visibility window was unchecked.
Set it to selectable solved it all.

I was working on it only in edit mode, and in edit mode everything was selectable, here's why i didn't understood :/


Not render sky texture? I'm using a sky texture for environmental lightning. It gets rendered as background when I do that.
Can I prevent it from rendering, but still use it for environmental lightning?

Blender Internal:
Method 1:
You could disable Sky in Properties > Render Layers > Layer:

With Sky enabled:

With Sky disabled:

Method 2:
Another way is to set the Alpha to Transparent in Render settings > Shading:

This will give the same result as disabling Sky in Render layers > Layers.
Cycles:
For cycles you could set the Film to Transparent in Render settings > Film:

With Transparent disabled:

With Transparent enabled:


Why isn't my sapling rendering? I have set up a fairly simple scene and have gone through the process of making and animating a sapling. I left it as a curve and applied a material to it. When I hit render, the tree doesn't show at all.

Note that the 'tree' object is NOT the tree I want rendered. That's why it is unviewable and urenderable

I'm using cycles, and even if it is a material problem, the tree should still render just as a blank thing, right? Is there something special I have to do in order for curves to render?

UPDATE

The tree renders fine in rendered view port.

Here is a stripped version of the .blend:

The problem is that the layer it is on is disabled for the active blender layer:

Enable the box the arrow is pointing at.


round corners inverted of a plane this is a face in my object.

I initially planned to have it this form and let the white part be transparent. However, because of a few reasons I now want to cut the white part from the plane. How would I do this?

The nearest I found is this solution:

https://blender.stackexchange.com/a/63815

This comes close to what I want to do, but I need the corner the other way round

Probably the easiest way to do this is to manually cut it out. In edit mode, press K to bring up the knife tool. Cut along where you want and press Enter when you're done. You can then delete the face you want.

To get straight lines, press C while in Knife mode for constrained angles.

If you want a cleaner mesh with only quads, use the knife tool again and connect the vertices from where you cut to the edge of the plane. Repeat this with each vertex to create quads.


Extruding not creating solid objects I have a plane which a want to extrude on z-axis.

It happens when I select the whole plane A and press E it extrudes but does not creates the wall figure below.

However, if I select just an edge it works:

What am I doing wrong that I cannot extrude the whole model?
I think the model might have been build wrong, but I should start it over to fix it?

EDIT: added blender file

http://pasteall.org/blend/index.php?id=48424

You must remove doubles first

Select all > press W > Remove Doubles

Select the plane and extrude


Using object's printed name in script I am trying to write a script that will end up baking materials from a high poly object to a low poly object. The problem i am having is that i will never know the object names beforehand, as my script is importing obj's from a folder into blender then duplicating them and applying a decimate filter to them. So far i have all of that functioning correctly, but i'm stuck on the final part of selecting the low poly at the target object of the bake.

>>> bpy.ops.object.select_by_type(type='MESH')
{'FINISHED'}

>>>
>>> for obj in bpy.context.scene.objects:
...     if obj.name.endswith("001"):
...         print(ob.name)
...         bpy.context.view_layer.objects.active = ob
...
Hat 1.001

>>>

I have the script printing out the name of the object that has a name ending in 001 since i know that my low poly duplicate will always end with that. My problem is that i need to take that printed name and apply it to the next command like this example

bpy.context.scene.targetobj = "Hat 1.001"

I can't figure out how to take the name that gets printed out and apply it like in that example. Thanks in advance.

Use a pointer property

Can set up a pointer to any blender ID type objects, in this case bpy.types.Object instances of which can be found in bpy.data.objects collection.

Assign the property to class

import bpy
from bpy.types import Object, Scene
from bpy.props import PointerProperty

Scene.target_obj = PointerProperty(type=Object)

Test.

>>> C.object
bpy.data.objects['Cube']

>>> bpy.ops.object.duplicate()
{'FINISHED'}

>>> C.object
bpy.data.objects['Cube.001']

>>> C.scene.target_obj = C.object
>>> C.object.name = "Foo"
>>> C.scene.target_obj
bpy.data.objects['Foo']


How to get a smooth reflecting surface? I tried model this Hiraishin Kunai from Naruto and this shiny blade part keeps bugging me.
How to solve this, please help.

Mesh looks like this.

I tried using only one face for that part like this.

And gave a result like below.

Thank you.

Your problem is absolutely topology related. I see 2 things going on that are causing your shading issues. Firstly, there are triangles mixed with quads - this usually causes problems, especially around edges and areas that will be shaded smoothly - both of which are true in your case. Secondly, it seems you have formed the "blade" by moving the front faces away from the rest of the mesh. This has left non-planar (impossible shape) faces along the edges of the blade. I suggest you begin with topology looking like this: notice - all quads.

When starting with this shape, you can extrude the "blade" area instead of moving it. This will not create any non-planar faces.

From there, you can move and scale the blade section down to your desired size.

After this, it's almost done, but to make nice edges, you probably want to select the areas I've highlighted below, and inset them slightly (0.001 was good enough for me).

To make the rest of it look as clean as possible, I would also recommend adding edge loops - one around the edge of the "hilt" where it meets the front (blade containing) face, and one more along each end of the blade itself. (I put one in the center of the blade and beveled (CTRL+B) to make it into 2 lines, and then dragged until they were almost at the ends).

Here is the end result with smooth shading, and even a subdivision surface modifier.

Hope this helps.


Add menu for primitives in Blender 2.8 Is there a way to bring back the add menu that pops up in the bottom in Blender 2.8 when adding primitive object to your scene to change vertices?

Just expand this little tab on the bottom left corner of the 3D window.


Physic simulation is visible in viewport, but not in the animation render My physics animation is working as expected while I'm inside Blender. When I try to render the animation, the simulation is not running. Every frame is identical (the objects are static).
Viewport:

Render:

blender file

You need to cache the physic animation:

Go to Scene Properties.
Go to Rigid Body World.
Under Cache, delete all bakes and then click on Bake All Dynamics.
You can now render your video.


Don't autocrop video when having different dimensions of videos Lets say I want to have an video with 1000x1000px dimensions.

My source video is FullHD (1920x1080) and if I paste it into my Video Editing Screen it gets automatically cropped to fit the desired dimensions.

What I basically want is to have the video at its max height cropped down but therefore only displaying the 1000x1000 square from the original video, like so:

How would I do this?

First set your render settings Resolution to X:1000 px and Y:1000 px. In Video Sequence Editor right click on the name of the video that you are editing with the ending .001 (or similar). Open the options window with N and select Crop option and crop away the top, bottom, left and right to get the size that you need. To constantly see what you are doing the option at the bottom Use Backdrop is also good to be turned on.


How can I track a moving board and superimpose a video on top of it? You know Captain Disillusion? "The World's Greatest Blenderer"?
Well, he does this effect all the time in his videos; Adding videos on top of a board he's holding, to make it seem like he's holding one large, suspiciously bezel-less, screen.

Now, I'd like to emulate that in my video project.
This MUST be a simple process, easier than adding a 3D object to a scene, since it's simply tracking a 2D plane and superimposing a 2D layer on top.
But I just can't figure out HOW I would look this up!
"Chroma keying" just turns up tutorials of how to remove backgrounds from videos (Done that before), and other keywords didn't help.
So, how can I do this? And, do I need a green board for this, or would a white board with dots on it be better? And importantly, how would I go about masking the video (to compensate for fingers, etc)? Would it be better to use Adobe After Effects, since I have that in hand?
Thank you guys for the help!
It would be amazing to be able to make this effect work.

What you want is called Plane Tracking. The idea is that you associate 4 trackers to the vertices of a plane or an image.
Track the elements and select Create Plane Track.

In the compositor you use the tracking information to deform an image.
For more detail read the following links:
Can't choose Plane Track in Plane Track Deform node while compositing
Is it possible to take a mask clip and 'connect' it to a specific point on a moving object?
And yes, it would be easier to use a green (or blue) screen on the card you film, otherwise you will need to create masks over the fingers and other elements that occlude the card. Such process is called rotoscoping, it is more complicated and tedious than dealing with green screen.


How to select the entire object on edit mode I need to have further explanations about how to select everything while I'm on edit mode as in this tutorial.

I would like to know how I can select the entire object in edit mode because when I'm on object mode I can select only one part of the object and when I switch to edit mode I can again edit only the part that I have previously selected on object mode. I've tried to do CTRL+G but at the minute 28.11 I saw that it's not the right answer,because she can select each individual piece of the character,but I can't. So,what's the solution ? thanks.

You hit Ctrl-J to join all your objects (they need to be selected). When in Edit Mode hit the A key to select all your points (vertices). You can hit it again to deselect everything. If you want to only select your object, use L.


Texture becomes black when tryng to bake vertex color to texture! when I UV smart project my model, then open a new file (thats black) where I want my vertex color to bake to. The texture only becomes black. It doesnt make any sense.
Please look at attached file:
https://gyazo.com/045b606b616df5907c79aaf2cf10d7e0

I have multiple guns that I would like to bake a texture from. So please post an explanation when you fix the gun. Thanks!

Here is the gun (Glock 18):

EDIT:
Hey, I used the answer that Craig wrote. Basically, I got the colors etc. But the texture was very "round" compared to Craigs.
I do not know why.

What I did:
(Firstly changed from Cycles to Blender Render)

Make the whole model "one", so I can edit the whole thing at once.(CTRL + J)
Smart UV Project the whole thing.
Add blank, black image.
Go to bake, choose Textures. And Bake the whole thing.

WHAT I GOT: (Please see attached link)
https://gyazo.com/be11838d12f9b26fc78943d09faec235

  When I used the texture on a Model in ROBLOX STUDIO the model just went black.
  (See link)
  https://gyazo.com/9f3838c2061a552da4361bbf32b881f1

Why??
What have I done wrong?
Why does it look so different from yours? (I know I did something wrong!)
Please tell me. It would mean the world to me! Seriously, I got to get the game out in February! Thanks!

You have no vertex colors, your file has blender render materials but is set to Cycles right now. Turn it back to Blender render. In your scene, you have no light source, so every bake will be black.

edit: My steps were incorrect the first time, so here is a corrected flow:
1. Your file as it is with Cycles as renderer but has no Node materials.

2. I switch to Blender Render and find your UV are wrong, so I Smart UV Unwrap

3.I also then remember in Blender Render that I can bake using Textures to get the straight diffuse color without a lamp

And then the result comes out pretty clean


How to render in cycles volume with camera inside I know there were tricks like cutting inside the volume object with another object with boolean modifier (this one I'd like to avoid) and another with putting the camera inside some sort of a bubble with inverted normals. The latter is the one I'd like to use, however I can't set it up properly.
Does the "bubble" object need some specific material or is there something more I need to know? Or that doesn't work anymore?

Well, seems like there is a fix on the way, as pointed out:
https://developer.blender.org/D794

Update

Camera in volume is now natively supported as of 2.73:

  Cycles: Add support for cameras inside volume

  Basically the title says it all, volume stack initialization now is
  aware that camera might be inside of the volume. This gives quite
  noticeable render time regressions in cases camera is in the volume
  (didn't measure them yet) because this requires quite a few of
  ray-casting per camera ray in order to check which objects we're
  inside. Not quite sure if this might be optimized.

  But the good thing is that we can do quite a good job on detecting
  whether camera is outside of any of the volumes and in this case there
  should be no time penalty at all (apart from some extra checks during
  the sync state).

  For now we're only doing rather simple AABB checks between the
  viewplane and volume objects. This could give some false-positives,
  but this should be good starting point.

  Need to mention panoramic cameras here, for them it's only check for
  whether there are volumes in the scene, which would lead to speed
  regressions even if the camera is outside of the volumes. Would need
  to figure out proper check for such cameras.

  There are still quite a few of TODOs in the code, but the patch is
  good enough to start playing around with it checking whether there are
  some obvious mistakes somewhere.

  Currently the feature is only available in the Experimental feature
  sey, need to solve some of the TODOs and look into making things
  faster before considering the feature is ready for the official
  feature set. This would still likely happen in current release cycle.

As user sambler pointed out, fix is on the way.


set light position from script I'm trying to render a mesh from script. All good, except the lights. The output rendered mesh is very dark and turning it becomes completely black. How to set them?

Again, you can see all the properties equivalents in Python by hovering over the light properties fields you want to change via Python scripting.

For example,

lamp = bpy.data.lamps['Lamp']
lamp.energy = 10  # 10 is the max value for energy
lamp.type = 'POINT'  # in ['POINT', 'SUN', 'SPOT', 'HEMI', 'AREA']
lamp.distance = 100

The simpler is to first change their values by hand, before to find the values you need and set them via Python.


How to scale objects along the length of a curve and keep them all facing the same way I have created a long capsule shape and I want a large number of arches to be spaced along it. The capsule shape bends along both the y and z axis, but all the arches should be aligned to the x axis with no rotation.
With dupliframes I got them to follow the shape of the capsule, but because it bends, while they are all oriented along the x axis, they weren't as wide as they should be at the far end. It doesn't seem to be a tool where I can add something on to also scale the x axis of the arches further along the curve. With an array modifier set to fit curve they turn  to align with the curve.In that setup I could use an empty to scale the ones further down, but only if the arches can be made to align the right way.

The arches should align with the green highlighted arches. Is there a way to do this? Otherwise I think I'll break the curve into sections and create an arch with the right dimensions for each one, and an array for each. The structure is very large, there will be something like 600 arches, so it makes a difference.

As far as I know you will either be able to scale them progressively or orient them correctly at once, not both.

Using the arch as duplifaces in an arrayed plane you get correct orientation always facing one axis but no scaling.

You can then make duplicates real and clear any erroneous rotations introduced by the curve modifier.

Then scale them by hand or using proportional edit as desired.

Otherwise use the the array directly on the arches. It will not orient them correctly, but you can control scaling point buy point through the curve radius property.


Unwrapped UV window not displaying I marked the seams on my object.  Then, I selected one face and hit "A" to select all faces.  I right clicked on my object and selected UV Unwrap Faces/Unwrap for a custom unwrap. But, the unwrapped UV window is not there; just the one window of my object is showing.  The window of the unwrapped faces didn't pop up on the left in a new window.  Where is it? How do I access that missing window if it doesn't come up?

The window of the unwrapped faces didn't pop up on the left in a new window.

The UV Editor doesn't automatically pop up, you need to open the UV Editor manually by creating a new panel and selecting it:


Whats wrong with my rig? https://mega.nz/#!C3hinCwa!h_3F6_WkF8-Cm4iLqbBorElmumhXKJnDnelBMFN3X_0

There's the blend file. I need it to bend backward in sort of a 'U' shape, but it bends and contorts in odd ways. I need to get this done asap as a client needed something done in 2 days, so I'm having to learn blender rigging on the spot. Anyone who can tell me what I need to do would be a hero. I tried turning on preserve volume which keeps the mesh from changing sizes, but it doesnt bend back as much as I need it to.

Ok, so, radical solution, follow these steps:


How to import kinect data? I want to use kinect Data Import to import data of kinect to blender, then apply that to a model in blender with kinect data import add-on. I used this
link to get this done, but I have a problem understanding the last step:

  Now you have enable armature control using the Kinect data

What he his doing there is enabling an addon. Do do this hit Ctrl-Alt-U, or File>User Preferences.

Now you are in the user preferences. Go to the addons tab. Next you will need to install the addon. Click Install from File.

Navigate to the addons .zip or .py, and select it.

The final thing to do is to select the checkbox. If you want the addon to be installed when you create a new project, click Save User Settings.


Blender image output is greyish and not white I already searched the internet but could not find a solution to this. Maybe it is the same question as Why my animation render is getting greyish? but there was no answer.

I want to render a video with tracking, but the output "loses" color information and gets kind of greyish. I first thought that it is related to the renderer, but it happens in Cycles and Eevee. Therefore i made a sample image, added it to the image sequence editor and rendered it as 1 frame. Resulting in the same problem.

I placed the original image beside blenders output so that you can see the difference. The only idea I came up with is that something with the lighting is not correct but I can't find a setting for that.

I am using Blender 2.80 with the default settings. Only set the output resolution to match the input resolution.

Why is this happening?

The image's colorspace, and the color space that blender is using to display them are not the same.

Images displayed in a different color space will always look wrong

The values for what you call "white" are different depending on the color transform you use in the color management section.

If you are dealing with video files only, using sRGB values, and not rendering anything that uses a wide dynamic range, then you don't need "filmic", which is the "default" option on blender.

Set the View transfrorm from Filmic to sRGB (or "standard") in the color management section. To understand the difference read the following links:

White background with filmic blender

and

Render with a wider dynamic range in cycles to produce photorealistic looking images


What's the difference between addons, plugins and builds? These words are often used in reference to new features that aren't in blender by default, but are they all the same thing?

Add-ons (also spelt addons) are python scripts that can be used just by "installing" them (which literally just copies it into the right folder).

As far as I know, there is no such thing as a plug-in (or plugin) for blender, but it's a common term that's sometimes used instead of add-on, but means the same thing.

Builds are needed when there are actual changes to blender's source code (not just something like an add-on you can plug in ;) ). Often blender's python API doesn't give you enough access to perform the function you need, or is too slow, and thus you need to implement the function directly in the source code and re-compile blender. Compiling blender can be a bit of a bitch, so the dev (or some smart person) will compile it for you and upload the new compiled code (the 'build') somewhere for regular humans to use (graphicall.org usually)

Some more info:

Quick overview and introduction to the python API
A bit more in-depth overview of the Python API
Where to get add-ons
Docs for building blender yourself: Windows, Linux, Mac


Bezier Curve - Cant select anchor points This is a really simple question but I am new to this.

I just started using blender on my Mac and I created a Bezier curve while following along with a tutorial.

I have toggled to edit mode, and am trying to select the endpoints in order to manipulate the curve. However, I am unable to click the endpoints to select them. I can rotate (using R) and move the curve (by pressing G) but I can't select the endpoints to drag them around or the tangent lines.

Is there a quick fix for this? I am totally stuck :(

Thanks!

In blender select objects by right mouse button instead left mouse button. Left mouse button is used to place a 3d cursor.

If you want to change it - you can do this in file -> user preferences -> input tab. But it is recommended to stay as it is


Turn physics proccesses off and on? Is there an easy way to, while keeping all of the physics settings the same, turn off the physics processing? Essentially, I have a huge scene with a ton of physics and I'm not ready to bake it yet but with all of these simulations going at the same time, workflow has slowed to a crawl. I want to tell blender to just process the simulation I'm currently working on but without it messing up my other physics! Any ideas?

Yes, click the eye icon in the physics panel or the modifiers panel to disable the simulation in the viewport:

Clicking the camera icon disables the simulation in the render.


Enum Property Error: expected a string enum, not tuple I'm writing an addon that generates a list of categories that I want to set in an enum property. The enum property is defined as such:

class PipelineProperties(bpy.types.PropertyGroup):
    asset_categories = bpy.props.EnumProperty(
        name="Asset Categories",
        description="Categories for Project Specific Assets",
        items=[
            ('init', 'init', 'test', 0)
        ]
    )

def register():
    bpy.types.Scene.pipe = bpy.props.PointerProperty(name='Pipeline Properties', type=PipelineProperties)
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.pipe

The enum property is accessed by:

bpy.context.scene.pipe.asset_categories

Here is the code where I assign a new value to this enum property:

scn = bpy.context.scene
scn.pipe.asset_categories = bpy.props.EnumProperty(
            name='Asset Categories',
            description='Testing',
            items=[('new', 'new', 'test value', 0)]
        )

Here is the error message:

scn.pipe.asset_categories = bpy.props.EnumProperty(as_name_list)
TypeError: bpy_struct: item.attr = val: expected a string enum, not tuple

What is this error and why am I getting it? How would I go about setting the value of the enum property I have defined to something else?

You are attempting to assign a property definition as a property value:

scn.pipe.asset_categories = bpy.props.EnumProperty(...)

Should be:

scn.pipe.asset_categories = 'new'

Or, if you actually want to change the definition, uou must manipulate the type instead of it's instance:

del bpy.types.Scene.pipe
bpy.types.Scene.pipe = bpy.props.EnumProperty(...)

Where ... are all the enum arguments


Animating my character's leg brings part of the other foot with it Once again, I'm running into problems following basic tutorials.  I tried to animate my model that I rigged with rigify, and when I move one foot, part of the other foot comes with it in some strange ways.

What's the best way to fix this?  My Blender project can be found here.

The problem is caused by the fact that your foot is not correctly weight painted:

The red bits will follow the bone, and the blue bits won't. to fix your problem, it should look like this:

To perform the fix, select the foots vertex group, enter wait paint mode, then paint the parts of the foot you want to follow the bone red.


How to get shadows information in cycles I have a WIP looking like this

Now I want to do something about a background and I want to do it in a similar halftone style. But when I'm applying it the same way as I did on the models, the dots are covering the shadow.

I need a shadow information, to influence them somehow, but I have no idea how to extract it. I'm using Cycles.

Ok, so  I achieved the result I wanted. Unfortunately, it's not fully procedural. What I needed to do was to bake shadow map of the plane and than I could use this information to make a final artwork.


Rigid Bodies - objects exploding and clipping Well, the title just explains my problem. I have been searching online but cant find any solution for me to understand.
At first I started with real lego size blocks and the I read rigid boides arent to friendly with small object, so I scaled them but problem persist.
I tried icnreasing steps per second, playing and tweaking around but nothing cool came out of it :(
The animation Im aming for is that the moving wall just "clears" the legos from their original position in a natural and organic movement
Thanks!

See the weight of all objects and make sure none is intersecting with each other.
And yes, change the collision identifier from convex hull to mesh.


Associate extra scalar data field with mesh or pointcloud I work with scientific pointclouds and I often have extra columns of data in my .ply files. For example, I might have a column for "temperature" where there is a temperature value for each point or mesh triangle. In a 3D package called CloudCompare, it's easy to hide parts of a pointcloud or mesh based on the value of one of these "scalar fields."

Is there a similar feature in Blender? If I have a .ply with extra columns, is there any way for me to, say, color the mesh by the value of that column, or use that column as the input to a python script?

I have edited the import script so you can get extra info from the file as vertex weights with a factor as object property
ex : temperature info column will generate

vertex_group named 'temperature'
object property named 'temperature_factor'
point temperature = vertex_weight*temperature_factor

download this file (  import_ply.py  ) and replace the one in Program Files\Blender Foundation\Blender\2.73\scripts\addons\io_mesh_ply\ , restart blender after that to take effect

I have used the factor to normalize all values (0.0<->1.0) because weight can't handle more than that


Break apart grid pattern of foams in mantaflow fluid sim In Blender 2.82, mantaflow was introduced, with a built in way to generate foam, bubbles, and spray.

However, the particles all seem to be a bit too uniform, resulting in a grid like pattern.

Is there a way to distort the pattern?

I am trying to get it to look something like this:

https://www.youtube.com/watch?v=I2EhrzmRQOE

or

https://www.youtube.com/watch?v=vTfGo6tWkzE

Increasing the particle resolution just makes the grid tighter, and reducing the foam instanced sphere size makes the actual foam ridges less prominent (and you can still see the grid).

The sprays and bubbles also have this issue, though to a slightly lesser degree.

It is a known bug in the official release, it has been fixed in the daily builds.

The first video you linked is actually done by me.


How to make ik target overlap with its constrained bone's location I know that the general practice when creating an ik rig for say a leg, you constrain lower leg bone to ik target and create a copy rotation constraint from the ik target to the foot.

Now I would like instead to have the foot bone directly constrained to ik target. To make this setup work I enabled rotation option in IK solver's constraint. But what I haven't been able to do is to make the IK target's location and the foot's (that is constrained to this target) location to overlap. This would allow me to directly rotate the foot from its pivot point instead of from its tail.

This is how the setup look right now. The foot bone's TAIL is matching the ik target location:

And this is how I would like it to look (don't mind that the foot doesn't look to be constrained), with foot bone's HEAD matching ik target location:

Is this possible to achieve?

As far as I know, this is easiest to achieve, when the (first) constrained bone in the IK chain points to the target. I added a helper bone LowerLegHelper (which is the parent of Foot and Lower Leg) and added the IK constraint to it.

If you want Foot to be reoriented like IK_Target, simply add a Copy Rotation Constraint to it.


Hide Objects(Collection) used as an particle from render in Blender 2.8 EEVEE I am trying to hide the Object collection that I am using as particles, But when i uncheck that camera icon to not render the collection then the particles are also not rendering.
As you can see in this Fig:(Before uncheck camera icon)

Now after un-checking

You also clicked the computer screen icon. Click the eye and camera icon, but keep the screen icon.


Mark seam's shortcut code? Blender has a lovely system for creating new shortcuts. Can anyone advise me on the code for the "Mark seams" operation? Bonus points for the button-toggle (one button to mark/unmark).

Press Ctrl+E and choose "Mark Seam" or "Clear Seam" from the list.
Then, in order to add a shortcut, you can do as explained here: How to assign a keyboard shortcut for a mesh selection mode?


image loading, but not appearing in an Empty, latest release 2.77 Still a bit of a noob with Blender and definitely with this stack exchange, so please go gentle!

Anyone else having a problem getting images (.png, .tiff, .jpg) to show up in an empty in the 2.77 release? I realize I can use a background image, but would rather use an empty for the perspective view. Tried disabling the "import images as planes" add-on, thinking that script might've altered something, but no luck.

Hope this issue isn't something moronically obvious that I'm missing here; many thanks ahead!

Use shiftA and select Add->Empty->Image

Then in the data section of the Properties panel Look for the Display control to open the image:


Cannot edit UV mesh? It seems I cannot find a way to edit my UV meshes.

I selected an object in object mode, went to edit mode, selected part of the surface, did a Project from View - and the change was reflected immediately in rendered view. I rotated my object , selected different vertices and projected again - so now my image shows up in two places on my object, as desired.

However, I wish to fine-tune everything, i.e, scale, shear, rotate, translate the UV meshes of the two islands I just created. This should be possible in the UV/Image editor.
With my object still in edit mode, I can pick the UV map to be manipulated and the image to be used. In paint mode, I can see the UV meshes, but there is no way to select and manipulate it. In view mode I can do some selecting (All, Circle, but border select does not work at all) somewhat: What I select in the UV editor (with "Keep selection in sync")  reflects in the selection in the 3D view - but I cannot see what I selected in the UV view, nor can I transform the UV mesh selected (i.e., doing some "G" or "S" or "R" blindly(!) does not change the final rendered apparence). Without "keep selection in sync", no selection seems to be possible at all ...

I wish I could reach a situation like this, where the yellow lines and thick vertices in the UV editor window indicate that things can be transformed:

But, alas, all I can achieve (and I have meanwhile crawled back and forth through all menus for over an hour) is either white lines in paint mode or no lines at all in view mode ...

What is it that I keep doing wrong (Blender 2.79)?

While in Edit mode in 3D View, and in View mode in UV/Image Editor, the View menu in UV/Image Editor has an item UV Local View with a checkbox. (With other views in either the 3D or UV window, the menu item may not be present).

Uncheck it.


Visualize depsgraph? Is there a convenient way to visualize the dependency graph of a Blender file?
If so, does it provide granularity showing where and how the dependency occurs?
If you create a dependency cycle, then the resulting error message will say something like:
Dependency cycle detected:
  OBCube/Transform Component/TRANSFORM_CONSTRAINTS() depends on
  OBCube.001/Transform Component/TRANSFORM_FINAL() via 'Copy Location'
  OBCube.001/Transform Component/TRANSFORM_CONSTRAINTS() via 'ObConstraints -> Done'

So clearly this information is kept track of internally.

It seems that bpy.context.evaluated_depsgraph_get() will return a Depsgraph() Python object.
bpy.context.evaluated_depsgraph_get().debug_relations_graphviz("/SomePath/SomeFile.gv") will then save the dependency graph in the Graphviz/DOT format, which can then be rendered out to an image using local or browser-based software:


can I get number of edges connected to a vertex I essentially want to put a fence up around the edge of my object, is there a way I can select all vertices with 3 edges connected to it?

for vertex in object:
    if vertex.connectededges == 3:
        select

Boundary edges

  I essentially want to put a fence up around the edge of my object

IMO Simplest here to select edges that are boundaries, ie are connected to only one face.

import bpy
import bmesh

ob = bpy.context.edit_object

me = ob.data
bm = bmesh.from_edit_mesh(me)

for e in bm.edges:
    e.select = e.is_boundary

bmesh.update_edit_mesh(me)

The vertex selection is implied by the edges.  .. which is why I could have used

e.select_set(e.is_boundary)

  BMEdge.select_set(select):

  Set the selection. This is different from the select attribute
  because it updates the selection state of associated geometry.

Although in this case I'm of the belief that the verts of an edge are selected with the edge. So

verts = set(v for e in boundary_edges for v in e.verts)

will be same as selected verts.

v for v in bm.verts if v.select

Using the bmesh to extrude those edges.

Rather than selecting the edges, can instead feed them directly into bmesh operators. For the example below the vertices created as a result of extruding boundary edges are fed into transform operator, and moved up one in Z.

Result on 10 x 10 default grid

Notice newly created geometry added with bmesh is unselected by default.  Run both these scripts below in edit mode.

import bpy
import bmesh
from bmesh.types import BMVert
from mathutils import Matrix

ob = bpy.context.edit_object

me = ob.data
bm = bmesh.from_edit_mesh(me)
bmesh.ops.transform(
    bm,
    verts = [
            e for e in
                bmesh.ops.extrude_edge_only(
                    bm,
                    edges=[e for e in bm.edges if e.is_boundary],
            )["geom"]
            if isinstance(e, BMVert)
            ],
    matrix=Matrix.Translation((0, 0, 1)),
    )

bmesh.update_edit_mesh(me)


Delete small structures on a surface I try to modify an object in Blender which was extracted from a CAD file. It looks like half of a sphere with a solid rim and some distortions (something like you can see in the picture)

My problem is: I want to have a flat inside of this object. Is there a possibilty to achieve that without selecting and deleting all the vertices I don't want? It is hard to use border or circle select because there are always some vertices behind the structures I want to delete.
I hope I described it properly.
Thanks!

You can't do much in Blender to have a better mesh imported. Hopefully your CAD program's export settings have more options for better exported mesh.

For that particular object and problem, I'd go like this:

Select a clean faceloop in order to see how many faces there are in one ring (in my case, 128):

Select the absolute center vertex of the object and place the 3D cursor there by hitting Shift+S and selecting Cursor to Selected

Select another vertical faceloop that doesn't have any of the crappy geometry. Make sure to zoom in and add faces to the selection all the way to the cursor, both from top and bottom of the object. (In my case I needed to select 2 triangles near the 3D cursor and from the bottom.)

Hit Ctrl+I to invert the selection. Delete all the faces.

Use calculator to find out what is 360 degrees divided by the number from phase 1. In my case 360/128 = 2.8125 degrees
Press . to use the 3D cursor as pivot point. Select all with A or AA. Do the following without clicking with mouse, moving is okay: Shift+D to duplicate the faces, R to rotate them, Z to use only Z-axis, type 2.8125 (or the number specific to your case), hit Enter. Press , to use the default Bounding Box Center as the pivot point again.

Press and hold Shift+R to repeat last action until you reach the whole circle.
Select all with AA, press W, select Remove Doubles, Ctrl+F and select Shade Smooth to be sure the geometry is nice and clean. In some cases you need to press T or F6 right after Remove Doubles in order to adjust the Merge Distance to make sure all the vertices are welded together.
There you have it, a clean bowl :)


Why can't I delete the vertices and faces in the legs? I wanna redo the legs of my mesh. I extruded them too early. Does anyone know why I can't delete them? I tried using alt+H to make sure everything was unhiden.

You have to switch to vertex select mode:


How to make a triangle with one angle being 90° Im new to Belnder and having troubles making a triangle with one angle being 90 degrees. I'm able to make a triangle but that's the existent of what I can do.

What I tried was making a normal triangle and attaching a cube to one side of it accomplishing what I want but this means I couldn't extend out side A (reference to image above) which is my goal.

Any other methods I should try?

End goal:

(but 3D)

If the second screenshot of your desired result is the side view of the future prism, then you can dissolve geometry of the cube.

Add a cube, in Edit mode choose Edge Select to select edges. Select one of the top edges of the cube. Press X > Dissolve Edges.

Once the edge is dissolved the mesh becomes a prism.


How to render only shadow instead of an object? In Blender internal render, that has been deprecated, there was an option for material to render only shadow that is cast on an object, not the object itself. Is there a way to do the same in the Eeevee render in Blender 2.9x ?
EDIT: In cycles, there is an option "Shadow catcher" under the object's visibility settings. What I would like is similar option or solution in Eevee.

Eevee
Render Only Shadow instead of Object

In Principle BSDF set Alpha zero
and under Material Properties > Settings > Blend Mode > Alpha Clip

Reaction on your EDIT:
Shadow Catcher

Shader to RGB with some tweaking in Color Ramp
and under Material Properties > Settings > Blend Mode > Alpha Blend


Wacky, weird colors when entering sculpt mode (blender v2.83) Every time I enter sculpt mode, the mesh (which should be grey) is a whole bunch of different colors. I tried changing the metacap, but the stupid colors remain. Any advice would be nice.
Picture bellow:

I had the same issue for hours in Blender 2.9
It appears everytime I apply boolean modifier on two or more objects or when I join them. My assumption is that it might be because of different face densities.
The solution from John Eason is working for me. Just turn off the Face Sets.


Is it possible add a group to selection (not selection to a group) in the in 3d viewport? Is it possible to add a object group to selection (not selection to a object group) in the 3d viewport? I know it can be done in the outliner, but I would rather some sort of shift click function in the viewport similar to how add objects to selection is done in the 3d viewport. Thanks.

Would it be Shift+G > Select Grouped > Group > Group Name?

After executing the operator, on the bottom of the tools panel or pressing F6 you can open the operator properties and tick the Extend option to extend current selection


Transform masked area in sculpting mode I'm trying to rotate a masked area in sculpting mode, but the pivot is right at the center of the world(scene). Is there a way to move the pivot in sculpting mode? What I'm trying to do is to move the pivot to the center of the unmasked area.
I've been trying to find info on this in the manuals and watching Pablo's twitter videos but I still can't find the solution.

You find an easy way to move the pivot to the center of the unmasked part
at the menu item
Sculpt (right next to Sculpt Mode and View) > Set Pivot > Pivot to Unmasked.


Why Can't i get back to the normal screen layout? My screen layout in one blend won't go back to normal. Even if I go to the tile area there is no bar for the different screen areas like uv editing. in the right hand corner where file and window is supposed to be, there is the object mode, rotate,scale and transform option. Look at the picture[look at the arrow

By the looks of it I'd say you have several (5, to be exact) 3d-View Windows. Selct one of the cube icons, I would suggest the second counting from left to right and set it from 3d view to "Info". Then you can change between the presets.


How to set the Origin to the center of an Array? This sounds simple, but apparently it is not:
I want to rotate the resulting array by its center (without having to set the origin manually).
That's the original object:

And that's the resulting array:

How to set the origin to the center of this array?

I have an intuition that this MIGHT work, so try this. Hover your mouse(pointer) over where you want the origin to be(here:the centre of the array) and then hold down shift and right click .
This actually places the cursor(the small round thingy in the viewport) there. Now right-click the mesh and set origin to 3D cursor(there's an option for that under set origin).This places the origin where the 3D cursor is and voila! The origin is set to the centre of the mesh.
P.S. I'm a beginner in blender, like, an absolute noob. Please don't kill me if this doesn't work.


How to make a wind force field, does not affect all objects in front of it (cloth simulation)? How to make a wind force field, to affect on some objects but does not affect on the others?

In my case, I want the wind affect on clothes, hanging on the rope, but did not affect on the rope (the rope - cloth simulation)

A cloth enabled object has a "cloth field weights" panel where you can set the influence for several dynamic effects, separately: one is wind, try set it to zero for "wind".


Anchor hud pane on camera bounds Is there a way to figure out the frustum bounds of an orthographic camera using Blender Game Engine?

I'm trying to anchor some panels on the corners of the screen without success .

I'm working with two scenes , one with a camera perspective and another with the orthographic camera ( hud )

Thanks in advance

Here is where you set it:

It says 7.314, therefore the camera is 7.314 wide.

As to doing it in real-time, the python API you are looking for is camera.orthoscale to get the width of the camera.

Sample code (untested):

aspect_ratio = bge.render.getScreenHeight() / bge.render.getScreenWidth()
height = aspect_ratio * camera.orthoscale
top_right = camera.getAxisVect([width/2, height/2, 0.5])
bottom_left = camera.getAxisVect([-width/2, -height/2, 0.5])

Note that the 0.5's in the getAxisVect are to place the object slightly forwards of the camera to ensure it get's viewed.


Node for local mesh curvature Is there a node (or group of nodes) that outputs a measure of local mesh curvature?

Using the input Fresnel node almost gives me the effect I'm looking for, but the node setup I'm looking for would be unaffected by viewing angle.

This feature was added recently and should be in 2.74.

  This attribute means how "pointy" the geometry surface is, which
  allows to do effects like dirt maps and wear-off effects on render
  geometry. This means the attribute is calculated for the final mesh
  which means no baking (which implies UV unwrap) is needed. Apart from
  this the behavior is quite close to how vertex dirty colors works.

  The new attribute is available as an output socket of Geometry node.

  There's no penalty for the render time, only some delay on scene
  preparation (the delay is linear of the mesh complexity).


Start Blender with popen in windows 7 I am trying to start and run a blend file with python3 popen under windows 7, but all I am able to do is start Blender.

blendFile = "D:\_Blender_Files\atrium.blend"
blenderPath = r"C:\Program Files\Blender Foundation\blender-2.71-windows64\blender.exe"
subprocess.Popen([blenderPath, blendFile], stdout=subprocess.PIPE)

It's because of the escape character "\" and how python handles it. Windows paths on python scripts are a nightmare. So you have to escape the backslash.

Try :

blendFile = "D:\\_Blender_Files\\atrium.blend"
blenderPath = r"C:\\Program Files\\Blender Foundation\\blender-2.71-windows64\\blender.exe"
subprocess.Popen([blenderPath, blendFile], stdout=subprocess.PIPE)

or with simple slashes (python handles it well) :

blendFile = "D:/_Blender_Files/atrium.blend"


Blender modeling a mallet / T-joint with variable cylindrical dia Unlike regular T-Joint, mallet has shruken cylindrical component forged with a big cylindrical component.
Please guide correct mesh flow.

At the beginning you could duplicate your cylinder and use the copy as the Target of a Shrinkwrap modifier so that you're sure that the circular hole you'll dig will stick to the cylinder profile. Then apply the Shrinkwrap and extrude to make the handle.

Also, you could use much less polygons:

Create a hole in the cylinder.
Extrude and make a circle with LoopTools > Circle.
In side view check that the circle's vertices are aligned with the cylinder profile (or use the shrinkwrap method if you think it's easier).
Extrude again to make the handle.


blender vse video height not divisible by 2 or pillowboxing I record an area of my desktop for upload to youtube with ffmpeg the area is a 16x9 aspect ratio with a width of 2952x1458

I can upload this video to youtube and it plays properly but of course I need some editing, mainly to remove some junk frames from the beginning and end of the video.

I load up blender vse and make the preferences changes

and go down and edit the encoding settings as well

mainly to go along with youtube recommended video settings

The problem is that when I try to hit animation, blender complains that this video's height is not divisible by 2.

When I change the percentage below x & y to 100% from 50% then the output video has horrible pillow boxing. As you can see from this screenshot:

How can I actually get blender to just take the video that I recorded, cut of the few parts that I don't need and export the video, in pretty much the same way it came in, while avoiding these issues?

Edit
I grab the screen with this ffmpeg command
ffmpeg -an -f "x11grab" -framerate "120" -video_size "2594"x"1458" -i :0.0+5,+257 -c:v "libx264" -crf "16" -bf "2" -flags "+cgop" -movflags "faststart" -pix_fmt "yuv420p" -preset "ultrafast" "$1".mkv

here is the raw upload: https://www.youtube.com/watch?v=2NzSlo3knbk
here is the out output from blender: https://www.youtube.com/watch?v=LYUTu6UV5ug

these are the export settings that I setup in blender render preferences

EDIT: The most direct answer to the question is the discrepancy between the capture dimensions and the export dimensions. The video is being captured in 2594*1458, which is a 16:9 ratio, whereas blender is exporting at 2952*1458, which is not a 16:9 ratio. It is likely to be a simple typo. This ratio difference is causing the letterboxing on the exported video.

sambler: Requiring dimensions to be divisible by two is a limitation of the H.264 encoder in Blender.

Original post

Render Dimensions:

The first problem here is blender downsizes the video to a non-divisible-by-two height. A simple way around this is to bump your scaling percentage up or down one or two percent. A better way would be to manually input dimensions instead of using the percentage slider. Blender can do math in text input fields, so you can simply put 2952/2 into the X dimension and 1458/2 in Y. If the result is an odd number, just bump it up one pixel. Amaranth Toolset (included in blender) has a nifty tool to show the final resolution of the render. Enable it in your user prefs and a new line of dimensions will show up in the render properties:

Letterboxing:

The second problem is letterboxing, the black bars on the top and bottom of the video. This is actually Youtube's fault because your video isn't a perfect 16:9 aspect ratio. To see your aspect ratio, simply divide your width by your height, in this case 2952/1458 = 2.024... Compare this width/height ratio with that of HD video: 1920/1080 = 1.777... You can see now the ratios are different. This difference ends up as letterboxing on Youtube. Pillarboxing occurs when your video is more square than the 16:9 player.

There are three ways you can deal with this difference: upload the video in its original aspect ratio and accept the letterboxing Youtube gives you; crop the sides off the footage to get a perfect 1.777... ratio on your output; distort the footage to fit within the desired ratio.

Personally, I would take the letterboxing because it means the entire area of my footage is visible without distortion, especially because the whole desktop is important.

Distortion:

If you absolutely do not want letterboxing, but still want all of the footage, you will need to distort the footage to fit in the 1.777 ratio. To do this, simply change your render output dimensions to a 16:9 ratio (2592/1458, 1920/1080, 1280/720, etc.). Blender distorts VSE strips to fit the render dimensions.

Cropping:

To make your video 16:9 ratio, your dimensions would need to be 2592 wide by 1458 tall (or some percentage of). A normal application would allow you to crop the video, but blender does not. You will need to use a transform layer on your VSE footage to compensate the aspect ratio difference between your footage and the new render dimensions.

Start out with your footage in the VSE. Change your render dimensions to 2592 wide by 1458 tall. Your footage will look distorted; this is expected. Select your strip in the VSE and add a transform layer effect. Open the properties region for the strips by pressing N. The Effect Strip panel contains scale controls for X and Y dimensions. The one you need to worry about is X. Input this value into X: 1.139 - this corrects the ratio difference. I came to this number by dividing your original ratio (2.024...) by the desired ratio (1.777...). If you have multiple strips, you will need to do this for each one because the effect strip is linked to only a single input strip.

Final Thoughts:

Letterboxing may be ugly, but it is a necessary evil if you don't want to lose information. Cropping may be more acceptable for camera footage. I can't think of a time when distortion is acceptable.


Python to select and delete multiple faces? I'm trying to select the top and bottom face of meshes and delete them.

So far, the code I have just deletes to first face but not the second. It would probably be more efficient to select both top and bottom together and delete them in one go rather than one, then the other, but I'll be happy with whatever just works. Any help anyone can offer would be most appreciated. Thanks

import bpy
from mathutils import Vector

def NormalInDirection( normal, direction, limit = 0.5 ):
    return direction.dot( normal ) > limit

def GoingUp( normal, limit = 0.5):
    return NormalInDirection( normal, Vector( (0, 0, 1 ) ), limit )

def GoingDown( normal, limit = 0.5):
   return NormalInDirection( normal, Vector( (0, 0, -1 ) ), limit )

def GoingSide( normal, limit = 0.5):
    return GoingUp( normal, limit ) == False and GoingDown( normal, limit ) == False

obj = bpy.context.object

#bpy.ops.object.editmode_toggle()

prevMode = obj.mode

bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

#Selects faces going up
for face in obj.data.polygons:
    face.select = GoingUp( face.normal )

bpy.ops.object.mode_set(mode=prevMode, toggle=False)

bpy.ops.mesh.delete(type='FACE')

#Selects faces going down
for face in obj.data.polygons:
    face.select = GoingDown( face.normal )

bpy.ops.object.mode_set(mode=prevMode, toggle=False)

bpy.ops.mesh.delete(type='FACE')

You can use bmesh and bmesh.ops to do it.

The code is commented below:

import bpy
import bmesh
from mathutils import Vector

def NormalInDirection( normal, direction, limit = 0.5 ):
    return direction.dot( normal ) > limit

def GoingUp( normal, limit = 0.5):
    return NormalInDirection( normal, Vector( (0, 0, 1 ) ), limit )

def GoingDown( normal, limit = 0.5):
   return NormalInDirection( normal, Vector( (0, 0, -1 ) ), limit )

def GoingSide( normal, limit = 0.5):
    return GoingUp( normal, limit ) == False and GoingDown( normal, limit ) == False

obj = bpy.context.object

prevMode = obj.mode

# Will need to be in object mode
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

# Create a bmesh access
bm = bmesh.new()
bm.from_mesh( obj.data )

# Get faces access
bm.faces.ensure_lookup_table()

# Identify the wanted faces
faces = [f for f in bm.faces if GoingUp( f.normal ) or GoingDown( f.normal )]

# Delete them
bmesh.ops.delete( bm, geom = faces, context = 'FACES_ONLY' )

# Push the geometry back to the mesh
bm.to_mesh( obj.data )

# Back to the initial mode
bpy.ops.object.mode_set(mode=prevMode, toggle=False)


Correct way to delete double material on object by exact words inside I try to excluding objects except 4 types, the objects in question have these letters in the name, but they are not always in the same place, for example ".Type1.001" to delete duplicate material , the script without the list work fine:

import bpy

mat_list = bpy.data.materials
scene = bpy.context.scene
obj_list = [".*Type", ".*AnotherType", ".*Example", ".*AnotherExample"]
patch_list = re.compile('|'.join(obj_list))

get_objs = [obj for obj in scene.objects if  obj.name == patch_list ]

for o in get_objs:
    for slot in o.material_slots:
        if slot.material.name[-3:].isnumeric():
            if slot.material.name[:-4] in mat_list:
                slot.material = mat_list[slot.material.name[:-4]]

return

Match the compiled re

Not sure you will ever get ob.name == patch_list recommend using patch_list.match(str)

>>> "xxxxType1.001" == patch_list
False

>>> patch_list.match("xxxxType1.001")
<re.Match object; span=(0, 9), match='xxxxType1'>

>>> patch_list.match("xxxxType4.001")
<re.Match object; span=(0, 9), match='xxxxType4'>

>>> patch_list.match("xxxxTpe1.001")
>>> patch_list.match("xxxxTpe1.001") is None
True

In question code

import bpy
import re

scene = bpy.context.scene
obj_list = [".*Type%d" % i for i in range(1, 5)]
patch_list = re.compile('|'.join(obj_list))
get_objs = [o for o in scene.objects
        if  patch_list.match(o.name)]
print(get_objs)

on your edit.  I'm not sure this changes anything.  Below I've simply added a names list of potential names of objects and how they match.

To repeat I dont think any object name is ever  going to be equal to a compiled re object.  name == patch_list hence your get_objs list will always be empty.

import re

obj_list = [".*Type", ".*AnotherType", ".*Example", ".*AnotherExample"]

namelist = ["SnoopType", "Frog", "DogisAnotherExample.001"]
patch_list = re.compile('|'.join(obj_list))

get_objs = [name for name in namelist if  patch_list.match(name)]

print(get_objs)

results in

['SnoopType', 'DogisAnotherExample.001']


array of random cylindrical extrusions I am trying to model this bowl pictured below with rings of elements with slightly varying section, extrusion length and angle. I am wondering how best to go about this? If I added randomization to an array as described here that would deal with the random angle of each element but how then would I go about randomizing the extrusion section shape?

I would do it that way :

First, create your cylinder by using an elongated rectangle. Delete the bottom face.

Add a subdivision surface modifier. Don't forget to smooth it out with Object > Smooth

Add an array modifier to get your row of 3

This is the trickiest part. Add an empty in your scene. Add an array modifier with a constant offset and set the empty as an object offset :

Drive the empty rotation depending on the array count :

Add a displacement modifier, add a new texture and set the direction to "RGB to XYZ".

In the texture tab, set the type to "Clouds" and the color to "Color". Increase the size. There is a soft limit of 2 but you can manually input higher values.

Tweak the displacement modifier strength so that it is believable.

Result :

If you want lower frenquency in your displacement noise, you can add another displacement modifier with a new texture, set to a higher size.

I didn't go full non-destructive but you can still tweak some parameters :

Addition (Thanks R. Betts :) ) :
To give a nicer transition between the base of the cylindrical thingies and the plate, I modified the base mesh to have a square extended base :

Next add a vertex group, and make sur only the top vertices have a weight of 1.

In your displacement modifiers, make sure the group is selected so that the base doesn't get displaced :

Final result (Eevee - By no means supposed to look realistic :) ):

The blend file :


Make glass lightbulb material work? I am making an old fashioned incandescent light bulb in cycles, with the coil inside having an emissive material. However, I am trying to find a good way to make the glass material. If I use an actual glass material with low roughness, it is too dim. If I use a glass material with high roughness, I can't see the filament, which I want to see. The best way to pass the light through that I found was a completely transparent material, but then you obviously cant see the glass. Is there any way to make a material that passes light through like a transparent bsdf but still shows up?

I would think you could use a principled shader with the transmission level set to 1.  Here's a demo scene:

There's a cylinder inside the first sphere and it acts as the filament:

The plane and the back sphere have simple principled shaders.  The only changed setting on either is the color.
The front sphere has a principled shader with roughness well down and transmission set to 1:

Note: if you look at this scene in Lookdev/Viewport shading you won't see the filament because EEVEE is used in lookdev:

My world emits no light and there are no other lights in the scene but the filament:

and the filament is just an emitter:

The blackbody simply sets the color to daylight.
Here's the render view with that setup:

or you can set the color to reddish by changing the temperature to 1500:

or lower the intensity of the bulb:

note that the yellow outline of the cylinder is because it's selected.  Here's an actual render:


how to split an object into two Beginner in blender. I am trying to split an object into two equal parts by bisecting it. However whenever I try to bisect it, Blender gives me the error message, "Selected edges/faces required." What does this mean and what should I do?

In Edit mode you need to select at least one face or one edge of your object, or the whole mesh, meaning you want to cut this face/edge/whole mesh. Then activate the Bisect tool. On the bottom of the Tools panel (on the left of the 3D View) you can enable some options. I guess the best is to leave everything as it is. Then to separate the two parts you've created, keep the cutting selected, then press V to rip, now you can select a half or the other with L. To make another object with one of your halves, select it and press P > Selection.


I want to show different object modes on two different windows in 3DView (Object Mode and Weight Paint I am doing some very detailed weight painting on a texture.  Using Blender 2.92.0.   What I'd like to do is have a side by side in 3D view where on screen is in Weight Paint mode and the other is in Object mode but i can't find a way to do it.
When I select either mode, both screens go into that mode as shown here:

When I select Object mode, it switches to this:

This is what I want (NOTE: I photoshopped/cropped this side by side together to illustrate what I want, not a real image:))

I've been using Blender for a year so I'm fairly experienced but this one has me stumped (maybe because it is simple...).   I'd be fine with mapping a key to either mode (eg F1=weight, F2=object) but in Blender 2.92 that doesn't seem possible (i've tried, again probably doing something stupid).
any ideas?
thanks

The simplest thing to do is just disable overlays on one of your viewports. Look on the right side (top or bottom, probably top) of your viewport for a button with a "show overlays" tooltip. Click it.
There may be some information you wish to see with overlays.  In that case, click the drop-down arrow to the right of the overlays button and, while in weight paint mode, set weight paint opacity to 0.  And, optionally, set fade inactive geometry to 0.0, or disable it.  Selected vertices while in vertex mode will still be drawn; wireframes in face mode will be drawn.


How can I make a number of objects sit "snugly" on an irregular surface? How can I make a number of objects (or copies of one object) sit "snugly" on an irregular surface - like trees or rocks on irregular ground?

I once came across a tutorial that covered this but I cannot find it again.

The only thing I can think of is to create a "pseudo object" whose vertices represent the desired relative target locations then use retopologize to make the "pseudo object" vertices conform to the surface of the irregular target object and, finally, use dupliverts to place the added objects.

This might not be as 'snug' as you might want but for the use case you described above, it is perfect. You can do this with a particle system and groups.

Group all your objects that you want to sit on the ground and add a new Particle system to the ground.

Change the type to Hair and under Render change the type to Group and select the group you had previously created, your objects will be scattered randomly across the ground.
(Note: This might lag your scene as the default Emission amount is 1000, so change it before or after).

I imagine this can be ideal for scattering rocks and or brush over some terrain. I won't go too indepth on the other settings as they are pretty intuitive and you will more likely get your desired results if you experiment. (larger image here)


Displacement settings in Materials turn material black I've been trying to fix this forever and I dunno what to do anymore,
I have a plane (over 100k subdivisions)
I set cycles render to experimental (every tut tells me to do so)
now I read that in order for displacement to work you have to change the displacement type in materials settings from bump to displacement and bump (thanks for the default settings which disable functionality?!). I saw that in Blender guru's tutorial.
But when I do that, the Material turns black, I can only use bump only in material settings.
BLENDER FILE: Blend file - displacement bug
All i basically want to do is to displace my ground material i downloaded from quixel megascans.
Every image I see of the quixel megascans looks photoreal, but when i export via bridge they never displace and are flat. So i always have to find a way to displace them, when i do with the displacement modifier it only displaces one the texture i load in, i want to use a bigger plane and use the texture multiple times (using blender gurus poliigon addon).
Does anybody know a good tutorial for ground material + displacement ? I am 100% sure there's gona be a silly problem anyways, so far there wasn't even one tutorial where i could just follow along without any functionality, interface, location, glitch or bug issue.. This is by far the most tiring software i learned (and still learning) hands down. But I won't give up! Sorry just had to let some steam out...
Appreciate your help!

Luckily this is a easy one, the only problem was your Displacement node having the wrong values. I downloaded your file and saw that you set the scale on your displacement to something around 47 which is really big, this value controls the overall scale the displacement has meaning a higher value makes the displacement stand out or drop down more.
The middle value called "Midlevel" was set to 5 in your file, but it should be around 0.5 in most cases as it marks the height of the overall displacement (the Midlevel specifically controls what height the colour on your height map right in the middle between black and white would be at, in short its the height of the entire displacement.) Due to it being at 5 in your example, the whole texture got sent up into the air so you couldnt see it anymore, therefore making the object appear invisible because you could only see the orange outline which doesnt go up with the rest of the texture.
Lastly, the displacement texture you're using is almost completely black meaning the texture gets sent down anyways as black indicates a drop in the displacement and white tells it to go up.
I would reccomend you to play around with the displacement node in a test file and learn how the different values work so you can set them up correctly in the future, as well as making your texture artificially brighter so it ideally spans the whole range between black and white, either in a image editing program like Photoshop or using nodes in Blender.
I hope this helps, if it doesn't make sure to comment here again so I can help you further :)


screen is black when rendering in cycles I have no clue what I'm doing wrong.

I have a light, and everything, but it renders black.

When I render it from the bottom toolbar it renders fine, when I click Render Image, or render it from the view of the camera, its black.

I would attach the blend file, but I don't know how to. I already tried putting in more lights, and messing with the layers, but it just wont work!

Does anyone mind telling me what I did wrong?

Only apply if you cannot see by pressing F12

Make sure you don't keep any hidden object in front of camera.

Check your right hand column if there is hidden object or not.

You can hide by clicking on eye stuff click again for un-hide.


How to install Sensei theme I've only just discovered Blender and after a few hours I can do far more of my simple project than I managed with FreeCAD after hours of struggle.

However I have found the scaling and units a bit confusing and read that Sensei deals with this more simply. I downloaded the zip file and tried running it from the Linux terminal and in the Blender Python console but it errors.

Blender 2.76 on Linux Mint Cinnamon 18.1

Thanks to Duarte Farrahota Ramos for the answer.

Instructions and file to download are here: Sensei

Download the file sensei_theme_update_10_21_2013.zip
Extract the zip file.
Open Blender and go to “File” at the top choose “User Preferences” and then choose the tab “Themes”
At the bottom of that screen choose “Install Theme” and select the file you just downloaded on your computer.
If you’re happy with the theme changes then go to “File” at the top and select “Save Startup File” and you’re done.

Notes:
(2) Make sure the extract results in an .XML file.
(5) This doesn't appear to be necessary.


Place an object on each face of a polyhedron I made a regular polyhedron - let's say a octahedron - and (again for simplicity) a pyramid whose base face is congruent to the face of the polyhedron.

Now my question is: How can I "glue" a copy of the pyramid on every face of the tetrahedron? (such that the tip is pointing outward?)

Here an example of the two example objects (on the left) and the "desired" result (on the right), but in this one I attached the pyramid manually (very badly, as you can see). They point in all kinds of directions, but not really away from the octahedron.

I tried finding suitable modifiers, but without success.

PS: I'm aware of this question but that does not apply here, as the actual objects I want to glue to the faces are a little bit more complicated.

EDIT1: I just found the Object > Duplication > Faces menu which is getting me a step closer, but then then all duplicates are still facing the same direciton as the original.

EDIT2: Using the Duplication > Faces method the spikes still do not end up in the correct orientation as I stated already in EDIT1. It looks about like this now (I enlarged the octahedron just just to separate the pyramids a little bit):

EDIT3: It seems I can do it with the generic objects, but not wich my own. I added a file: In this case the "cut of cube" should be placed on the faces of the tetrahedron. The cutting plane on the cube exactly matches the faces of the tetrahedron:

Let's say you have an octahedron and a gear and you want to have a gear on each of the faces of the octahedron.

Select the gear, then shift select the octahedron (so that both are selected but the octahedron is the active object)

Then press CtrlP and select parent to vertex.

Set the duplication to faces.

The advantege of this is that both objects remain editable, and chhanges on the duplicated object will be applied to each one of the instances. Once you are happy with the results you can Make Duplicates Real by pressing Ctrl+Shift+A

EDIT:

Both objects must be at a common origin.


When creating animations, how come we start at frame 1, not frame at 0? By default it is set to frame 1, not at frame 0, any particular reason why?

It's this way because just about everything else that is indivisible in the world is that way, and for good reason. We start at frame 1 because it's the first frame. Sure 0 could be used, but having 0 as the first frame instead of 1 would be unnecessarily confusing since frame 1 would now not be the first frame and everything would be offset by 1.

It may be easier to understand if you think of a similar situation where you start at one and not zero, such as counting things (which is technically what we are doing here) or book pages.


How to prevent indentation errors? I added a line and am very sure there is no indentation problem. Here is the error report and screenshots of the text so you can see it:

  Error: File "C:\Users\info\Desktop\Claas UI.blend\Claas_UI_2.py", line 40
      bpy.ops.object.mode_set( mode = 'EDIT' )

  TabError: inconsistent use of tabs and spaces in indentation
  location: :-1

  Error: Python script fail, look in the console for now...

When I remove the line with the arrows and uncoment the previous lines below it all runs fine.

Any idea what causes this?

Python doesn't like inconsitently mixed tabs and spaces for indentation.
Ctrl-T opens the property panel, check that the Tabs as Spaces is ticked.
You can usually fix this by unindenting the lines in question by Shift-Tab to the first column and re-indent them Tab again.

There is also the menu option available  Format > Convert Whitespace > To Spaces  (or to tabs)
Related:

https://stackoverflow.com/questions/5685406/inconsistent-use-of-tabs-and-spaces-in-indentation


Transfer Weights does not affect one edge loop I have a modular character with separated parts (for game) and different head variations. For some reason one head has differently weighted edge loop around neck, which causes problems when moving neck bone:

Both heads have vertices in the same place along this problematic edge loop and both are separated from torso. If Head nr 1 deforms correctly, then, after transfering weights, Head nr 2 should deform the same way, right? When i Transfer Weights from Head 1 to Head 2 it transfers the weights (i've tested it), but this problematic edge loop is still detaching when moving neck bone. How to solve this problem? Here's my .blend file ('Head2' mesh is hidden): http://www.pasteall.org/blend/35974

It may be not an exact 100% answer, but i've managed to find a workaround:
I've recreated Head nr 2 by duplicating Head nr 1 and deleting all polys besides these near edge loop. Then, from Head nr 2 i took all polygons besides these around edge loop and connected it to duplicate of Head nr 1. This way, the edgeloop remained from Head nr 1, and the rest is from Head nr 2 - which gave me a Head nr 2 without problematic edgeloop.
Problem solved, but i still don't know why it could not transfer weights properly.