How to make a button link to a DataLibrary using python? I have a random 3D model from a .blend file and I have been using Blenders Data Libraries to import it.
Here is the code:
import bpy

filepath = r"C:\\path\example.blend"

coll_name = "collection name"

link = False

with bpy.data.libraries.load(filepath, link=link) as (data_from, data_to):
    data_to.collections = [c for c in data_from.collections if c.startswith(coll_name)]

for coll in data_to.collections:
    if coll is not None:
       bpy.context.scene.collection.children.link(coll)

It imports my object I need. But I would like to be able to press a button to activate it. So how can I do that?
I want the button to look like this:

(That type of formatting)
-

If you have any questions, please let me know and I will reply as soon as I can.
Thanks
Daniel

i took the liberty to make an addon out of it.
It's a bit convoluted, so i made the simple version and EXTRA with file picker, it's mostly from
https://www.youtube.com/watch?v=9fuFDHR-UkE&list=PLa1F2ddGya_8acrgoQr1fTeIuQtkSd6BW&index=6
it adds a panel default 'N' key
the panel can be merged with existing panels by modifying bl_category
just create a file in your blender instal folder /Version Nr/Scripts/Addons/
name it anything.py
then in blender after a restart go to preference/addons search for "Link data" and enable it.
hope that saves you a headache. hehe

bl_info = {
    "name" : "Link to Data Library",
    "author" : "Daniel",
    "description" : "Add description Here",
    "blender" : (2, 80, 0),
    "version" : (0, 0, 1),
    "location" : "",
    "warning" : "",
    "category" : "Generic"
}

import bpy

class OBJECT_OT_link_data(bpy.types.Operator):
    """Tool tip thingy"""
    bl_label = "Link Data"
    bl_idname = "object.link_data"
    bl_options = {"REGISTER", "UNDO"}
    bl_context = "objectmode"

    def execute(self, context):

        filepath = r"C:\\path\example.blend"

        coll_name = "collection name"

        link = False

        with bpy.data.libraries.load(filepath, link=link) as (data_from, data_to):
            data_to.collections = [c for c in data_from.collections if c.startswith(coll_name)]

        for coll in data_to.collections:
            if coll is not None:
               bpy.context.scene.collection.children.link(coll)

        return {"FINISHED"}

class VIEW3D_PT_Link_Data(bpy.types.Panel):
    """Tool tip thingy"""
    bl_label = "Link To Data"
    bl_category = "Link Data"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_context = "objectmode"

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

        col = layout.column()

        col.operator("OBJECT_OT_link_data",
            text="link data",
            icon="PACKAGE"
        )

def register():
    bpy.utils.register_class(OBJECT_OT_link_data)
    bpy.utils.register_class(VIEW3D_PT_Link_Data)

def unregister():
    bpy.utils.unregister_class(OBJECT_OT_link_data)
    bpy.utils.unregister_class(VIEW3D_PT_Link_Data)

if __name__ == "__main__":
    register()

Modified version with EXTRA bits
bl_info = {
    "name" : "Link to Data Library",
    "author" : "Daniel",
    "description" : "Add description Here",
    "blender" : (2, 80, 0),
    "version" : (0, 0, 1),
    "location" : "",
    "warning" : "",
    "category" : "Generic"
}

import bpy

class OBJECT_OT_link_data(bpy.types.Operator):
    """Tool tip thingy"""
    bl_label = "Link Data"
    bl_idname = "object.link_data"
    bl_options = {"REGISTER", "UNDO"}
    bl_context = "objectmode"

    def execute(self, context):

        filepath = bpy.path.abspath(context.scene.DanielLinkFile)

        coll_name = context.scene.DanielLinkCollection

        link = context.scene.DanielLink

        with bpy.data.libraries.load(filepath, link=link) as (data_from, data_to):
            data_to.collections = [c for c in data_from.collections if c.startswith(coll_name)]

        for coll in data_to.collections:
            if coll is not None:
               bpy.context.scene.collection.children.link(coll)

        return {"FINISHED"}

class VIEW3D_PT_Link_Data(bpy.types.Panel):
    """Tool tip thingy"""
    bl_label = "Link To Data"
    bl_category = "Link Data"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_context = "objectmode"

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

        col = layout.column()

        col.prop(context.scene, "DanielLinkFile")
        col.prop(context.scene, "DanielLinkCollection")
        col.prop(context.scene, "DanielLink")

        col.operator("OBJECT_OT_link_data",
            text="link data",
            icon="PACKAGE"
        )

def register():
    bpy.types.Scene.DanielLinkFile = bpy.props.StringProperty(name="Link File",subtype="FILE_PATH", default=r"C:\\path\example.blend")
    bpy.types.Scene.DanielLinkCollection = bpy.props.StringProperty(name="Link Collection",default="collection name")
    bpy.types.Scene.DanielLink = bpy.props.BoolProperty(name="Link",default=False)

    bpy.utils.register_class(OBJECT_OT_link_data)
    bpy.utils.register_class(VIEW3D_PT_Link_Data)

def unregister():
    del bpy.types.Scene.DanielLinkFile
    del bpy.types.Scene.DanielLinkCollection
    del bpy.types.Scene.DanielLink
    bpy.utils.unregister_class(OBJECT_OT_link_data)
    bpy.utils.unregister_class(VIEW3D_PT_Link_Data)

if __name__ == "__main__":
    register()

```


How to trim down the total ammount of keyframes in a animation Hey guys I'm currently working on a motion capture project using the rokoko studio. At the moment studio exports animations at 100 fps and can't be changed. This leaves a huge number of keyframes in the animation for me to have to go through and clean up. I was wanting to find out if there was a way to pack down the sheer number of keyframes to something more manageable like 30fps.

Youn go to pose mode, menu pose, animation, bake action, and set the frame step to three, reducing at one third the number of keyframes.


How to merge edge loops? How do you merge edge loops? They say ALT +  M  but that merges the edge loops to the middle of it.

What I want to do is is like this, not bridge because bridge will make new faces. I just want merge.

Merging is the way to go, although differently.
First you want to select two vertices you want to merge to a single vertex of the final model.

After that hit ALT + M to merge and select At center.

Repeat this process for each vertex. Done.


How can I etch a perfectly straight line into a sculpted model? How can I etch a perfectly straight line into a sculpted model? I sculpt heads for ventriloquist dummies. I want to etch straight and parallel slot lines on either side of the mouth. Thank you.

you can also use: crease + space with stabilize strokes in sculpt mode or strokes lines


How to hook empties to points of a curve programmatically? Here is a sample code which creates a primitive bezier spline (location1 and 2 are the control points' location):

def createBezierCurve(location1, location2):
    dirVect = getNormalizedDirVector(convertDictCoordToTuple(tableCenterCoords), convertDictCoordToTuple(refTableCenterCoords))
    bpy.ops.curve.primitive_bezier_curve_add()
    obj = bpy.context.object
    obj.data.dimensions = '3D'
    obj.data.fill_mode = 'FULL'
    obj.data.bevel_depth = 0.02
    obj.data.bevel_resolution = 12

    obj.data.splines[0].bezier_points[0].co = location1
    obj.data.splines[0].bezier_points[0].handle_left = addVectors(location1, dirVect)
    obj.data.splines[0].bezier_points[0].handle_right = subtractVectors(location1, dirVect)
    obj.data.splines[0].bezier_points[0].handle_left_type = 'VECTOR'

    empty1 = bpy.data.objects.new("EmptyObject", None)
    empty1.location = location1
    bpy.context.scene.objects.link(empty1)
    hookmod1 = obj.data.splines[0].bezier_points[0].modifiers.new("Hook", type='HOOK')
    hookmod1.object = empty1

    obj.data.splines[0].bezier_points[1].co = location2
    obj.data.splines[0].bezier_points[1].handle_left = addVectors(location2, dirVect)
    obj.data.splines[0].bezier_points[1].handle_right = subtractVectors(location2, dirVect)
    obj.data.splines[0].bezier_points[1].handle_left_type = 'VECTOR'

    empty2 = bpy.data.objects.new("EmptyObject", None)
    empty2.location = location2
    bpy.context.scene.objects.link(empty2)
    hookmod2 = obj.data.splines[0].bezier_points[1].modifiers.new("Hook", type='HOOK')
    hookmod2.object = empty2

What I couldn't find is how to hook the points to these empties?

To add a hook modifier

Following code adds a hook modifier. named Hook1,  to the curve object CurveOB and sets the hook object to Empty1

hookmod = curveOB.modifiers.new("Hook1", type='HOOK')
hookmod.object = empty1


Can Cycles do a Gooch Shader? Now that 2.68 has introduced a toon bdsf, is it possible to recreate the Gooch shader? Insight, links, or a nodes screenshot would be great.

Update: Using a model similar to the one in the wikipedia article, I've come up with a complete solution. I also kept my previous attempt included in this post for the comments that refer to it. (Thanks Róbert and gandalf3!)

Follow the instructions below.

Gooch Matte

First, the surface normals from the geometry are combined with a Normal node that manually chooses the direction of the gradient. The dot product of these two vectors is normalized (0 through 1). When dot-product-multiplied against the camera's view vector, the gradient takes on the desired effect. I'm using emission to produce the color and then darkening it down to 10% strength by default (as is described in the paper). The two shaders are added together so that the blue lightens up areas that would otherwise be in complete shadow.

Gooch Glossy

To make a glossy Gooch shader, the Matte is simply added to a Glossy BSDF.


Using the loop cut and adding additional loops I have an issue with loop cut. It says press ⎈ CtrlR and then you can use the mouse wheel to adjust the cuts. I am using industry standard keys and ⎇ AltC is the shortcut but middle mouse button only zooms.

Am I doing something wrong?

ALT + C does not make ZOOM this only centers the model on the 3D viewPort

on the other hand perhaps what you are looking for is the following

unless you refer to

ALT + SHIFT + C


Mist that only erases objects and not background? I'm trying to make an odd effect similar to a video game where things off in the distance aren't drawn, but aren't chopped off completely - they blend into the background instead. So it's sort of like a fog or mist, but one that only applies to objects and not the background.

The closest I've come to making this work is by using two separate RenderLayers - one that's only the background with a mist pass, and one that's all the objects. Unfortunately, this leads to a "ghost" effect: the objects are semi-transparent over the background. Additionally, it doesn't work with non-white objects.

Is there anything I can do?

With a single render layer, enable a mist pass.

Then in the compositor use the mist value and a color ramp a factor to mix the background.


How do you exchange an object/mesh between two separate rigged armatures I have a two people walking down a path. One is carrying a bag (guy1) and passes it to the other person (guy2)

I can easily attached the bag to guy1 but I can seem get the exchange right! Im using the Child of constraint to parent the bag to Guy1 hand but it doesn't seem to work further then that.

To hold and drop an object, here is the basic operation to do:

Give the object a Child Of constraint, press Set Inverse so that it stays in place.

Make the parent move from point A (at frame 0) to point B (let's say at frame 20).

The frame before the frame where the dropping is supposed to happen (let say frame 9 as the dropping will happen frame 10), select the child, create a location keyframe and keyframe the Child Of constraint Influence at 1.

The next frame (so, here, frame 10), where the dropping happens, keep the child selected, create a keyframe Visual LocRotScale (or simply Visual Location), so that the new location is the one currently seen on the 3D view. Also keyframe the Child Of constraint Influence at 0 so that the object is not the child anymore.

Now as you give the object to another one, just give this object a second Child Of constraint with the new parent. At frame 9 you'll keyframe the Influence at 0, at frame 10 you'll keyframe the Influence at 1, and now the the child has a new parent.


Animation of Dupliverts with Shape Keys with Python api Description of Problem

I would like to create an animation of 100,000 atoms with 10,000 frames from my molecular dynamics simulations. Currently I am using dupliverts with a single uv sphere for each atom type. This has worked great in creating a single frame using the python api. However, I am unsure on the correct way to specify the change in vertices at each frame in Blender. I have data that will give me the position of each atom at each timestep/frame.

What I have Tried

What would be the ideal way to animate this simulation? From reading I have seen that using shape keys would allow me to specify the change in the vertices from initial positions (Basis). However, this would mean that I would have to create 10,000 shape keys and change the value from 0 to 1 for each step but would allow me to take advantage of interpolation. The best example I can find showing how this can be done using the blender python api simple example of shape key python api. However, when I used this I was only able to create one shape key not the 10,000 that I would need.

edit:
So I got the functionality that I need using this code. But it still does not answer are shape keys the correct way to handle 10,000 steps?

obj = bpy.context.object
shape_keys = ['step ' + str(i) for i in range(10000)]
for shape_key in shape_keys:
    obj.shape_key_add(name=shape_key, from_mix=False)

for shape_key in shape_keys:
    bm = bmesh.new()
    bm.from_mesh(obj.data)
    shape = bm.verts..layers.shape[shape_key]
    for vert in bm.verts:
        vert[shape] = 'change vertex position here'
    bm.to_mesh(obj.data)

Probably very inefficient would be interested if there are better ways.

It is possible to keyframe each vertex. While by default Blender does not provide a GUI way to do this, it does include the AnimAll addon that provides a way to visually keyframe various components and values like vertices and edge creases. A python script can also easily keyframe the vertices.

import bpy
from random import random

obj = bpy.context.object
for f in range(bpy.context.scene.frame_end):
    for v in obj.data.vertices:
        m = random() * 0.1
        if f%2:
            v.co.z += m
        else:
            v.co.z -= m
        # index of 2 means only the z-axis
        # -1 (x,y, and z change), 0 x-axis, 1 y-axis
        # you will get weird behavior if the index and
        # axis changed do not match
        v.keyframe_insert('co', index=2, frame=f)

Once keyframed they show in the graph editor and dopesheet like any other animation, meaning modifiers can be added and interpolation types changed. You will find the fcurves in obj.data.animation_data.action.fcurves.


Extrude from two shapes I wonder if it's possible to extrude in blender not only from one but two shapes. One shape would be the lateral cut in the Y-Z direction, one shape would be the lateral cut in the X-Z direction.

My source shapes are paths from Adobe Illustrator (.svg).
E.g. I have two rounded rectangles (same height, different width) as source shapes and want to create a cuboid with rounded edges and corners out of it.
See the source paths here:

How could I achieve that?

A way to do it would be to convert both shapes to meshes (with Alt+C). Then extrude first mesh of a value greater than wideness of second mesh, and extrude second mesh of a value greater than wideness of first mesh. Then do a boolean intersect of them and a remove double (that can help to obtain a clean result).
You can't do booleans on extruded curves, even if you add first a remesh modifier on them, so you can't keep the editable property of bezier curves (or svg) for modifying on the fly the final volume if this is what you expected... (But for sure that would be a really great way to do it)


ManuelBastioni addon I recently got a new computer, and all my Blender addons are gone. One addon I can't get it is ManuelBastioni lab, because the site is under construction.

So does anyone have the .zip file of the addon, I would be really happy if you could share it.

It seems that the original add-on has been discontinued. However, there's a community supported branch of the add-on available at https://github.com/animate1978/MB-Lab/wiki


How can I make boids move along a path? I'm making a flock of birds with boids.  I want them to move along a path.

I tried curve guide, but they always move away from the curve.  If I make the particles Newtonian, then they follow the curve, but not boids. I want to use boids because I need them to be separate and flock reaching a goal.

Have an empty follow the curve.

For the boids set your empty as goal.


Coordinate alignment of meshes I have a navigation mesh. In Edit Mode, the coordinate of the first plane of the navigation mesh has a completely different coordinate than that of a cube mesh at the same location. How can I align the coordinates of both these objects?

Your problem is that you are looking at coordinates set to local. Blender is generating those coordinates based on the distance of the selection from the origin of the object, and not the center of the scene. If you set your coordinates to global the numbers will be generated by calculating the distance of the selection from the center pf the scene.

You can set the coordinates to Global by pressing this button.


How can save rendered images to a specific folder? I tried to render an animation when it suddenly paused, I just thought it was lag so I went to my desktop to find each frame it rendered as a file (it flooded my desktop) is there a way to make it so it puts all of those frames in a folder.

Thanks

You just need to add the output folder name in the Output file path and add a backslash at the end. Then Blender will create the folder (if it doesn't already exist), and write the new frame files into this folder.


Why does my texture look fine in preview but not when rendered? In the end, the texture is supposed to look bumpy like this.

It looks just like that in the preview, but not when rendered. I've tried about everything I could think of, short of restarting the entire project from scratch. I've made about three textures the same way, but none of them seem to work. I even tried moving the object to another project in case it was something with the file. I am a complete noob and know almost nothing about this program. Here is how it looks like now, if that's be any help.

You are using a normal map texture only. You need 2 textures: the bump map, and the diffuse. The following image show the steps for setting up the two textures:


Does running a python script via Blender command line not actually do anything? I am trying to create an animation programmatically (never using the interface) with Blender.  I can take my script and run it in Blender via the "scripts" tab just fine. It creates new scenes, adds cameras, object, lights, etc.  I can render the results of the script via the GUI or via command line.  But when I run it from the command line, it doesn't actually do anything!

I am using a "blank" .blend file with one initial scene in it with a title card.

Here is the .bat file script (Windows), it uses a python script to create the animation file:

cd\program files\blender foundation\blender
blender --background  C:\pathtofile\ANIMATION.blend --python CREATE_ANIMATION_FILE.py

It gives me:

found bundled python: C:\Program Files\Blender Foundation\Blender\2.78\python
read blend: C:\pathtofile\ANIMATION.blend

Blender quit

It runs the script just fine but doesn't change the ANIMATION.blend file at all. Again, if I run the script from the scripts window via the in Blender GUI, it works fine.  Anyone come across this?

I found some info here:

  11) Next step is to build a userpref.blend with Auto Run Python
  Scripts enabled. NOTE: This is essential because of a bug in blender.
  Starting blender with -y does not work. Neither does starting blender
  with a python script setting the autorun flag to ON. It even does not
  work to compile blender yourself with the WITH_PYTHON_SECURITY flag
  disabled (OFF). Blender will still not execute the python script. The
  only way to enable this auto execute is via the GUI. Since we do not
  have a GUI (or want to install one), we have to build a userpref.blend
  on a different machine.

David above solved it.   When manipulating a .blend file with a python script, that script must contain the following line at the end of the run in order to save the file:

bpy.ops.wm.save_as_mainfile(filepath=savepath)

Obviously insert your filepath/filename in the "filepath" variable. Thanks!


How to hide light object keeping the brightness alive? How can i hide the plane keeping the brightness?
OK i added a plane as emission light source, i dont want the plane to come in my scene, when i hide the plane brightness also disappears.

You achieve it by removing camera from ray visibility like here


GLB (GLTF) export, how to include color/material information? As a complete beginner with Blender, I have been creating simple 3D models to export as GLB and import into another program. For this purpose there is no animation, no physics, etc. I just need them to be visually correct.
When I export the object, it is always the default white color. I only need relatively flat color (that is, I don't care about textures nor do I want to map a bitmapped material onto the objects for this particular project), but I do want there to be something besides white.
I would appreciate if any answers were very step-by-step from scratch. Most answers I have seen here assume one is already very familiar with the Blender interface, and I am not. For example, one says to "Set the Workbench viewport to Flat-Vertex color." OK, but there's nothing on the screen with the label Workbench. Is that a Workspace? It seems not. The manual is unhelpful. So more specific instructions like, say, "On the right side of the Blender workspace is an icon like a wrench. Actually there are two wrenches sometimes, I mean the light blue one right next to the workspace. Click that and select foo."
I'm using Blender 2.90. Thank you.

Let's assume you have your model like this. Click on your model to select it. Then open the Material Properties panel by clicking the sphere in the Properties Editor.

Click on the New button to add a new material.

You should see something like this. You can edit the properties of the new material. Click on the Base Color button and a color picker will come up. You can now pick a color.

Your model will now export with the color you picked, but to see the way the model looks with materials applied, make sure the 3D View is in Material Preview mode.

Also when you export, make sure the Geometry > Materials option is on (it is by default).


How to set up SSS on cycles for efficient rendering How do I set up SSS shaders properly to render efficiently in animation projects. Are there any specific optimizations to consider?

I am trying to render some orange juice in a bottle and getting really long render times.I was wondering what I could do to optimize my shader and scene.

Here is a sample scene http://www.pasteall.org/blend/36594

TIP: You can adjust subsurfacing Strength to render faster.
Lower subsurface values === Faster Rendering.
This is most easily possible with the Principled BSDF shader introduced in Blender 2.79, which allows the use of subsurfacing in the same shader as the main material.
This is an example skin shader rendered with Principled BSDF with 100% subsurfacing:

Here are a few more images adjusting the SSS value respectively:

As you can see, adjusting the values off SSS amount produce a slightly lower SSS result, but give you around 10 seconds lead on each frame's render time.
This is obvious information, however, and you probably know this already.
Since you are using SSS to fake the look of orange juice, I decided to try and set up a material for it that would look about the same, but render faster without/with little SSS.
First I checked out this reference image:

I decided to make a node setup that would allow the material to be changed in between multiple different materials that would "fake" the look of orange juice, and change render times. It allows for more SSS for more realism, while sacrificing time, and diffuse+glossy+transparent for less render time.
Here is the node setup:
With SSS, this is about the type of material color we are going for:
Here is the improved SSS render:

This is a general SSS render:
This is a volume absorption + glass shader render:
This is a volume absorption + transparent render:
As you can see, the material color changes drastically, but they all stay around the same general look. The render times change quite a bit too. I found that my improved SSS shader worked with the lowest render time.
One last tip: Use adaptive sampling:
This allows world backgrounds to render instantaneously, and most other materials to only render until the noise is low, reducing render times.
Note: This feature is in Blender 2.83+ currently.


Shape On Animation Path Is Wobbly And Shape Not Facing The Right Direction I have made an animation of a shape following a path 100 frames. The shape when following the path, doesnt seem to be too smooth, its a little bit wobbly from side to side. Also is there a way to see keyframes in the timeline although it's an animation path?
Also the face of the cube is not facing the right direction when turning along the path.
Thank you.

https://streamable.com/mmq44f

If the cube is not animated, the wobbling should be only due to realtime viewport delays, but a true render should be fine.
When you parent or constraint a follow path function, Blender creates a modifier inside the graph editor, generating a straight infinite line. You can delete the modifier and add manual keyframes on the path animation properies tab, knowing that the number of frames (100 in my example) is the value needed to complete the curve, and the evaluation time is the value of the keyframe (so that 50 will mean half path, 33 one third, and so on).


Is there a way to restrict blender renders to a predetermined 256-color palette? I suspect there isn't, as this sort of thing is rather retro these days. But any help would be appreciated!

I'm going to say "no".  Fortunately there are tools like ImageMagick that make it fairly easy to quantize images as a separate step.


If I select mutiple objects, I can only sculp one of them If I select multiple objects, I can only sculpt one of them. If I go to sculpt mode I can only sculpt the last object that I have selected. The outlines of the last selected one is yellow and the others are orange.

You can sculpt more than one object but you need to make sure to uncheck the option Lock Object Modes, letting you select each and switch to sculpt mode.

You will still need to select the object you want to sculpt, but they will both be possible to sculpt without going back to Object mode for each.

If you want to sculpt both objects without needing to select them, then you will want to join them together as one object until you are done with sculpting - be careful because this means you may have to reassign materials or modifiers, etc.


Where are the Shape Key Editor / Fake User Setting? I've just picked up Blender again after almost 2 years and was stocked to see that 2.8 looks and feels amazing.
What isn't so amazing is that the layout has changed and almost all tutorials use the old layout.

I want to export a shape key animation to .fbx in order to use it in Spark AR. A simple location animation has worked but for shape keys, in all tutorials I've encountered, you need to open the shape key editor and check the F for fake user.

I can't find this setting anywhere. Where is it?

I found the shape key editor and as @FFeller pointed out the F was replaced by a shield icon.
For some reason the shape key editor doesn't show up in the Layout workspace but when I changed to Animation it was there.


Two diffenrent shapes in render I'm a newbie in blender, i solved a lot of problems thanks to this forum but this time i can't find any answer to my problem.

So basically i downloaded a 3D model, put some textures on it, etc.. but when i do the render the 3D model appears 2 times (no matter what type of render i use).

I don't realy know what to do, so if someone know i would be pleased to know what is the solution !

Thanks in advance and have a great day !

You have a second model just hidden, you need to disable it in the render too.

To do so press the camera icon that I marked in the image.


Object Merge ShortCut I am faced with a problem about merging two object with clean topology in a short time.

I have looked for any shortcut or addon that solve this problem, but have as of yet been unlucky.

Surface

Wire

Idle Chit-chat

I have come up with a way of doing it that has many steps, but turns out a nice result.

How to Do It

Start by selecting a single vertex of your sphere in Edit Mode and keying Ctrl + L to select the rest of it. Then key P and click on Selection. This should seParate your sphere from the cube mesh. Tab into Object Mode.

Now select the cube and go to the Object modifiers tab in the Properties panel. Add a Boolean modifier. Set the settings to the following. Substitute the name of your sphere mesh for where it says ""

If you key Z to enter wireframe mode, your meshes should look something like this.

Apply the Boolean modifier by clicking the Apply button.

Make sure you are in Orthographic View (toggle with Numpad 5). Key Numpad 1, Numpad 3, or Numpad 7 until you are looking at the side of the two meshes like this.

Tab into Edit Mode, toggle Z into wireframe view, and Box select these verticies.

Key X and select Verticies. Tab into Object Mode. Key R, then Z, then 90 to rotate the hole in your cube away from the sphere.

Select the sphere and go to the Object modifiers tab in the Properties panel. Add a Boolean modifier. Set the settings to the following. Substitute the name of your cube mesh for where it says "".

If you key Z to toggle wireframe view, your meshes should look something like this.

Apply the Boolean modifier by clicking the Apply button. Select the cube and key Alt + R. The hole on the side should go back to facing the sphere.

Select the sphere mesh, then Shift + RightMouseButton select the cube mesh. Key Ctrl + J to join the two. Tab into Edit Mode. Key A once or twice to select all of both meshes, key W, and click on Remove Doubles from the popup menu.

Here is a finished .blend file with the two joined meshes.


Align an object to transform orientation with python I'm currently writing a plugin for Blender. Everything is done except one stuff.

I would like to align an object to the selected transform orientation. Without the plugin, I just have to click on "Object"->"Transform" ->"Align to transform orientation". But I didn't find in the Blender Python API a method for doing that in a plugin.

Do you have an idea?
Thanks,
Maxime


Inset faces along line I'm currently trying to model these lines that are insetted into the mesh.

You probably won't subdivide the face completely to extrude it inwards?

It's not due to any normal or bump map, just modelling.

What's the best approach for this?

From an already created mesh, you can relatively easily add plates using this modifiers stack:

Subdivision surface with "simple" option so that corner are not rounded but only in order to add more geometry so that the plates can bind

Shrinkwrap to the base model. The preferred options should be here mode: "project", cull faces: "none", direction: "negative" and the wanted offset from the plane surface

Solidify in order to have rims joining the plates to the base mesh

Edge split to sharpen the previous modifier

As you can see in the gif above, this allow to model the plate with few geometry. But the technics is not perfect: it is sometimes difficult to keep straight edges.
You can also pile several meshes with the same modifiers stack (as visible on the right part above).

PS: I'm aware that this won't solve all the needed work to obtain a finalized plane model...


texture preview for displacement in Cycles? Why, when I'm using the Blender internal renderer, can I see my procedural texture (for my displacement), but, when I'm using Cycles render, I cannot? It's not like I want the procedural texture for texturing; it's for displacement, so why is it not possible to see this when I use Cycles?

It's very annoying for me. Maybe there is a trick using the node editor to show this texture, but I don't know how do do that. I think it's the best way to have a preview directly in the properties panel.

This has been added as of this commit (will be in 2.72).

Any recent development build will have this.


Mirror image disappears when joining with another object Before joining.

After joining.

The Cross and surroundings are half mirror image. But when I join it to the back wall, the mirror image part is disappearing.
Please tell me why and how can I solve this problem.
Thanks.

Objects are not carrying their modifiers. After joining them, only the main object's modifiers will be valid. If you have a mirror modifier on the cross apply it first, then join them.


Blender 2.79 How to Pin Down a Bone to a certain location? I try to make a walking animation.
The difficulty is the foot tweening often makes the foot not to stay put. Even though in the keyframe 1 and 2  the bone is in the same location.
Is there a way to pin the bone?

Your best shot is using IK.

Give IK to the bone you'd like to stay fixed (make the chain as long as you
need).
Create a new bone close to the fixed one to become your
"ground". This new bone MUST be a child of some bone higher in rank than the leg. If you have to, create a new "master" bone to be the parent of all bones.
Go back to the fixed bone's IK assign the new "ground" bone as the
target.

When you move the parent of the leg bones, the feet stay stuck to the ground.

Only when the feet need to move should you keyframe the "ground bones".


Why can't I remove the light blue weight paint from my mesh? I even maxed out my strength and everything but it still can't remove that light blue part of that mesh area. I need to reduce it back to normal dark blue.

Add extra geometry and then subtract and then remove useless geometry.


Bevel inside cylinder I am trying to bevel selected faces as shown below:

The problem is too many overlapping faces are created (example below) and clamp overlap creates too small bevel. Is there a better way to bevel in this situation or is there an efficient way to clean overlapped faces?
What I have tried: Remove doubles just merges vertices randomly and overall shape is broken.

.blend file

Well, you are not only bevelling the two circular edge rings, you are bevelling every edge between them.

That can for example happen when one uses Vertex Select Mode. When selecting vertices, every edge between them is automatically selected, too. That's why it's not possible to extrude a checker pattern in one go.

Use Edge Select Mode and only select the two edge rings, for example with ALT right click. Then you will get a nice and clean bevel. Make sure your object isn't scaled. That can distort the bevel as well.


Mirror multiple meshes with bezier curve I am standing in front of a problem, hopefully somebody knows a solution to it.

I have a torus array and inside a bezier curve; I've added a curve modifier to the array to follow the bezier curve as should be seen in the picture. The curve is parent to the array.

Now I had to copy the array multiple times to get the needed length and now I have multiple meshes arranged around a bezier curve and the modifiers are applied.

I just copied the whole thing, curve and meshes and turned them 180 degrees on Z axis to put them on the other side just to realize that I somehow need to mirror it to fit correctly, but if I do it starts looking like rubbish

Alt+C is not helping for the curve nor is Ctrl+J properly combining the meshes, I tried before and after applying the modifiers.

I hope I could make it clear, thanks for the attention.

The left one is the one I need to flip/mirror, it has 4 meshes and the said bezier curve.

Actually found solution to my own question xD
So here we go:
I just picked all 4 meshes and then pressed alt+C and then clicked on mesh from curve and done. That such simple things can stop one from progress for like a good hour straight... anyway, riddle solved, case closed.


Graphic Glitch on Startup Blender was working fine a few days ago, but suddenly starting Blender up yields a screen like this.

For some reason, the glitch doesn't occur when Blender is left free-floating: if I set it to fill the screen or either half of the screen, the glitch happens again. I can't get into system preferences or anything, either, because any pop-up from Blender has the same problem but irreversibly.

I don't know what changed. The only marginal thing I could think of is I installed a new library to my Anaconda IDE for Python, but I have the zipped Blender: they each have their own bundled version of Python.

I have a Windows 10 64-bit O.S., if that helps. But again, I don't know why this glitch is happening now when Blender was fine just a couple days ago. I have tried uninstalling and reinstalling Blender, but it doesn't help...

Edit: I have tried downloading a fresh copy from Blender's website; I've tried ZIP bundle AND msi executable downloads; I've tried multiple versions of Blender; and I have tried x32 vs x64 variants of each version. The glitch has persisted throughout.

everyone!

I'm the same person as the asker - had to make a new account because Stack Exchange said I hadn't used their email to confirm my email address (because I never got one).

I'm not sure why it was screwed up to begin with, but Blender works on my system now. I updated the drivers of my Display Adapters in the Device Manager.


Can I use an instance of an object created with a custom operator to run other custom methods in the same class? In my Python script, I would like to use the selected object to choose a method from the appropriate class.  Here is an example that explains what I want to do:
import bpy

class CheckShape(bpy.types.Operator):
    bl_idname = "myops.check_shape"
    bl_label = "Check Shape"

    def execute(self,context):
       obj=bpy.context.active_object
       print("what shape is this?")
       obj.check_shape()
       return {'FINISHED'}

class DrawCube(bpy.types.Operator):
    bl_idname = "myops.draw_cube"
    bl_label = "Draw Cube"

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

    def check_shape(self,context):
        print ("a cube")
        return {'FINISHED'}

class DrawCylinder(bpy.types.Operator):
    bl_idname = "myops.draw_cylinder"
    bl_label = "Draw Cylinder"

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

    def check_shape(self,context):
        print ("a cylinder")
        return {'FINISHED'}

classes = (
    CheckShape,
    DrawCube,
    DrawCylinder)

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

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

if __name__ == "__main__":
    register()

So, if I draw a cube with the operator bpy.ops.myops.draw_cube(), I would like to be able to run other methods in the same class when I select the cube.  For instance, I would like the operator bpy.ops.myops.check_shape() to call the method in the appropriate class depending on the selected object.  When my myops.check_shape() operator is called, I get the following error message:
AttributeError: 'Object' object has no attribute 'check_shape'
Is it possible to fix my example so that it would work?
Also, is there an update function of some sort that will be run if the cube created with the custom operator is transformed?
Thanks.

I am trying to write a Python code to save a 3-d model created in Blender so that a simulation program can read it.  In order to save the data from the different types of objects, I have a list of if statements.  I was thinking I can avoid that if I could take advantage of the fact that Python is an object-oriented language and each object could have its own method to save data.
After reading the following question and answer,
Is it possible to create an own object data type through Python?
I think that the answer to my question is no, that will not work.  I may try to use a custom property to store the information I need for each object when I create it.  Then I could just get the value of the custom property instead of having a bunch of if statements.
I think custom properties have an update function, so that if the object is modified, I could catch that in my Python code and adjust the custom property.  Since I am only creating 3d models and not using other aspects of Blender, hopefully a custom property would not cause problems with memory use and execution time in Blender.


What does this icon mean - circle next to a child in blender I would like to know what the circle icon next to Body_M_Georndr.005 means and why it is not next to part_Kidney_Right since they are both children of the same parent

That is the icon of a Material datablock, it means there is a material assigned directly to the mesh data, as opposed to the object itself.

When creating or editing Material Slots you have two options when assigning a material, it can be either assigned to the Object or the Object Data.

When assigned to the object, several object clones or instances of that object (while sharing the same geometry or mesh data) can have different materials regardless, but if the material is assigned to the Object Data all instances will forcefully have that same material.

Each materials assigned to Object Data will display one additional icon to the side of the data it is bound to in the Outliner, other materials show up below.


The x file makes sense, it has a 1 to 1 correspondence of vertex to normals. If you use smooth shading, you should fix your rendering code.

The rendering code:
1. Upload vertices array , normals array and  UV's array.

Draw triangles using the vertex indexes provided

It's rather simple, look here:
http://www.songho.ca/opengl/gl_vertexarray.html


How to set which graphics card is used by OpenGL render active viewport? I whan to use 3D View OpenGL render with Blender Render.
I have a laptop with two graphics card.

Of course the NVIDIA card is the superior. I used the Blender Help / Save System Info to check the OpenGL settings. It shows like this:

Does it mean Blender using the (lame) Intel card instead of the NVIDIA card?
Is it possible to switch to the NVIDIA?

It seems there is no option in the User Preferences window to select graphics card for OpenGL. There is only graphics card option for Cycles Compute Device but as far as I know Cycles has nothing to do with OpenGL.

According to this article: How to set a default graphics card
you can choose graphics card for an application via NVidia Control Panel. You can find it by right-clicking on your desktop.

You may need to update your NVidia driver (and restart your computer). If everything is OK, Blender system info file will look like this:


Snap during transform can not snap to what I want Why can't I snap the point I chose to the target point.
I tried for a long time to do this, but no use!

Could some help me? Thanks !

Solution in object mode :

Add an empty
Set snap to vertex option
Grab your empty to the needed vertex of the mesh to be moved
Shift+RMB to select the mesh to be moved additionally to the empty
Then grab them both to the destination


Copy Rotation constraint rotating on wrong axis with IK bone I want to make it so my leg IK can rotate the foot bone as well but it seems any rotation on the X axis is rotating on the Z axis for the foot bone

The simplest way to have this result, as moonboots says, is to set the foot as child of the IK controller.

If you want to understand how to use rotation constraints you have to activate the axes display in the armature properties, and vary the bones'roll value in edit mode.

Every bone shows its axes on its tip (while it's more convenient to think they are on its head, as a joint).

Y axis it's always longitudinal to the bone.


I cannot create a mesh (the dimensions are all set to 0 whenever i do try and create one) have am doing a 747 400 currently I have done all the bits up till the engines.

I keep on trying to add a new cylinder to make the engines of the 747 but it doesnt work in either edit mode and object mode, the dimensions are set to 0 on all axis and whenever I try and change it it wont let me for the cylinder.

However when I try and add a cube, it somewhat shows the cube and not the cylinder.

Here's the link to show all the dimensions are set to 0 and I cant change them.
https://gyazo.com/b4d058ce91745538a1c97e88cd8e2fbd

I'm not sure but i might try to add new Objects (Create Tab -> Cylinder)

(Actually, I would use a torus )

and join the whole thing later on. (Ctrl+j)

Problems:

the object may need three different textures, one for one engine, one for the other, and one for the rest. (i had such issues, i don't know if that happens)


Run python file in blender from command line I have the following structure:

The repo folder is located over ~/Desktop/Github/ and when I run from the command line blender --background --python ./Desktop/Github/repo_folder/main.py I get the following error:

I want to import all the classes/functions in utils.py to main.py to do that I tried the following things:

1) from scripts.utils import * got an error that scripts module wasn't recognized.

2) moved main under scripts and edited the line from .utils import *

3) tried to create __init__.py file under scripts

I use python 3.6.8 on Ubuntu 18.04 when trying (1) no errors marks shown over the IDE (Pycharm)
Blender version - 2.8 installed using snap (if that helps)

Thank you for helping!

An example that should work with Blender 2.80:
The directory:

folder
  | -> main.py
  | -> scripts
         -> __init__.py
         -> hello.py

scripts/__init__.py:

from scripts.hello import *

scripts/hello.py:

def hello():
    print('Hi')

main.py

import bpy
import sys

if __name__ == '__main__':
    sys.path.append('')
    import scripts
    scripts.hello()

And you launch it with: blender -b -P main.py.


blender 2.8 shader editor normal map missing When I go to the shader editor and search for "normal map" there are no results. Where would I add a normal map to the editor?

Where were you searching from? Were you using the regular F3 search function or were you using the Shift+A function inside the Shader Editor? The add node function (which is Shift+A) comes with its own searching feature which searches through all of the different nodes, which will include Normal Map.


Can Grease Pencil objects created with older Blender versions interact with light sources in Blender 2.83? Since 2.83, Grease Pencil objects can interact with light sources.

In my tests, it seemed that this only applies to Grease Pencil objects that were created with Blender 2.83?

Is that correct? If not, what do I have to consider?

That's correct. The Grease Pencil has been rewritten from scratch and lights are only affecting Grease Pencil Objects created in Blender 2.83.

Quote from the official Blog Post (5. Converting Old Files):

  When you load a file, Blender tries its best to convert missing settings/features to their new equivalent (e.g. 2.7 Groups → 2.8 Collections). But sometimes there isn’t a one to one equivalent, especially if the feature has been replaced completely. In the new system, for example, the Light Effect modifier is replaced by light objects, this case needs to be handled manually.

Some new properties/data seems to be missing in the old version of the Grease Pencil Object thus lights can't illuminate the old strokes. However, there is a workaround:

Create a new Blank grease pencil object (ShiftA > Grease Pencil > Blank)
Replace its data-block with the old one (Object Properties > Data-Block dropdown)

And copy all transforms (location, rotation and scale) from the old one to the newly created object (you can use 'Copy Attributes' Add-on for that).

Following script does all of that in one go. Select all appended objects and just run the script:

import bpy

C = bpy.context
D = bpy.data

for old_gp_obj in C.selected_objects:
    if old_gp_obj.type == 'GPENCIL':
        # Create new gp object based on the old data
        new_gp_obj = D.objects.new("{}_converted".format(old_gp_obj.name), old_gp_obj.data)
        # Copy transforms
        new_gp_obj.matrix_world = old_gp_obj.matrix_world.copy()
        # Get and link to collection
        old_gp_coll = old_gp_obj.users_collection[0]
        old_gp_coll.objects.link(new_gp_obj)
        # Hide old object in viewport
        old_gp_obj.hide_set(True)

Notice that old objects are hidden after running the script.


Assigning two shortcuts for the same action I'd like to assign two shortcuts to the undo action in blender 2.8 (ctr+z and middle mouse click) but I failed as it seems only one at time is possible. Is there any way to do so?

There is a way, but it's a very bad idea
You should not do it. Middle click is used too much to practically change it and retain important functionality in Blender's keymaps.
You would have to add a new entry here in the Preferences(F4 -> P), Keymap tab, under Screen, Screen(Global):

But you would also have to search for and remove all the conflicts:

That would break stuff.
This would be a very bad idea.


Why is the view header showing triangle count when my mesh is all quads? I know for a fact I don't have any tris so this thing is wrong, however, I notice that it's the same number as edges. I also find it hard to believe I only have 2 more vertices than I do faces. It takes 4 vertices to make one face and after that 2 for every adjoining face.

Without getting too technical, in 3d, there is no such thing as a true quad. Quads and ngons are mere abstractions to make objects easier to manipulate (imagine modeling a car or face using triangles only). At the very core however, every object is comprised of triangles. Blender and other modeling packages abstract these away but they are there.

You might have seen proof of this if you've ever badly transformed a face for example, if you were to paint all 4 vertices of a plane and move a vertex out of place, you will see evidence that there is supporting geometry somewhere holding that "quad" together.

To test, just add a plane and check the header again, you will see that it shows 2 tris, this is accurate because a flat plane in its simplest form is two triangles. If you were to cut it diagonally with say the knife tool, it would still show 2 because now it is still 2 triangles.

Now if you were to create an actual triangle, it would show 1.

In a perfect sphere without any actual triangles, say a cube morphed into a sphere (by subdividing and using To Sphere AltShiftS), the amount of triangles will always be twice that of faces, because remember, by default a quad is 2 triangles.

This might not be the case for edges however, that count depends on how uniform your object is, toplogy etc.


How the Normal Map baking works, what is the ray direction I've gone into some trouble understanding how the ray shoot out and the size relationship between the high and low poly mesh, below is my understanding,

But which one is right? From the menual it says the ray is generated from the low poly inwards to the high poly, then I suppose the first illustration is not right, because it points outwards.
The second illustration, the middle section should been working properly, but the left and right section has no high poly surfaces to point to, because it is starting point is inside the high poly, I searched and found someone says I can set the ray distance, then setting the distance won't change where the starting point the ray started, am I right?
The last one is I think how it should work, by having the low poly encapsulating the high poly, but I still needs some basic understanding how blender works with Normal map baking, thanks!
Edit:It turns out the ray will travel in both direction as opposed to what the Doc. says towards inwards.

The above shows the low poly has a cube inside and sphere outside, both have been reflected on the low poly cube.

So first, let's make sure we define what "inwards" means.  I'm going to say it means in the opposite direction of your low poly's normals.  So if we were to draw your low poly's normals on your graphs above, the normals would be pointing upwards.
As of 2.91.0-ish, rays are shot in the opposite direction of the low poly's normals-- that is, inward.  Rays that fail to intersect cause 0.5,0.5,1.0 to be written (which is the same thing as saying, using the low poly's own normals.)
My memory of this in earlier versions (like 2.79, 2.80) was that rays were shot in both directions, but you would still want an enclosed high poly, because rays shot in the direction of the low poly's normals would hit the backfaces of the high poly rather than the front faces, and you'd get screwed up normals.
"Ray distance", just a version or two ago, referred to what is now "Extrusion."  This means to start the rays offset in the direction of the low poly's normals.  It is exactly the same as baking from a displaced low poly, or baking from a cage with a numeric shrink/fatten operation applied to all vertices.  To be explict, this does change the origin of the rays.
"Max ray distance", as implemented a version or two ago, means that Blender will just discard results that arise from intersections greater than a certain distance.  I'm not really sure what the intended use for this is, although it can be useful for some texture baking situations that are selected-to-active bakes but couldn't reasonably be described as high-to-low bakes, like baking text objects to a texture or something.  This does not change the origin of the rays.


Why are objects rendering black even with texture (both cycles and BI)? I created several objects, applied its material with a texture. When I render the scene it all render nicely except one. It renders black both in cycles and BI. I have tried everything. I don't know whether I have missed something or not But I'm not getting the result properly. What is the solution to this 'rendering black' problem?

You can fix it by adding an attribute node to assign the UV map you intent to use:

I made minor changes in the node editor:


.remove from list not working as expected Hey I am trying to remove anything that isn't a mesh or curve from a list and it is missing items, does anyone know what I am doing wrong? For example if I add 3 sun lights I would expect it to remove all 3 from the list but it removes 2.

import bpy

selected_objects = bpy.context.selected_objects

print("-----------------------------")
print("List len before: " + str(len(selected_objects)))

for obj in selected_objects:

    if obj.type not in ['MESH','CURVE']:
        selected_objects.remove(obj)

print("List len after: " + str(len(selected_objects)))

The problem is that you are changing the list that you are reading. For example, consider the first one read... you delete it, shuffling the second item into the first ‘slot’. However, next time around the loop it is the second item in the list that is picked up - which was originally the third since they have now all shuffled up - so each second item slips through the net. There are various solutions to this - such as processing the list backwards or building a list of items to delete on the first pass and removing them after all items have been processed.

Try :

for obj in reversed(selected_objects):

    if obj.type not in ['MESH','CURVE']:
        selected_objects.remove(obj)

Another option is to use a copy of the list for the loop - rather than the list itself - by using '[:]' to indicate all elements :

for obj in selected_objects[:]:

    if obj.type not in ['MESH','CURVE']:
        selected_objects.remove(obj)

This would allow you to process them in the original sequence but since the loop is acting on a copy of the original list it is not affected by the removal of objects from the list.


How to export a sequence of images as a video file in Blender 2.8 I'm using blender 2.8 and on the video sequencer I added an image sequence of an animation I'm making. I now have a strip and I'm happy with the result. How do I then export it as a video file?

Go to the Output Tab in the Properties Window. You can specify your output formats there, video included.


Edging alpha texture viewport Blender I'm having difficulties to understand what happens with textured models using alpha textures in Blender's viewport.

As exemple,I have a fence made of a grid (which is an alpha texture), or some trees with leaves, using as well obviously alpha textures. And all the time, I have edging around my models...

Unless I select my model ! Indeed if my model is selected, I don't see anymore these edgings around my leaves, grids and etc..

Why ? And how to solve it !?

Well, finally, I I've found the way to "solve" it, if that could be called really an issue... It's true that Blender display badly meshes with alpha material if the map is low quality or small when I'm in the "Blender render" mode, well from what I've tested, that's what I've noticed...

However here, as I'm working with low poly assets and small maps, I just switched to "Blender Game engine" render, and by pressing "P" to have a preview of the "game", I don't have anymore those artefacts... There was as well the fact the shader was set in the shading tab to "shadeless" ! Unchecking this, is also important, even thought in this case I really want the shader to be shadeless...

Sorry for my ignorance... I guess you didn't think about that because that was too much simple...


Advanced UV unwrap and bump map / displacement problems First post here! I've been searching and searching and can't find a solution to my problem.

So basically I'm wanting to model myself a ring with the surface of the moon on it.

So the first route I thought of was to try and UV map the top surface of the ring then I could maybe use a bump map to get the geometry I want. But when I tried to unwrap using the follow active quads it didn't unwrap in a uniform way allowing my to get a realistic surface of the moon.

So I then tried separating the surface that will have the moon texture on and tried applying a displacement modifier, but cannot figure out how to get control over how the image is stretched and hence displaced on the surface.

I've watched hours of tutorials to no avail and would really appreciate some help on firstly the best way to achieve my desired results and secondly how to get around my problems!

I think I've done what you appear to be attempting and using of all things a moon map texture designed to be unwrapped on a sphere, certain I'd have the same problem.

I UV unwrapped it using 'Smart Unwrap' and got good results albeit with one section showing an annoying area at repeated intervals.

Because this was aligned along the ring's circular surface , I went into the UV editor and rotated the image 90 degrees.  Then rescaled and dragged all the outer surfaces in the editor to eliminate that pattern.

The end result -


Scale keyframes for multiple objects with a script I have N objects in a scene and each has baked keyframes on some frame_start, frame_end interval.

Can anyone help me to write a script to scale keyframes for all of the objects along x axis and set interpolation type to constant. I cannot find an appropriate function to scale that programmatically.

thanks

I found a solution, however it resizes keypoints around arbitrary point.

old_type = bpy.context.area.type
bpy.context.area.type = 'GRAPH_EDITOR'
bpy.ops.graph.interpolation_type(type='CONSTANT')
bpy.context.scene.frame_current = 1
bpy.ops.transform.resize(value=(6, 1, 1))
bpy.context.area.type = old_type


control the rotation of the particle instance to face to camera Hi i want to create a lot of tree using particle . I create a master tree where it's just a simple plane and i used a tree image (with alpha channel) as the material. Then i create another plane (as ground) and apply particle system modifier and select my master tree as the instance object. Now i want to contol the rotation of the instance to always face the current camera position. is it possible ?

Thanks CG Boost: https://www.youtube.com/watch?v=aLVodLos41Q

Here is a summary:

Create an Empty that you parent to your camera but placed far away behind it on the local Z axis. This will be used to lock the particle source orientation that will "look" at that general direction

place the source particle object somewhere in the middle of where most particles will be (in the middle of the forest)
Add a Track to Constraint to the source particle object, use the empty behind the camera as target
Add a Limit Rotation constraint to the same object to keep it strait.

This way, generated particles should all face the general direction of the camera as long as the empty is far enough behind it.

Also if you have trouble with your source object in the middle of your scene, just put it on a difference scene along with a linked duplicate of the camera.


What are the files in the /tmp folder and can I delete them? I know that by definition "tmp" means "temporary" and that therefore, these files might not be necessary for blender to function.

I can see that some of them look like automatically saved copies of my projects because of their naming.

However, certain files such as the one with a little "forbidden" sign seem to hold some kind of importance so I thought I'd ask...

To expand on cegatons answer - /tmp/ is the default location for some data paths unless you change them.

The main one is the render output, unless you change the output filepath before rendering, your renders will be saved to tmp. Changing the output path before saving your startup file will prevent any renders going into tmp.

Simulation cache files can also be saved in tmp. While most prevent saving of external cache data until the blend file is saved, the fluid simulation will save it's cache files to tmp if you haven't saved the blend file first. If you then save the file, the path will still point to data in tmp instead of moving the data to where you saved your blend.

The ocean modifier is another that will store it's data in tmp if you haven't saved the file before baking the simulation.

If you save your blend file to disk before starting any simulations then the data will first get saved within the same folder as your blend file.


Texture seen in viewport is paler compared to the original texture Issue:

My textures in the viewport look darkened or desaturated when compared to viewing it in the UV window.
Should I adjust the colors of the texture?  or is this a a Blender issue that can be solved with some settings? My goal is to make the viewport 100% reflect the colors of the textures.
Is there a solution to this?

You are now in the viewport shading - material preview. So your color depends on the lighting you have chosen here. You can change your lighting by tapping on that shading button.
Then choose another lighting you like by tapping on the sphere.
You can even import your own .hdr lighting by tapping on that gear icon.


How do I write a function that changes current frame to 150 if current frame is 250 I've a script that starts render animation from frame 1 to 250, I want a script that changes the current frame to 150 when it reaches 250

I'm trying to write a function that changes current frame to 150 if current frame is 250

here's my code:

def stop_playback(scene):
    if scene.frame_current == 250:
        bpy.ops.screen.animation_cancel(restore_frame=False)

bpy.app.handlers.frame_change_pre.append(stop_playback)

bpy.ops.screen.animation_play()

    def change_frame():
        if scene.frame_current == 250:
            bpy.data.scenes["Scene"].frame_set(150)

        change_frame()

here's my console output:

>>> def change_frame():
...     if scene.frame_current == 250:
...         bpy.data.scenes["Scene"].frame_set(150)
...
>>> change_frame()
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "<blender_console>", line 2, in change_frame
NameError: name 'scene' is not defined

Scene.frame_set(...)

All handlers take a single argument, scene. In some handlers, load for example, the scene argument has value None in which case is often referred to as "dummy"

import bpy

def skip_playback(scene):
    if scene.frame_current >= 250:
        scene.frame_set(150)

bpy.app.handlers.frame_change_pre.append(skip_playback)

The scene in the handler is the scene being "handled"..  Using a data reference like bpy.data.scenes["Scene"] is a slippery slope, when there is no scene named  "Scene" or there is another scene's handler will set its frame.

Similar functionality could be achieved by setting the scene frame start and end, or preview start and end.

On your error, it is a basic syntax error in that you have not defined scene in the change_frame method.

I would recommend, when you are new (or not) to python,  when you get an error you don't understand make a search for "Python NameError"  (based on the error type NameError in this case)


Filling objects into a container: it's taking a while I tried making small objects fall into a container in Cycles, but by doing so when hitting the Animation Player feature, it just seems to take a while and like a long time. Is this normal in Blender? If there is a problem on the other hand, is there a way to make it go faster when making them fall into the container?

What are your computer's specifications? Generally, it's pretty common since the physics calculations require extensive computation. You should bake your animations so you can play it a bit faster. More info https://docs.blender.org/manual/en/latest/physics/baking.html


Why is my alpha texture repeating as a triangle shape? I've been designing a 3D intro where a logo, split up into 64 squares, comes out of the bottom smoothly. I used an online tool to split up my logo into 64 squares. For example,

 is the top left corner piece. I added this as a texture and made a material, but for some unknown reason, it displays like this:

If anyone knows how to fix this, it would be greatly appreciated. Thanks

Never mind, I figured it out. Under the Mapping submenu in the Texture pane, the Coordinates need to be set to Generated. It then appears normally, like this:

Hope this helps.


Getting Euler rotations for an object and exporting them Currently I have add-on that gets rotations from an object, converts angles into a matrix and saves it in a particular format into a text file.

This is what code for that looks like:

rot = tuple(chain(*obj.matrix_world.to_3x3().normalized().transposed()))

dump += ['"rotation" "{}"'.format(" ".join(str(r) for r in rot)),]

self.write(self.filepath, "\n".join(dump))

I also need to have Euler angles written after "rotation" in the following format:

"angles" "Y Z X"

Where Y, Z and X are angles in degrees.

How would I do that, following analogy with rotation matrix ? Thanks.

Should be as simple as:

from math import degrees

"{:f} {:f} {:f}".format(*map(degrees, obj.matrix_world.to_euler()))
# '-90.224203 -10.379210 -11.433244'

to_euler() converts a matrix to an Euler object, with order XYZ (regardless of what is set for rotation_mode). The angles are given in radians, but they can be simply converted to degrees using math.degrees().


Text on a Curve>Mesh I would like to put the text on the jacket of cable I have rendered. As the Cable itself starts off as a curve which is then converted to a mesh, I need a solution to place it on the mesh and follow it

Just unwrap the black cable and add the text as an image texture.

Add seams to the cable - two around (to cut it from the rest), and one straight (to make it flat).
Connect and position the image texture (either by moving the UV or using the Mapping node)
Done.

You'll need at least three seams here, to unwrap it flat.


how to hide green pyramid of group objects handler when I handle group objects, green pyramid disturb me.
how can I hide these?

 https://gyazo.com/a8af6ff8d9810c374d0d4970e1bc3fe9

https://gyazo.com/d5fd3cfed539194daef6625d436c25f9

What you call "group objects" are in fact called Group Instances. They are objects using the Dupligroups feature to instance a group definition.

Any object can do that, but by default Group Instances are inserted in a scene as a Empty object type. Besides the group they are duplicating Empty objects can have a virtual representation in the 3D scene.

It can be one of several predefined shapes, and its size and settings can be controlled from the Object Data tab in the Properties editor.

What you are seeing are the arrows represeting these Empties. Either reduce the size of the empty display, or change it to something else that doesn't get in your way.

In the Properties Window > Object Data> Empty adjust the empty display settings.

Change it to either Plain Axis or something else that suits your need. Also reduce the Size property


Need to render a VERY HQ 2.4 meter tall image Need to render a VERY HQ 2.4 meter tall image for print. How can I achieve this without my computer exploding? :)

Thanks
Logan

For print a 2.4 meter billboard you are absolutely don't need it to be in "HQ". Check this answers here.
You don't have to render all in once - you can render layers and then compose them. Explained here
I can presume that if you rendering a work for this kind of printing, you will have to make some post-production work - color correction, text layout etc. So the right workflow is to render the elements you need in blender and than combine them in your preferred editor, trying to make minimum layout work in blender.


Modeling gas lamp pipes I am in a bit of a pickle at the moment, as I can't seem to make those tubes look how they should. I tried extruding from the bottom part of the lamp to try and create a curved tube but it just doesn't look right. Any ideas?

Clearer reference:

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

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

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

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

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

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


Weird UV artifacts in final render In preview render (with enabled RenderLayer) it looks ok:

But in actual final render something strange happening with UV map:

I tried to reunwrap mesh, change sample count but result is still the same
What should I do?

Problem's solved! I've forgot about hidden array modifier, which is appeard in render and overlapped wall :)


Extruded sphere has loop with no normals - how to fix? I've extruded a sphere which I later deform with a shape-keyed lattice. All's well, except that when deformed, I see a discontinuity in the shading. Inspecting the face normals, I see the following:

You can see that there's a loop which has two odd characteristics:

It has both edge and face markers;
It has no normals (and they're not just pointing the other way, they really appear to be absent).

Selecting everything and recalculating the normals had no effect.

If I select an edge segment along that loop and delete the edge, one of the adjacent faces gets deleted too.

I think this is an edge from which I extruded to lengthen the tube.

How can I repair this loop?

I just created a similar object by extruding from a circle,dragging upwards then extruding and not dragging, then extruding a third time and dragging up.

The resulting ring of faces with no surface area I removed by selecting All then going to the Tools panel > Remove > Remove Doubles.


Rotate a group of 6 objects to align 3 points (each on a different object) on a plane I have 6 rectangular blocks that I want to rotate as a group so the bottom 3 vertices (each are on a different block) end up on the same plane; in this case the global X-Y plane. How can I do this?
See picture below.

I am completely new to Blender, so please be clear with the steps.

Select all blocks and enter edit mode (TAB), change pivot point to active element.

then enter vertex select mode (number one on horizontal numbers on keyboard above Q)
Select all verts and click on one of the bottom verts so you have that one as active. Press 1 on number pad (right numbers). Use move tool (G) and right after press Z to move blocks down to where you want. Now while still in front view (that you set by pressing 1 on number pad) press R to rotate your blocks until one of the other 2 verts are aligned with the plain. Then switch to side view (number 3 on your number pad) and rotate again until 3rd vert is aligned


how to fix normal of a shader after scaling with a factor of -1 I am making a door made of two sliding panels (I have simply made one panel, duplicated it and scaled it by -1 to make the second one)
As you can see, the flipped one get a weird color, I guess it is due to something happening with his normal when I scaled it by -1

Here is the same panels but without the normal map linked in the node editor and they look similar. I have also applied the scale of the object (the two panels have a scale of 1)
here is the simple node I use for the normal.

any idea how to fix it?

First set your normal map to be non-color, then apply scale on the copied door and recalculate it's normals (Alt+N in Edit Mode)


Why wireframe thickness changes in edge mode? I didn't change standard theme
But in edge mode, wireframe changes it's thickness.
I don't want that to happen. I need one thickness for all modes. How can I do that?

Swapping between the different edit modes changes the look to show you what you're editing. Vertex select makes the points thicker, face select will highlight faces, and in your case, edge select makes the edges thicker.

It's purely UI based, the actual thickness of your edges is not changing. Renders won't look any different.

To display the same thickness, use the Viewport Overlays menu.


.obj export - moving the origin I'm having trouble with the Wavefront .OBJ export script (using Blender 2.69). I can't seem to affect the origin of the exported vertices.

I've seen other threads suggesting the origin is that of the scene/world, but as far as I can tell the origin seems to always be the centre of the object's bounds. This makes it difficult to position objects in the game I'm developing because I'm never sure where exactly the origin is.

I have tried the following:

Tweaking all the export settings
Moving the object's origin around
Moving the object around in the scene (inc applying transformations)

All of the above have no effect on the exported vertices.

Any help would be much appreciated; thanks.

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

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


Can't change mouse influence in proportional editing mode I press O and I see it change to Proportional Editing mode, but when I press G and mouse wheel down/up, or arrow keys down/up, it doesn't change the influence area.

"You must press PgUpPgDown or use the scroll wheel during a transform action such as Translate (G), Rotate (R), or Scale (S)."

And I am, I press G and then I tried to scroll to change influence, but it's not working.

To make Proportional Editing work on the mesh you need to change pivot point from Individual Origin to Median Point.

Done this aswell and it's not working

I'm adding an answer here because effected users might overlook what is written in the comments:

If you're working with large scale models to scale (say at a distance 100Km), the influence radius will likely be too small for you to notice, even if you scroll multiple times. When you grab (G) a vertex or edge, press the page up key and keep it pressed until the scope starts to become visible. "proportional size" at the bottom of your 3D view might appear to not change, but it eventually will.

Hope this spares another soul some misery.


Cycles is texture stretching and not applying scale correctly I've been wrestling with this for hours now, so I've finally succumbed to posting for help.
What I'm trying to do seems simple enough - I want to create a texture that I can use in various different geometries in my scene with a consistent scale, rotation, location etc.
I've searched all the avenues I can think of for similar posts, but nothing seems to solve my problem.
I'll illustrate it below.

So it was suggested on one post I read to use the mapping coordinates node, but I've played around with it in multiple different ways, and it doesn't seem to achieve what I'm after, and I believe it is actually a problem with the geometry, as I will illustrate below.

I created a few different cubes, and have applied smart-uv's, and applied scale, loc and rot to them in various intervals to show what I think the problem is.

As you can see from the images above, applying scale etc doesn't seem to effect the size of the texture EVEN after resetting and redoing the smart-uv's.

The following few images just show what the result of changing the mapping vector is (Edit: I couldn't attach all of them sadly, but I did try almost all the options available on blender). Again no success.
I've also tried changing the image texture from 'flat' to 'box' - again to no avail.

Any help would be massively appreciated. I'm hoping that I've just missed something obvious!

Many thanks in advance,

Chester

EDIT:
Here is how it looks with the texture coordinates and mapping node. All the objects that it is applied to have had their scales etc applied and all UV maps deleted.

I've created another scene, with a new material and the problem is the same. Very odd.

Try connecting your texture coordinates node to the mapping node like below. Then you dont need to worry about UV's at all.


Needing help with Vaporwave inspired Illuminated grid (Eevee 2.8) I've been following this tutorial https://www.youtube.com/watch?v=FTdEtf1YTTI
I got to the part of 4:11 but what I'm getting as a result is not the same as the video. I cannot create an illuminated grid using a simple shade mixer node... It shows up pink and half-filled. I believe there was an update that happened from the date of the video until now. Forgive me since I am fairly new to the program but trying to learn. Help is appreciated!

What I'm aiming for is this (underneath)

Eevee currently seems to have issues with the wireframe node, in cycles it seems to be rendering correctly.


How to save cut video as a video file in Blender 2.92.0 As the title says. This is similar to this answered question, but before marking it as a duplicate please note there's a problem with that post: it is outdated.
Basically, all existing answers that I found on various sites refer to pressing some Animate button as a way of triggering the process of saving to a file, and the button has disappeared. On the current interface the most similar one I found is Render → Render Animation at the top menu, but all it does is creating a new window with a playback, which has no obvious way of finally triggering the save to a file (and I also found a Sequence Render Animation menu elsewhere, which seems to do the same thing).
I've been searching for about two hours already, and I'm kind of becoming desperate at this point. I find amusing that Blender even has a documentation about setting up a video output, but it lacks the most crucial step: how to make those properties result in an actual video file.
For reference, below is a screenshot of the current interface.

At the top-right half of the window you can see a panel with video output settings: a codec, a quality, and most importantly there's an output directory. But whatever I do in the program, the output directory is always empty.

I found it! Turns out, it is the menu Render → Render Animation: it makes a window pop up, and after that window finishes playing, a video file appears.
But as I mentioned, I tried that menu and it didn't work, right? So why wasn't I finding it? Well, turns out when you set up the output directory for a file, you must end it with a slash. Otherwise the last /-separated chunk of the text would be interpreted as part of a resulting filename. Which means that if I wrote a path /tmp/foo (expecting the file to end up in the /tmp/foo directory that I created), then it saves to a file like /tmp/foo-SOME-POSTFIX.mkv, and I had too much stuff in my /tmp directory, so I simply missed it.


How to draw normal map? How can I draw (not bake) normal map over my model, like a texture in texture paint mode? Render cycles.

Thank you in advance!

It is easier and more intuitive to paint a height-map, then convert it into a normal map:

There is GIMP normalmap plugin, Photoshop plugins like xNormal, apps like CrazyBump and a lot of others. These all can do the conversion. Also, it can be done through Blender Baking.

If you already have a normal map, and you need to add to it, you can combine normal maps with overlay blending operation - generally it is ok enough but note that it is not the correct operation - more on combining normal maps is here: Blending in detail.

You can also paint directly into normal maps:

you can erase with RGB[128,128,255] brush
you can average with ordinary Soften (smooth) brush
you can smudge with Smear brush
you can paint with a special texture brush:

create a brush height texture that you want to paint with
convert to normal map texture

paint with this texture in overlay mode. It will be like sculpting, but on a texture. The brush color must be white, spacing of strokes very low and strength of brush also low


Blender 2.8 How do I set object/collection active and apply my script for each of collection's objects in via python? I have a collection of leaves in my scene which calls Lines:

Here's a little snippet that creates another leaf from leaf and randomize it:

bpy.ops.object.duplicate()
rotateX = round(uniform(-20,20), 2)
rotateY = round(uniform(10,50), 2)
scaleX = round(uniform(0.3,1), 2)
scaleY = round(uniform(0.3,1), 2)
scaleZ = round(uniform(0.3,1), 2)
bpy.context.object.scale = ( scaleX, scaleY, scaleZ )
bpy.context.active_object.rotation_euler = (radians(rotateX),radians(rotateY),radians(-90))

And here's a brief look of what my script does

From:

To:

My goal is to apply my script to other leaf objects, so I can easily  generate a little procedural garden with random leaves.

I'm pretty new to blender, and I don't know of it's possibilities, and how powerful it is.
If you could suggest a better option or way to solve my problem I'd be grateful!
May be it's even better to use particle system, and if so, how do I randomize the scale and leaf shape if it was generated by particle system?

I want to achieve something similar to this: https://imgur.com/a/uGRNtyF

^ here I manually select and make objects active to apply my script on them on by one, but I want a script that does it

Here is a little commented script to iterate over a collection and populate a second one from copies of the meshes of the first.

import bpy
from math import radians
from random import uniform

# get an existing collection or create it if it does not exist
# if created, the collection is added to the scene main collection
def get_or_create_collection( scene, collection_name ):
    collection = bpy.data.collections.get( collection_name )
    if collection is None:
        collection = bpy.data.collections.new( collection_name )
        scene.collection.children.link( collection )
    return collection

# duplicate an object and link it to a collection
# copy_data allow to know if the objects will share their data or not (are dupli or not)
def duplicate( obj, collection, copy_data ):
    new_obj = obj.copy()
    if copy_data:
        new_obj.data = obj.data.copy()
    collection.objects.link( new_obj )
    return new_obj

# get the scene
scene = bpy.context.scene

# names of the collection
source_collection_name = 'Collection'
destination_collection_name = 'Collection2'

# get the source collection
source_collection = bpy.data.collections.get( source_collection_name )

if source_collection is None:
    print( 'will not work' )
else:
    # get the destination collection
    destination_collection = get_or_create_collection( scene, destination_collection_name )

    # enumerate mesh objects in the source collection
    for obj in [o for o in source_collection.objects if o.type == 'MESH']:
        # get a copy of the object
        new_obj = duplicate( obj, destination_collection, False )
        # ** Make your random transforms here **
        rotateX = round(uniform(-20,20), 2)
        rotateY = round(uniform(10,50), 2)
        scaleX = round(uniform(0.3,1), 2)
        scaleY = round(uniform(0.3,1), 2)
        scaleZ = round(uniform(0.3,1), 2)
        new_obj.scale = ( scaleX, scaleY, scaleZ )
        new_obj.rotation_euler = (radians(rotateX),radians(rotateY),radians(-90))


How to use blender to create a grid cylinder? I’m new to Blender, but pretty experienced with other 3D software.
I need to create a mesh cylinder.

One of   procedural ways to create the cylinder and have its topology consisting of even quads is array a plane to create big plane and bend it afterwards.

Add a plane, rotate it so it's oriented up (along Z axis). Put its origin point in the corner (snap 3D cursor to selection when that vertex is selected and in Object mode use Origin To 3D Cursor).
Start adding modifiers, first will be Array. Set it to array along Z axis (if using default Relative Offset set value of 1 to the Z axis in the modifier options). Set number of iterations so that the height of final result is as height of desired cylinder.
Add another Array modifier and set this one to array along horizontal axes (in case of screenshot X). Set number of iterations to number of edges of cylinder.
Add Simple Deform modifier. Set it to Bend mode, then enter value for Angle to 360 degrees.

The modifier stack in this case is

Otherwise you can add a cylinder, enter Edit mode and use Ctrl+R to add loopcuts along its edges. This will be destructive change to geometry.


How to use the age of a particle to change a modifier of a particle itself? I would like to know if there is any simple way to use the age of a particle to drive any parameter of the particle itself. For instance, Assuming the particle to target an object with modifiers, I would like the age to change a parameter of one of those modifiers.

Using the shaders nodes, we can easily change the color depending on the particle's age.
We can use a texture to change the size of the particle (despite I find this a little cumbersome and counter intuitive).
I tried using AN (animation nodes) but I only found a way to change the location or forces or only one particle.

I am pretty new to blender, I know we can use scripts and drivers but I never made use of them.
[Edit]
Okay I found this solution using AN
It might be possible to then modify the data path's value of any particle's instance.

A simple way I just found is to use animation node (here version 2.1.8) and to loop on the particles object. Here is the graph I made:

Note: this is only a minimal setup to have something working (the result is not really useful/pleasant for a real animation), also for some reason I am unable to set a modifier into the "Object Data Path Output > Path" field. Only object specific data are working.
My scene only contains a cone for the particle and a cube for the emitter.


Smoke simulation not working in Blender 2.77a I understand at least 100 people have asked this question before. I am going to be as specific as possible and provide a screenshot. I used "Quick Smoke" on a circle with an Ngon fill type. Nothing shows up. I stretch out the cache and the maximum frames available, it simply does not work. Rendered mode for internal and cycles, nothing shows. If anyone wants the .blend file, here, I will provide it, but I have no idea what I am doing wrong, and I am using an integrated CPU.

http://www.pasteall.org/blend/41482

What is missing or incorrect here? Any ideas?

Smoke starts after it has gone through all keyframes, you have yours at 10000, that will take a long time. Set the max to 100, press play and wait for it to start, then change it back to your desired amount. Oh, the top panel of your mesh behind the sphere's normal is inverted. :)

EDIT: And, as cegaton said, the domain has to be a domain object.


How to draw a cylinder with an irregular cross section, which varies along the cylinder length? I want to draw a cylinder which has a different and irregular cross section along the cylinder length, with precise measurements

?

At each angle the cylinder has a specific radius, therefore the cross-section shape is nor regular. (like the figure)

If you need to work in micrometers, it is better to select None as the Length unit and just keep in mind that the scene unit is micrometer, because Blender starts malfunctioning  if you try to scale units to that size even if you do that with unit scale value:

It is easier to create the cylinder then it may seem. We could use vertex slide functionality(shift+v) to quickly and easily specify the lengths of the radii. Vertex slide works proportionally to the edge it slides on and we want to enter units instead of proportions during the slide operation, so let's adjust the proportion to match the units by making a circle that would have a radius of 1 unit. Once you have the circle, enter edit mode (tab) select the edge loop and extrude it(e), scale it in a bit (s), extrude again and merge the loop to center with alt+m. Now you can take the vertices one by one. Slide every  vertex (shiftvv) to the center, slide it again, hit c to clamp it to the path so it can go further than the edge loop marking 1 unit, and enter the units before confirming the operation with a mouse click. Repeat this for all vertices around, once you are done, you can delete the 1 unit mark edge loop, select everything and extrude:


Screw modifier not working perfectly Has anyone had problems like this?
just previously the modifier works fine but just take look at this

:(

Make sure you apply any previous transformation to your curves/mesh (in Object Mode) with Ctrl+A, in my case, X axis was scaled to zero so naturally it became flat.

I did not realized this all the while thinking the only transform I did was in edit mode.

Hope that someone find this helpful as well :)


How to join group objects into one I have imported and duplicated a mesh from a group instance. But now I have many of them on my list under scenes tab. How can I put them all in one place( like a folder , to select them all at once).

If you just want to organize them conveniently, you can simply group them into a new group (or several, if needed). To select all objects within a group, first, switch the Outliner's Type display mode to Groups, then click on the icon(s):

If you want to remove them out of those empties, you can press Shift Ctrl A to make all selected duplicates real, instead of instancing:


Translate track marker 2d position to empty in 3d space How do you transform a track marker to a empty in 3d space?

I only need the 2d position relative to the camera's view.

For the one who didn't see the video in comments:

Reconstruction > link empty to track


mesh doesn't follow armature correctly - bones outside the mesh I set up the armature and weight painted every bone and everything seemed to be fine but the mesh doesn't follow correctly. it moves, but not as expected. (it seems to move too little)

I tried to fix vertex groups manually. There  is just one Armature Modifier.
I really don't get it :(

here is my blend file: http://sta.sh/0edcqulrf04

I think the problem is that your weights, give influence to the movement of that part of the mesh (an arm of the creature) to two different bones:

So, afaik, the end of the arm, being influenced by two different bones, is a "compromise" (or more properly a "blend") of the position of the two involved bones.

I roughly tried to correct the weights of the first image:

and you see the mesh now behaves better, hopefully?

(btw the other arm of your model already has a similar setup and the mesh moves like expected)


Hair Comb not working I'am trying to make a rug with all the simple particle rug settings. I want to comb the hair with particle edit but whenever i enter particle edit mode, my hair settings all distort up.
This is what it looks like in object Mode

Right when I enter edit particle mode, this happens

Getting out of particle edit doesnt fix this and i have to undo everything. I only need to comb the hair. Please help.

Delete any "custom NORMALS" / VERTEX GROUPS on your object properties. Delete any other irrelevant information (this is caused by a smooth group from other software).

Also check you don´t have UNchecked the EYE icon and the EDIT icon on one of your modifiers. This is the reason why you see something in Edit mode and then another on Object mode.

Last but not least, like it´s been mentioned, you have to CTRL+A your rug to apply transformations.

Thank you if you vote my answer.

BFCT_Schiller.


Baked normals not calculating gradient smoothly when using a depth map I'm currently trying to bake normals using a depth map generated from a rigid body simulation I did featuring a few hundred coins -

The problem I'm encountering which I wasn't able to find anywhere else (potentially because my approach is flawed) is the presence of these noisy lines that run across the gradient of coins which don't lay flat, as seen here -

Baking the depth at a much higher resolution and baking the normals again doesn't eliminate the artifacts and only makes the lines more defined with the added detail—manually painting out all of these lines is obviously not an effective solution, and I'm interested to hear if there are ways of baking the normals without the presence of the lines that very obviously catch the light when applied to a surface.
I figure that the approach of converting a depth map to a normal map in this way may be fundamentally flawed and that's why I'm potentially running into this issue, but I'd like to hear any potential solution from anyone who has more experience in the area of baking. Thanks!

Your saved image doesn't have enough color informations.
Save baked pass in OpenEXR format that can save information in unclipped bit depth.


How do I determine Shift+Left Click modal operator? I would like to determine if Left Click + Shift pressed at the same time in event.type in a modal operator. I also want to treat Left Click itself as a separate event.type than one with the Shift.

I looked around and I can t seem to find an answer. I am wondering how this is done properly.

I may be wrong.. but this is my understanding (and it seems to work for me):

There is nothing as simultaneous with the events. Even if you press shift and click simultaneously, there are actually four separate events. 1) event.type = 'LEFT_SHIFT' with event.value = 'PRESS' 2) event.type = 'LEFTMOUSE' and event.value = 'PRESS' 3) event.type = 'LEFT_SHIFT' & event.value = 'RELEASE' 2) event.type = 'LEFTMOUSE' and event.value = 'RELEASE' (the order might change depending on what comes first).

There is also a CLICK event.value available for LEFTMOUSE event.type that combines PRESS and RELEASE.

So, to answer your question, you would basically need to store an instance variable like self.shift and set / reset its value on event.value == 'PRESS' / event.value == 'RELEASE'. You can check in your function whether with the mouse press event occurred when self.shift was True.

If you figure out a better way to do this, I would be interested to know :)


I want to combine several textures... Bump, displacement, diffuse, specular but I don't know the node combination. A screenshot would be nice I have 4 textures. Bump, displacement, specular and diffuse. Please what node combination would help me get the best render for this mixture. A screenshot after the node setup would be nice.

If i understood the question here the answer

With the powerful addon Node Wrangler in built in Blender you can set the node automatically.

Make a folder and paste all the images (Bump, displacement, diffuse, specular).

With the Principle BSDF Node selected Press Ctrl+Shit+T

A pop-up which need to access all the images made above folder. Select all (Press A)

Press Principle BSDF Setup and your done . Render it with F12


Apply texture to mesh that has been extruded I'm super new to blender. I'm trying to build a room and I am trying to apply a texture to one of the walls. I had to extrude this wall to get it to the right size, so there's a few edges/faces that make up the entire shape. If I try to apply a texture, one face is textured differently than the rest of the faces.

If you see here, I have the entire plane selected, but the UV editor on the left only slected a portion of the texture. I have no idea why, so that's why I'm asking you guys how to fix this.

So you can see here that the bottom of the wall looks different from the rest of the wall. Can anyone here help a noob out?

If you make a change to your mesh you will need to UV Unwrap it again.

In Object Mode Apply the Scale Ctrl + A > Scale.

Also, you could use the Project From View method of UV Unwrapping since it's flat. Just make sure your looking at it straight on.

A quick tip on Modeling the wall: Unless you plan on extruding "out" geometry your mesh would be much "cleaner" if, in Edit Mode,  you just selected the bottom two vertices (or top two) and pressed G + Z to grab them and move the only on the Z Axis. Then your left with a simple rectangle. If you Extrude the mesh down you are creating extra vertices and in complicated models that will increase render times unnecessarily.