How do I connect a bone to another bone via python script I'm trying to make a chain of "segments", meaning I have 3 bones in a setup and I'd like to replicate them along the z-axis. I use a for loop to duplicate the entire armature, my object and then rename the bones of each segment. Which works best for vertex groups assignment.

I then use CtrlJ to join the meshes as well as the armatures. When I go into Edit Mode for the mesh, I can just use Remove Doubles to connect the pieces, but here is my problem:

When I join the armatures, I have a chain of bones that are not parented, so I was trying to find a method that does something like this:

for bone in arm.pose.bones:
  i += 1
  bone[i].parent = bone[i-1]

(pseudocode, but I hope you know what I mean)

But bone parent is read-only and the ops.pose.parent_set() only works if there is an active bone, but I could not figure out how to change the active bone. bone.select seems to always be True, so I'm not entirely sure how to us the ops. I hope there is a better way, like with objects, where you can just assign your parent object/bone.

Parenting is done in edit mode where you setup the armature.

arm.pose.bones already indicates it is related to posing bones.

Try:

arm.data.edit_bones['yourBone'].parent = arm.data.edit_bones['parentBone']


Can't see any fonts except Bfont for text objects When I go to object data properties tab on the text object in properties editor the only font I see is Bfont. In blender preferences the windows font folder seems to be correctly configured and points towards C:\WINDOWS\Fonts. Why am I not seeing any fonts except Bfont? Blender version 2.82.7. Do I need to manually install the fonts for blender?

A new font can be loaded by clicking on the folder icon in the Font panel.

Blender will open the directory configured in Preferences > File Paths by default. All font files located in the directory will be displayed. If you've installed fonts through the Install option, instead of Install for all users, they will not be located in C:\Windows\Fonts but C:\Users\[your username]\AppData\Local\Microsoft\Windows\Fonts instead.

Image source: Announcing Windows 10 Insider Preview Build 17704


How do I export rigged model from Blender to Mixamo? I tried different FBX options but Mixamo says it can not indentify the armature.

You should be able to setup the armature in Mixiamo. Make sure your character is in a standard pose with both arms extended. Mixamo has problems with characters with short arms and legs. It works best with standard humanoid looking character because it's  easier to identify the difference between the different joints. Once you've setup the armature you can click the "Download" button.


How can I rename selected objects instead of just the active object? I am trying to take all the selected objects and rename them based on their active material. I can make it work with the active object, but I can't figure out a way to do it with the selected objects.
This is what I have for the active object, that works as expected.

import bpy

#takes active object and renames it to the active material
name = bpy.context.active_object.active_material.name
bpy.context.object.name = name

Thanks in advance!

You can do something like this:
import bpy

for ob in bpy.data.objects:
    if ob.select_get():
        #ob.name=ob.material_slots[0].name #this can fail if no material is assigned
        print(ob.name)

Or using context as @batFINGER suggests
import bpy

for ob in bpy.context.selected_objects:
     #ob.name=ob.material_slots[0].name #this can fail if no material is assigned
     print(ob.name)


Remove object from multiple vertex groups Blender assigned automatic weights to my object in a weird way and now many bones seem to be moving an object. Is there an easy way to first remove the object from every vertex group before then assigning it to the correct one?

Found it:

Take the object into edit mode and click on the little "vertex group specials" triangle that is below the plus and minus symbols in the vertex group panel. There you can find the option to remove the object from all vertex groups.


Automatic weights deformation on character mesh I tried rigging a character with automatic weights and did, but it deformed the mesh severely, I did remove doubles, recalculating normals, etc, but nothing worked. Any ideas for what the cause of the problem might be?

That is the IK-Chain's doing. If you switch from Pose Position to Rest Position, you can tell, that your mesh is still ok.

This is however a very easy fix: All you need to do is adjust the roll of the bone that has the IK-Constraint on it. You do by selecting the bone in Pose Mode and the going to the Properties Window and Bone Constraints Tab.


duplicate the mesh in edit mode and flip normals using python script I want to make my two sided (input model is collada). so, for that i want to duplicate all the faces in edit mode and then flip normals, and then export the model as fbx. i want to do this using python script.

my command to run the python script is

blender --background --python MeshDuplicate.py

Below is the .py file i am calling:

import bpy
import sys

object = bpy.ops.wm.collada_import(filepath="H:\\models\\armour.dae")
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_all(action='SELECT')
dup_object = bpy.data.objects.get("object")
object_d = dup_object.copy()
object_d.data = object.data.copy()
scene = bpy.context.scene
scene.objects.link(dup_object)
scene.update()
bpy.ops.export_scene.fbx(filepath="H:\\models\\armour.fbx", axis_forward='-Z', axis_up='Y')

i am getting this error.

Read new prefs: C:\Users\Lee\AppData\Roaming\Blender Foundation\Blender\2.76\config\userpref.blend
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 96000hz instead
found bundled python: C:\Program Files\Blender Foundation\Blender\2.76\python
Writing node id='node', name='node'
Traceback (most recent call last):
  File "", line 2, in
  File "C:\Program Files\Blender Foundation\Blender\MeshDuplicate_Flip.py", line 11, in
    object_d = dup_object.copy()
AttributeError: 'NoneType' object has no attribute 'copy'

Then you get this error

'NoneType' object has no attribute 'copy'

This means, that you try to get attribute from object 'NoneType'. NoneType is nothing.  So you want to get something from none. Why dup_object is None? You will get 'NoneType' when try to get object, that doesn't exists. I guess there is no object with name ""object"". Why name is "object"? - check this.


Painting onto textures - cycles I'm on the road to modeling and texturing a old castle ruin near from home, I scanned the ruins to have some blueprints and realistic texture patterns. The project is modeling the missing parts of the castle according to archaeological and historical research.
I finished modeling and wood texturing, now I'm doing the stone and wall texturing and it's not so easy.
My walls look too flat and too perfect.
Like this :

What I'm looking for is something like this:

As you can see on the foreground wall, there are some water infiltrations on the bottom, some of the bricks looks broken, the plaster touchs ... everything looks irregular, its realistic.
Or on this one

It's what I want to do on my wall and I want to know the best way.

Is there any solution to mix a repetitive texture pattern (e.g. the wall texture) and painted parts in multiple layers?

If it's no, what is the best way to have these kind of effects?

I will explain how I use stencil images to make use of tiled textures. I paint the stencils using different brush and brush mask textures.
We want to set up our uv mapping to make the best use of the tiled texture to make it spread across our object.

So we need to use the UV layer and rename it to tiled, and we want to arrange the uvs so that we get a nice texel size - stretching outside the constrains of the uv window is fine, as the texture just repeats past it and scaling way past just means we can see the texture decreasing in relationship to the actual face size.

We now want a second uv mapping layer for our stencil , and we will use Smart UV Project here so that we will be able to paint on a stencil over the whole object.

We will set up an initial node tree that mixes two tiled brick textures, even thoguh they aren't exactly the same scale we can use the same UV map to control how it lines up. We only see one brick texture without having painted the first stencil yet.

With the Stencil for the bricks in place, we can paint into small patches with a hard curve brush with white and reveal the second brick - I like to try to keep the paint inside the brick shapes from the first image, making it easier to blend them together.

We repeat the process, adding a stencil and a tiled image for the plaster.

I use a combination of procedural textures here, one set to 3d mapping on the brush at a small scale and another set to tiled at a large scale on the brush mask texture - procedurals are your friend here, allowing you to get interesting effects rather quickly.

We then can add another stencil and a tiled moss image texture.

If you make a new texbrush, you can set it to use jitter and wide spacing on the stroke, and set the radius to use pressure, painting in the moss where you want it.

I hope that helps - once you paint your object the way you want, you can use the same method to paint other objects in the scene. How you apply it is up to you, and you can use this same technique applied to mixing shader node groups with the matching tiled normal maps, and you can go so far as to also paint in dirt and cracks on another image multiplied - if you do that, start that one with a white image and paint with black.

Good luck!


How to know what's happening with a patch I submitted for Blender About three months ago, I submitted a proposed patch for changing how the ParticleInstance modifier works in Blender (https://developer.blender.org/D9100).  Since then, there has been no feedback.  I have no idea if this will be reviewed and acted on or if it will just be ignored.  I feel this is a very useful feature and would like to see it incorporated into the Blender program so that I may be able to use it in the future.

Don't be afraid to nudge the developers if it's been a while. You could do that on https://blender.chat in the #blender-coders channel, or by mentioning the assigned reviewer in the patch comments.


Imported PLY file appears blank I have imported a PLY file sent to me into a new Blender file. There is a Vert count and all the rest displayed at the top of the window, but I don't see anything. Do I need to adjust display options or something?

I think most .PLY object come very big.
The object is here but you need to scale it down a lot and center it.
This is my process with this sample file :
http://people.sc.fsu.edu/~jburkardt/data/ply/airplane.ply

file import .ply
CTRL-ALT-SHIFT-C to set the Origin to Geometry or in the menu

ALT-G to make sure your object is in the center
scale S to something like 0.02
I would suggest to immediately Apply Scale (CTRL-A) to ensure correct scaling.


Rigging: moving the leg moves other parts as well I just was working on rigging a model I downloaded online. However, when I bound the rigging to the mesh, for whatever reason, moving the leg also moves a part of the armor on the corresponding arm. It's really weird and I have no idea how to fix it. Please help.

Ah, this a common issue with automatic weights. It is easily fixable though. Select the armor piece that is moving when it shouldn't be, and enter edit mode. In the properties panel, you should see the Object Data button, which appears as a triangle. In this tab you will see the Vertex Groups menu.

In this menu, select the leg bone in the list that affects the arm to move. Select all the armor mesh in the 3D viewport, then drag the Weight slider all the way down to 0.000. Then click assign. This takes the selected mesh, and sets how much it should move when the leg bone moves (which is now no movement).

Now when the leg bone is moved, the armor piece should not. Repeat this for all occurrences. This should also note that when moved to 1.000 it will move the mesh entirely (and anything in between will move accordingly with the weight value).


Copy Keyframes From One Channel to Another? Is it possible to copy the keyframes from the X Location channel in the Graph Editor and paste them into the Default Value (Strength) channel? The second channel pertains to a keyframed Emission shader's Strength: value.

Yes.

Key A once or twice until everything is selected. Then  LMB select the X Location channel. You should see only it highlighted in white.

Key Ctrl + C to copy the red keyframes.  LMB select the Default Value (Strength) channel. Key Ctrl + V to paste.


Why do I have a single vertex connected to 2 edge loops? In a UV Mesh I have a single Vertex connected to '2 Edge Loops'

One on the top of a cylinder, and one on the bottom.

I have to remove either the top or the bottom Edge Loop, Then I delete half of the other Edge Loop.

I can not determine where this lone Vertex is located, because "it moves"

Video demonstrating the problem

It's not a single vertex, non of your top and bottom of the barrel faces have UV coordinates.

If you move that "one single vertex" in the UV Image editor you will find that there are actually several overlapping vertex in the 0,0 coordinate, in fact if you move more of them you will start seeing faces appear which correspond to the bottom and top of your barrel.

In other words you have to unwrap the rest of the mesh also


How to round corners of plane? How can I cut an arc into a square plane? The gif above shows what I want to do, but, in another software.

No need to subdivide the whole plane, no need to add vertex groups or modifiers!

All you need is Ctrl+Shift+B and middle mouse button scrolling on vertex or vertices:


How to make a camera face exactly downwards at the centre point? New to using blender, and have an image as a plane in the centre point. I'm trying to set a camera up to face perpendicular to it which i preume is doable by resetting position to centre, which I've done, and then changing the angle, but I can't find any shortcut to press to face it downwards, and can't find any input boxes to manually set the rotation by value. Any help?

Alt+R reset to the default orientation, which is downward.


Sculpting is hard. Any other way to make a drop? I wanted to make a drop of liquid (foundation) that is smooth and curvy.
Like:

I would prefer the liquid being outside the dropper like so:

I tried using sculpting which I'm quite new to and the result has been disastrous

Should I spend some more time learning sculpting or is there a better way to get the curvy, stretching liquid drop?

Start with your dropper object, and add a loop cut where you want your paint line to be.

Select the whole bottom (painted) section, right-click and choose "extrude faces along normals" to bring the sides out a little bit (to mimic paint thickness).

Bring down the bottom center of the dropper and scale it inwards to make a "point".

Extrude the center section a couple of times and then scale the center line to make a shape like this:

To make everything round, add a Subdivision Surface Modifier. You may need to add some supporting geometry (such as the highlighted loop cut) to control the roundness the way you like. Don't forget to right-click and shade smooth when you're done.

Finally, just assign the correct materials to the different sections.


Why are there bright unwanted lights coming out of nowhere in my render? I have no idea why, but this keeps happening to my renders, most of the time, when volumetric lighting is involved, sometimes not. But is there any way to fix it?

These are sometimes called fire flies.
This can be eliminated by setting the "clamp indirect"value to 1, found in the "sampling" section in the "render" tab.


How can I connect a set of disconnected vertices with a line through all of them How can I connect a set of disconnected vertices with a line through all of them?
I tried
V but it shows the error of "cannot rip multiple disconnected vertices"
F just creates a face but I would like to have a line
"connect vertice path" gives "invalid selection order"
"connect vertice" doesn't show any change

What can I do? Appreciate all your help.
Thanks guys

Select two vertices and create an edge between them, repeat for each edge you want.

With two vertices selected blender will create an edge, with three or more vertices it will create an edge between each vertex as well as a face that is surrounded by all of them. If the vertices are aligned the face will be too small to be seen even though it is there.

You could select the vertices from one end to the other and create a face, then use X->Only Faces to only have edges, but this will still leave an extra edge from the first to last, and the remaining edges will only be worthwhile if you select them one by one in the right order, if you use select all then you can get edges between random vertices in the row.

This is a drawback of using the same operator to create edges and faces, the number of selected vertices is the only factor that decides if a face is created, so to create only edges you need to select two vertices and create one edge at a time. As you may want to create edges between all the vertices you have in the grid, you may want to fill in the grid with faces (enabling the F2 addon might help), then select everything and delete only faces to have only edges remaining.

If you enable vertex snapping and auto-merge you could select the first vertex and press E to extrude it and snap the new vertex to the next vertex, then repeat for each edge.


Combining Generated Textures for Displacement Modifier on Plane I have a grid that's subdivided into 512x512 quads.  I set up some basic nodes to composite two different (Blender generated) textures.  I wish to take that result and apply it to a 3rd texture slot that the "displace modifier can use to change the plane's geometry.

Basically I'm just trying to use Blender's noise generation to create a heightmap that I can see updating in real time.

The problem is I can't figure out how to reference the composite of the 2 generated textures.

Is this possible?  I'm obviously pretty newb but any insight would be appreciated.  Thanks.

I don't think you can use textures through the compositor or materials for displacement. But, the effect you're trying achieve by just using two displacement modifiers, one for each texture. There are other ways, but they require using the Cycles engine.


Blender material issue while snapping two objects snaps together This is two half-sphere snap to each other by the center line.
I am working on a modeling project which run into this problem.

I want to make it like a whole sphere while render it out, but it like this

The vertex at the center line are perfectly aligned.

And I would like to keep it two objects.

Is there any way to make it like one single object but without that center line?

I think there are two reasons here for discontinuous smooth shading.

The normals are flipped on the right half ... CtrlF > F, Flip normals
The normals haven't got anything to interpolate to over the edges of the hemispheres.

To fix (2), retain an intact version of the sphere as a form, same topology, same location, and transfer the normals from it to the 2 halves, by giving them  Data Transfer modifiers, with the intact sphere as target, and the settings shown. You will have to set 'Autosmooth' on the hemispheres in their data tabs.


Scene Referred and Display Referred RGB values of the image If I left click on an image in the UV/Image Editor two sets of RGB values are displayed. Are the "left" RGB values the scene referred values and the "right" RGB values the display referred values ?

The left values are scene referred values.

The right values, after the CM are post display referred transform.


AA issue toon shading blender internal render Hi i'm trying to create a toon effect using the blender internal render. But  not matter what AA settings i use it comes with jagged edges like in the image. Do i miss a setting?

I actually found it, DOH!. Somehow 'Full Oversampling' was disabled in the material options. Needs to be enabled. It now renders smooth lines.
Thanks for your respons.


"Render Animation" doesn't refresh bone constraint to rendering frame in 2.8 I have a character that switches from armature control to a rag doll controlled by the physics system using bone constraints. It works fine when playing in the viewport or when rendering a single frame, but does not work when rendering the whole animation.

I found this article that seemed to have the same issues. The response was:

"This is a known issue in our current depsgraph, there is a workaround for it though - enable Extra Object Update and/or Extra Data Update for armature and ant mesh, in Object buttons, Relations Extra panel.

Anyway, not a bug, rather a known TODO for our future new depsgraph. ;)"

But I don't see those options in 2.8. Anyone have any suggestions?

Thanks!

Viewport Video

Rendered Video

Rendered Still

Blend File

I was having a similar problem.  My issue was I had one bone with a Damped Track constraint pointed at a another bone which had it's own Damped Track constraint pointed right back at the first bone.  It should have still worked since the tracking constraint didn't affect the location of either bone's head, but...  it apparently confused Blender anyway.  Ultimately, in order to fix the problem I had to create 2 more bones with no constraints in the same locations of the original 2 bones.  I could then have the original 2 bones point at those un-constrained bones.  In other words, having a constrained bone relying on another constrained bone can cause problems.


How can I make the shadows more defined? I have this project where some of the shadows are failing to show up (ex. the shadows that should be cast by the bars on the window).

How do I go about making the shadows appear?

External lighting setup:

A big light source is going to give  you very soft shadows. The bigger the source, the softer the shadows (think of the light on an overcast day, when the sun is diffused by clouds). A small light source (like direct sun or a street light) will make harder shadows.

Adding a second point light in front of the original source will give you defined shadows while keeping the light directon You might want to make the original soft source less bright)


How to keep Workspaces in Blender 2.80 when opening previous version of blender's files? i'd like to use the bmps file from previous version of blender, in blender 2.80 as latest version.

but, when it's opened, blender 2.80 lost every interface layout it usually has. especially those new workspaces as tabs on top of the screen.

is there a way to keep blender 2.80's interface layout -especially the workspaces- whenever we open previous version of blender files?

Start new project using General preset

File -> Open .., locate your .blend, but before you open the file, uncheck the Load UI option

Your old .blend should be opened using the General preset UI, so the workspace should be there


Is it possible to bake multiple emission materials to one single texture? I am currently trying to export a Material ID texture to use with Quixel, however I have been unable to bake the material colors to one single texture as all the colors are a different material on the same mesh. Is this possible?

I tried your problem and came up with this solution. if you are in 2.8 it's easier.

First you create a new UV map for each object that is affected. Then you select all, enter edit mode, this should let them all be in edit mode together, you select all, and unwrap it all to that UV-Map.

Now you create a new Image with your desired resolution.

In the ShaderEditor you add that image to all the affected materials and select it. this will bake the taxture to that image.

Now you make the texture. It all should be now on this one Image.

It worked for me in 2.77? and in 2.8, sure it will work in other versions aswell.


Can anyone help with this rigging error? Rotating bones causes my model to shrink/be squeezed First off, I want to say that I have little to no idea what I'm doing. This is the second time I've ever tried to rig something, and the first consisted of only two or three bones, so this is my first attempt at a full body rig. That said, I could have made a mistake in the beginning of the rigging process, so the error may just be my sloppy rigging. I hope I'm not thaaat bad and this just happens to be a simple, common, and easily fixable error. Still after searching a while, I haven't found a solution, so I decided to ask here.

Full model

If I did this right, above is a picture of the model I am trying to rig. I've completed the model and skeleton, but only the body and head are connected to bones. I think I should note that this isn't the first problem I've had with the rigging, so I have already done a bunch of things, adding weights and normalizing in weight paint mode, although I can't say I'm sure I did those right.

Bug-HeadY

Now this is the bug. As you can probably see, whenever the I rotate a bone on the X and Y axes, any objects connected to the bones rotated appear to shrink. The effect increases the farther the bone is from the starting place or a full 180°. Oddly the closer the bone gets to a full 180° flip, the less it distorts, so the effect is only noticeable between 0° and 180° rotation.

Bug-HeadX

And, above we have the an example of the bug with the same bones rotated along the X axis. I'm fairly certain that this is even more distorted then when I rotated these bones on the Y axis.

And here you can see the distortion's effect on the whole mesh. So yeah, that's the problem. If anyone has a solution or a similar experience, please let me know.

And here's the blender file if anyone wants to see the error first-hand.

I loaded your blend file and found the problem.
People often forget it when they start with rigging.
 - A mesh or object(s) should not be scaled before rigging-.
Sure you can scale while modelling but when your figure is done press CTRL +A to apply those scalings, before you let the bones control them.


subdivide bezier curve in Blender 2.9 I have issue subdividing bezier curve in edit mode. I go right-click and than subdivide and it does not work.
How can I add vertex in the middle (subdivide) between the already existing two on both ends of the bezier curve in Blender 2.9?

Subdivide will put a division between all handles you currently have selected, so if you don't have more than one handle selected it won't do anything.  You can press A to highlight all handles and then run the command to subdivide the whole thing.


How do I set a mp4 as my background? Ok so i got this template from the internet, and it came with an mp4 file called shockwave, everything worked, but I dont know how to add that shockwave behind the text. here is how it suppose to look.
https://www.youtube.com/watch?v=X8WKpitwn4Q

Time where it shows it: 0:13 - 0:14

and right now i got the text and the audio working. I just need the shockwave to show on the background.
If someone can help, i would appreciate it a lot!!!
Thanks!

You can combine a 3D Scene with a video using different tools:

Node Editor (Compositing)

PRO: Here you can apply filters, color correction, and other cool effects.

CONS: Non-linear editing is a little complicate

Some tips:

Set alpha mode Transparent in the Render Panel
Toggle Compositing in the Render Panel
Scale the Movie Clip to fit the render dimensions

VSE (Video Sequence Editor)

PRO: Easy control over the timeline

CONS: Little effects

Some tips:

Select the Scene Strip and set Blend to Alpha Over
Toggle Sequencer in the Render Panel

This is only an overview: you'll find a lot of tutorial on the web about Node Compositing and VSE (Video Sequence Editor)


Why do I get this error? Loading large text file to Blender Hello Blender Community,

I am trying to simulate a machining process in blender. The cutting tool used is simplified via cylinder and its position is extracted to space delimited text file from NC Code.

Currently, the code I am running via text editor is

import bpy

with open(bpy.path.abspath("//cutting position trial.txt"),
       'r', buffering = 1) as content:

    for line in content:
        # extract tool position
        x, y, z = line.split(' ',2)

        # create tool
        bpy.ops.mesh.primitive_cylinder_add(
            vertices = 3000,
            radius = 0.5,
            depth = 10,
            location = (float(x), float(y), float (z))
            )

        # add BOOLEAN modifier
        bpy.data.objects['ISO 10791 M1 blank cd 0.0025'].modifiers.new('Boolean', 'BOOLEAN')
        bpy.data.objects['ISO 10791 M1 blank cd 0.0025'].modifiers['Boolean'].operation = 'DIFFERENCE'
        bpy.data.objects['ISO 10791 M1 blank cd 0.0025'].modifiers['Boolean'].object = bpy.data.objects["Cylinder"]
        bpy.data.objects['ISO 10791 M1 blank cd 0.0025'].modifiers['Boolean'].solver = 'CARVE'
        # activate the blank
        bpy.context.scene.objects.active = bpy.data.objects['ISO 10791 M1 blank cd 0.0025']
        # apply modifier
        bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean")

        # Remove cylinder
        bpy.ops.object.select_all(action='DESELECT')
        bpy.data.objects['Cylinder'].select = True
        bpy.ops.object.delete()

The code works for small amount of lines, around 15 lines are tested.

However, when loading full file blender quit after a few seconds and give error file:

Is there something wrong with the code? I thought the file was read line by line so the the problem should not happened.

The complete zip file can be downloaded from:
https://drive.google.com/file/d/1aUYUExuDTMFPYKpgOcB34_cXWutqMTPV/view?usp=sharing

Kind regards.
iwan

Some of the way there

Here is some changes to get you some of the way there.  Unfortunately I have a late version of 2.79 where the boolean modifier no longer has the solver property, so I can't be sure of result.

add and remove the cylinder once at start and end respectively.
set the cd object as active and select.
reference the modifier when added, apply by reference (name).

Edited script:

import bpy
context = bpy.context
scene = context.scene
bpy.ops.mesh.primitive_cylinder_add(
    vertices = 3000,
    radius = 0.5,
    depth = 10,
    location = (0, 0, 0)
        )
cylinder = context.object
cylinder.select = False
cd = scene.objects['ISO 10791 M1 blank cd 0.0025']
scene.objects.active = cd
cd.select = True
with open(bpy.path.abspath("//cutting position trial.txt")) as content:
    for i, line in enumerate(content):
        print(i)

        # extract tool position
        x, y, z = [float(n) for n in line.split(' ',2)]
        cylinder.location = (x, y, z + 5)
        scene.update() # may not be needed.
        # add BOOLEAN modifier
        m = cd.modifiers.new('Boolean', 'BOOLEAN')
        m.operation = 'DIFFERENCE'
        m.object = cylinder
        #m.solver = 'CARVE'

        # apply modifier
        bpy.ops.object.modifier_apply(apply_as='DATA', modifier=m.name)
bpy.data.objects.remove(cylinder)


Why do I see edges partially see-through on back face (in viewport)? Maybe you can help me with a weird viewport issue.

I want to show only visible edges in edit mode. i.e. I don't want to see those on the back side of the model. For some reason I always see partial edges in Solid Mode.

See the first image. There appears to be an 'inner cube' within my model. It occludes backface edges partially.

When I search on this topic people suggest toggling 'Limit Selection to Visible' in edit mode, and when I turn it on I can see all backface edges as expected, but the inner cube is still there.

It shows up in other models as well, like these steps:

Any suggestions?

I don't really know the correct answer to this one, I think this is a limitation of the current opengl viewport rendering engine. Would like to hear from one of the devs about it, if it is actually fixable or a bug, or if anyone else knows any other way to fix it.

Only way to remedy the situation I found is to adjust viewport clipping. It's a workaround with its own side effects but can minimize the issue.

In the 3d view properties shelf N key, under the View panel there is a setting for viewpor clipping, star and end. Try bringing the two values closer together like increasing clip start and/or increasing clip end but keeping them in a usable state for your scene.

Edit: Worked well on my end

Ok, missed one detail, if you are in camera view mode, then you need to adjust the clipping settings in the camera's Object Data Settings in the Properties window, not viewport clipping as it has no effect while in camera view mode.


Redraw Texture Based Off Disfigured Mesh I have a full mesh and texture of a dragon in blender, which both work fine.
I have to cut the dragon up into ~20 parts for what I need to do. I cut everything up correctly, but I can't figure out how to get a new texture based on the new object.
As you can see in the image, a small part of the texture is being used.

When the mesh is exported alone, it needs the same texture, but redrawn/created to fit.

Is there any way to do this?

I think you can use a bake process to do that.

Let's say we start with this dragon (anyway, it does not know at all it is not) :

And you for instance want to separate the horns from the head :

You here want to remap these UVs like that which does not match the initial texture :

Create a new material and a new texture for the head
Go to node editor and add a texture node to it (with the corresponding texture). Keep this node selected as below (this selected node indicates to Cycles where to bake to) :

Do the same for the horns part (new material, new texture and same node setup)
As we will bake and bake uses environment light, set it to full white (RGB = 1, 1, 1) and a strength of 1 : this will keep the same colors as the original

We begin with a bake for the head
Set the new head at the exact same place as the original
Select the original RMB
Then select both the new head Shift+RMB
Go to the bake section in the render panel
Click 'selected to active'
Adjust a little bit the 'ray distance' in order to avoid artefacts (this may be tuned depending of your mesh)
And click 'bake'

Do the same for the horns :

Instead of doing that piece by piece, you can also rejoin all your meshes once you have recreated each UV map and each material (eventually remove doubles after the join) and bake them all in one time.


Non intersecting objects Is there a way to sculpt(while in sculpt mode) a separate object in a scene such that it conforms to the surface of another object without passing through that object? Essentially can another object act as a mask for sculpting a separate object?

You can work around it with the shrinkwrap modifier. Make a vertex group with the part that you want your other object to touch. Add shrinkwrap. Set your other object as target. Select your vertex group. Apply. Sculpt the seam to make it not deformed.


Node Editor: Custom Label Shortcut I want to create a keyboard shortcut to quickly label a selected node.

The ideal shortcut would bring up a text box to show input, and then pressing Enter would assign the text as a Custom Label.

You can't do precisely what you want, but SHIFT-ALT-L will bring up a dialog that allows you to quickly modify the label
(Not sure if this requires Node Wrangler or not. If it does, simply enable Node Wrangler in user preference -> Add Ons.)


Internal Render with colored shadow pass Is this normal to have colored shadow pass if I have Z-transparent material with disabled receiving of shadows? I thought it should be just white in this case.

Recently found something usefull. I don't know how does it work exactly, but anyway:

Make second material, which will be replicating first Transparent material in all aspects except for transparency (!).
Then enable nodes and plug Transparent material to the Output.
Finally add another Material node (Input-> add Material node). And choose there your second material (one without transparency), but don't plug it anywhere, just click it with RMB to set as active in node system.

P.S. It is not the best solution and I guess, it can corrupt other passes with more complex materials.

Blend file with this setup is attached here:


how can I use a brush CUSTOM re-topology? I am aware of the dynamic re-topology options in sculpting and I want to make it clear that what I want is slightly different. Is there a way to get something like a brush that when it paints over the mesh it tries to subdivide/merge tris in the least destructive way?

I think Sculptris had something like what I'm asking for but I've long since abandoned that software for many reasons, but I really miss that in blender.  My current work around is to zoom out with the clay brush, enable dyn-topo, then click.

While this works it doesn't allow for fine control, especially when you just want to merge a few tris.  Going into edit mode isn't feasible due to the lag from the shear number of polys generated while sculpting a complex mesh(for instance a model with 600,000 faces taking 5GB of memory), and it's tedious to do for every spot you want to clean up.

Basically I want a brush that ONLY subdivides and collapses at an amount dependent on it's strength, NOT the brush size.  Can this be done in blender?  If so how?

Also please note that I have no experience modifying/adding brushes in blender so if that is a part of the answer please be patient with me and explain it to me like I'm a three y/o.  I have trouble following complicated answers.

I found a video showing the feature: https://www.youtube.com/watch?v=_Ia-fhpsabQ
Sorry about the quality, it's not my vid, but it I think if makes my question clearer.

Strenght Brush = 0 with Constant Detail

I usually take advantage of the Constant Detail dynotopology mode for this task. Basically the detail size does not depend anymore on the brush size on the screen, but it's a function of the Resolution parameter field.

Given that we can set up a brush that deoes nothing (set the Strenght to 0) but modify the topology with the set resolution. With the eyedropper we can easily pick up the resolution of the nearby faces like shown in the image sequence below.

You can restrict the action of the brush to Subdivide only or Collpase only if wanted. There's even the "Detail Flood Fill" button to automatically spread the same amount of resolution across the whole model.


why array not following the curve path I  have curve and array modifier. Rotation and scale is applied to mesh and curve. The mesh is not following the curve (Square). Mesh getting mess with the geometry. As soon as curve modifier added the mesh get mess. Any suggestion or help. Thanks

Three things to make it work.

Your curve's radius is messing it up. Uncheck Radius in the Curve properties.
The object and Curve origins need to match. Set the Object's location to X=0, Y=0
Your curve modifier is using the wrong axis, set it to X axis.


Transforming collections with animation nodes Hello everyone and happy holidays! So I really would love to parent a collection to an empty since instancing can be so messy but what I had not considered is ... perhaps using animation nodes to transform a collection ...
So I am just curious if I could use animation nodes to move my collections around ?

Case A (blue) would be to set the parent parameter every object has, wich also can be found in Object Properties > Relations > Parent
For a onetime operation this could also be done via shortcut Alt + P or python.
Case B (green) does not parent but moves a collection of objects in realtion to another. Here the logic of animation nodes and its potential maybe is more apparent.
Important: for this to work you have to check Delta Transforms in Object Transform Output > N-Panel > Item > Advanced Node Settings > Delta Transforms.

Here you can see were to find the Delta Transform toggle in the Object Transform Output Node:


How to bypass error in Blender? I have an addon, a part of which takes all selected objects, and if they are rigid-bodies, cycles through them applying "Bake to Keyframes". When this is done, something else is done.
However, when this is run, it all works fine right up until the last object is Baked to Keyframes, at which point I get an error saying that:
Operator bpy.ops.rigidbody.bake_to_keyframes.poll() failed, context is incorrect
Since it actually does what I want that segment to do (all of my objects are keyframed), this error is even more confusing.
What I think it's trying to do is Bake another object, but which one I don't know.
Here is the relevant piece of code:
for i in range(len(selection)):                     #selection is just all objects selected
                bpy.context.scene.objects.active = selection[i]
                bpy.ops.rigidbody.bake_to_keyframes(frame_start=firstFrame, frame_end=lastFrame, step=1)

        #scale it by -1 to reverse it
        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=(-1, 1, 1))
        bpy.context.area.type = old_type
        return {'FINISHED'}

And the console when the error occurs:

I also think it might be an iteration error, as in it tries to bake one of my already-baked objects, but I'm not sure.
Any help as to figuring out how to either fix the error or just entirely ignore it (since it doesn't actually stop anything from happening other than halting my script) would be appreciated.

The error is because one of your selected objects is not a rigid body, maybe a camera or lamp.

Instead of looping through a range and using it for an index, it is better to loop through your list of selected objects. Add a test for whether it has rigid body enabled to prevent the error.

for obj in selected:
    if obj.rigid_body:
        bpy.context.scene.objects.active = obj
        bpy.ops.rigidbody.bake_to_keyframes()

And when you need the index as well as the listed items, use enumerate()

for i, obj in enumerate(selected):
    print(i, obj.name)

But here's the thing, you don't need to use a loop at all. The bake_to_keyframes operator already bakes all selected objects --

  bpy.ops.rigidbody.bake_to_keyframes(frame_start=1, frame_end=250, step=1)
      Bake rigid body transformations of selected objects to keyframes

So you are just repeating the same action multiple times.


optimize blenderswap models for unity (mobile use) i like some of the models on blender swap but the issue most of them have the models as separate meshes and materials therefore it will be a lot of overhead on mobile performance, is there an easy way to open the file in blender and make all the meshes as one object with one material ,  and if there is also an easy way to reduce number of verts it will a lot of help?

As Duarte pointed out, there are no "easy" ways to optimize models for games - especially mobile games - efficiency is everything for mobile.  Most game models are built with a "budget" in mind, and every component of them - from the geometry to the textures to the rig and animations (if it has them) need to be carefully considered with that budget and  overall optimization in mind.  In my experience as a modeler (for games) high-resolution models can present a usable framework to build a low-poly version around and then maps and normals can be extracted - but it will be a very rare object that you will be able to use straight away.


How to fill multiple holes? I'm wondering if there is a way to fill holes correctly like the next one

In order to make it automatic an not monually like this, by selecting each edges and fill them with F

I've tried fill it with F and F alternatives (Ctrl +F) and always I have results like this

Thanks, it would be too helpful :)

Follow these steps to create a clean mesh:

Fix the regions I pointed out. (these faces are currently overlapping)
Select the edges you want to bridge but deselect the edges shown in the image.
Press CTRL+E and select 'bridge edge loops'


How to add a Particle Texture? I am new to blender and working through a tutorial, but I have a problem. I can not for the life of me figure out how to add a particle texture. I must be missing something in the UI. When I navigate to the texture tab I can not find the button. What am I doing wrong?

in case anyone is wondering the tutorial is here:
http://blenderdiplom.com/en/tutorials/all-tutorials/394-tutorial-dissolve-your-logo-in-blender-262.html

Go into the particle tab of the properties window and add a new particle system to your object. In the particle settings look for the Textures panel and add a new texture.

If you return to the textures panel it should then turn into particle texture editing, along with a pull-down menu to choose texture context from.


Clone-brush paints with wrong color Such a simple task and such unexpected behaviour from the Clone-brush. I want to pick up green color from the opposite side and place it on the red dot (doing it in 3D viewport).

What I get is black instead of green. Why?

An alternate workflow and a much more controlled one is to load your canvas image as a brush texture in the basic TexBrush and use stencil as mapping for the brush - then you can move the image and rotate it exactly how you want it to align, and paint that part into the image.

edit: The Clone brush is mainly meant for cloning pixels to hide the UV seams, and not exactly a way to copy sections of paint onto the canvas without also picking up areas you might not want to pick up - those extra parts usually mean more work to paint out.


How do I animate a right-angle triangle inside a circle (hypotenuse of the triangle is the radius of the circle) As I move the radius of the circle I need to show the triangle moving showing the right angle moving (on the x-axis).

Basically the three points of the triangle are: the centre of the circle (A), a point in the circumference (B) and one on the x-axis (C) - so that line drawn from B to the x-axis is always perpendicular to the x-axis and remains perpendicular as you move point (B) (or angle CAB from 0 - 180 degrees).

Here a drawing of what I have in mind.

Start by adding a single vertex (ShiftA then S then A or Add -> Single Vert -> Add Single Vert). You should be in edit mode by default after doing this, but if not Tab into edit mode.

Extrude by 1 along the X axis (E then X then Numpad 1), then extrude by 1 along the Y axis (E then Y then Numpad 1). Select everything, by hitting A twice. Press F to make a face.

If you want only the outline of the triangle, press I followed by some sufficiently small number then press Enter, then X followed by F. Tab out of edit mode.

Go to the object properties and add the following into the Scale boxes:

If you prefer degrees:
X: #cos(radians(360*(frame-1)/100))
Y: #sin(radians(360*(frame-1)/100))

If you prefer radians:
X: #cos(2*pi360*(frame-1)/100)
Y: #sin(2*pi*(frame-1)/100)

The hash signs are mandatory. They tell Blender that you're entering a driver rather than a static value. If you edit the driver later, the hash signs won't show up, and you shouldn't re-add them. Once the driver is created, Blender knows it's a driver without being told again.

frame is the current frame number, and the reason I subtract 1 is that Blender starts at frame 1, while the parametric equations for a circle start at 0. 360 or 2*pi is the angle of a full circle, and 100 is the number of frames it will take to complete a full circle.

The result:

As you can see, the triangle's outline gets scaled as well, and there's certainly room for improvement there, however, here's the .blend.


Is it possible to remove a window that is lying on top of 3 other windows in a row? Suppose you have 4 windows in 2 rows. The first row has one window and the bottom row has 3. Is it possible to remove the top window?

I can't find any particularly good and fast way around this, this is the best I could come up with:


Add-On Dev: Operator Window - Open/Close events? I've read in several places that its not safe to rely on constructors for types derived from Blender objects, such as property groups. But now I am creating a pop-up window with an operator class (using context.window_manager.invoke_props_dialog()), and I need to execute code when the window is opened and closed.

Previously, I was using invoke() as my open event, and execute() as my closing event. But I just found out that execute() is only called when the "OK" button is pressed. If the user clicks outside of the window to unfocus the window, it closes without executing. I'm assuming this is basically "cancel", which is cool. But I still want to execute certain code when it happens, if possible.

I've tried implementing _init__(self) and __del__(self) for the operator window, and they both appear to be called when the window opens and closes. But its difficult to know how reliable the behavior will be. Can anyone confirm that it is safe to use these as open/close events for an operator window? Or is there a better way to handle it?

I think I can safely say these are reliable, for a couple reasons:

They are reliable for modal operator classes, and there is little difference between a modal operator class and a non-modal operator class, except for a specific function being defined and returning certain values from specific functions. It makes sense that the constructor/destructor can be relied on for all operator classes.
See https://docs.blender.org/api/current/info_overview.html (thanks to Brockmann for updated version link) .. If you look under the section titled class mix-in example, it states the following:

"Notice these classes don’t define an __init__(self) function. While __init__() and __del__() will be called if defined, the class instances lifetime only spans the execution."

If anyone can confirm or has any reason to think otherwise, please let me know. Thanks!


Blender 2.78 file size grows and does never shrink I made a huge project, wanted to reduce file size from 1.3GB to below 1GB. Compressing did not help. I removed objects from scene. Also textures. I then realized, the file size even was the same when I delete ALL objects. Why?

Download of sample: https://ufile.io/0cc23

Before deleting all: 1.2GB, after: 1.1GB.

Your scene is far from empty (couldn't be any other way), there are plenty of objects there stored inside groups.

Try switching your outliner to Group view and you will find plenty of group definitions you can insert into your scene, with lots of high poly objects stored in them.

Not sure exactly how they are stored or where they come from, but they are causing your big file size. Will try to investigate further.

If you go into the Outliner > Datablocks view you can also see lots of data stored inside your file, like images, objects, groups, brushes, etc.

To actually delete data, select the (un)desired groups in the Outliner under Group mode, Right Click over the group name (not the icon) and choose Unlink option.

You have to save, quit file, close Blender and then reopen the file again, for actual data to be gone. Save again and file size should be reduced.

EDIT

Ok, only way I figured out how to actually reduce file was to go into the Outliner, after unlinking all groups as described above, switch to Blender File mode, go into the Mesh category and manually select everything and erase it with Right Click > Delete. This reduced file size to about 5Mb

Due to the large amount it is probably easier to just select everything with A and deselect all other categories before erasing


Blender non square unwrap When I do unwrap in blender 2.78 I get like this. With strange triangle diagonal line - what's this?

How I can get smooth linear interpolation?

Thanks!

P.S. Post edited - change to more evident gif demo.

The diagonal line comes from the way you unwrapped the plane.

What you need to do is to push 7 to go to top view.
Then push 5 to go to orthographic view.
Lastly choose project from view bounds.

Before:

After:

EDIT: I misunderstood the question. The solution you are looking for is just to subdivide the plane. See this for why.


Scripting: Converting Text object to Mesh object fails due to incorrect context (2.78) I'm new to scripting in Blender, but after extensive googling and searching through the API, I've created the following script to create an empty scene (my default scene has no cube, light or camera in it), add a Text object, set some various parameters, and then convert it to a mesh. However, when trying to convert to a mesh, I get:

RuntimeError: Operator bpy.ops.object.convert.poll() failed, context is incorrect

The following is my script:

import bpy

font_loc = #set to font location

bpy.ops.wm.read_homefile()                       #load default (empty) scene
bpy.ops.object.text_add()                        #create the text object
mytext = bpy.data.objects["Text"]
mytext.data.body = "A"                           #set some stuff up
mytext.data.align_x = "CENTER"
mytext.data.align_y = "BOTTOM"
mytext.data.extrude = 0.1
fnt = bpy.data.fonts.load(font_loc)              #font loading works
mytext.data.font = fnt
bpy.context.scene.objects.active = mytext        #make sure my Text object is correctly selected
mytext.select = True
bpy.ops.object.convert(target="MESH")            #<------ context is incorrect?

On that last line is when I get the error, but if I type that exact same line into the in-editor console after the script exits, it converts the Text object to a Mesh object perfectly fine. What's going on? Is there some other way to convert the Text object that I can't find?

bpy.ops.wm.read_homefile() - kills your current file and causes the trouble. If you could avoid it, it will work. I think you can import a scene from some blend file instead.
Look also this thread, and this.


Script Light(Spot) for Multiple Objects I'm using this script.
Always(...) + Python (Script) = Nothing...
Do I need to configure anything else?
List item
The script does not work.

import bpy

scene = bpy.context.scene
lamp = bpy.data.lamps['Lamp']
lamp.energy = 10000
lamp.type = 'SPOT'
lamp.distance = 250000

Here is a script creating what you want:

import bpy
C = bpy.context
scene = C.scene
bpy.ops.object.lamp_add(type='SPOT')
C.selected_objects[0].name = 'Lamp'
lamp = bpy.data.lamps['Lamp']
lamp.energy = 20000
lamp.distance = 250000


Fluid Domain Re-scaling I have the setting of the fluid perfect but the domain is too small and if i make it bigger then the fluid messes up. How do I change the domain size without it effecting the fluid?

A fluid simulation uses a certain number of divisions to determine the resolution of the fluid. The number of divisions is related to the domain size in that 1 division will be 1/Domain Size blender units. Therefore scaling up the domain will make each division larger, so your fluid will be less smooth when you scale up the domain.

To make your fluid smoother, select your domain object and adjust the resolution values in the physics tab in the fluid settings. If you are looking for the exact same resolution as you had before, multiply the current resolution value by the amount you scaled the domain (if you scaled the domain by 2, multiply the resolution by 2, etc.). Blender allows you to do math equations in the input boxes as well so it should be fairly easy.


Precise openings (windows, doors )in meshes Basically, I'm trying to model an house to use later in Unreal Engine 4. I've set the scale to the one reccomended for UE4 already.

So, let's say I want one of the walls to be 3mx3mx20cm. This is easy. Add a cube, change the size in the transform menu.

Now I want a window that's 1mx1mx20 in size. But how do I make a precise opening the my wall?
What I've been trying is to add a cube, make it 1mx1m, and then use it as a guide to place four edge loops. The problem is that this is not exactly accurate, so I usualy end up with openings that are like 99cmx98cm, or 99cmx101cm. So when I model my 1x1 window, it won't fit exactly, leaving seams.

Is there a better and more precise way?

You can use snapping limiting transforms on an axis.

Basic house with a separate window object :

Select your house, enter in edit mode (tab)
Activate snapping, open the menu and choose Vertex :

Add your edge loop (Ctrl+R) place it anywhere. Move your newly created edge loop with g, lock your movement on X axis (X) and move your mouse close to a corner of your window. You'll see a circle appear where the movement can be snapped (window corner vertex). Click LMB

Repeat this actions on the 3 other loops with the 3 other corners (X and Z axis)

You can move along all axis, 1 axis (with X, Y or Z) or 2 axis (with Shift+X all but X, Shift+Y all but Y, Shift+Z all but Z).


Textured View Errors When I am in Textured view, I can't see my textures from afar. It is almost as if the camera is emitting a light. I can, however, see my textures normally when I am extremely close to (a textured object). I made a video showing my problem. Note that it does render perfectly. Lastly, I use Blender Game Engine the most, so I need it to work properly for quick building. Any suggestions?

This looks to me like it may an issue with being in multi-texture mode.
In multitexture mode, lighting is calculated per vertex. This means that the lighting on a giant plane is calculated at the corners. Because these are a long way from the light, this means the corners are black, and this extends towards the camera.

There are two ways I see to fix this if this is the case.
The first is to switch to GLSL mode. GLSL mode calculates lighting per screen-space pixel and provides much better looking results (also allows normal maps etc.)
The second is to try subdividing the plane such that the lighting resolution is higher. If your computer is old, this may be the only option to provide decent performance.

Another possible cause is mist. Again, in multitexture mode this is vertex based. Check that mist is disabled. You may have accidentally made your default blend file have a misty world.

A final possible problem may be your GPU or it's drivers. It may not be calculating mipmaps correctly in which case either a driver update may fix it, or using .dds textures (which contain pre-defined mipmaps) could solve it.

If none of these provide a solution, upload a blend file and I'll see if the issue is replicated on my computer


Exporting Parts of mesh Hello is there anyway to export parts of a mesh only and not the whole thing.For example.I have a chest piece that is made on one character mesh.I can duplicate that chest piece off of that mesh.But I want to export that chest piece only,for another character in a totally different file.How can I do that, please help?.And I like to thank you.

Afaik no, but it could also depend on the specific exporter, since they are all independent (made differently).

eg: the collada exporter has a specific option.

The simplest way to get what you need is to save your file, then create a new empty blend file and import in it from the saved file where you have only what you want (eg chest piece).

Then, even without saving the new file, export from that new file to th eformat you need (eg: obj, dxf, fbx, etc.).


Baking normal map from a cycles shader with normals I have a cycles material (diffuse shader) with a procedural normal map on it, which renders as expected in Cycles. But if I bake the normal map it outputs a flat image (0.5, 0.5, 1.0).

I've tried Bake from Selected with a normal mapped material and that doesn't work either.

How do I bake a normal mapped material into a normal map?

An obvious hack which, however, does seem to work well:

Connect the color output of your procedural normal map, that you would normally feed into Normal Map node to Emission node which has Strength set to 1
Connect Emission output of the node to Surface of Material Output
Bake Emit


how can i select all objects by type using python How can i select all objects by type using python scripting. I am trying to select all empties in my scene.

I tried using bpy.ops.object.select_by_type(type='EMPTY') but thats doesn't work.

Blender 2.7x
import bpy

objects = bpy.context.scene.objects

for obj in objects:
    obj.select = obj.type == "EMPTY"

Blender 2.8x
import bpy

objects = bpy.context.scene.objects

for obj in objects:
    obj.select_set(obj.type == "EMPTY")

See this answer for more info.


How do I make two objects pull toward each other in a zero-gravity scene? I have two spheres in a zero-gravity scene. I'd like for them to gradually float toward each other until they collide. This makes sense, since in real life everything has its own gravity.

I have removed the gravity from the scene and created two rigid body objects, with a very high mass, but they just remain static and never float toward each other.

I can add a Force Field to one with a negative value which pulls the non-force fielded sphere toward it, but if I add a force field to both spheres, they again remain motionless.

How do I set up a scene so that both spheres react to each other's gravity?

To make the your rigid bodies attract in your scene (assuming you already added your rigid bodies), you need to do this for each object:

1- Add a Force Field: In the 3d view, press ShiftA > Force Field > Force

2- Make your object the parent of the Force Field: Shift + Right click on the Force Field, followed by your object (The order is important) > Ctrl+P > Parent

3- Make sure your origin is on the center of mass of your object:
Select your object, then in the tools panel, select Set origin > Center of mass

4- Align the Force Field to your object: Click on your object > Shift+S > cursor to selected, Click on the Force Field > Shift+S > Selected to Cursor

5- Modify the settings of the Force Field: In the properties panel physics tab, you can find the settings for the force field. By deafult, the strength is set to a positive value, which will push objects apart. To make them attract, input a negative value. Note that massive/distant objects will require a lot more strength to be effective.

Repeat this process for every object in your scene, and you will have your magnetic attraction the next time you click play.


Soft body collisions give missing cache error Sounds like I'm having the same issue as this question (Missing cache error) but since that has no answers, I figured I'd post this question with a working example of my issue.

I have a bunch of tubular structures that I build and mesh using metaballs. The issue is that sometimes there is a small amount of overlap between the meshes so I've written a script which uses soft body collisions to reduce the overlap (this may be overkill but I've found no other satisfactory way to do it).

The problem is that when I have more than a couple of meshes, I get this 'missing cache error' being printed to the console over and over again. It doesn't actually stop the simulation but that much printing to the console slows the whole process down.

You can download the .blend file with ten meshes and the soft-body script in it to see the problem for yourself here .

Does anyone know the cause of this error message, whether it actually affects the result of the simulation and how to stop it?

Not exactly a general solution to the missing cache error but I solved my problem.

I think the error has something to do with the physics simulations running with all the separate meshes that have no physics modifiers attached to them alongside the meshes I'm interested in that do have the physics on.

I solved this issue by using collision groups so that each mesh only interacts with those that it overlaps with anyway.


How to unwrap UV for each non-adjacent selected faces? I want to select "Face Islands" on the main mesh. I know that each of them must have the same geometry. But I want to do only one UV unwrapping for each one. I think that I will have to individually select faces, then unwrap, then adjust the UV for each selection, which very tedious.

The three windows on the top floor have been individually selected, UV-unwrapped, and material-assigned.

The six windows on the lower floors have the exact same geometry. I was hoping that I could select all of them and UV-unwrap for each disjoint selection. The normal behavior for this is it will put all 6 windows in the same UV map.

Assuming your topography won't change from this point forward ( or at least not significantly change ), you can solve this by following these steps:

select the faces you want to unwrap ( in the case the windows ) and detach them by pressing p ( or whatever hotkey you've bound to it ), and selecting "selection"
select the detached object, and go into edit mode
select all faces, press p - select "separate parts"
select all detached objects, and press ctrl+alt+shift+c - origin to center of mass
select one of the windows and unwrap it
select all windows, making sure your unwrapped window is active ( bright orange ) by clicking on it last
press ctrl + l - select "object data"

This will essentially make every window into an instance of the active window. Please note however that this assumes that the geometry of every window is exactly the same.


Is there a UV maps limit? Using the properties panel I can add, with "+"  button, only eight UV maps. Is it possible to have more than 8 of them?

Yes it's limited to 8. Explanations on devtalk.blender.org.

Note that using multiple UV maps isn't quite recommended, it's memory heavy, not every software supports more than 8 UVs (some don't even go up to 8), there are usually tons of ways to do without extra UV sets,...


Problem with the rotation of the object The rotation of the object comes from the center of the axis, but not from the object itself.
How to make the rotation come from the object itself?

Choose Transform Pivot Point > Median Point for example, rather than 3D Cursor:


Creating clear gel pill having translucency issues I am trying to make a clear gel pill capsule and there is this weird wireframe effect as seen in the photo. Is it a result of the lights or do you think its the wireframe mesh? Any advice would be greatly appreciated.

Also any ideas on how to make the background lighting more compelling is appreciated. I still want it to feel very clean. Thanks for your time.

Apologies for what will now be a question others may not have, my issue was that I had a mirror modifier on both halves of the pill so I am assuming the problem is similar to the Z-Fighting @haarigertroll shared but not positive. I removed the mirror modifier and the issue is gone. Thanks to all who gave input.


What does this mean when I try to parent armatures together? blender amateur here trying to rig a character. I have already created the skeleton for the character, but when I try to parent parts of the armature together so they can move as one, an error pops up. I've tried switching modes, creating new armatures, etc etc. and I'm not sure what to do! Any help is appreciated.

You can't edit parents in pose mode.  You need to be in edit mode.

Select your armature and change to edit mode.  Select the bone you wish parented, then shift select the bone you want to parent it to, and hit ctrl-p.  You can choose between connected and keep offset.

You can change the connected property via the properties window, bu you rarely need to.  If you make a bone connected, it will change the location of the head of that bone to the tail of its parent.


How to create a Light with the Python API in Blender 2.92 I want to automatically create a point light source, but I can't get my blender script to work.
Im using the latest blender version 2.92.
After loading the default scene and loading my my obj model, I first delete the original light and then create a new light source:
# remove default light
bpy.ops.object.select_by_type(type='LIGHT')
bpy.ops.object.delete(use_global=False)

# Create new light
lamp_data = bpy.data.lights.new(name="Lamp", type='POINT')
lamp_data.energy = 1000
lamp_object = bpy.data.objects.new(name="Lamp", object_data=lamp_data)
bpy.context.collection.objects.link(lamp_object)
lamp_object.location = (0, 0, 2)

In the Cycles viewport I can see that the light is illuminating my object, but when I render with F12 my object is just black, see the screenshot
What am I missing here?

Recommended way is to use low level API calls. Create a new light data block using BlendDataLights.new(), create a new object using ObjectData.new(), link the light data block and add the object to the collection in context using CollectionObjects.link(object):
import bpy

# Create light datablock
light_data = bpy.data.lights.new(name="my-light-data", type='POINT')
light_data.energy = 100

# Create new object, pass the light data
light_object = bpy.data.objects.new(name="my-light", object_data=light_data)

# Link object to collection in context
bpy.context.collection.objects.link(light_object)

# Change light position
light_object.location = (0, 0, 3)


Axis guide line problem When translating in edit mode, axis guidelines appear, blocking the view of thin objects and the 3d-cursor hides. Someway to hide the axis guidelines? I mean the blue line in the middle of the screen.

In user views, you can control the visibility of the axes and grid floor in the 'Display' panel of the properties region in the 3D View window.

I don't know why, but this doesn't work in the preset orthographic views (Top, Left, etc.). To hack out of that, convert the preset view to a user view from exactly the same angle, by tilting away and back again: Numpad46. It might be more convenient to align your view to a selected face, or an object's Z axis, using ShiftNumpad7.


Operator bpy.ops.object.modifier_add.poll() failed, context is incorrect. How to apply modifiers to an .obj file? I' m trying to add some modifiers to an imported .obj file but I have several issues. The code that I' m running is:
import bpy

#Element selection and removal
bpy.ops.object.select_all(action = "SELECT")
bpy.ops.object.delete(use_global = False)

#Model loading
full_path_to_file = "path"
Obj = bpy.ops.import_scene.obj(filepath=full_path_to_file)

def surface_refinement(Render,Vista):

    bpy.ops.object.modifier_add(type = 'SUBSURF')
    bpy.context.object.modifiers["Subdivision"].render_levels = Render
    bpy.context.object.modifiers["Subdivision"].levels = Vista
    #bpy.context.object.modifiers["Subdivision"].quality = 3
    bpy.ops.object.shade_smooth()

Render = 2
Vista = 1

surface_refinement(Render,Vista)

The error occurs at bpy.ops.object.modifier_add(type = 'SUBSURF')

Ditch the operators.
Operators return a set indicating the success {FINISHED} or failure {CANCELLED} of an operation.
There a chance that import has imported nothing (and after delete all active object is None) or that the current active object is not a mesh (a "subsurfable" type)
In which case there is no context object and poll will fail.
However test script below ditches all but the import obj operator.
Most importers (check first)  select newly created objects ie they are members of context.selected_objects after the operator has run. . Have added note about not adding code for deleting all objects to question code, really not that important either way but could be a bit sticky for  a new user tryings it out before realizing.  Thank goodness for undo... anyway I digress
How to add modifiers using python script and set parameters?
Using python to set object shading to 'smooth'
Here is test code, adds a subsurf modifier and smooth shading to all newly imported mesh objects.
import bpy

# FWIW Dislike this in question scripts
#
'''
bpy.ops.object.select_all(action = "SELECT")
bpy.ops.object.delete(use_global = False)
'''
# will deselect instead.

bpy.ops.object.select_all(action="DESELECT")
#Model loading
full_path_to_file = "foo.obj"

def surface_refinement(obs, render_levels, view_levels):
    for ob in obs:
        if not ob.type == 'MESH':
            continue
        ssm = ob.modifiers.new("SubbyO", type='SUBSURF')
        ssm.render_levels = render_levels
        ssm.levels = view_levels
        me = ob.data
        me.polygons.foreach_set("use_smooth", (True,) * len(me.polygons))

# test call
render = 2
view = 1
bpy.ops.import_scene.obj(filepath=full_path_to_file)

surface_refinement(bpy.context.selected_objects, render, view)


BGE: realtime random shape generator (python) I want to set up a script that randomly changes the shape of an object.
What I have so far is:

from bge import logic
import random

cont = logic.getCurrentController()
object = cont.owner

for mesh in object.meshes:
   for m_index in range(len(mesh.materials)):
      for v_index in range(mesh.getVertexArrayLength(m_index)):

         vertex = mesh.getVertex(m_index, v_index)
         vertex.setXYZ([ random.random(), random.random(), random.random()])

This works pretty well. However, since every single vertex gets its own random location, the cube turns out something like this:

what I want is something like this:

My question is: how can I achieve something like that?

I think the "broken" shapes happen because 3 vertices are connected to each other and if they all get a different random position, the shape "breaks"?

I assume, that I have to give the vertices 1-3 the same random position, then the vertices 4-6 the same random position and so on?

If that is true, how could I write that down in python?

I have modified the code as follows :

added a dictionary that stores the vertex position and the generated offset by random.uniform()
for each vertex check if there is already an offset for this position , if so we add this offset to the old position
if there is no offset calculated for this position we generate a new one and store it in the dictionary, we also add it to the old position

this method gives the vertices that has the same position  the same offseet

from bge import logic
import random
from mathutils import Vector

cont = logic.getCurrentController()
object = cont.owner

for mesh in object.meshes:
   print(mesh)
   verts_shift = dict()
   for m_index in range(len(mesh.materials)):
      print(m_index)
      for v_index in range(mesh.getVertexArrayLength(m_index)):
         print(v_index)
         vertex = mesh.getVertex(m_index, v_index)
         xyz_old= vertex.getXYZ().freeze()
         xyz_shift = verts_shift.get(xyz_old, None)
         if xyz_shift :
             vertex.setXYZ(xyz_old+xyz_shift)
         else :
             xyz_shift = Vector(( random.uniform(-0.5,0.5), random.uniform(-0.5,0.5), random.uniform(-0.5,0.5) ))
             verts_shift[xyz_old] = xyz_shift
             vertex.setXYZ(xyz_old+xyz_shift)

         print(xyz_old, xyz_shift)


Is there any way to reduce the spaces between UV islands without scaling the actual islands? I know about Ctrl+P, I know about Individual Origins scaling, that is not what I am looking for, I am looking for the scale tool that reduces empty space between a selection of scatered, non-uniform UV islands without actually scaling said islands. Any suggestions?

When you press Ctrl+P move your cursor or let your cursor be in 3D window and press F6. A popup will appear - play with the settings there to adjust how much spacing you need.


How can i select my self made Texture Paint on my Shape in Blender 2.8? I have two different Texture Paints in my Material and i dont know how to select one or another. One is automaticly selected and i dont know how to switch them.

Have you looked at the Shader layout window to see how they are connected as nodes? There should be an image node for each image texture there. – Craig D Jones


Distance between two Bezier curves I have curve modifier applied on 3 extruded planes. The curves and planes all have the same width and the curves have the default handle values.

My expectation was that since the distance between the two curves throughout the curve extent is constant, if at one end the objects are just touching each other, at the other end also they would touch but not overlap.

I notice, however that at point 1 of the curve there is considerable overlap in the objects. Could you help me find the reason and the resolution of the issue.

The "distance" between them may be the same in the direction of duplication (ie. global), but not in the direction of extrusion (ie. the normals of the curve).

One solution to fix this is using the same curve to deform all your planes, just give each of the planes the right offset in object mode.


Where to Learn Cycles Material Nodes from basics Is there any video tutorial series learning cycles material nodes. Where can i learn material nodes for cycles right from the basics. What are different nodes and in what order i can connect. What effect i get to what node i connect. etc. All the video on Youtube i have seen are base on topic. For example how to give Steel effect or plastic,etc. I did not find a complete series on cycles node material. Any help or suggestion where can i learn. Thanks

Each node is very basic and very descriptive. For example, A Mix node mixes 2 input based on a factor value, a SplitXYZ node splits the input into XYZ. A simple online search should help if you still need clarification.

I think what you need to learn is the high level concept of shading and texturing. Look up "PBR material" basics, That should get you started learning about how the shaders behave, how inputs such as albedo, normal, roughness affects the surface, and how to create steel, plastic, etc.

I also suggest you focus on learning about the principled shader(as oppose to individual shaders such as glossy or diffuse), as it's the most artist friendly, complete, and industry-accepted pbr shading model.


Noisy picture with no fireflies I made this picture with 6000 samples. No fireflies but still so noisy. I read a lot of articles to get rid of fireflies but I just need to clear my pic. Any idea?

You can turn on the new denoising feature that was presented in Blender 2.79. Please download Blender 2.79 Here and then follow the instructions presented below.

Step 1.

Open render layers.

Step 2.

Check the box that says denoising.

Hopes this helps a lot of people


What is the most efficient way to invert a mesh so as to inform a key, coupler or mold? Let's say that I have a mesh, and I would like to create a "negative image" of the mesh.. essentially, creating a mold. Like so:

This I modeled manually.  But if you had a complicated shape, modelling it by hand might be something of a nightmare.

So ht question becomes: how do I create a "mold" of an object so one object will fit on another object?

To better explain what I said above in comments, here is an example.

Starting from a "positive" cube object, this below is a possible setup to use a boolean:

after applying the boolean modifier, you get a cube.002 like this:

Note, to make the boolean work as "difference" I had to scale up a bit the second cube: you may need to rework a bit the resulting shape to get a perfect "shape inversion" as in your image above.

Lastly, in this simple cube topology works very well:

but using more complex meshes, and less simple booleans, you'll get bad topology quite soon... if that matters to you, take into account to get the overall shape from booleans, and then spend some time to fix it, by retopologize.  Sometimes is simple, sometimes is so bad that is better to avoid booleans and choose another approach (manual modeling).

See this case: How can I make holes on a wrist strap?, where booleans had to be avoided, while in the above link (Partial shape subtracting only) due to very complex shapes it could work well (but it probably reuired using high density meshes)


2.8x ADD-ON - I need an add-on to "paint" instances of an object over another object's surface In 2.79 I used to use an add-on called "Paint Clones" which would allow me to basically paint instances of one or more objects over another object's surface with random scale/rotation.

That add-on hasn't been updated for Blender 2.8x, which means I need a substitute.
I've googled far and wide, but the only similar tool I've found died with Blender 2.79 as well.

Obviously I've tried resorting to particle systems but, besides the useless intricacies of setting them up, they don't allow me to place multiple/different objects with a single system, nor (seemingly) to randomize rotation over multiple axes.

Does anybody know of an unspoken Blender function or add-on that could help me in the task?

If I understand what your goal is correctly, then here is a solution that should work for you in version 2.8 without needing any add-ons or extra tools.

Move your clone object(s) to a new collection with M and give it(them) a useful name, such as "hair".

Add a new vertex group to your main object, Suzanne in our example here. You can leave it at the default name "group" or rename it to something more useful like "hair".

Add a new particle system and change the following settings to begin with:

Most default settings are usually fine, but here you want to Render as Collection, and set the Density Vertex Group

With all of that done, you can now paint your clones. Ctrl+Tab into Weight Paint Mode  and  paint away! Everything will paint into the last active vertex group, adding to the density group of your hair system.Ctrl+Tab again to return to object mode

See the gif below adding icospheres to Suzanne.

You may also randomize velocity if you'd like, (this will allow some randomness in rotations)  the option is pictured below.


How to make the camera move with the object while animating I recently made a drone in blender and i want to make an animation while it flies. There i have a problem because the camera stays in one place and i want it to move with the drone so can anyone help me out.

A camera in the real world rarely tracks directly onto the subject - it will typically lag behind the motion of the subject so that the faster the subject moves, the further the camera will become out of position before it can catch up and the nearer to the edge of the frame it will be. We can emulate this effect by tracking the camera to Empties that follow behind the object rather than to the object itself.

Add two Empties to the scene - one will be the point the camera is pointing at (target), the other will be the 'ideal' position of the camera (goal). The 'goal' can be parented to the object so that it stays at a fixed position in relation to the object being tracked - in this way the camera can be made to follow the object at a fixed distance and direction. A Track To constraint on the camera will point it at the 'target' Empty.

Drivers will be used to re-position the camera and the 'target' on each frame.

To achieve this, select the 'target' Empty, right-click one of the Location fields in the properties panel (N) and select 'Add Drivers'. Open a Graph Editor window and change the mode to 'Drivers' - you should see the three drivers for the X, Y, Z location. For the X Location, the default 'var' variable should already default and set to Transform Channel for X Location - set the 'Object' to the object being tracked. Create a second variable named 'self' and similarly set to Transform Channel and X Location - set its 'Object' to the 'target' Empty. Set the driver expression to '(var + self * 4)/5.

NOTE : To enable driver expressions you may need to go into File/User Preferences/File and enable Auto Run Python Scripts.

Repeat for each of the Y and Z locations, changing the Transform Channel to the relevant channel in each case (ie, Y Location for 'Y' and Z Location for 'Z').

The expression (var + self * 4)/5 calculates a point that is 1/5th of the way between the Empty and the object being tracked and the Empty will now move to that calculated position on each frame. This will mean that the Empty will gradually move towards the object being tracked and will lag behind the object as the object moves.

Moving the object using keyframes should now result in the camera tracking to the object with a slight lag when you run the animation. The lag will be greater the faster the object is moving.

Set up similar drivers for the Camera (ie, select Camera, right-click a Location property, Add Drivers, go into the Graph editor and set up the drivers with Object set to the 'goal' empty (var) and the Camera (self)).

To increase the lag in the calculated postions you can adjust the calculation - for example '(var + self * 9)/10' will move it 1/10th of the distance, '(var + self * 19)/20' would move it 1/20th of the distance - so it would take much longer to reach the goal.

If you now run the animation you should find that the camera attempts to move with the tracked object and attempts to keep it in the centre of the shot.

NOTE : As the object positions are calculated 'on-the-fly' you can get unexpected results if the frame number jumps forward/backward or blender calculates sub-frames (as the calculated positions will still move as if a single frame has advanced). Therefore, it's a good idea to Bake the animation prior to rendering by selecting each of the 'dynamic' objects in turn (ie, the 'target' Empty and the Camera) and go to Object/Animation/Bake Action in the 3d-view menu. Once baked to keyframes you should disable the drivers by clicking the image of a speaker in the Drivers view.

Blend file attached


Set multiple origins to geometry? I have lets say 5 individual vertexes objects with the origin all set to the centre of the screen. How could I set each vertex to the geometry of each vertex?

In 2.79, in object mode, with all objects selected, ShiftCtrlAltC will send the origins of all the objects to their geometry simultaneously.

in 2.8, until you set a personal shortcut, it's available only through the header > Object > Set Origin menu.


Adding keyframes while modifiers are active I've come to learn that if you disable all f-curves *Modifiers on an active bone, you can insert new keyframes for that bone by moving things in the pose editor. Once you reapply the f-curve modifiers by clicking the checkmark box in the top right corner of the modifier window for each f-curve, both the f-curve modifiers and keyframe movements are preserved.
My question is, is there either:
a. a way to insert new keyframes while an f-curve modifier is active
b. a way to uncheck f-curve modifiers in bulk (for animations that have many modifiers applied)
And I know that you can just click the wrench icon in the left pane, but that doesn't work the same as disabling each of the f-curve modifiers manually. Also, why is this the case? Is there some alternative purpose that I don't know about? Or is it just a bug or currently unimplemented feature?

If you want to set keyframes, enable "additive" on the modifier settings of any channels you wish to keyframe, then keyframe them.  (This will require expanding the f-curve modifiers so you can see their options.)  If you'd like to disable "additive" afterwards, you can, and the keyframes will remain, but keep in mind that keyframes don't actually affect the output of modified f-curves unless "additive" is set-- otherwise, the modifier straight up replaces the keyframed values.


Bright pixels that appear on the model after rendering I got this bright pixels, what is reason? , any one can help me for this

These pixels are called fireflies. The solution is to increase the amount of samples. I would try at least 500:


Can people using different computers edit the same .blend file at once? I was wondering if it was possible to make a multiplayer blender file, almost like Google Docs. If there is, can anyone help? thanks, sorry for the strange question

Currently this isn't possible and would require major changes to Blender.

Typically larger projects divide assets into many files so people can work on different parts simultaneously, this can be done so assets can be re-used in many places using Blender's library linking system.

Its also common to use a version control system, such as Git, Subversion, Mercurial... (or many others), to manage files for larger projects.

For reference, Mango Open Movie used this structure.


Why is the Mask size mismatched in the Compositor? I masked an image in the UV/Image editor masking section. I then used that mask in the compositor for background replacement. However, the mask size seems to be different. Why is that? Here's a screenshot:

The reason seems to be that the render resolution didn't match up with the image size.


I'm having trouble making my model look good with a small amount of faces Here a pistol that I'm trying to model for a game.

I watched a video where a guy made a whole rifle with way less faces than I have and his looked really good, while mine still doesn't look that great. I know part of it is just experience but there has to be something that I'm doing wrong that could be corrected.

Obviously there are a lot of unnecessary faces but I had to subdivide my model because there were some parts of it that were just looking horrible.  If you want to give me some tips that would be great or if you want to just link me to a really detailed tutorial that might help my situation.

Anything would help.

[

You probably need to learn about working with Subdivision Surface based meshes and adding control loops to control subdivision.

Try working with a lower poly version of your model as base mesh and add details only as needed dynamically with a Subsurf modifier on top.

That not only make modeling a lot easier and manageable, because there are a lot less vertex around to control, but also reduce polygons considerably.

You can control the number of subdivisions dynamically before exporting, without having to rebuild your model from scratch.

See tutorials about Blender Subsurface Modifier


including decals in weight painting for rigged models I have created details on a character models clothing using the method described

here

which basically copies the underlying mesh and projects the detail onto it. this works well because i can have a high resolution detail (such as a logo on a shirt) without having to make the whole shirt match that resolution. this technique works fine for still models but as soon as i try to rig the model using auto weight painting it runs into problems. it seems that the decals, despite being exact replicas of the mesh underneath them, are not included in the weight painting and so react unpredictably(i have tried joining and boolean union on  the mesh) . is there any way to get past this without having to bake on these textures which would result in the need for a very large resolution texture?
many thanks.

I think that you should be able to make use of 'empty weights' and mesh data transfer to copy the weights from your weight painted body to the separate clothes.
I came across this useful answer that should hopefully be of use to you : https://stackoverflow.com/questions/34719718/transferring-rig-weights-from-one-mesh-to-another-in-blender-2-76/34760742#34760742


Why my face is missing when I export fbx from Blender to Unity 3D? I am exporting .fbx to Unity 3D from Blender 3d but when I see the object in Unity it has a face missing. Can anyone help me fix?

Thank you,
Waqas

You just have to select problematic faces and then flip the normals.

To flip normals, open Blender in Edit Mode select problematic faces and go to Mesh > Normals > Flip.


How to create realistic lighting at night in Blender Cycles I'm modeling a simple night scene (with buildings, traffic lights, etc) to simulate you actually driving down the road. The rendered image looks like this.

The lighting in this image doesn't seem to be realistic and the building is too dark. I would want the buildings look like the one in the following image(with light coming from the building):

I tried to add light sources in the building, and make the material of the building glass as glass, the light is not visible. How do I create realistic lighting for the buildings? Thanks in advance for your reply.

. I changed the road material to be a solid color so I didn't have to worry about uploading texture images with the .blend file.

First of all, I noticed that your image has a pretty light-blank sky. (by which I mean that there really isn't light coming from it.) Light always comes from the sky, even at night. You can see the difference in the image you provided as a target.
You need a HDRI (high dynamic range image). these can be found quite simply by Googling HDRI maps. You can also render your own from blender, but that's a different story. If you want to use your existing sky, it'll work, but it may look weird. Change the color setting of your sky to environment.
I would also add an emission node to some of the windows. if you increase the amount of your fog glow node this'll give nice results.

Now obviously you don't want a model that took four minutes to make, but you get the gist of it. What really makes the example picture you have nice is that there are reflections off of the interior walls. This can be accomplished with a glass shader and some lights inside the building. Note that it will look better close up, worse far away, and better overall if you use a texture on the building. I used brick.


How do I set a custom shape for multiple bones? I've tried finding a solution for this, but I can't seem to locate one.  Or perhaps I'm not asking the right questions.

Right now, I'm using Blender 2.79b, and what I want to do is to select multiple bones in an armature, and set the custom shape for all of them without having to do each bone one by one.

Mostly it's because I've got a model with ten fingers, and each finger has two control bones that should use the same custom shape, and I would rather not have to set the custom shape twenty times if there's a possibility to do it all in one go.

Any help would be greatly appreciated, thanks!

Make sure the Copy Attributes Menu addon is enabled (by default embedded with Blender).
Then select first the bone(s) that should receive the shape, then the bone that has the shape holding the Shift key > Ctrl-C > Copy Bone Shape


Download add-ons from console? When I download add-ons from this page, sometimes I get a zip file, but sometimes it's just a link like this.

I don't have programmer training, but I know that's something to do with calling an action from the console. Before I just copied the text into a text file, saved it as a zip and installed it that way, but what's the actual way to get the add-on from a link like that?

I saw this: How can I get a list of the installed addons using the API? but it doesnt help me.

You can use wget which is a command line tool to retrieve files using HTTP, HTTPS and FTP you can download it from here and these are the installation instructions and how to use

Also rather than coping it to a text file you could have right clicked on each of the six files and clicked 'save link as....' (a easier way) after that just put all of them in a folder and put that folder in the add-on folder


Wireframe of top and bottom caps on cylinder I have a vertical cylinder and I want a wireframe on just the horizontal circular outlines around the top and bottom caps. However, when I apply the wireframe modifier, it wireframes not just these, but also each of the vertical edges around the outside that make up the faces of the circular shape around. Is there an easy way of getting just top and bottom?

Note: I already posted this answer as a comment; posting it as answer now so the question can be completed. Also added some extra information + images for clarity.

Have you tried using Mesh wireframe? In Edit mode, select the edge loops on both ends of the cylinder and find 'Wire Frame' in the search menu(spacebar). Uncheck 'Replace' if you also want to keep the cylinder shape.

Note that this is destructive modification; using the Wireframe modifier would likely be more convenient, but I think that's not applicable since if you use the modifier, the edge vertices are shared with the top/bottom face vertices, so they will likely always be modified together. The modifier also doesn't seem to work on only selected vertices / vertex group.


How can I extrude a dome from a circular face? I have the following mesh:

I would like to extrude the face at the center so that a dome forms out of it, such that the dome's boundary would be exactly that of the circle. (Think bubble wrap.)

Is there a quick and easy way to do this?

Yes, try extruding and scaling it multiple times:

To help make the extrusions more even, you might try using the To Sphere operator (⎇ Alt⇧ ShiftS). You can define where the center of the "sphere" To Sphere uses by using the 3D cursor as the pivot (.).

If you want to be more precise, try adding a sphere and deleting half, then using Bridge edge loops (W, E)

Note that the number of vertices on the perimeter of the sphere should match the number of vertices around the initial circle.


Material not rendering Greetings: I'm new to Blender. I've done my due diligence by reviewing about 100 posts on similar rendering questions but, within the limitations of my understanding, I've not found a response that appears to answer my question.

In attempting to render an animation using eevee, I am unable to get the rendered images to show the glossy finish that I get in the Modeling editor when I select the Render Preview button. Instead, I get the grey appearance shown in the eevee image.

Any help would be appreciated. Thanks for your time.

You need an HDRI texture for the proper reflections you are looking for. Go into the shading tab and switch from object shading to world shading (highlighted below). Add an environment texture, and assign an HDRI texture

(If you need HDRI images, one place that has  a good selection of free ones is here - https://hdrihaven.com/hdris/).

Alternatively, if you want the same ones that come with blender (used in lookdev), they are in the folder ../2.82/datafiles/studiolights/world. I think the one you used in the preview is forest.exr

Connect it up as shown below and enjoy.

For the other problem you are having, your (base) material node setup should look like this. Either add the nodes if they're not there, or if you want to just start again, hit the minus button next to the material, and add a new one.

EDIT: A SAMPLE PROJECT FOR YOU

Ok, I made a .blend project that SHOULD be pretty much the same as what you're working with. It works fine for me. Download it, and have a look, and see if it

a) it works for you, and

b) has any differences between it's settings and yours.

File is here -