How to remove a subdivision of a cube I want to know if there is a way to remove a smaller cube from a larger cube I subdivided. I removed the faces of the corner cube, but this reveals the inside. Is there a way to make the cube not hollow? So I could remove the outside faces and still not be able to see the inside? Thanks

Select the seven verts of the corner. Select the lower right vertex last so it becomes the active (white) vertex.

Extrude the selection with EESCAPE. That way the newly created verts stay in their places. Set the pivot point to 'Active Object' and scale the selection to 0 on the Y axis SY0RETURN. This will set all vertices to the y value of the active vertex, putting them in the back. Depending on how your object is oriented, you might need to pick a different axis.

Select everything with AA, remove doubles with WR and recalculate normals with CTRL-N


How to align bones so their rotations are the same? I'm fairly new to Blender and am having some problems with skeletons/armatures, specifically aligning fingers on a hand so they are rotated facing the same way. I can't find an option to do it in edit mode and it's making my end product rotate weirdly, mainly the thumb.
So say, I have a bone like this:

If I wanna align a bone in 3DS Max I press Alt-A which brings up an option to "Align" anything to anything, I can select transformations, rotations and scale, copying from the object I select afterwards. Here's an example:

So if I select all the transformations, rotations and scales, it'll place it in the exact same location, rotated in the exact same way and scaled the exact same way, but maybe I just want to align their rotations so their axes are the same, I can do that easily by just ticking the appropriate boxes. This is great for aligning bones so that they're all on the same axis.
Here, I just ticked the rotations and you can see the rotation data has been copied to the bone:

So I wanna have fingers all aligned perfectly as they tend to be in real life, in Max I just do that method I just said and I can align the finger bones so that their axes are lined up.
In Blender I can't seem to do this, I just have to guess and hope that I've placed things so they're rotated the same. Is there some way to align the bones like I just showed in those images with Blender? Or am I stuck guessing and hoping things don't look too bad?

You can add a bone Copy Rotation constraint then Apply Visual Transform to Pose then Apply Pose as Rest Pose.

As far as I can remember someone here in BSE had created a script to make this process faster, you may find it with a quick search.


Color ramp isn't working correctly with particle info node? I'm animating a spot welder which throws off some sparks (with help from Andrew Price's spark tutorial) and I can't actually get them to change color in relation to their age. Here's my node setup:

The color nodes on the top are all you need to pay attention to. If you look, I've got a color ramp that I tried to use to get the sparks to shift color as they get older, but for some reason it isn't working correctly. The divide node seems to always be giving an output of 1, no matter what the age of the particle is. This means that the sparks only ever have the color of the very end of the color ramp. I've tried moving the left color picker over, even to within about 1 pixel of the right one. It has no effect and the sparks keep the color of the right color picker throughout their entire particle lifetimes. I did also make sure to actually give the particles a lifespan. Does anyone know why the divide node might be giving an output of 1? The age to lifetime ratio should start at 0 and progress to 1.

This is what the rendered scene looks like:

Here's a demonstration showing just that part of the cycles particle info being used to drive a colour ramp.  Notice I had to also add in another divide just to get the far end of the colour ramp to appear in the view.  You can see clearly that the individual particle blurred paths are constant in colour even though different particles may have different colours.  You might be able to use a spherical gradient in addition to the age and lifetime values to change colour along a long thin particle to create the effect you are looking for.

Here's a crude version of the suggestion above.


Python script - objects are grey after export to glb file There is my short code. I'm using blender_osm addon to generate these buildings. After the first render, it looks fine with colors on textures. But when I export it and reopen all textures are grey. What am I doing wrong?
import bpy

class PrepareModels(bpy.types.Operator):
    bl_idname = "wm.prepare_models"
    bl_label = "Minimal Operator"

    def execute(self, context):

        context = bpy.context
        scene = context.scene

        bpy.ops.blender_osm.import_data()

        context.scene.blender_osm.dataType = 'osm'
        bpy.ops.blender_osm.import_data()

        bpy.ops.export_scene.gltf(filepath="/tmp/{}.glb".format(filename))

        return {'FINISHED'}

bpy.utils.register_class(PrepareModels)

bpy.ops.wm.prepare_models()

After @emackey comment I tried to convert one of my material using from bpy_extras.node_shader_utils import PrincipledBSDFWrapper as is said here https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Modules like this:
        mat = bpy.data.materials['wall']
        mat.use_nodes = True
        principled = PrincipledBSDFWrapper(mat, is_readonly=True)
        base_color = principled.base_color
        specular_texture = principled.specular_texture
        if specular_texture and specular_texture.image:
            specular_texture_filepath = principled.specular_texture.image.filepath

and also lik that:
        newmat = bpy.data.materials['wall']
        newmat.use_nodes = True
        node_tree = newmat.node_tree
        nodes = node_tree.nodes

        bsdf = nodes.get("Principled BSDF")

        vcol = nodes.new(type="ShaderNodeVertexColor")
        vcol.layer_name = "VColor" # the vertex color layer name

        # make links
        node_tree.links.new(vcol.outputs[0], bsdf.inputs[0])

but it doesn't help

glTF (GLB) uses a PBR material system, and the Blender exporter requires the exported materials to use the "Principled BSDF" node.  The glTF material system is documented in the Blender Manual.
If the blender_osm addon is producing materials based on the Diffuse node or similar, these won't export correctly in the current version of the glTF exporter.  Your script will need to convert these materials to use Principled BSDF.


Object not visible in render even when it is not disabled in rendering When I render, the object shown in the image is not visible in render, even when the disable in the render is checked. I would like to know how this is happenening? Here is my .blend file-
http://www.mediafire.com/file/64n3e7l4hzio3dv/nami_no_lacagues.blend/file

Not a whole answer: I've figured out what happens, but not why. I thought it best to share it anyway since it might help.
In the 3D Viewport the object seems to be affected by the Surface Deform modifier. But for rendering it is not. When rendered it is in the shape (and location) where it would be without the Surface Deform modifier.
If you render the character from the back you can see the object in this location, partly hidden in the body of the character.

A possible solution is to Apply the the Surface Deform modifier on the object.


What is the coding alternative for double edge loop select? Suppose I want to select the entire mesh boundary. Alt + RMB on a boundary edge would select one edge loop (left image), while Alt + double RMB yields the desired result (right image).

How would I achieve this result by scripting? Assume the user first selects one boundary edge manually. I reckon it is buried somewhere in this function:
bpy.ops.mesh.loop_select(extend=False, deselect=False, toggle=False, ring=False)
But I can't quite understand how to use this function. Examples on how to do this would be very much welcome.

Bmesh script.
With a single boundary edge selected in edit mode, the LHS of question images can be achieved calling bpy.ops.mesh.loop_multi_select() directly from the python console.
>>> bpy.ops.mesh.loop_multi_select(
loop_multi_select()
bpy.ops.mesh.loop_multi_select(ring=False)
Select a loop of connected edges by connection type
>>> bpy.ops.mesh.loop_multi_select()
{'FINISHED'}

The mesh.loop_select operator is a different kettle of fish and requires context override if called from outside the 3D view.
This is a matter of giving the context override dictionary a 3d view "area", "space_data" and "region"
However even then, with all combos of options it still did not perform as did the alt double click on my test mesh.
Use bmesh.
IMO edit mode mesh operators can become mind-numbingly annoying to code when they cannot be "made to perform" as desired
Touched on some  other reasons to avoid operators Element indices messed up after switching from Edit to Object Mode
Can instead create our own methods
The boundary select function below takes an edge, tags it, looks at all untagged boundary edges linked to its two end verts, tags them and so on until it can go no further, then returns the edges.
Test script, run in edit mode with a single boundary edge selected.
import bpy
import bmesh
from collections import defaultdict

context = bpy.context

ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)

edge = bm.select_history.active

assert isinstance(edge, bmesh.types.BMEdge), "Select an Edge"

def boundary_select(edge):
    tag = defaultdict(bool)
    tag[edge] = True
    grow = True
    edges = [edge]
    while grow:
        more = [
        el for es in edges
        for v in es.verts
        for el in v.link_edges if not tag[el] and el.is_boundary
        ]
        edges.extend(more)
        for e in more:
            tag[e] = True
        grow = bool(more)
    return edges

for e in boundary_select(edge):
    e.select_set(True)
bmesh.update_edit_mesh(me)

Persistence of element tag and select using bound bmesh
How to detect disconnected parts within a selection?


Why are my object's shadows so janky? I'm trying to sculpt some stylized boulders for use in Unreal Engine.  I got something I'm happy with:

However, whenever there is light on them, the shadows look pretty messed up:

After digging around for clues, I found a few posts here regarding non-planar faces.  I tried using Clean Up > Split Non-Planar Faces, but it really messes up the look:

As does Clean Up > Split Concave Faces

How might I go about fixing the faces while preserving the look?
Thanks a million in advance!!  I've also uploaded the blend file in case it helps.

The reason this mesh has strange shading is because of the topology.

Polygons which are made of more than 4 vertices are called ngons. These ngons are pretty extreme in your mesh as you can see. While ngons have their place (on totally planar faces) if an ngon face has even the slightest twist, then it will cause horrible shading.
This is why in 3D modelling (especially for beginners) people avoid ngons and aim to keep faces consisting of no more than 4 vertices, which are called quads.
Another way to make these kinds of stylized rocks is to add a cube. Subdivide it with constant detail and then enter sculpt mode.
With the scrape brush, you can scrape away at the faces of the heavily subdivided cube to get nice flat edges.
Once you're happy with it, you can leave sculpt mode and then add a decimate modifier and decimate the rock to reduce the polygon as much as possible (lower the value in the slider to somewhere near 0.01).
The decimate modifier will retain the detail best while keeping the shading looking the best. Once you find a happy medium between detail and polygon count, you can apply the decimate modifier and move on to UV unwrapping and later texturing.
This is how I make stylized rocks.
Hope that helps! :)
I just added a rock I did just now.
https://www.dropbox.com/s/rcbo7lwoyoetbln/RockSculpting_Demo.blend?dl=0
I just rushed this so with a bit more time and effort put into it, you could get something looking nicer but hopefully it'll give you an idea of how the topology should look.


Does keyframe slow move exist? I remember, in Dope Sheet, using Shift while dragging keyframes (I always use G) to be more precise. With 2.7, that doesn't work. I tried with 2.66... and it neither! Tried 2.57... and neither.

Am I wrong and this function never existed... or there was a version that supported it?

EDIT: I don't want to move to decimal frames (eg: 24.534). As commented, I want to move keyframes in a zoomed-out-view and be precise when dropping them.

When the new animation system was added, Auto Snap was enabled by default in the Dope Sheet and Graph Editor. It uses the nearest frame for snapping. You can change this behavior using a the Auto Snap dropdown menu in the header (it's in both the Dope Sheet and the Graph Editor). You can disable Auto Snap altogether by setting that dropdown to "No Auto-Snap".


How to bake texture with same brightness as original? I try to bake this simple model in cycles render engine.

but the bake result is always much darker than the original.

How can I bake it so that the result will be an exact copy of the original textures?

Render Settings:

World Settings:

I learned it from this video:

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

Result of Turning Indirect and Direct off (only Color is on)

Looks washed out.

As it turned out the simplest solution to this problem was to make the world white and disable any lamps to make sure every part of the mesh gets the same amount of light. Blender Internal would be a good alternative but if you're working in cycles you probably don't want to redo all settings after switching back. (Though I do think the setting will stay)


How can I detect global/local view via python? is there a way to detect what view global or local is active via python?

Can I set them directly somehow or at least always come back to global one?
In a way where if script is executed view is moved to global no matter what view user is in.

It can be done this way:

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        space = area.spaces[0]
        if space.local_view: #check if using local view
            for region in area.regions:
                if region.type == 'WINDOW':
                    override = {'area': area, 'region': region} #override context
                    bpy.ops.view3d.localview(override) #switch to global view


Make blender particles a specific shape? I have just followed and completed a tutorial that made a woodchipping effect on the text. this is a link to it:

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

I would like a specific shape for the particles that come off, though. Is this possible? I am new to blender and stack exchange so please so your help would be much appreciated :)

In the render panel in the particle system options check "object" and select your object.


What is the most efficient way and the industry standard to make and add textures to a UVmap? I have been asking this myself ever since I learned about UV unwrapping years ago. I learned that you can either paint your models itself in a software and the UV map will automatically be applying those values and colors. You can also paint the UVmap itself in say Photoshop or Blender itself though. I want to know what artists use in the gaming industry and whether or not I missed other methods of painting textures. Thanks in advance =)
(This question is not asking for opinions but facts)

The UV Map is not an image itself, it is the mathematical projection of the vertex in an X and Y plane. The image texture is just that, an image texture - but it is aligned to a specific UV mapping so that it can align to the vertices of your mesh. Paint in the 3d view, paint in an external editor, or as now possible paint in Substance Painter and get all your texture images there. Do it how you want to, the result is what is important.


How to add background image with background environment and only render the first? im new to Blender so apologies for any silly question but I have an object that have already an HDR image as environment background for reflections and stuff, and now I want to composite that object with other image, how can I add the background image without rendering the environment background too?

If what you want to achieve is a render without the HDRI Background, you can go to Properties Panel > Render > Film > Transparent [x] []1

Another option could be going to Properties --> World --> Ray Visibility --> Uncheck the "Camera" Box.

Hopefully this is what you need, Cheers!


Any way to attach another mesh to another ( Not CTRL + J) Basically, I'm creating a uniform, I want the uniform to have some pockets and the like

I want to create nearly the same as in the picture, but I'm struggling at creating the pockets.

Imagine the cube is a pocket, how do I properly attach it and deform it so it perfectly attaches/merges to the jacket? It's hard to phrase, I hope you understand.

You could try using the Boolean modifier.  Select your jacket, add the modifier, change the mode to Union, and set the Object to the pocket cube.  Hit apply and it should make it one manifold mesh.


Mixamo/Animation Merge animations I would like to ask a question about "Mixamo". Is there any way you could mix multiple animations and start them from different location. For example my animation (1.running) goes from point A to B and I want to start animation(2.running jump) from point B. But when I move those animations they change, so basicaly animation (1.running) starts at point B if I move it slightly.

Also I tried to use different plugins for combining them as GODOT GAME TOOLS. But this doesn't work so well...

If you guys understand me please help me.

You need to put all mixamo animations to a single armature using nla tracks.
I made a script for automating it.
You can try a script that i wrote. It combines all .fbx anim files that you downloaded from mixamo into one armature.
gumroad.com/l/MixAnimMerger
You can then skin the mesh to the new armature and export it as fbx.it will contain all animations.


How to render all cameras in the scene automatically How can I render all cameras in the blender scene automatically, with multiple resolutions and sampling set per camera? I'm using Blender 2.8

The reason I am looking for automation is the following: when the model is remodelled, the old renders are outdated and new ones must be created. Doing so manually for multiple cameras, with each their own settings, is time consuming (and boring).

You can use a script for that. This repo on github has Render.py. It uses a settings file for each camera (or the default if no camera specific setting is found). So for each camera multiple resolutions and sampling settings can be defined. Put the render_settings.json file in the same dir as the blender file. Open the blender file and goto the scripting tab. Load and run the script.

Render.py script

import bpy
import json
import os

renderPath = bpy.path.abspath("//Renders\\")
print('Render path: ' + renderPath)
renderSettingsJsonPath = bpy.path.abspath("//render_settings.json")
print('Settings file: ' + renderSettingsJsonPath)

def ensureDirExists(file_path):
    if not os.path.exists(file_path):
        os.makedirs(file_path)

def loadRenderSettings():
    file = open(renderSettingsJsonPath,"r+")
    contents = file.read()
    file.close()
    return json.loads(contents)

ensureDirExists(renderPath)

renderSettings = loadRenderSettings()
print('Render settings loaded')

for obj in bpy.data.objects:
    if obj.type != "CAMERA":
        continue

    print('Camera with name "' + obj.name +'" found')

    renderSettingName = 'default'
    if obj.name in renderSettings:
        print('Render settings for camera found')
        renderSettingName = obj.name
    else:
        print('No settings for camera found, default settings will apply.')

    if renderSettingName not in renderSettings:
        print('No render settings for "' + renderSettingName + '" not found, skipping')
        continue;

    bpy.context.scene.camera = obj
    print('Active camera set to ' + obj.name)

    for renderSetting in renderSettings[renderSettingName]:
        resolution = renderSetting['resolution']
        resX = resolution['x']
        resY = resolution['y']
        samples = renderSetting['samples']
        engine = renderSetting['engine']

        fileName = obj.name + "_" + str(resX) + "x" + str(resY) + "_s" + str(samples) + ".png"
        print('Render file name: ' + fileName)

        bpy.context.scene.render.filepath = renderPath + "\\" + fileName
        bpy.context.scene.render.resolution_x = resX
        bpy.context.scene.render.resolution_y = resY
        bpy.context.scene.render.engine = engine

        if engine == 'CYCLES':
            bpy.context.scene.cycles.samples = samples
        elif engine == 'EEVEE':
            bpy.context.scene.eevee.taa_render_samples = samples
        print('Render engine settings set')

        print('Render start')
        bpy.ops.render.render(write_still=True)
        print('Render finished')

render_settings.json

{
    "default": [
      {
        "engine": "CYCLES",
        "samples": 32,
        "resolution": {
          "x": 320,
          "y": 240
        }
      }
    ],
    "Camera": [
      {
        "engine": "CYCLES",
        "samples": 128,
        "resolution": {
          "x": 640,
          "y": 480
        }
      },
      {
        "engine": "CYCLES",
        "samples": 512,
        "resolution": {
          "x": 1920,
          "y": 1080
        }
      }
    ],
    "Camera.001": [
      {
        "engine": "CYCLES",
        "samples": 128,
        "resolution": {
          "x": 640,
          "y": 480
        }
      },
      {
        "engine": "CYCLES",
        "samples": 512,
        "resolution": {
          "x": 1920,
          "y": 1080
        }
      }
    ]
  }


How to have color in your blend file preview So I am suffering from a TREMENDOUS amount of Blender files! I currently have about 1000 on my machine and organizing these in certain folders helps a little but it does not really solve the issue. I kept thinking I really need to get color in these grey previews and then one day I spotted this ...

One file in hundreds just randomly has a little bit of color ... I have since tried everything to recreate this result somehow but have failed and I was just curious if anyone knew how to make these file previews colorful and easier on the eyes.

Thank you !!

The File Browser preview only shows solid view colors.
You have three options here:

Adjust the solid view color for each material (in Material tab)
Set solid view color for each object (in Object tab)
Use random color for each object

You can switch between different modes using the Viewport Shading menu.


How to change a certain parameter of all principled shaders in my blend file? I have like 100 objects, each with its own material, different mesh, own texture and UV maps. I want to immediately adjust only one parameter for all the materials, say: metallic but I want to keep separate textures, so I won't just link materials.
I found that "copy to selected" does not work for material properties (this would be a cool feature, by the way).
I also watched a tutorial about group nodes and yeah, it's cool to control many materials with a single node, but I would sooner move 100 sliders manually, rather than set up a node tree for each material.
If there's no tool for it, I would be happy with a simple python script that takes all materials in the model and changes them one parameter.

You would have to iterate through all materials, get their node trees and find the principled bsdf to set its default values. Demo on how to change the Metallic value for all materials in the file:
import bpy

for mat in bpy.data.materials:
    if hasattr(mat.node_tree, "nodes"):
        for node in mat.node_tree.nodes:
            if node.type == 'BSDF_PRINCIPLED':
                for input in node.inputs:
                    if input.name == 'Metallic':
                        input.default_value = 0.7

If you'd like to change another property of the principled shader, here is a complete list:
Alpha, Anisotropic, Anisotropic Rotation, Base Color, Clearcoat Clearcoat, Normal, Clearcoat Roughness, Emission, Emission Strength, IOR, Metallic, Normal, Roughness, Sheen Sheen Tint Specular, Specular Tint, Subsurface, Subsurface Color, Subsurface Radius, Tangent, Transmission, Transmission, Roughness.
Note that some of them are actually vectors (yellow and purple socket) so you'd have to assign a tuple instead. Demo on how to set the Base Color:
import bpy

for mat in bpy.data.materials:
    if hasattr(mat.node_tree, "nodes"):
        for node in mat.node_tree.nodes:
            if node.type == 'BSDF_PRINCIPLED':
                for input in node.inputs:
                    if input.name == 'Base Color':
                        input.default_value = (1.0, 0.0, 0.0, 1.0)

Further reading: What is the meaning of the color of the node sockets in the node editor?


Render Quality is amazing but video is poor quality and really grainy When I render my animation I can see each frame being constructed frame by frame and the quality is great, however, when I watch the video that is composed of these frames the video quality is really bad. What should I do?

The most probable cause for this issue is bad video compression. Here are my favorite settings for rendering video.

I would recommend rendering an image sequence instead though, since that offers better formats such as .png

Note:
It is nearly impossible to confirm what is wrong without you posting more information.


How to play the animation after it has been rendered? I'm pretty new to Blender and I followed a tutorial online to create an animation.

I finished the building of the animation and it told me to render the animation. So I rendered it and waited 24 hours before it was done. When the render was completed, I tried to click the play button and it showed that it was going through all of the frames but the animation wasn't playing. I'm wondering if anyone can tell me how to get the animation to play?

To play the Rendered Animation Click Ctrl+F11

Or :
Select "Play  Rendered  Animation " from Render menu :


All options are greyed out and inaccessible in the node editor If I go to the Node editor and press Shift+A every action is grey and I can´t click anything. I started to model a waffle(I'm at the very beginning of modelling) and wanted to make a material for it in the node editor but every action in Shift+A is grey and unclickable. Even returning to factory settings doesn´t help. Here is the project:

https://www.dropbox.com/s/fdqqbnyq57cgwng/Waffel.blend?dl=0

I hope somebody can help me.

You need to add a new material.
Press "New" in the bar below the node-editor window.

make sure the "use nodes" is ticked.


seamless mesh placement Is it possible to place meshes in a seamless way on a plane, I have made some tests with the array modifier but it didn't work

Here is my setup
The part of the fish that are not in the square should be in the opposite edge of the square
Here is what I try to do (this version is eye balled so it is not seamless)

Ive had this issue before too and solved it like this:

Have the plane 2m x 2m in size
Apply the particle system
Join the particles to the plane
making it tile

(option 1)
 Duplicate the original plane and move it 2m to the left/right/top/bottom and corners

(option2) use 2 array modifier, uncheck relative, check constant distance and set it to 2m on X and the other 2m on Y, now the middle one has all the overlapping parts.

that way the middle plane has all the overlapping parts

if you have multiple particle system, apply them all at the same time, join them together with the plane

Now you can proceed with the baking


Joined Object to Mesh Separates when Moved So for this mesh, I decided to add a little rose to the shirt. The rose is made from grease pencil and turned into a mesh. So I joined the two objects first and then added an armature modifier and then parented with automatic weights to the armature. The rose will move with the shirt, but it won't move with the bones. I have tried weight painting the rose to a bone while connected to the shirt, but then it moves with the bone and changes places on the shirt. I have also tried parenting the rose to the shirt, but the bones still only move the shirt.
Here the rose and shirt are joined and moving as expected

Here it is still joined but does not move with the armature

Is there any way to get it to move with the shirt?

Maybe, in the Properties panel > Object Data > Vertex Groups, remove the rose from all groups (down arrow dropdown menu > Remove from All Groups) then assign it to the vertex group you want.
Another way to fix this is to remove the rose vertices from all vertex groups, to separate it as a second object, then, in Object mode, select the rose, shift select the shirt, switch to Edit mode, select one or 3 vertices of the shirt and press CtrlP > Make Vertex Parent, it will make the rose follow these vertices.


Is there any way to preview freestyle lines using cycles? When using blender render freestyle lines will be previewed in the viewport while in render mode. This doesn't appear to be the case for cycles, but I'm thinking it is just an option somewhere that I have either unchecked or overlooked. If not, are there any addons or alternatives to previewing the lines without having to render every time?

No
As of 2.79, unfortunately there is no way to preview Freestyle lines using Cycles.


How to convert result created with dupliverts into editable meshes? Hi, I have this Cylinder and Cube. Cylinder is parented to the Cube and duplicated as you can see in the right down corner (option "verts"). Now I don't know how to convert the duplicated Cylinders to meshes, so I could have one mesh. Now when I switch to edit mode I still have only one Cylinder and the duplicated eight are not real meshes but only duplications. Do you know how to fix it?
Sry for my english ... .

You can use the "Make Duplicates Real" function Ctrl+Shift+A. This will generate one object for each duplicate, but the generated objets will still share the same mesh. You can join them Ctrl+J to make a single mesh with all the cylinders. You can then separate each to an object with its own mesh by going to edit mode and P "By loose parts".


Change focus on mist pass for getting DOF in composition I'm trying to get DOF in Compositing from an OpenEXR image with Combined/Alpha/Mist passes. This is the combined pass:

I can get DOF by a defocus node using the Mist pass (after a ColorRamp to define better), but I can't set which part of the image is focused and unfocused. (I want the character with the knife to be focused, and not the other character).

If I invert the Mist image I can achieve this but the borders aren't unfocused:

Is there any better way to achieve this? FYI I have an alpha pass

Thank you!

You can try inserting an add node between the mist pass and the color ramp, to "offset" the focused value. Tweaking the values, positive or negative, you should be able to set the knife pixels as focused and the rest unfocused. If you can post an image of your mist pass i can be more accurate on the answer.


Do meshes have to be connected? I'm new to Blender and I was wondering, do meshes have to be joined?
In the image below, I found it a lot easier to just snap the edges to the top face instead of joining all the vertexes. Is that a correct way to do it?

It depends on your use-case, but in general, no, it's not necessary for meshes to be connected. A good rule of thumb is that if the object is composed of separate parts in real life, it's okay for its model to be made of separate parts.


How to add a shortcut for 'Reload Scripts'? Blender 2.7x used to have F8 to reload scripts.
As an add-on developer I rely on reloading the scripts a lot and having to press F3 and search for "Reload Scripts” every time I update the add-on I develop and that's pretty much inconvenient IMHO. I tried to add shortkey in the keymap section of the settings but it seems that 'Reload Scripts' doesn’t exist in the list of operators that can be attached to shortkeys.
Q: Is there any way to get F8 back? And in general, how do I go about adding a shortkey to any other operator that is not listed in the keymap section?

New shortcuts can be added in the preferences Edit > Preferences > Keymap.

With the keymap tab open, navigate to the Window category of shortcuts. Click the Add New button to create a new shortcut. The operator for reloading scripts is bpy.ops.script.reload() therefore the identifier for the shortcut is script.reload. Click on the shortcut field and press F8 to set the key binding.

In the default keymap for Blender 2.80 there is no existing key binding on F8 which means you can add the shortcut without any problem.


Advice on making these machicolations So for the longest time I've been trying some methods to create these friggin things but cant seem to find a solution that actually works.

So basically, I've constructed this tower out of a cylinder mesh with the extrudes and whatnot.  The closest I've been able to get is by using the Boolean method with those shapes.  It's looks ok without the SubSurf modifier visibility on but like I keep hearing, the Subsurf and Boolean modifiers do not go well together, which created the mess on the right.  I want to go with the subsurf because it looks too blocky without it, even with smooth shading turned on.

Anybody have any other ideas on how to approach this?  Because I'm at a loss here...

For this kind of pattern repeating around a circle, Array and Simple Deform modifiers can often be a good solution:

Create your pattern, as it is symmetrical use a Mirror modifier.

Give it an Array modifier to repeat it. Choose the Count you need, enable the Merge and First Last options.

Give it a Simple Deform modifier / Bend mode, choose an Angle of 360°. If you see that it twists strangely, you need to apply the rotation of the object.

Give it a Subdivision Surface modifier and Shading > Smooth it in the T panel. Now you can work the mesh as much as you want until you're satisfied. When you think it's ok, apply the modifiers and merge the first and last vertices with a Remove Doubles.


How do I make an individually scaling square set shader? I've gotten as far as to make the squares, tile them and have control over the size, but I expected them to scale uniformly, but they distort as shown in the image provided. This problem doesn't happen if I use a value node. Is there a way to "pixelize" the texture that is inputted in the scale socket?
To make it clear, the first image is what I don't want, and the second is somewhere near what I want

To get your squares to remain square, they must use the same evaluated brightness from the image across their extent, otherwise some parts of the squares will scale, or pass a threshold, differently from others. In other words, the image must be pixellated at the square-centers first.
(The illustrations below are not all shot at the same grid-scale)
Make a Grid .. This is just a different way from yours, no better..

It has 2 outputs: 'Cell UV' and 'Cell ID'

'Cell UV' maps each cell in XY, -1 to 1, with 0 at the cell center. 'Cell ID'  colours the whole cell with the original, piece-wide UV at the cell centers.
Sample the Image, or your procedural texture, at the cell-centers, using 'Cell ID'...

..for a  pixellated image. This image, on the left, has been gamma corrected and made negative for this particular, "printer's", way of making a half-tone...

The Half-Tone Screen, on the right, above, is made by making a 'Distance from Cell Edge'from the cell UV:

Combine: When the screen is multiplied with the image, put through a threshold, (and inverted again,) using a Color-Ramp, you get a traditional black-dots-on white half-tone.

If you do without the negative steps, you get white dots on black.

This example samples only one point for each cell, at the cell center. You could, say, take samples from a number of well-arranged  points in each cell, and take their average, for more accurate toning.


How to animate an image sequence texture? I'm trying to create an animated texture, in this case a lava flowing look on a static mesh.
The 'lava' only consist of 10 frames atm, the texture animation would be looped.
However I have come across several problems.

the textures doesn't update/animate when the i press play?
how to keyframe this? can't seem to keyframe the nodes?
it's suppose to loop when I tick the cyclic option? Doesn't seem to loop.

here is a screenshot of the settings i used on the image node.

You need to indicate the number of frames you want to be used for the sequence:

From the documentation here:

Frames
Sets the range of frames to use.


Blender Python: Exclude Collections from View Layers I would like to replicate in a script what happens if i exclude a collection from a view layer via hotkey E (bpy.ops.outliner.collection_exclude_set()).

I cannot seem to find that exclude in the tree. Is the E hotkey doing a hide render and viewport, or is there more to that? How should i best approach this?

Thanks, Axel

First you need to retrieve the view layer you'd like to modify. The view layers in the scene can be accessed through bpy.context.scene.view_layers or if you want to access view layers of other scenes you can use bpy.data.scenes["Name of the scene"].view_layers.

In order to exclude a specific collection the LayerCollection has to be accessed, because that is where the exclude property is stored. While iterating over the children of the master layer collection from the view layer, we can check for each entry if it matches the collection that we want to include. If it doesn't, it can be excluded through its LayerCollection and otherwise be included.

import bpy

def include_only_one_collection(view_layer: bpy.types.ViewLayer, collection_include: bpy.types.Collection):
    for layer_collection in view_layer.layer_collection.children:
        if layer_collection.collection != collection_include:
            layer_collection.exclude = True
        else:
            layer_collection.exclude = False

if __name__ == "__main__":
    view_layer = bpy.context.scene.view_layers["View Layer"]
    collection_include = bpy.data.collections["Collection"]
    include_only_one_collection(view_layer, collection_include)


Using Texture Nodes for the Displace Modifier I'm trying to make some procedural textures that will give me a result like this:

 -

this one is said to have been a voronoi + a clouds texture and I figured the best way to combine those is to use the node editor for Textures and then just slap that Texture that I create in the node editor as the Texture I use in the Displace Modifier pane.

The thing is, for some reason, when I select my Texture in the Displace modifier (for which I have already setup the nodes) as you can see here

, it doesn't actually affect the plane at all, as you can see

.

When I go over to the Textures tab, it shows the preview that is output from the node editor

but the Displace Modifier isn't having any of it...

Any ideas? I tried looking online but everything was either on baking normal maps or they didn't use the node editor for the Displace Modifier - they just used the default cloud textures or whatever.

Thanks so much!!

It'd be nice if this worked, however as an alternative you might consider using cycles displacement.

Here's a simple example of what's possible. This scene is made up of one plane, with no displace modifier:

Note that it's an experimental feature, so you'll have to enable experimental features first, and you may encounter bugs. If you do find a bug, report it and chances are it will be fixed :)


How can I add auto weight to a new object and use the animation from other object? I had a 3d model animated. Now I want to add one more object upon the old model. How can I add auto weight to my new object so that it follows the animation sequence?

I'm assuming this model is rigged, so parent the new object to the model, with empty groups. go to the vertex groups, and select the bone you want it to be parented to. go into edit mode, select the vertices you want animated, and assign them to the correct bone.


context.material.node_tree - context has no attribute to material? I am trying to write an addon, I am making a node group that will be created with a single button however I have run into issues with these final lines:

    custom_node_name = "dust"
    my_group = create_dust_group(self, context, custom_node_name)
    dust_node = context.material.node_tree.nodes.new('ShaderNodeGroup')
    dust_node.node_tree = bpy.data.node_groups[my_group.name]
    dust_node.use_custom_color = True
    dust_node.color = (0.5, 0.3, 0.9)

the problem I'm having is with the line

dust_node = context.material.node_tree.nodes.new('ShaderNodeGroup')

I don't know how to get it to work for creating a material

any help or suggestions would be greatly appreciated

thank you

Different contexts also can have different context members.

  Context Access (bpy.context)

  The context members available depend on the area of Blender which is
  currently being accessed.

The properties panel is a classic example.  Looking at property panel code may come across context.material or context.modifier but will find them unavailable in say the python console.

>>> C.material
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'Context' object has no attribute 'material'

Use another way to get material, from the active object

>>> C.object.active_material
bpy.data.materials['Material']

Re creating a material

Add Nodes to Material with Python

Python: Add existing NodeGroup to Material


Assigning hotkey to set keyframes without using the menu How could I change the " I " hotkey so that it simply sets a keyframe on LocRotScale? If I set key mappings to "industry compatible" this behaviour is mapped to " S " but I can't figure out how to make that work within the default key mappings.

Thanks!

Finally figured it out!

Go to "Preferences -> Keymap" and search for "insert keyframe".

Chose which view you want to edit the hotkey for. For example, under "Pose" click the triangle and it'll show you the python command "anim.keyframe_insert_menu"

Simply change it to "anim.keyframe_insert" and press Enter.

There's one more thing to do. If you go into Pose Mode now, select a bone and press "i" - you won't get the menu anymore BUT you'll get an error "No active keying set".

Under the python code is a confusingly greyed out drop-down menu. Click that and choose what you want the "i" shortcut to do, in my case I chose "Whole Character"

That's it! Now when in Pose Mode selecting one controller and pressing "i" now instantly keys everything on the rig!


Booleon Modifier Artifacts I'm trying to perform a booleon difference but I'm left with some odd geometry that I cannot seem to get to work correctly.

I've tried all the things I know about trying. On the objects I'm using as the cut out I have done a Clean Up -> Merge By Distance, and a Recalculation to ensure all the normals are facing in the right:

But I'm still left with this odd Geometry as an artifact of the booleon and I don't know what to do to fix it.

If I apply the booleon I end up with a really unexpected set of geometry that looks like this:

What do I need to do to eliminate this artifact in the resulting cut out? I'm using 2.81.

blend file

One thing that really improves Booleans is the 3D printing tool add one. Enable that (it is not enabled by default in 2.81) and then view it from the side menu at the top right. You can e it to check that everything is manifold and all your normals are correct and so one before you do a Boolean


How to orbit with finer precision When moving objects or vertices around you can hold Shift for finer precision. This doesn't seem to work with orbiting or panning the view however. Can I toggle slow down orbiting or panning without changing my mouse sensitivity?

You can change Orbit Sensitivity in the Preferences(F4 -> p):

You could also add two entries to your keymap to make a key that you could press and while it's pressed the sensitivity is set to some value, but when you release it, it resets it to some other:

Note that one is set to "Press", another to "Release".
The operator: wm.context_set_value sets the value for preferences.inputs.view_rotate_sensitivity_turntable here. You would have to play with the values to find the ones comfortable for you(mine are quite low, because I am using a pen tablet right now).

It doesn't work while you are orbiting, you have to press and hold the key before you start. It might be possible to make it work while you orbit, but that would require a more complex approach.


Automated way to make "Select interior faces" ignore select faces that are visible to the camera? Here's my mesh. It has some interior faces (it's made out of merged cubes) that I want to remove. I've highlighted two of them for example:

When I run Select Interior Faces, it selects them, but also erroneously selects the large middle face:

I believe I understand why this is happening, due to the nature of the vertices at the edge of this face and how the "interior" faces algorithm works.

Is there an automatable way using Blender scripting to ignore faces that are visible to the camera, or achieve a result similar to that? I'm writing a Blender script to do some automatic mesh cleanup. Removing interior faces is a required part of the process, but I'm not sure how to achieve it in a script.

Here's the solution I came up with:

Run Blender's built in "select interior face" algorithm
Note which faces are selected
Loop over every face, and cast a ray from the "camera" position to the face.
If the ray hits (the center of) the face, we know it's visible to the camera, so don't delete it.
If the ray doesn't hit the face (hits another face) it means it's probably interior.

This is a bit confusing, so I made two images to show more detail:

Commented code is below. Please note this is taken from a large file so I might have forgot to declare some variable references. Happy to clarify if anyone has questions in comments.

import bpy
import bmesh
from mathutils import Vector

cameraOrigin = Vector( ( 0, 0, 10 ) )

ops = bpy.ops
scene = bpy.context.scene
mesh = bpy.ops.mesh

current_mesh = scene.objects[ 0 ]
current_mesh_data = current_mesh.data
scene.objects.active = current_mesh

# Blender's "select interior faces" doesn't actually select interior faces, it
# selects faces that share edges with 2 or more other faces. In my case this
# erroneously selects some faces that are visible but connect to multiple other
# faces. The solution is to select interior faces, then ignore any faces that
# the camera (positioned at 0,0,10) can see, and delete the remaining ones
# See http//blender.stackexchange.com/questions/57540/automated-way-to-make-select-interior-faces-ignore-select-faces-that-are-visib
def removeInteriorFaces( mesh_data ):

    # First do the built in selection
    mesh.select_interior_faces()

    # And store all faces inside that selection
    indices = []
    bm = bmesh.from_edit_mesh( mesh_data )
    for index, face in enumerate( bm.faces ):
        if face.select:
            indices.append( ( index, face.calc_center_median_weighted() ) )

    # Deselect everything...
    mesh.select_all()

    # Switch to object mode to do scene raycasting (doesn't work in edit mode
    # I don't think, got error "has no mesh data to be used for ray casting"
    ops.object.mode_set( mode = 'OBJECT' )
    outside = []
    for index_data in indices:
        index = index_data[ 0 ]
        center = index_data[ 1 ]
        direction = center - cameraOrigin;
        direction.normalize()

        # Cast a ray from the "camera" position to the face we think is interior
        result, location, normal, faceIndex, object, matrix = scene.ray_cast( cameraOrigin, direction )

        # If the ray actually hit the face, as in the face index from the
        # selection matches the face index from the raycast, then this face
        # *is* visible to the camera, so don't remove it!
        if faceIndex == index:
            outside.append( faceIndex )

    # Build a list of the "true" interior face indices, which is the original
    # indices from Blender's built in "select interior faces", but without the
    # faces we know the camera can see
    invisible_interior_faces = [ data[ 0 ] for data in indices if data[ 0 ] not in outside ]

    print( 'Removing ',len( invisible_interior_faces ),'invisible faces' )

    # Select the faces (in object mode this is easy, strangely)...
    if len( invisible_interior_faces ) > 0:

        for index in invisible_interior_faces:
            mesh_data.polygons[ index ].select = True

    ops.object.mode_set( mode = 'EDIT' )

    # Then delete them
    if len( invisible_interior_faces ) > 0:
        mesh.delete( type = 'FACE' )

ops.object.mode_set( mode = 'EDIT' )
removeInteriorFaces( current_mesh_data )


Separate Red And Blue When Blurred I want my depth of field to be separated like this

You can use a combination of a lens distortion node and a mask.

In the lens distortion, chromatic aberration would be controlled by the Dispersion value.

With a mask you can designate areas of the screen that would be affected by such dispersion.


PythonScript to load data as colored point-cloud Background

I want to render 3D points with color information for scientific visualization. I have several hundred thousands of points up to 2 million. For each point I have [xyz] coordinates and two scalars [t, tau]. The scalars should be shown as color and are currently mapped to uv-coordinates.

Wanted result

I want to achieve something like this but with (lots) more points/spheres:

Current solution

Here is my script: visualisePointCloud.py
Here is some example data: point_data.txt

My workflow

load the data
create/copy a sphere mesh
move the copied mesh to [xyz] coordinates
define the uv coordinates for the whole mesh with respect to [t, tau]
repeat 2. to 4. for each data entry
join all created meshes

Problem

While loading the points and creating the scene I get a slowdown. The first 1000 points work fine, but the overall process gets quickly slower. I am sure it has something to do with the commands I use from the API and the amount of objects I create.

I had two ideas to solve the problem - neither worked:

Create a sphere mesh for each data entry and join them in the end. This leads to a huge amount of created objects, which slows down blender (compare this question).
Create the meshes for a subset of the data entries and join these to a single object/mesh. Do this until all points are loaded. This leads to the problem, that the joining process gets more complicated and increasingly takes more time.

Questions

Are there better commands I can use to speed up the process?
Is there a better solution than copy a sphere mesh for each data entry and adjust its UV-coordinates for coloring. E.g. create one mesh and add vertices to it - how can I alter the UV-coordinates this way.
Is there generally a better way to render a colored point
cloud, e.g. this one is missing the colors.

Updated:

This script will add the pointcloud data as mesh vertices, then create a low-poly icosphere as an instanced object on each vert (using mesh.from_pydata instead of bmesh as advised by BatFINGER).

Currently this does not use the UV data in the latter two columns in the data file. I've also scaled the coordiantes by a factor of 25 (can be changed in the script) to make everything more visible and easier to manipulate in the viewport. This script takes ~0.075 seconds on my laptop for the 10,001 verts in this file.

import bpy
import numpy as np
from mathutils import Vector
from time import time

t = time()
C = bpy.context

scale = 25

# Open textfile to numpy array and scale
pointcloudfilepath = '/Users/username/Downloads/point_data.txt'
with open( pointcloudfilepath ) as fh:
    data = np.loadtxt( fh ) * scale

print( f'vertcount = {len(data)}')

# Create and arrange mesh data
verts = [ Vector( data[i,:3] ) for i in range(data.shape[0]) ]
m     = bpy.data.meshes.new('pc')
m.from_pydata(verts, [], [])

# Create mesh object and link to scene collection
o = bpy.data.objects.new( 'pc', m )
C.scene.collection.objects.link( o )

# Add minimal icosphere
bpy.ops.mesh.primitive_ico_sphere_add( subdivisions = 1, radius = 0.05 )
isobj = bpy.data.objects[ C.object.name ]

# Set instancing props
for ob in [ isobj, o ]:
    ob.instance_type               = 'VERTS'
    ob.show_instancer_for_viewport = False
    ob.show_instancer_for_render   = False

# Set instance parenting (parent icosphere to verts)
o.select_set(True)
C.view_layer.objects.active = o

bpy.ops.object.parent_set( type = 'VERTEX', keep_transform = True )

print( f'Total time = {time() - t} seconds' )

I've used each sphere's location as material color in a simple shader, you can apply any other logic that fits your requirements better. Here's the node setup:

And final result:


How to Delete Color Stops of Color Ramp using Python I have Added a Color ramp in my node editor using a Script
 and I wan't that the Color Stops That Are Available by default Should be Deleted.
before I add new stops
I know how to add new stops but i don't Know how to remove the stops that are there by default using Python script.
Can Anyone Help me Out Please

You can remove them but not the last one.

If cr_node is the color ramp node, stops are stored in cr_node.color_ramp.elements.

You can remove the element n by:

cr_node.color_ramp.elements.remove( cr_node.color_ramp.elements[n] )

But if you attempt to remove the last one, you will have this error message:

RuntimeError: Error: Element not found in element collection or **last element**

So you need to keep it and change its values:

cr_node.color_ramp.elements[0].color = your color
cr_node.color_ramp.elements[0].position = your position


Blender_icons_update.py - SVG icon generation to DAT file issue I have been trying to run the python blender_icons_update.py blender_icons.svg command from command prompt in the \release\datafiles folder, but without any luck. I get these errors:

FileNotFoundError: [WinError 2] The system cannot find the file specified

Line 10 (in the blender_icons_update.py)  when it does the run(cmd) in line 33.
subprocess.check_call(cmd)

Something is wrong with the subprocess. What is the fix?

I have correct Python versions installed (2.7 and 3.5.0), Blender 2.79b installed, and... what is missing?

The issue was that the paths were not defined for Inkscape and Blender. Both software do not add the PATH environment variables to Windows, so adding them manually made the script file find the correct software to process the *.dat files.


Can you turn a Simulation into Keyframes? Basically, if I have a fluid sim in one blend file, can I somehow turn it into keyframes to form an animation or an action and export it as an animation?

Yes, you can export fluid sim in alembic format (File -> Export -> Alembic) and import to different application with alembic support. It work similar than create shape key for every frame, but it do it smarter way.


At What Point in My Workflow Should I Apply a Mirror Modifier? I applied the mirror modifier to my object. So now, how can I return the mirror modifier and work symmetrically? When I try to add the mirror modifier again, the faces of my existing mesh have been duplicated.

Either undo (CTRL+Z), or File > Revert, or load a backup file, or manually remove mirrored vertices:

Press Numpad 7 if your object was mirrored around X or Y, or e.g. Numpad 1 if it was mirrored around Z, then press SHIFT + Z for X-Ray mode and drag-select all vertices that have been mirrored - and press Del or X to remove them.


Is there a way to make a hair particle look like a mesh I've already made? So I have my character, and her hair is already an object mesh (modelled and sculpted), but now I want to add realistic hair to it. I tried using a hair particle system, but I'm finding out that you have to actually groom it in the way you want it. Is there any way I can make my hair particle follow the mesh, so I don't have to groom it? If it helps I'm using cycles. I don't know if that has any effect, as I'm brand new to particle systems lol.

There are a few add-ons like Hair Net that can generate and hair particles to follow a given curve, fibers (converted curves, just edges), or sheets (hair cards).
Have a look here: How can I merge this Head and Body models?
Hair cards, as used for game characters, can be used directly for the add-ons.
If you have sculpted hair you can layout Bezier-Curves on the surface of it. Just activate the snapping tool.
After you have done a complete layer of curves, duplicate the curves 2 or 3 times, scale and move them a little. Don't forget to Apply Scale and Location (Ctrl+A in Object Mode) for the curves and the head (emitter) when you're done with the layout. That's important.
Finally, generate the Hair Particle System. Select the Curve objects first, then the head/scalp object (emitter). The emitter selection must be orange, the curve selection must be red.

Sculpted hair (purple), curves (black), duplicated curves, finally the generated hair particles (green)
In the Hair Net add-on in the N-panel, select a Hair Setting (optional) and press the "Curves" button. The script may run a while.
Switch Children type to Simple and give it a tiny bit of Roughness and Randomness in the Hair Particle settings. Use a small value (like 0.02 m) for Radius of the children.
Hair grooming takes a bit of practice. Try to do the hair layered, and don't let the hair guides intersect. That can look messy if you activate the hair children. Make sure you have your model on a real-world scale and adjust values of the Hair Shape. (Shape: -0.850, Diameter root: 0.03 m, Tip: 0.02 m (or 0.00 m). With the default values, the hair looks like ropes in Cycles.
(Fibremesh, the 2nd button of Hair Net addon, are curves that are converted to mesh.)
Note:
The HairNet add-on 0.6.3 for Blender 2.9x has an issue at the moment. The generated hair sometimes moves down the Z-axis a little if you add more than one Particle System. You can fix this when you turn off the Particle System in the viewport (turn off the Monitor icon in the Particle System Settings). Or in Comb Mode, select all hair guides (Ctrl+A), and move them up again (G, Z, and use mouse).


Mixamo Rig And Mesh Problem i drawn a cubic style character and i set weights properly from blender. But when i upload and autorig my character from mixamo, i'm getting weird issue that my mesh is stretching as you can see from belowed image.

I think rig effects to vertices try to add loopcuts bending areas and reupload to mixamo again probably it will work


hair simulation too slow and cache inaccessible I'm using Blender hair particles for simulating grass and there are two issues.

1) Hair simulation is too slow, even when I set the number to 5 just to check how the grass blades move around. (No there are no Force Fields currently).

2) "Cache" is missing when "Hair" mode is used. This is Blender 2.76b

This means I can neither clear the cache nor bake the animation so I can preview it in the 3d view before so I know everything is fine before running the day-long rendering of the scene.

You should enable Hair Dynamics in order Particle System set to Hair mode to have cache, because

  When set to hair mode, particle system creates only static particles, which may be used for hair, fur...

wiki page.

This type of Particle System may be animated using the cloth solver.

Baking particle system may be neccessary if something happens in the scene, i.e. animation is involved. If dynamic hair is disabled, it seems like hair won't change, so nothing to bake.

After you enable Hair Dynamics, Particle System will be accessible for baking results and previewing animation when it's played (and so on):


Why do I have 'glitched' areas in my render after enabling denoising? I am a newbie to blender and i found a 'Denoiser' option and decided to use it. I found out its function but it seems to create these 'glitched' areas in one of my  renders. What are they and how do i fix it?

I agree with the link Duarte Farrajota Ramos posted.  I'd also like to add that I prefer the denoise settings turned down a bit, to minimize it's blur effect.


What is the script of Glossy BSDF roughness value? This is the script I am working on
BsdfGlossy_node = material_gold.node_tree.nodes.new('ShaderNodeBsdfGlossy')
        BsdfGlossy_node.location = (0,-100)
        BsdfGlossy_node.outputs[0].default_value = (0.144, 1, 0.8, 1)
        BsdfGlossy_node.select = False
        BsdfGlossy_node.hide = True

I want to know the roughness value script

Also, how can I script the colour of this node? I tried BsdfGlossy_node.outputs[0].default_value
but it has an error


Baking cloth simulation use only 20% of cpu ressources, how to get 100%? Baking a cloth use only 20% of CPU, inactive process of cpu is 78%, is there a way to use those extra 78% ?
Blender 2.75
Windows 10

Do you have a quad core? Simulation calculations are not multithreaded, and so cannot use more than 1 core at once. If it's using up a single core of your quad core, that'd be your 20-25%. There is no way to increase this unless someone gets a multithreaded physics algorithm into blender (these exist, but they are complicated and there are caveats. The program Marvelous Designer has multi core cloth sim, and maybe some other expensive programs.)

However, you could run multiple entirely separate physics bakes, or bake physics while rendering or performing other tasks.


Why are portal area lamps slowing down my renders? I was confused when I added portals to my scene, and it actually increased (slowed down) the render quite considerably!

Here is the demo scene I used to confirm this: portal-demo.zip

portals disabled: 0:47
portals enabled: 1:36

Additional edits after original post

In the scene I'm working on, I created two renders to compare portal lamps enabled/disabled — the sample amount is adjusted to achieve the same render time — and I find that the scene with portals enabled looks considerably worse!

stage-render-portals.zip

This indicates to me, that in my scene, the portals cause the render to slow down, and ultimately produces a worse result.

Could this be, because my room has two rather large windows, and with a certain amount of "openness" to your indoor scene, perhaps the benefits of portals are outweighed by the costs?

(my previous little suzanne portal-demo.zip room seems more reasonable, perhaps because it has a much smaller window?)

Portals have limitations — it depends on how "open" your scene is

As mentioned by @Leander, the blender manual says that portals are not good for "outdoor" scenes.

portals lamps provide diminishing returns as your indoor scene becomes too "open"
in other words, if your indoor scene has several very large windows, you may be better off without using the portals (because the cost of portals starts to outweigh the benefits)
in my experience, I found portals to be unfit (by a narrow margin) for an indoor scene where I have a room with a whole wall basically missing (huge floor-to-ceiling window), and also an open doorway in one of the intact walls (think of a garage with the big door open, and also a side-door open too)


Is it possible to render modifiers at preview settings? I have an issue where I am trying to render a very complex scene, and I need to cut on my poly count in order to fit it on my GPU. The simplest way is to change modifiers like Sub-division to a lower value, like in my preview, which is all fine and good, but I have hundreds of objects . . . is there a way to render at the Preview settings in the final render?
I do know rendering at these lower settings will work as my scene currently renders in the viewport, I just need to know if there is some Python script or something to set all final values to the preview values.

I am using:

Blender 2.72
Cycles Render Engine

Scene details (preview):

384,000 verts
366,000 faces
237 objects
.45 GB Memory

There is a option in the Scene tab of the Proprieties editor called Simplify that limits the maximum number of subdivisions on all objects. In the picture below all objects would be limited to just 2 subdivisions.


How can I make a copy of a material? I want to create a new material based on an existing material. For that a need a copy of the existing material as a starting point. How can I make such a copy?

Assign the 'base material' to the desired object and click Add a new material button:

This automatically creates a copy of the 'base material'.

Blender 2.7x


Edit mode Toggle and select faces in one shortcut. How possible is it? I just saw the command object.editmode_toggle () and I am guessing that parenthesis will help invoque a direct selection mode.
I´d like to assign a single keypress "U" to do the following:
While in object mode, the new keypress will toggle to edit mode and fixes the selection mode to: FACES.
How possible is it? Could it just be that I only add an additional shortcut key on the User prefs?
Please, help I´d really would like to only press one key and go from object mode to edit mode and have "faces" assigned as the preferred method for selection.

Thanks.

To perform two steps from one shortcut, you will need to make your own operator, by putting it into your own addon you can make it active every time you start blender.

Combining two existing steps is simple, you just need to call both existing operators from yours. You can then add a shortcut by using the bl_idname from the operator in the input settings.

To be able to cycle through the selection modes, you look at what the current mode is.

bl_info = {
    "name": "Edit mode with face select", "author": "sambler",
    "version": (1, 0), "blender": (2, 75, 0),
    "location": "blender", "category": "Object",
    "description": "Enter edit mode and set selection type to face.",
    }

import bpy

class EditSelectOperator(bpy.types.Operator):
    bl_idname = 'object.edit_face_select'
    bl_label = 'Enter edit mode and set face selection.'

    def execute(self, context):
        if context.object.mode != 'EDIT':
            # if we aren't in edit mode goto edit and set face select
            bpy.ops.object.mode_set(mode='EDIT', toggle=False)
            bpy.ops.mesh.select_mode(type='FACE')
        else:
            # if we are editing cycle through selection modes
            sel_mode = context.tool_settings.mesh_select_mode
            if sel_mode[0]: # vertex
                bpy.ops.mesh.select_mode(type='EDGE')
            elif sel_mode[1]: # edge
                bpy.ops.mesh.select_mode(type='FACE')
            else: # face
                bpy.ops.mesh.select_mode(type='VERT')
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()


Cant select edges created by the screw modifier I tried to create a pumpkin using the screw modifier and it worked out fine , but for some reason i can only select the source and not the rest of the object ?

In Edit mode, as long as you haven't applied your modifier you won't be able to select any other vertices than the one of your profile. In Object mode you can select the whole object. If you want to select some vertices, perhaps keep a version of your object with the modifier, duplicate it and apply the modifier, then go back in Edit mode.


Get lattice points' positions at specific frame when animated by another object (through hook modifiers) I am currently developing an exporter for FFDs (Lattice).
I currently have support for FFDs animated through shape keys but now I have encountered a lattice whose points are driven by another object, rather than being animated itself, e.g. the lattice points’ positions are being driven by hooks (through the hook modifier). These hooks are defined as empty-objects, one for every point in the lattice that should be animated. And the empty-objects are animated by an Armature.
With this setup, how can I get the position of a specific lattice point at a specific frame in python?

So far I have found that I’m able to get the target object of a hook modifier through "lattice.modifiers[n].object".
Within the object I have also seen that the local and world matrices update with the animation. However I’m not sure how I would know which empty object affects which lattice point. I suppose the empty object’s position and the lattice point are supposed to be at the exact same position, but is that a guarantee? I have been trying to multiply a hook’s local position with its world matrix, but it doesn’t seem match the position I get when de-parenting it from the armature (which it should right?). I have seen that you are able to use "Assign" to assign the hook modifier to specific vertices in Edit Mode, but I don't know how to get this information.

Any comment that can get me in the right direction is greatly appreciated!

Thanks

Depending on how many hooks there are a (probably too tedious solution) would be to create a vertex group containing only that vertex for each hook. Then you can get those from script.
Selecting the vertices for a hook modifier has always been an enigma to me, which I don't like.

If any of the hook modifiers has a strength < 1, the method of using it's hook object's location will fail.

A fairly brute force solution can be found here: How do I get the deformed coordinate of a vertex with Python?
remember the vertices of a lattice are called points.

A Similarly brute force solution would be to copy your lattice, apply the modifiers, read the applied vert info and then delete the object again.

All those solutions are fairly ugly, but it's all I can come up with atm.

For meshes, bmesh offers a solution of copying the modifier's info to a temp mesh: https://blenderartists.org/t/get-vertices-coordinate-after-deformation/617992
Don't know if you can transfer that to a lattice.

Also: you don't have to multiply .matrix_world with anything. It gives you the absolute position (and loc/rot), no matter what parenting/constraints are influencing it.


Undo is not working 2.8! I was just 3d modeling as usual and I enabled the Archipack blender addon. Everything was fine until I tried to undo something and it didn't work. I went to a new project and the same thing happened. I moved a mesh in object mode and it wouldn't undo. My shortcut is CTRL-Z as usual.
I first disabled the addon, which did nothing. I then tried manually going to commands and undoing, and that didn't work. I then checked my keyboard in another program (It works fine). I tried all the blender stack exchange forms, and none of them worked. I updated windows, Gforce, and my driver (Still no difference).
Then as a last resort completely uninstalled blender and its cache, and installed the newest version, and still it doesn't work. I've studied my undo settings and everything, blender is refusing to undo!

You have to enable: Global Undo
For 2.8x and 2.9.
Edit > User preferences > System > Memory & Limits: Global Undo

For 2.79
Just go to Edit > Preferences > System & Setting, and check the Global Undo in Memory and Limits


Creating lots of random cuts on a surface Here's an image of a cube with lots of edges added. It was created using knife tool and lots of clicking:

What would be the best way to randomly generate such cuts with less effort...?

The cell fracture tool should do what you require.
Press SPACE and search for
CELL FRACTURE

.


custom transform orientation doesn't align with object I'm following along a tutorial how to custom transform orientation. The cube which I select and apply the custom transform, doesn't follow the angle of the cube I want it to align with. Rather it resets to its initial position.
The correct result would be like the cube in Green and not the Red.
If anyone would like to see the 1 min tutorial: https://www.youtube.com/watch?v=GHIZBoh3wdc

It looks like since 2.9, the orientation that has been selected in the Transform Orientations dropdown menu won't be taken into account by default when you Align to Transform Orientation. Now you need to go into the Operator box and choose the Orientation you want. The previous way made more sense in my opinion (it may also be an oversight/bug).


Is there a way to prevent Blender from creating .fbm folders when exporting to .fbx? I frequently have to export models in Blender to .fbx files for a Unity game I'm working on, and although the models are coming out OK, Unity always creates .fbm folders when the models get imported. Models exported from Maya also have this problem unless you go into the FBX options and disable "embed media". Blender 2.74 has an option to embed textures in fbx files (which is presumably the same thing as "embed media"), but even though this is disabled by default, I still get .fbm folders being created when models are imported by Unity.

Normally, this wouldn't be a big deal, but the folders get created on the system of everbody working on the game, and because Mercurial/GIT ignore empty folders, and Unity creates .meta files for empty folders, cleaning up the mess gets way more annoying than it needs to be and that's why I would really love a solution to this problem.

You should delete the material on the object you're exporting in Blender and have the material importing disabled in Unity.


Blender Portable and python script from command line I downloaded the portable version of blender from here and "installed" it in the downloads folder. Next I want to use my .blend file and python script (works fine with the standard 2.78 blender installation) with this portable version...did not work. It solely loads the .blend file, but no script is executed. I use this lines for execution:

cd "...\BlenderPortable\"
BlenderPortable ...\xyq.blend --python ...\myscript.py

So I first navigate to the blenderPortable directory and then run it like I did with the standard version.
Anybody encountered the same problem and has some helping ideas?

Use the blender portable version (.ZIP version) from the blender website using this link: https://www.blender.org/download/


VSE: How to add images on the video so that both the video and the image will be visible? So I have the video strip but now I want to add an image on it, like I would add a text.

Make sure that the text image has an alpha channel to show the video strip below on the timeline. Also make sure that the new image strip has its properties (n-key) set to Blend type: Alpha Over.


Can't blender do a snap like the Sketchup? Sketch-ups snap to the left corner and move.

Blender doesn't sort by left.
I know it's based on active after changing the origin.
It's very uncomfortable. Is there any simple way to cut short?

In Object mode you have to move object to the right, release, than grab again and Snap.


Blender addons are called also 3d party plugins? Blender addon are the same thing with 3d party plugins ? These are 2 names for the same thing ?

A third-party software component is a reusable software component developed to be either freely distributed or sold by an entity other than the original vendor of the development platform. Blender is an example of this.

So it has 3rd party plugins because it's a 3rd party software. Another way of saying these are Blender add-ons because it's more particular. Having two different names for the same thing is normal.


2.8 select and deselect like in 2.79 The only problem I have with the new 2.8 is that I need to make an extra effort with deselecting -> Alt+A or type A twice.

Can I change to the classic way from the User Preferences or with a script?

UPD: since beta release were is a setting in settings called select all toggles:

You can just click on this, instead changing shortcuts manually:

Old answer:

Yes. All hotkeys are fully customizable.

Open user preferences, Input tab. You can search hotkeys by key-binding("A"):

There are many different "selects" here for different types of editors and modes. You can change everywere, or in specific part.

In every hotkey you should change an action to toggle:

After edit hotkeys, don't forget to save user settings.


Material Properties - missing Features I want to add a new material in Blender, and instead of showing a long list of menu like "previews", "surface", etc., all I get is "view port display" and Customer property".

Your Render Engine is set to "Workbench".

Set it either to "Eevee" or "Cycles", depending which one you want to use in your project.


Blender file keeps crashing - how do I open it in safe mode? I'm making a blender video using the VSE and compositor, with multiple scenes. I noticed that it's a bit buggy when I'm using blender scenes in the VSE editor, but so far everything was working.

Now all of sudden, I can't even open the blender file without it crashing. Please help! Is there a way to run it in safe mode, or disable something so that it will open?

I'm on a macbook pro running blender 2.76b. I don't know how to view the console so I can see the error message.

You can find the terminal in Applications/Utilities and you can start blender by typing the following into a terminal window (this is the default so you may have to adjust folder names if you have altered them)

/Applications/Blender/blender.app/Contents/MacOS/blender

This may only give a simple message like Segmentation Fault

A few things you may want to try -

Turn off Load UI when opening the blend file - this will leave you in the default screen layout and not take you straight into the VSE where you where last time.
Turn off Trusted Source when opening the blend file - this will only help if you have drivers/scripts setup to run automatically
Use File->Load Factory settings before opening the blend file - this will disable non-default addons that may be causing an issue.
Also turn off Load UI and Trusted Source after loading factory defaults.
Start with a new file and import objects/animations from the bad file.


How can I change the frame range in an alembic file? How can I change the frame range in an alembic file?

I have an alembic file from Houdini and I want to use only part of the simulation in Blender, so I can't figure out how to take the necessary part (like from frame 150 to 350) and put it on frame 1.

If I got what you ask, here is a way that seems to work: I created a simple blender cloth sim, a cube with hooked vertices, 50 frames long. Then, exported that as alembic.

After I opened a new default blender file, deleted the default cube, and imported the above .abc file.

I got the object in my new file, and the animation worked thanks to a "Mesh Sequence Cache" modifier I found for my object; also my new file frame range has become 1-50 (it was, as default, 1-250).

Now, while my blender frame was 1, I checked the modifier's "override frame" option, and set a keyframe for frame "1". Then I moved to blender frame 50, and set a keyframe for the modifier's "frame" option to "50".

Now, in the NLA editor I have a new "action"

that can be converted ("pushed") to a "strip" using the double arrow button.

After that, you get a strip, which can be moved anywhere in the timeline...

here it is starting at frame 40, and last until frame 90... (of course before I extended the blender frame range to somewhat higer...)


Connecting faces that are out of alignment I'm working on a face mask in Blender. I have gotten to the point where I'm trying to make ear loops for it. I've used the spin tool and gotten it pretty close, but I can't think of how to line up these faces or rotate the whole ear portion without it looking wonky. I feel like this is an easy answer, but I've lost some skill on Blender the past few months. Pictures are included. Please let me know how to solve this!

If I'm understanding your question:

Select the ear loop and detach it from the rest of the mesh pressing L;
Activate the proportional editing with O;
Select the end-face of the loop (the one you want to bring to the mask mesh);
Move it with G and setting the action radius with the mouse wheel (be careful not to reach the other end with a big radius, or you'll move it too).


Animating an emission shader (or any) This is my first time posting here, I'm still relatively new to blender. I'm having trouble animating my emission shader. I'm trying to achieve like a blinking effect or an even brighter emission (at a certain point in the shot) but I'm not sure how to go about it.
If anyone could give me any tips, that would be great!

While howering mouse over a Strength value in Emission node, you can press I key to insert a keyframe for this parameter. Move in Timeline to another frame. Move mouse over node strength parameter and press shortcut again.

To adjust blending between keyframes to get on /off effect switch to Graph Editor, select all keyframes and switch handle type from Bezier to Constant (T).


Smoke in view port not always showing Blender Ver 2.77a
hp elitebook 8460p
i5 2520m
Intel HD 3000 (crap) graphics
16GB RAM

I'm just starting Blender.

When I set up a smoke domain using a half a Sphere, and the Quick Smoke (the long way of doing this too, using youtube how tos).

When I run it Alt+A it will show the smoke, then every time after that it is gets worse and then begins not showing smoke, so I have no way of knowing my results unless I render it to a file then check it like that.

Problem two, it sticks on frame 1 at times as well after following the youtube video I go to play it again to see the results, using Alt+A and it cycles frame 1.

I wish, I knew what detailed information you really needed to understand what I am talking about, but I am confused about this so me making heads or tails out of it to enplane it in here better is a far cry to do.

Upon further investigation, I found that Blender's Cycles render engine is not compatible with the Intel HD 3000 (waste of time developing it) graphics "card" on my laptop. I purchased a new (different, used) motherboard with an ATI graphics  card for 25$ cheap...hopefully that will fix this issue.


Transparency not working when using several textures I downloaded this tree model to study by myself.
But there is a black square around the leave and the flowers.

The node setup is here

When I make the tree with the tutorial, there is only one image texture box(left yellow box) like the below picture. so adding transparent BSDF & Mix shader makes the leave clear.

the first picture that I download has three image texture boxes in node, so it seems that it needs another solution for them to be transparent. is there any way that I can make it transparent??!

Not sure, if you using Cycles or Eevee... But at least in Eevee you have to enable alpha for the leaf material in the settings.


How do I import garment patterns into blender? I have created my garment patterns using Valentina(.val file) , now I want to import this into blender to make 3D simulations.

How can I do that?

You need to export the patterns form the app you are using on some format that is supported by blender.

Image

JPEG, JPEG2000, PNG, TARGA, OpenEXR, DPX, Cineon, Radiance HDR, SGI Iris, TIFF

Video

AVI, MPEG and Quicktime.

3D

Alembic, 3D Studio (3DS), COLLADA (DAE), Filmbox (FBX), Autodesk (DXF), Wavefront (OBJ), DirectX (x), Lightwave (LWO), Motion Capture (BVH), SVG, Stanford PLY, STL, VRML, VRML97, X3D.


Rig a zbrush model in blender and send it back to zbrush with GOB? Allright,there is the thing,I got a model build in ZBrush with subdivision levels,and I sended it in blender with GOB addons,rigged it,posed it,and then when I sent it back,it doesn't work,in zbrush it just created a new Tool and didn't catch my pose,Buuuut!!this workflow works just fine with Maya and with default GOZ app.
My goal is getting the model rigged and posed meanwhile keeping the subdivison levels alive, Is there any genius can help me?

Hmm. Try importing the obj you exported from blender back into blender. My guess is that it will be in the same pose that you exported from Zbrush, but all triangles because your pose was not applied to the mesh before export.

I haven't used GOB in a while, but it should work so long as you didn't change the topology and iirc it should work even if you did change the topology. You need to actually apply the armature pose to your model in blender so that the armature modifier no longer exists. There should be an OBJ option to apply all modifiers on export.

Also, I would just recommend using in Zbrush, and the masking tool. That would be way less complex, and if you didn't know how to do those things, increase your skills in Zbrush. It's also better because you can use layers for per-bodyparty-poses or entire poses. Right?

Edit: Yeah, I haven't done this in years, but I still remember. Just change your high poly Ztool to low poly, press the GoZ button to export to blender (blender needs to have the import button active), modify the mesh, export the mesh as a Wavefront OBJ from Blender. Import the obj to Zbrush, it will apply your changes instantly.


Making a rigable robot I am a complete Newbie in regards of rigging and animating, trying to create a Robot, which I will try to rig and move afterwards.
I have two questions while I am at the beginning to avoid double work in the long run.

Question 1:
Right now I have every part as a separate object, should I combine them to one sinle object for the whole Character? Because then I ask myself how the movement of the jaw you see in the picture should look like.

Question 2:
I want to make the neck, and probably arms and legs as you can see in the following link:
Make Bezier Curve look like Torus Array

I ask myself if I should use a torus array for this or rather a cylinder and try to achieve a similar look and avoid any problems of being unable to move the parts without any sort of unwanted deformation.

Thank you all a lot. :)

Unless you have good reasons to keep some meshes separate (like a modifier that must not affect the other meshes), it would be simpler to join them.

For the second question, it really depends on what you want, it will deform but it won't necessarily be a problem so you should try this solution, on this topic you can follow this very simple tutorial by AgenZasBrothers that explains how to create robot limbs with Array and Curve modifiers, maybe at the end parent the vertices to bones so that you can always come back to a Rest pose.

Also maybe this answer I gave on how to rig a cartoon-like limb may interest you.


Branched Path Tracing control for preview in 2.78 In blender 2.78 when Cycles is set as the renderer and Sampling is set to Branched Path Tracing, I lose the ability to set the number of preview samples. This is helpful when I have very high Sampling/Samples values for the final (very slow, but high quality) render.

The net affect is that the preview window takes forever to update and my PC is bogged down trying to calculate detail that I don't want or need in the preview window every time I make a change to the scene.

When regular Path Tracing is used, you have control over the number of Preview Samples which you can set to a low value so that the real-time update of the 3D view is fast. Then you can set your actual render samples high for better quality on the final render.

It seems like this control is completely missing when Branched Path Tracing is employed, forcing me to go through the hassle of using Path Tracing for editing and then switching to Branched Path Tracing right before I do the final render, with the resulting outputs potentially looking different.

Is there any way to set "Preview Only" settings for the Branched Path Tracing option (for more than just AA Samples, which does have a preview specific setting).

With branched path tracing the viewport preview quality is controlled by the AA Samples setting, to the left of the sample settings.

The amount of bounces is multiplied by the number of Anti Aliasing samples, thus controlling preview quality while keeping the same settings in sync for final render.

If those are not enough for you, you can alternatively add some custom presets on the menu above, keeping a lighter one for viewport preview, and a more complex one for final production.


gltf2.0 issue after export I am  trying to export a scene to gltf format, and load it with threejs gltf2loader. However after I the export the edges are more visible, I'm not sure if it is the exporter issue or I must do something to my scene in Blener. I do not see this problem when I render my scene with cycles

Do somebody have this issue before?

this is how my material looks like

myexporting settings are the following:

After searching in blender manual I find out that the problem was the shading mode. Basically edge was clearly visible because I applied flat shading to my model and then exported it.

The changes I made to my gltf exporter didn't affect my model at all.

to change you can change shading mode in transform tab in object mode


Why is my Array modifier rotating my object at an offset angle? I have created a button and i want to rotate the button in circular way. But the button shape should be same shape. I have added array and empty to rotate. I got this result.

Or with the array i want it to bend or twist in circular way

But i want to rotate the button in same shape. Near by near but the angle to be same. As show below.

There should be no space between them. Like the array no space between and bend or twist circular shape it should get the shape.

Any suggestion or help how it will work. Thanks

Since the object needs to distort in order to leave no gaps, maybe a regular relative-offset array, given a Curve modifier, would suit better?

Oops.. or this, if you RX180 in edit mode..


How To Lock A 3D View From Being Roatated ? (2.8) What do I need to do to lock my Front and Right 3D views from being rotated?

I am using the quad view (Ctrl + Alt + Q)  in the meantime but I only want to work with front and right views only and the Ctrl + Alt + Q View simply does not allow me to enlarge the views I want to work with.

You can lock a camera's rotation in the Transform tab. Press Ctrl + Alt + Numpad0 to align a camera with a view and then check Lock Camera to View.


Convert Sphere UV Coordinates to Object Coordinates I am trying to procedurally flatten out roughly one half of a sphere by using displacement. This would be easy to do by using Object or Texture Coordinates, but since I need these to be preserved for later steps, meaning every vertex keeps its original coordinates, I need to use UV Coordinates. Do you have any ideas how I can convert the UV Coordinates for a spehere generated by Blender to the initial Object Coordinates I would get without any displacement? The result should look roughly like this:

Okay, so it seems I managed to get the Z-Coordinate by utilizing some of the formulars for circle segment calculation that I learned in school but have gone lost like many things. Here is the Node Tree, if anyone is interested:


How to change the object of an animations scale when you saved the key frames as LocRotScale guys fairly new to blender and I ran into some trouble...

I worked really hard on an animation saving each keyframe via LocRotScale
However now I want to change the object size but I can't... Is there any way I could change LocRotScale to LocRot without losing anything else in my animation?

PS: in the image in the dope sheet panel, it says LocRot... that's because I tried to fix it because previously it said LocRotScale and I thought I could change it by getting rid of Scale in LocRotScale but It didn't work :(

You can remove separately the scale keys in the dopesheet.


How to write a bpy.app.handlers handler thats only called once? I have a problem with app handlers in Blender and Python. I am trying to write a script that can start a render and automatically upload it when it finished.

So far it works, but now I want to see the render process as well.

I tried bpy.ops.render.render('INVOKE_DEFAULT'), but that doesn't wait until the render is finished until executing the next parts of the code, where the upload happens.

After a bit of search I stumbled across app handlers, which seem to be what I need.
So I tried this:

import bpy

def my_handler(scene):
    print("render complete")

bpy.ops.render.render('INVOKE_DEFAULT')

def register():
    bpy.app.handlers.render_complete.append(my_handler)

def unregister():
    bpy.app.handlers.render_complete.remove(my_handler)

if __name__ == '__main__':
    register()

When I press Alt+P in Blender's Text Editor, it works fine at first. But when I try it a second and third time, it starts printing "render complete" multiple times at once in the console. Each time I run it, it prints one time more.
So I guess something is wrong here, and if the simple printing doesn't work, I rather don't try to use this app handler to upload the render result ;)

Anyone has an idea what's going on?

It looks like you're adding the render handler multiple times.

If you want a one-off handler, you can do this:

def my_handler(scene):
    print("render complete")
    bpy.app.handlers.render_post.remove(my_handler)

... you'll also want to change unregister not to error when the handler has run.

def unregister():
    if my_handler in bpy.app.handlers.render_post:
        bpy.app.handlers.render_complete.remove(my_handler)

Note: if you end up writing many one-off handlers, you might want to investigate writing a decorator, so a new handler could look like:

@call_once(bpy.app.handlers.render_post)
def my_handler(scene):
      print("render complete")

... where call_once can handle details to avoid a lot of repetition.


IK working with object constraints I am making a robot, and I want its movement to be mechanical and stiff according to its hinges. I rigged the robot according to that and set constraints on the bones to limit their rotation, but when I add the IK, it doesn't respect the constraints. So is there a way to have IK respect the constraints or is there another way around?

Here's an image of the robot with the armature in case it can help you understand it better.

The limits for IK solving are stored in the bones properties under Inverse Kinematics.

Pose Mode > Properties Panel > Bone (Tab) > Inverse Kinematics (Section)


Unfold / peel off animation I have to create a similar animation with the attached image.
How to create  this effect in Blender?
Thanks in advance!

You can try Plane deformed by Curve modifier plus Mirror modifier

It is quite tricky to work with curve for me. But in this case just add Curve, switch type to 2D (under Curve Properties), rotate 90°on X, in edit mode shape curve as you need. In object mode rotate on Z axis to let curve peel from cornet. Before you add paper a Curve modifier move curve object origin to paper's left top corner. Animate curve's Location.


Convert Cycles Hair Particle System to Mesh Object I'm hoping this community can help me solve a issue.
I have created a cycles hair particle system to render grass. This is successful in rendering and works great. However I want to convert this particle system into a whole mesh (A patch of grass) so I can distribute it across the ground in my scene, rather than using tons of memory with hair particles alone.

I have two issues with converting the particle system into a mesh in the modifiers tab.

It only outputs the strand vertices rather than the faces of the cycles hair rendering such as in my case True-normal.
The Material that is used in the particle system does not copy over or appear on the mesh. I presume this is something to do with the UVs as I am using the output intercept on a hair info node.

I'm hoping theres a solution within Blender or even a script that can help me with this process. Can you please help me out.

Thank You

I had the same issue converting hair particle into mesh, then trying to bake it in a low-poly model to use in a game engine. I found that there's no one-click solution built into the Blender, so here's my work-around:

Convert the particle into edge loops (click "convert" button in the modifier stack)
Convert the edge loops into bezier curves (select the edge loops and hit AltC)
Make them solid and shape them up using bevel and taper objects (Properties Panel > Object Data > Geometry)
Finally convert them back into mesh object (select the object and AltC)

You need to do quite a few steps in this workflow but it yields more control over final shapes.


What does "Show Group Colors" do? This toggle locates at View menu on both Dopesheet and Graph Editor. There is few information about it, and I can hardly understand the tooltip. I wonder what the "Show Group Colors" toggle does, or how it affects.

It displays the bone names background on the left in the Color Set select in the Bone Groups
settings.