Change material of object by using python

I have solved the problem by:

#***Set color***
D = bpy.data
Color_material = D.materials["Material"]
cube = D.objects['Cube']
cube.active_material = Color_material


How can I tell if my mesh is detailed enough for boolean operations?

Sorry, but you can only get that knowledge by doing a series of misstakes. Subdivision is by no mean a silver bullet and neither is bevels. Subdivision is not a requirement for any model. It is a tool to handle a hi-poly surface with fewer controlling vertices. But it is hard to handle and you must take interest in how to make good topology for sub div.

If you do booleans the resulting topology will often be bad. It needs to be cleaned up. I would recommend you to analyse the result of each modifier and so you can learn how to control them.

It's not how much topology you have, more how it the edge flow works and that you have enough of it to support your shape.

I can recommend you to research how Arrimus 3D solves different problem, not always the same tools but more often then seldom a solution that works for blender.

https://www.youtube.com/channel/UCSLLdTBwLMfTKWS56tOiQpw


Duplicated Material output node

Even though it seems to be one, if you try to grab it and move it slightly you should discover that there's another one just behind it.

When you have multiple material output, Blender set as active the last selected of them. As in your setup Shader/Surface and Displacement are in different output node, you cannot see both effect at the same time.

Delete one material output node and plug the cables in the other.


How do I add a non-deformed end cap to a tube?

Thinking about this only way I could come up so far is by not using an Array Modifier at all, and using hooks instead.

It may have some downsides and limitations like less flexible texturing and not allowing more complex shapes along the length of the curve, and it wont merge the vertex automatically, but the ends wont get deformed this way, and you won't see any seams if the ends match.

Model your pipe exhaust tip regularly as you did, or append it from a library, whichever way suits you best. Can even be a collection Instance

Instead of using an Array Modifier use the bezier curve Bevel option directly, to give it geometry, you may even use another curve object as section for the bevel. Just make sure the exhaust tip and the section match perfectly so there are no visible seams.

Now align your cap object perfectly with the bezier curve end. That means both position and rotation, including curve handles so they line up perfectly. Try scaling the last curve handle to zero in all axis before hooking up.

Use the 3D cursor to snap the cap in place like Select Vertex > Shift + S Cursor to Selected, then exit edit mode select the cap and Shift + S Selection to Cursor.

Now select the Cap then the Curve (by this specific order) enter Edit Mode on the curve, select the last vertex you previously aligned, press Space Bar type Hook and select the operator Hook to Selected Object

This has the positively unexpected advantage that you can now tweak the shape of or pipe directly from object mode without ever entering Edit Mode in your curve.

On a side note, you can use this with an Array Modifier, but it will not always work perfectly. Since the array is based on segments, depending on the particular length of the curve at a given moment, it may not give an exact count of arrayed items so will get gaps at the end, between the last arrayed object and the end cap.

If you plan on applying the modifiers later you can fix it by hand, you can also use very short array segments to minimize visibility at the expense of performance.


Well for one you vastly overrepresented the geometry of simple objects. See for example your arm chair:

There is no need to have this many polygons. I don't even think you are using smooth shading and it looks smooth just because there are so many polygons. It looks like this with solid shading:

But guess what happens when I add a decimate modifier and set the reduction factor to 30%? It looks the same but has way less polygons. With the kind of displacement you're doing, you should really be using microdisplacements with texture maps, and normal mapping instead of insane polygon counts. For the chair you could get by with just normal mapping which is  computationally way cheaper than displacement mapping but gives similar results when the geometry is not dramatic or on the silhouette as seen from the camera.

Regarding render times, there are lots of optimizations you can do but unless you reduce the polygons the BVH tree will be huge which will make everything else slower. You probably don't need 2500 samples on an animation. If you are playing back at 30 frames/second you can accept a tiny bit more noise and you won't notice much because it only lasts for 1/30 a second and the noise on each frame is unique. First reduce the polycounts though, then worry about render optimizations. A relatively unoptimized scene of that complexity should take about 3-10 minutes to render on a GTX 10XX card with those noise levels you have now.


How to transfer uvs from static mesh to the same rigged and animated mesh

Select the object you want to copy UV map to, then the source object. Execute Ctrl-L > Transfer UV Layouts. If you're using an older version of Blender, it's in UV Maps property group's dropdown button. This will work flawlessly only if both are exactly the same, no vertices/edges added or removed.

You still need to edit the destination object's texture to use the right UV map, afterwards.

Edit: In your case, it seems like both character meshes are attached to different image files. Two identical objects can have identical UV maps, material and texture, but look different in the viewport because they're attached to different image files:

To fix this, make sure the image file being displayed on Image Editor is the same, when both objects are edited. This doesn't affect how they're rendered, though.


Masking doesn't touch the mesh, just makes it appear a hole, tunnel, or pit is in the impaled object. Note that this form of masking only works when rendered with OpenGL.  Blender Internal can also do this but with more imagination and work.  I have no experience with Cycles but imagine it could also be possible.

In this example a 3D mask is used to give the hole depth. It is turned off in the Outliner until the sword is ready to be withdrawn. The sword's removal reveals the hole.  The camera can actually travel through the hole and out the other side, spin around and peer through from the rear with a little Outliner trickery.

If 3D masking is a little too much for the inexperienced, a plane shaped as the hole can be used instead, but you'll be seeing straight through the torso and without depth, as though a hole had been cut into a photograph.

The details -

Make a duplicate of the actor and store it in say Layer 10 for safekeeping.

Impale the char with the sword and select the char, use a Boolean modifier on it, choose the "intersect"  option and name the sword as the impaling object.  What should be left is the actual hole the sword makes but shaped as a solid 'lump'.  It's front and rear surfaces will match precisely the torso's geometry.

APPLY the modifier so the geometry remains solid.

Blender is still seeing this 'lump' as the character, so rename it as a mask and move it to layer 2.

Go back to layer 10. duplicate the character or torso and move that to Layer 1. (replace what the Boolean modifier has destroyed)

Select the mask in Layer 2 again and give it two material slots.  One for it's sides (coloured red) and another for it's front and rear surfaces. (transparent)

We use the 'old Inviso trick' here and refer you to this link for detailed info about this form of masking.

How to put a mask into 3d space

The two important steps being - the Transparency tab's "Opacity" slider is to be set at 0.008, and both Specular sliders set to zero to avoid ghosting.  The diffuse's colour wheel slider should be set to about half brightness.

Once done and viewing in 'Material" mode the mask should now have invisible ends and you should be able to peer through it and see it's sides.  If the sides aren't visible, get into the mask's material tab and make sure the 'Mask' material is underneath the 'Sides' material. (use the triangular arrows to move each up or down)

With both layers active, expand the mask in the X or Y direction only and just a whisker so it's ends are barely outside the torso's surfaces.  This is so we will be seeing the mask's ends, not the torso's material where the mask sits.   When the ends are working properly as masks, a hole will appear 'through' the torso.  Viewing from the rear will be the same.  If it's not working you will need to read through the link
properly and apply that info.

Shape the hole's ends as you wish to make it appear as a wound, bearing in mind that it's surfaces once deformed, may slip back under the torso's and lose the masking effect in those regions.  It's no big deal but it may appear a little strange.

If the character is going to be moving about, a 'Navigation Empty" will be necessary.  Create an Empty at the char's origin point, then parent the mask to it.  Do that first.  Next, parent the character or it's armature to it.

This maintains the 'creation hierarchy' necessary for this form of masking.  We would be in effect, parenting the torso to the mask but not directly.

Full details can be seen at the info link above.

The character's selection arrow in the Outliner should be grayed out so it cannot be moved about directly.  Instead animate the Navigation empty.  That will keep both the 'hole' and the torso together.


The problem is that you need to change the size/format of your UV map.
Go to edit mode in the viewport and then you will see the UV map in the UV/image editor:

EDIT: in order to see the uv map, you need to select the vertices in the viewport while in edit mode or select this option:

Then select one or all of the vertices in the UV/image editor and move/scale.


Why do i get this Merge Operator: Enum not found error?

The type enum property items for the operator is populated based on selection.

The type enum is an example of a dynamic enum that is populated dependant on selection.

As mentioned in my answer to  this related question Add shortcut for Merge Last, and Merge First if you use col.operator_enum("mesh.merge", "type")  you get the available options.

import bpy

class MESH_PT_merge2(bpy.types.Panel):
    """Merge Panel in Mesh Tools"""
    bl_label = "Merge"
    bl_idname = "MESH_PT_merge2"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    #bl_category = "Tools"

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

    def draw(self, context):
        layout = self.layout
        col = layout.column()
        col.operator_enum("mesh.merge", "type")

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

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

if __name__ == "__main__":
    register()

  I would like only the "At First, At Last, and Distance" buttons to be
  visible

Speculatively it looks like first and last options require vertex select mode and at least one vertex  selected.  An edit bmesh could be used to test, depending on your use case. this is probably overkill.

A try and except clause, except I generally recommend try to avoid these if possible.
In this case the error is thrown after the UI draws the button before the type property is assigned, hence I've disabled.

    for k in ['FIRST', 'LAST']:
        row = col.row()
        try:
            row.operator("mesh.merge", text=k.title()).type = k
        except TypeError:
            row.enabled = False

Lastly, to get all the items possible in an operator enum

>>> rna = bpy.ops.mesh.merge.get_rna_type()
>>> rna.properties['type'].enum_items.keys()
['FIRST', 'LAST', 'CENTER', 'CURSOR', 'COLLAPSE']


How to create realistic plastic effect in packaging

For the following cloth simulation, the ground plane is set to be a collision object and the box has the 'leather' cloth preset applied.

There is a Sub-Division modifier in the stack below the Cloth Sim modifier, you can place the Sub-D higher up the stack for more detail however this greatly increases the time needed for the calculations to run.

Once the simulation is run, you should have a series of frames to choose from.  Select the one you prefer and Apply the modifier so that the mesh becomes frozen in that shape.


Subdivision + Solidify + Bridge Edge Loop

Your face orientation is causing this problem. To see face orientation you can check Face Orientation under Viewport Overlays tab. Blue is outside. Red is inside.

To solve this select your object and toggle to edit mode. Press a to select all. Then press Shift+n to Recalculate Outside. This fill flip normals that are inside-out. You can also select Mesh tab and from Normals select Recalculate Outside.


Is it possible to tell viewport Ambient Occlusion to ignore edge lines in edit mode?

Disable Faces Overlay

Because the way viewport's AO is currently built (2.77), everything is drawn in the 3D viewport is taken into account.

What you see is probably the projection of adjusted faces that comes from the unmodified mesh. Basically, as in edit mode you see two version of the same geometry (even with "Adjust cage ..." enabled, it's only projected upon the modified mesh), you get AO from both meshes.

If it is suitable for your workflow, one possible workaround could be to disable the Faces option in the Overlay section of the Mesh Display panel in the Property of the viewport.


How to rename uvmaps in multiple objects

I figured out a very simple answer. First rename all uvmaps to something random like "bnoterp" that is not anywhere. That changes all (primary?) uvmaps to that name. Then after that rename all of them to "UVMap". That way the script does not create new uvmaps called UVMap.001 when it finds uvmaps with the same name as the script.


Animation nodes - Driving scale attribute from a CSV list to create a bar chart

At the moment your “parse” loop loops over the list of lines given by the Split Text node with mode set to lines. This is useful if your .csv file is in this form:

name, value
A, 1
B, 2
C, 3

But if your file is in the form of

A, B, C
1, 2, 3

then you'll have to

split the file into lines,
pick the line with the values in it,
split this line at the value separators outside of the loop
and then loop over the value strings.

Depending on the number format of your values (e.g. decimal comma, thousands separator) you might have to use a script node to parse them. However, a simple Parse Number node might be enough for your file. The parsed number has to be piped into the loop's output that you can generate by clicking New Generator Output and choosing the type Float List.

Finally, the parsed list of numbers will be piped as an additional iterator into the other loop which is used to place and scale the bars (New Iterator > Float List). Using a Vector from Value node, piped into the Object Transforms Ouput is sufficient if you only enable scaling for the Z value, but you could also use a Combine Vector node:

If the number of columns in your .csv file is the same as the number of bars then you could also combine them into a single loop with one Object List iterator and one String List iterator. However, two loops offer more flexibility if the .csv file should contain a column header (or line header in your case) or when you want to select for which values you want to create a bar.


edit: I wrote up an addon that creates a panel in the tool bar that you can drag into position above the brush panel - it polls for whether you have an object in sculpt mode or not. I made separate classes for each of the brushes so I could place them in 3 rows of 6 icons.


You can use the expression var != 1 which will evaluate to False if var is 1 or True in any other case.
Example :


Layer specification for bpy.ops.mesh.primitive_torus_add

Yes, that's one primitive which doesn't seem to inherit the layers attribute. You can however in the meantime use code like this to set layers.

obj.layers = [(i in [0,3,5]) for i in range(20)]

the object will appear on layer 0, 3 and 5.


When I use 'Shift+B' to Zoom in to box, doesn't work

I have no idea why this is happening but i can give you some ways that it MAY fix it. Blender uses a central orbiting camera movement, this means that if you have zoomed in too much, the camera will be at the origin of the orbital system. You can zoom out and in with your scroll wheel and you can also use 'SHIFT+CTRL+(- or +)'. Hope this helped, if it did not please reply as i will try my best to help you!


The workflows can in fact be even more seamless in 2.80 if you dedicate some time to learning the new functionality

No, you do not have to drag the mouse to the corner of the screen every time you want to perform some operation.

There is a whole lot of ways to do it now. I am not even sure I will be able to list them all, but:

You can have move tool active and Ctrl + right-click to use lasso select.
You can have any tool active and Ctrl + right-click to use lasso select and transform stuff with regular transform hotkeys G,R,S.
You can select Select Lasso tool from the toolbar and then use it without the move gizmo visible and transform stuff with the regular transform hotkeys G,R,S.
You can switch between tools using keyboard shortcuts: Shift+Space->2 for Select Lasso, Shift+Space->T, or G,R,S for transforms.
You can right-click on the Select Lasso and Move tools on the toolbar and choose Add To Quick Favorites and then access them from Quick favorites menu with Q.
You can assign any shortcuts you desire to them.


object instancer animation nodes only work on a clean new blend file?

The instanced objects are in the same layer as the source, but not in the same scene! each node tree has a scene attached to it (you see which one in the left toolbar). also you can use a "Create Scene List" node to tell the Instancer node which scenes the instances should be in.


If you don't care about the bottom of it being deformed like the top, you can simple add a solidify modifier (with offset of -1) to achieve this effect. Otherwise, this answer is suitable.


Blender 2.80 - Image Editor - how does Set Curves Point work?

Sometimes it's best to ask the developers directly. Thanks for the explanation.

This hotkeys is to pick the color under the mouse, and set the black and white level values in the curves sub panel in the Color Management panel.

To see the result you need to tick View as Render in the Image Panel in the sidebar.


Problem with UV unwrap, collapsing vertices

The problem was that I had pinned vertices(They are red when pinned), the fix was as simple as selecting all vertices in the uv editor and pressing Alt-p. Thank you so much, Mr Zak for bringing this to my attention.


The bridge is showing up as black because it has no shader on it. You need to add a shader to it to be able to render it. Let's use a diffuse shader.

In the node editor, Shift A Shader -> Diffuse
Connect the output from the Hue node to the color input of the diffuse shader.
Connect the BSDF output from the diffuse shader to the Material Output's Surface input.


Maybe your problem is the following one:
Your shapkeys are set to Relative. Let's say that you have a cube and that the shapeky #1 will be this one, i.e. vertex going up:

Now, bring back the shapekey #1 value at 0. Create your second shapekey, let's say that for this shapekey the same vertex goes up:

Now keep shapekey #2 value at 1, and move shapekey #1 value up to 1 as well, you'll see that vertex 1 will cumulate shapekey #1 and #2 effects:

I guess this it what happens here, as you've left some shapekeys value at 1, and as you've moved the same vertices in different shapekeys, their movements cumulate.
Maybe disable Relative to switch to Linear (which allows to go from a pose to another), or use bones instead of shapekeys.


You should use an armature, and create one bone by fold, like this (the central one being the parent of all the bones):

Give your bones names, parent the object to the armature with With Empty Groups option, select the vertices of a fold in Edit mode and in the Properties panel > Object Data > Vertex Groups, assign these vertices to the vertex group they are supposed to be part of (the vertex group that has the name of the bone that is supposed to control these vertices).
You can also give some Limit Rotation constraints to each bone so that they only rotate on the right axis.


Shared preferences/addons across different machines (e.g. Dropbox)

It seems like this thread should help. Copying startup.blend (this contains your startup scene) and userpref.blend (this contains your user preferences) to Dropbox and syncing them should have the result you're after. You would have to manually copy and paste the files to and from the Dropbox folder on each machine each time you changed them, however, so it won't be an automatic update.

ex. Working at home, make changes to User Preferences, copy userpref.blend to Dropbox, go to work, move userpref.blend from Dropbox to Blender folder. You would also have to do the same with the addons you installed.


Make all objects on an array fit exactly on a curve

Fit Curve changes the number of copies in the array to fit within the length of the curve object specified in Curve.  If the length of your mesh is a multiple of the length of the curve, then there will be an exact fit.  It is up to you to scale your mesh.


How do I output the image rendered by viewport shading (2.8+)?

From the desired 3D Viewport header menu go to View > Viewport Render Image ir Animation according to what you need.


What type of normal and specular map nodes is correct for these textures

If you are talking about the unwanted white pixels appearing like the one on the seats, you could use clamp indirect which is found in the light paths section or use clamp indirect which is found in the sampling section or you could even try using the denoiser which is in the render layer tab.


Delete nodes that does not contain mesh?

OK. I just learn Python and developped this script :
import bpy

# This script selects all objects hierarchy that have mesh on them
# After executing this script, just invert the selection (ctrl+I) and delete (X)

for o in bpy.data.objects:
    if o.type == "MESH":
        obj = o
        while True:
            obj.select_set(True)
            obj = obj.parent
            if obj == None:
                break;


Blender textures are rendered on each triangle individually

When the mesh does not have an UV map, the polygons still have default UV coordinates. The default maps the whole 2D texture to the entire polygon. That's why every face separately repeats what you see in the texture preview.

But to actually get this, coordinate mapping has to be switched to UV.

The procedural wood texture is a 3D texture. It can use 3D coordinates to calculate the color. But only if the coordinate mapping is of a 3D kind. UV is 2D mapping.

The "Object" coordinate mapping is a 3D mapping. Normally it is based on the bounding box of the mesh, but it can be changed in the Texture Space settings for the mesh.


ParticleSettings data is not readily accessible in append/link browser.

The easiest way I found to reuse it in another file, is to append or link the mesh object using it. Once the object is in the scene, you'll find every ParticleSettings data used by the object available to every other objects in the new file.


Example : we have a plane and want to 3 materials based on two textures.

Plane parts :

The cockpit : glossy material with texture 1
The nose : diffuse material also with texture 1
The other parts : diffuse material with texture 2

Create your plane
Add the three materials
In edit mode, select the wanted faces and assign them to the corresponding material

Create your UV seams (probably corresponding to the material). You may also have done the seams before the material assignation

Select the wanted parts using the "select" button of the material,
Then UV unwrap

The materials can be defined as you wish (here I used a bake to produce the textures
You can also export the UV map parts separately in order to paint over it in the tool you want (or paint directly here in Blender)


How can I use an image texture as a guide for weight painting?

Here is my solution:
Create a plane and subdivide it (as many times as you like, depending on your weight paint resolution requirements). Unwrap the mesh. Now you want to create a sphere from a plane using shapekeys. See the Cegaton's answer on how to do it here: What is the best way to unwrap a sphere?

When your transformation is ready, check the Basis key and add your heightmap image as a background image. Scale the added image to fit the size of a plane and check the image display type to Front. Set the Opacity value as you like.

Now you can easily paint in Weight Paint Mode, seeing a heightmap texture.

Transform a plane to a sphere using shapekeys.

As you can see all work quite nice.


I am not sure, but for me it looks like some of the faces are not split where they should be. On the low poly model it looks like when you are going from the lower back to the butt that the first face ( the one that is on the screenshot "over the red line") is not split in two verticaly. And also the face three below that. I cannot clearly see due to the perspective.

Optionally I could imagine that you maybe have 2 vertecies over each other so try and remove doubles, but I guess you already did that.
Hope that helped :)


Unselectable geometry in Edit mode means there's another object in the scene located in the same place. You have several options to continue working on current object without anything messing around:

enter Local View for selected object. Nothing except it will be visible. Note that you can activate Local View for several selected objects, not only one;
exit Edit mode and enter Object mode. From there you'll be able to select another object (you could use Outliner for navigating the objects in the scene in order to find what's needed) and either move it somewhere else or delete it altogether.
join objects, which is done from Object mode too. Thus both objects will be editable at the same time, see Cannot select vertices from different object while in edit mode. Note that you could edit 2 different objects without joining them with MultiEdit addon;


An object wouldn't render in cycles (all solutions on the topic I found don't work)

The cutting plane is somehow overlapping geometry and causing Z Fighting artifacts.

Your $Intitial$ object as a Boolean modifier invisible to viewport and visible to rendering leading to different results.

Your scene also as a multitude of unrelated issues like using Hemi lamps which aren't truly supported in Cycles and a Sun lamp which doesn't really seem to be doing much besides illuminating the background, since you are using an ambient occlusion shader on your objects which doesn't interact with scene lighting.


If you don't mind the Properties being on the right side instead of the left, at the bottom left of the screen, you can select the logic editor. This is what I've been using since I didn't know there even was a Game Logic choice.


To enable compositing go to Post processing in the Render tab of the Properties Panel and:

check the Compositing option
uncheck the Sequencer option

this will process the render result through the compositing pipeline if the compositing nodes are enabled.


Blend-Files Preview Thumbnails with Background Images

In the Blender File Browser was able to show previews by clicking on box shown and the clicking on show previews.

My bad, did not notice I was in 2.81. Switched to 2.80 and does not work.
Sorry for incorrect information.
In my present version of 2.81 the settings in preferences don't stick.


How to add reference photos in orthographic view from angles other than the default front, back, top, etc.?

There are two ways (as far as I know)

Add a plane with the texture.
Set the background to the Camera.

1. Add a plane with the texture

This is a way used in a 3D software called MODO.
It is easy to manage the location, rotation and scale.
However it is tedeous and cannot be used in Solid (in matters of viewpoint shading.

There are some tips that can help you with this method.

select "Generate UVs" (on the toolshelf when you made the object)
press the E key (it will resize the uv so that the ratio matches the actual mesh)

2. Set the background to the Camera

Find for "Camera" in the "Axis" of the Background image panel.
This will fix the image as a background image of the camera.

There are some tips that can help you with this method.

lock the location and rotation at the Properties Region
switch between cameras with Ctrl-Numpad0


Dual Xeon vs High-End GPU for Cycles rendering?

I use Blender at work. This might help you out.

My work computer used to be a Mac Pro with a hyper-threaded Xeon processor. It was a little older, like from 2010, but it could run 16 simultaneous threads. That translated to 16 little squares rendering at the same time in Cycles.

A year and a half ago I asked my boss if I could build a PC instead of getting a new Mac Pro. They approved and gave me a budget of \$3500, roughly the amount a new Mac Pro would have cost. Because I was choosing my components I bought two GTX 980s (they were about \$550 a piece, so \$1100 total).

When I compared the Cycles rendering speed on the two computers, the PC I built rendered the same scene SIXTY TIMES FASTER than the Mac Pro with the Xeon processor. That meant projects that used to take multiple week to render would now be done over night.

I used Render.st once. It was a very smooth experience, and didn't cost me anything because they had given me a \$25 credit to get started. It wasn't blazing fast, but it did render for much less money than the cost of building and maintaining my computer. And like Pyroglyph mentioned, all the frames began and ended around the same time.

If you are rendering things every now and then, for fun, I suggest trying a render service like Render.st. It's very easy to set up.


How to render multiple scenes at once, composite, and save as ONE file in Blender 2.8?

I thank God for showing me the solution: all you have to do is create a new, blank 3rd Scene (with no objects or cameras) and composite the other 2 scenes there in the compositor. Now when you hit render from the 3rd scene, both scenes will render and one file will be output. Be sure to set your color management settings AND the desired frame output range in the 3rd scene, as it will OVERRIDE whatever settings you have in the other scenes.

For example, this allows you to do special compositing hacks with EEVEE, which currently doesn't support the "holdout" or "indirect only" passes for Collections. However, you can use a "holdout" material on individual objects and create masked areas from that. This is how you can workaround flickering ambient occlusion in EEVEE that is caused by thin objects. In one scene you have AO turned ON, and in the other scene you only render certain objects with AO OFF; then composite them together in the 3rd scene.

This other stackexchange thread shows the same composite process and includes info if exporting to a multi-layer EXR.

Each of the other individual scenes you want to composite should have at least an output node connected to its renderlayer, like this:


Part of the armature is not copied and pasted correctly

So, I would NEVER use Copy and Paste for a Mesh and Armature combination. I would always duplicate in the same Blender project by selecting BOTH in OBJECT mode and then key SHIFT+D and move the copies.

To move to another Blender project, I would ALWAYS append the mesh and armature in one operation from the first blend file to the second. To append, click Append in the file menu and select mesh object, if you have parented them properly, the armature will come with it, in its entirety.

At around the 1 minute mark in your video there is an error message at the top, look in the console and tell me what that was…

Clockmender.


How can I get a shot of the whole room without removing walls or distorting the camera?

There are several options to sort the problem.
Quicker would be to set the camera clipping:

Set the Start to a value higher than the distance between the camera and the wall you want to see trough.

Other option would be to set the wall invisible to the camera from object options tab in Cycles settings:


you must be using to high resolution or to many samples or to high poly count

https://www.youtube.com/watch?v=8gSyEpt4-60

tutorial for lowering cycles render time/workload on the computer


Pivot point is binded to the 3D cursor, scale with G only works with Ctrl

I pushed shift + tab (shortkey of the button with magnet icon) accidentally


Smart UV Unwrap on Joined Object Breaks Textures

Here what's should help. As I understand you want to bake textures.

Join objects into one.
Duplicate object and move to different layer. Name it "bake".
Remove all materials from "bake" object. Create new material for it.
(image tex > Diffuse > output).
Create new map for baking (in UV editor) and save it as "Bake_diff"
UV unwrap "bake" obj with smart UV unwrap.
Select "Bake_diff" in image texture node as active one.
Set background on full white.
Go to Bake setup. Tick 'Selected to Active' and setup 'Ray Distance' to 0.100
Now select both layers, select first obj with textures and as second, the bake one. (make sure image texture nod with "Bake_diff" is selected)
Bake and wait.
Save map F3

There's a blend. Prepared, just do 9 & 10.


In my opinion your method is too tedious and your topology has too many vertices and ngons. What you should do in your case is:

Create a module like this one.

Enable the Snap tool (or press Ctrl) in vertices mode and enable the Auto-merge option.

Duplicate the module as much as you want, move on the X or Y axis (GX and GY), snap and auto-merge will help to make them stick each-other. Give it a Subdivision Surface modifier (and Shade Smooth) to make it look smoother.


Judging from the (quite old) link you posted, that is just a proposal. No such feature has been implemented as far as I know.

As of version 2.77, once the original object has been created and has gone through some kind of transformation, there is no way to get the original creation parameters back.

Maybe it will get implemented in the future, maybe it will never happen...


Select neighbour faces from a mesh with python

does his help? Start with the template in:

TextEditor > Templates > Python > Bmesh Simple Editmode

import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data

bm = bmesh.from_edit_mesh(me)

face = bm.faces[3]
face.select = True
print(dir(face.verts[0].link_faces))
print(face.verts[0].link_faces[:])

# This gives the list of all edges that use that vertex.
# [<BMFace(0x7f7acb5ddb70), index=52, totverts=4>,
#  <BMFace(0x7f7acb5ddbe0), index=54, totverts=4>,
#  <BMFace(0x7f7acb5ddba8), index=53, totverts=4>,
#  <BMFace(0x7f7acb5dd0b8), index=3, totverts=4>]

bmesh.update_edit_mesh(me, True)

There's also link_edges which could also prove useful, arguably more so

import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data

bm = bmesh.from_edit_mesh(me)

# just assume now there is only one selected face
selected_face = [f for f in bm.faces if f.select][0]

for edge in selected_face.edges:
    linked = edge.link_faces
    for face in linked:
        face.select = True

bmesh.update_edit_mesh(me, True)

produces

And finally, the join command

import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data

bm = bmesh.from_edit_mesh(me)

# just assume now there are at least 2 selected, and are touching
selected_faces = [f for f in bm.faces if f.select]

# the script equivalent of the F key
bmesh.ops.contextual_create(bm, geom=selected_faces)

bmesh.update_edit_mesh(me, True)

Regarding your statement about Bmesh being experimental, I wouldn't worry about that too much, it's being used a lot and has proven to be more than capable. The Bmesh.ops docs are an excellent but admittedly terse resource:


A Simplified Sample

One mesh for the body of the container.  Cap not included.

Above in a progression of left to right, top to bottom

Blue Cube Scaled
Yellow  Loop Cuts
Blue with faces deleted in the Handle area .. dark back faces
Yellow [Bridge Edge Loops] so the handle with internal edges are present
Blue Spout trough and crests with [Proportional Edit]
Yellow with Subdivision Surface Modifier which smooths the corners in this example.
For the round spout use [Extrude] and the add on ... Loop Tools.  That should be a different question.  Not shown in the above example.
Extrude will be useful for decorative ridges.  Not shown.

The above has no detailed instructions since a Video Tutorial would be an efficient use of time for someone very new to Blender. This was mentioned in the comment. This proposed answer is not a tutorial. It can serve as a discardable practice model.  Blender Stack Exchange is not focused on artistry, but rather technique, question and answer.  I am sure you can be more artistic in your work than the simple model above.  Inspect and Improve the sample.

Click to see larger image above.


How do I move bones relative to global position rather than its parent?

A way to do that is, instead of parenting your bone, you could use a "Child Of" constraint on it. You can animate its influence during your animation.

And if you want to push this further, you can even have its influence driven by a controller, parented to your bone.


Can't unwrap new geometry added to the already unwraped object!

You didn't pack the texture with the file so I wasn't able to check where they were assigned to...

...anyway, by unchecking the UV local view box, you should be able to Unwrap and see the faces.

That option is not well integrated in Cycles, while it is often useful in Blender Render. Developers talk about it in this review.


Straight line draw animation how doing it?

You can add a Bezier Curve and make it any shape you want to. SHFT +A > Curve > Bezier.

"Extrude" it to add some width.

Then Animate the start and/or end of the Bevel Factor. Hover your mouse over the Start or End input box of the Curve press I move the Playhead in the Timeline, change the value and hover your mouse over the Start or End input box press I again.


Can I set render settings by individual scenes?

Yes you can, make sure when creating a new scene to choose New for a fresh default scene or Full Copy to make a copy of your current one.

Any changes you make to the settings in either scene will stay unique to that scene.

As per the wiki, the three options when creating a new scene that I think you should pay attention to are:

  New
  Creates an empty Scene. In the new Scene, the Render Settings are set to the default values.

  Copy Settings
  Creates an empty Scene like the previous option but also copies the Render Settings from the original Scene into the new
  one.

  Full Copy  Is the deepest form of copying available. Nothing is shared. This option creates a fully independent Scene with copies of
  the currently selected Scene's contents. Every Object in the original
  Scene is duplicated, and a duplicate, private copy of its ObData is
  made as well.


How can a Diffuse material not be effected by light?

This is simply done by setting the color to black. The light of a diffuse material with a roughness of 0 is calculated using the Lambert lighting model.
This model calculates the light that an object reflects as follows:

where  is the intensity of the diffusely reflected light,  is the material's color and  is the intensity of the incoming light,  is the surface's normal vector and  is the normalized vector from the surface point to the light source.

For typical colors  this will give you light areas where the surface faces the light source and darker areas where the surface points away from the light source. But since in your material the color is a pure Black (RGB (0,0,0)) the red green an blue light component will always be multiplied by 0. Thus the resulting surface color will always be black as well, no matter how strong the lightsource is.


What is the best way to mirror lots of vertices?

Select the whole mesh (A) and unselect the nonmanifold edge loop (Shift+Alt+RMB while hovering the cursor over it). Duplicate the selected vertices (Shift+D) and scale it along the X axis by 0 (S,X,0). Finally remove doubles (W-->Remove Doubles).


Transformation hotkeys stopped working in blender 2.82

Uncheck the Locations option in the Tool Settings bar:

or in the Tool and Workspace tab in the Properties Editor:


Rename a modifier's name for multiple objects

Iterate over all objects (or all selected objects, in the following script). If the object supports modifiers, check if the looked for modifier name exists, if it does, rename it.
import bpy

previous_name_modifier = "boolean1"
new_name_modifier = "MyBoolean"

for obj in bpy.context.selected_objects:
    if not obj.modifiers:
        continue
    mod = obj.modifiers.get(previous_name_modifier)
    if mod:
        mod.name = new_name_modifier


How do you make objects not collide and pass through each other?

Collision groups are the correct way to do this.

Set your "bad guys'" collision group and collision mask up like this.

Set the "good guy" up like this.

Now here is why. The Collision group is conceptually assigning a number to the object say 1-8. Your good guy has collision group one. The Collision Mask is what number collision group it can collide with.

So looking at your bad guy, it can only collide with other objects that are assigned to collision group 1. Itself is set to collision group two so it will not hit other bad guys. Your good guy is set to collision group one, and it can collides with all groups.

Blend file with bge collision demo.


It has something to do with "use modifier stack" checkbox in particles setting and hair grooming. Subsurf level should be the same for viewport and for render.


Some small parts of the mesh are unpaintable in texture paint

Maybe try to increase the Bleed value in the Tools panel > Options > Project Paint. It gives your brush a bit margin around the borders of your UV islands.


see related here: https://blenderartists.org/forum/archive/index.php/t-266184.html

To solve this we're going to make use of blender's bpy.utils.register_class() method and the type() method.
First, we need a method to generate our dynamic properties. In this case, you can use a decorator function to make things a bit easier:

def dynamic(func):
    """
    @:keyword: dynamic - Function Generator that creates properties for Blender data types on the fly
    :param func: Function to generate
    :return: dynamic_property(): returns decorated function
    """
    def dynamic_property(*args, **kwargs):
        """

        :param args: first argument is always *prop_dict (from func in outer scope)
        :parameter *prop_dict: One Blender Property Mapped to a dict: e.g. prop_dict = {'mapname': bpy.props.StringProperty(default="some_path_to_map")}
        :param kwargs: specific keywords needed by enclosed methods
        :return: Pointer to newly registered/assigned property
        """
        Prop = type(str("Parameters"), (bpy.types.PropertyGroup,), func(*args))
        bpy.utils.register_class(Prop)
        PropPointer = bpy.props.PointerProperty(name=func(kwargs.get('param_type')), type=Prop)
        setattr(func(kwargs.get('blender_type')), func(kwargs.get('param_type')), PropPointer)
        return PropPointer
    return dynamic_property

This decorated function generates a function that returns a pointer to a new class instance called Prop, which subclasses bpy.types.PropertyGroup. func(*args) is always a 1 item dictionary. (Further details on the dict contents below)

I also found it useful to create a class to hold the variables I need to pass to the decorated function. (To extend functionality, just create a subclass and override the blender_type variable with whatever type you need + any other variables needed for your implementation)

from bpy.types import Material

    class BlenderProperty(object):
    def __init__(self, **kwargs):
        self.name = kwargs.setdefault("name", None)
        self.prop_dict = {}
        self.blender_type = Material
        self.param_type = "TestParameters"
        self._prop = None

    @property
    def prop(self):
        prop_ptr = self.create_property(self.prop_dict, blender_type=self.blender_type, param_type= self.param_type)
        self._prop = prop_ptr
        return self._prop

    @staticmethod
    @dynamic
    def create_property(prop_dict, **kwargs):
        return prop_dict

For testing purposes, let's use a fake dictionary and fill it with some stuff. Then assign this dictionary to a BlenderProperty.prop_dict

fake_dict = {}
prop_list = ['Prop1', 'prop2', 'prop3']
for prop in prop_list:
    fake_dict[prop] = {'mapname': bpy.props.StringProperty(default="some_path_to_map")}
    new_blender_prop = BlenderProperty(name=str(prop))
    new_blender_prop.prop_dict = fake_dict
print(new_blender_prop.prop)

Calling new_blender_prop.prop calls the decorated getter function for this class's private variable prop, which just so happens to be a pointer to the dynamically created property inside of blender.


Fluid simulation render works in viewport, but fluid is missing in image render

If the name of you water input is [Sphere] it may have its render capability turned off in the outliner.  Please turn on the render setting in the outliner.  That  is the one that looks like a camera.


You have edge loops along the existing ones, it makes them sharper:

If you remove them it will round the shape:


How to get round "salient" shape of building

In whichever space is specified, the Simple Deform > Bend modifier progressively rotates elements about Z, by a factor of the element's X distance from the origin.

(The X distance is normalized, so there is 0 rotation at X=0, and min_X -> max_X is mapped onto the total angle of bend)

The direction of rotation is determined by Y of the specified space. The 'inside' of the bend is in positive Y.

By default, the modifier's space is set by the pivot of the modified object, but you can set the origin and orientation of the modifier to the pivot of any other object by allocating it as 'Axis, Origin' in the modifier. (Usually using an empty)

This object was created with its ridges up in world Z, its length down X.

The object bent around its own pivot, aligned to world

Using an Empty as the modifier's origin, with its local Y rotated to world positive Z

Using an Empty as the modifier's origin, with its local Y rotated to world negative Z


As Mr. Zak said in the comments, the Data Transfer modifier was not added until Blender 2.74. You can upgrade by downloading the application from the Blender website.


Create curve from Numpy Array using Python

Create POLY type curve from numpy array
Script below creates a POLY type curve from 4d SplinePoint.co numpy array.

Script result in edit mode
import bpy
import numpy as np

def flatten(*args):
    c = np.empty(sum(arg.size for arg in args))
    l = len(args)
    for i, arg in enumerate(args):
        c[i::l] = arg
    return c

context = bpy.context

# emulate numpy data
x = np.arange(0, 10, 0.1)
y = 2 * np.sin(x)
z = np.cos(4 * x)
w = np.ones(len(x))

cu = bpy.data.curves.new(name="poly", type='CURVE')
cu.dimensions = '3D'

spline = cu.splines.new('POLY') # poly type
# spline is created with one point add more to match data
spline.points.add(x.size - 1)
spline.points.foreach_set("co", flatten(x, y, z, w))

ob = bpy.data.objects.new("Poly", cu)
context.collection.objects.link(ob)

For a simple two point NURBS curve from local coordinates  (0, 0, 0) to (1, 1, 1) the coordinates can be defined
NURBS
For NURBS required to define the end_path_u
How to specify Nurbs path vertices in python?
Have introduced for each point having radius of r and setting this as well.
# emulate numpy data
x, y, z, w, r = np.array(
    (
        (0, 0, 0, 1, 0.5),
        (1, 1, 1, 1, 3.0),
    )
).T
cu = bpy.data.curves.new(name="poly", type='CURVE')
cu.dimensions = '3D'

spline = cu.splines.new('NURBS') # poly type
# spline is created with one point add more to match data
spline.points.add(x.size - 1)
spline.points.foreach_set("co", flatten(x, y, z, w))

spline.points.foreach_set("radius", r.ravel())
spline.use_endpoint_u = True
ob = bpy.data.objects.new("Poly", cu)
context.collection.objects.link(ob)
context.view_layer.objects.active = ob
ob.select_set(True)

Notice in the foreach_ methods require us to ravel (or flatten)  the array.  Flattening data as shown in  https://blender.stackexchange.com/a/172973/15543 the stackoverflow link suggests slicing is quickest.


Add reflection to transparent cycles material

By mixing transparency and the Principled BSDF, you're defining a shader that can return either reflection, or transparency, but never both. (and since you have mix factor=0.8, it will give transparency 80% of the time). So you're making the reflections transparent along with everything else. To get your desired result, you want a shader that gives glossy reflection normally, but returns transparency to any rays the gloss doesn't catch. Two different ways you can do this:

1) Get rid of the transparent BSDF and its mix shader, just keep the Principled BSDF node for A. This will leave your glassy Principled BSDF as the only shader. Since this a refractive shader, you will need thickness on your bread bag mesh. You can use a solidify modifier to achieve this. See here if you also need the alpha channel: Render Glass like materials with Alpha Channel to composite in external app

2) If you don't want/need refraction and don't want to deal with adding thickness or messing with ways to get alpha, you can replace the first Transparent/Principled BSDF mix with the shader described here: Render Glass like materials with Alpha Channel to composite in external app


In the 3D view header, find the icon that lets you change your pivot point.  Just to the right of that icon you will see an icon with three dots along the top and a left and right pointing double arrow below.  Clicking on that icon toggles rotation.  It's easy to click on it by accident.


Is it possible to enable render transparency for only certain renderlayers?

You can do this by assigning objects into different layers and setting render setting to transparent in the Scene setup property page.


(v2.8) Objects disappearing from viewport when going from UV Editor to Texture Paint

This one took an obnoxious amount of time to figure out how to get it to reappear, and even then I'm unable to replicate the problem of getting it to disappear now. If I can replicate the problem, I'll update my question further.
All it took to get the item to reappear was to go into local view by pressing / on the numpad to get it to re-appear.
The / on the Numpad toggles Local View.

Local view isolates the selected object or objects, so that they are
the only ones visible in the viewport.Source: The official Blender Documentation version 2.92


Single EXRs or Multilayer?

First you have to decide what type of OpenEXR you want to render:

OpenEXR to get single files of your passes or channels/layers
EXR Multilayer to get a multi-channel file with all your passes or channels/layers included

This decision really depends on your further workfow. For e.g. Blender or Nuke it's much more useful to have one multi-channel EXR, but in Photoshop, After Effects or Fusion it's easier to use single EXRs.

In the context of the Layer Management the EXR Multilayer term is quite confusing. For this reason and also to consider the OpenEXR concept it should be named EXR Multichannel.

Passes/AOV's

Then you have to decide which passes are key for compositing. In the view Layer tab->Passes section of the properties editor select the passes you need:

For 2.79 and earlier: In Scene Tab you can enable all standard passes of the render engine and create individual render layers.

You are ready to render if Multilayer EXR fits your needs. Blender automatically writes all enabled passes and layers as single channels to the EXR as expected.

If you choose OpenEXR, Blender only saves the beauty pass (final render) although other passes are selected. To save all your passes or channels/layers separately is only possible with the help of the image compositor. In this case you have to create a file output node and add new input slots in the properties of the node:

Still the same for Blender 2.8x:

The file output node makes it possible, whether OpenEXR or EXR Multilayer, but especially in the multilayer case, that you can unleash the full power of the format and pack your custom channels e.g. mattes or backgrounds like this:

Note: If a 'Z pass' is required, check out these answers: How can I get a Depth of field render pass?

Cycles light passes for reference

Further explanation in the manual: https://docs.blender.org/manual/en/latest/render/layers/passes.html

Tlousky's production script

To speed up this process you can also use Tlousky's production script. It automatically creates a file output node based on your enabled passes and your output directory:

Note: It's not updated since blender 2.69 that's why some passes are currently not supported.


If "bpy" in locals(): evals to True on first run

Following batFINGER's sage advice, I've done the following. I think I get the from make_Shaders.make_Shaders import xxxx now. I haven't seen this syntax exactly anywhere, but it works an absolute treat. My actual statement is:

from make_shaders.make_shaders import buildShader
from make_shaders.figure_defs import matZones

'buildShader' and 'matZones' both being classes. This approach works perfectly, and is an excellent solution to managing multi-file modules. Incidentally, I took out the add to syspath stuff as well. Thank you, batFINGER. Wish you did a correspondence course... :)


How do you quickly align one object to another along only one axis?

Begin with the solution you already know, which is to go to Object > Transform > Align Objects, except that instead of left-clicking to choose Align Objects, right-click on it instead, and choose either to create a shortcut, or to add it to your Quick Favorites menu (which will then make it accessible with the 'q' key). The Quick Favorites option is very fast and easy to use, provided you only have one or two items in it at a time (you can have more, but I don't recommend it).


You have to recalculate normals by selecting the whole object in edit mode and using the shortcut Ctrl+N.


Water won't pass through channel, and how to make a rotor stay on its place while it spins?

From just looking at the image without examining the file, it looks like you didn't make your water domain big enough. Is the water domain object covering the entire channel unit?


Question from a AutoCAD drafter / aspiring Blender 3D modeler. Is there any draw tools in Blender that are similar to AutoCad?

I don't have any experience with AutoCad but I can tell you that these all sound perfectly possible.

Offsetting sounds like simple duplication. Shift-D the object or part of the mesh you want to copy and then move it, restricting to an axis (via X, Y, or Z hotkeys) to keep it parallel. If you want the new mesh to always resemble the old you can make a linked duplicate with alt-d. The new mesh will mirror the old one any time you edit it.

As a 'base point' blender has the '3D cursor', that red and white circle you always see. Left clicking places the cursor and then by pressing the period key (not on the numpad but on the keypad) your transformations will use it as a 'pivot point' (blender lingo). If left clicking isn't accurate enough you can make the cursor snap to the grid or to any vertex or object center you select (shift-s to bring up the snapping menu).

Blender is extremely capable, but probably has different names for most tools. It has less of a focus on precision and more on artistry than CAD programs from what I understand, but you can make it work. I've watched interviews wherein car engineers and designers started their visualization with blender and then brought it into AutoCad to tweak later.


Is it possible to decrease the face count dramatically so I can continue working without crashing?

Another option is to set the "Display Type" to "wire" (in the "Object" tab)

Might not be exactly what you want, especially if you're texturing, but thought it would be good to mention it here... I've realized, looking back, that my work would have often been WAY easier if I had remembered the "wire" option, or, even better, the "box" option, on some of my projects... just thought I'd mention that.


Reflections are pixelated in eevee, any idea how to solve the issue? I am adding the pic for reference

Eevee reflections are a bit fickle because of the type of rendering it uses. There are a lot of workarounds. You may need to play around with some of the settings, bake a reflection map, use a reflection plane, etc. to achieve the look you desire. You can also opt to use Cycles.


How to control reflection of environment color on materials

In the World material, use the Light Path node to give 2 different colors to the direct light and the reflected light

In this example I use a purple tint from an RGB node, but you can replace it with your texture


Animating wire/cable/rope wrapping around a cylinder

This is a somewhat similar answer to @moonboots', perhaps expressed in a different way.

Using the shipped add-on Add Curve: Extra Objects, create an Archimedean Spiral.
Create your rope as a straight subdivided cylinder of some kind: it could be an array of segments, or simply another curve. Mine is long along X.
Use a Curve modifier to deform your rope along the spiral.
As you move the rope along its deforming axis (my X), it will wind itself around the spiral, and, when it runs out of curve, project itself from the end in the direction of the spiral's last segment. With (T)interpolation set to 'Linear' in the timeline, keyframe the rope's start and end positions, for a whole number of turns.
Now, the trick is to keep the fixed end of the rope stationary in the length-dimension of the spiral. Again, with interpolation set to 'Linear', keyframe the spiral's translation the other way, to compensate for the movement  of the tail of the rope along it. Neither the spiral nor the rope rotate.
Create a spool that does rotate, inside the spiral; keyframe its rotation to sync with the rope's progress around the spiral. You know how many turns the rope has travelled between start and end frames; just keyframe that number of turns into the spool.


I have an undesirable black area on my glass shader/object

I've had a similar problem today with an object I created using the screw modifier.

It turned out that for some face loops the normals were pointing in the wrong (opposite) direction and especially the bottom of your object looks to me as if it needs some normal recalculation. I suggest enable the display of face orientation to verify.


How to create a procedural chevron like texture/material?

Start with Wave procedural texture and create tiling in X axis with Repeating patterns on procedural textures. After that clamp the values into stripes with a ColorRamp node set to constant:

 (^click to enlarge)

You can adjust the stripes with the ColorRamp node:

For mapping procedural textures onto spherical objects there has to be additional transforming of mapping coordinates:

For procedural cylindrical projection this node group:

And for procedural spherical projection this node group:

Using the spherical projection with the tiled chevron procedural texture:

Here we also added an extra Mapping node to control stretching of the texture around the surface.

Download the .blend file with append-able node groups here:

On the egg shape cylindrical projection looks the best:


How to generate a closed surface using sverchok?

It looks like that you have an internal vertex/circle of vertices on the top. Can you check the topology before subsurf?

You can see on the second picture that there is one circle with 0 radius inside on this reproduction of your problem.

Then, I dont know sverchok but i guess it should do the trick:

sverch Remove Doubles


I need to create more faces( but ctrl+r in edit mode isnt working), how do i do it alternatively?

You might want the Knife tool (the K tool in edit mode).  https://docs.blender.org/manual/en/dev/modeling/meshes/editing/subdividing/knife_subdivide.html .  It lets you divide faces along a line you choose.

If you decide those vertices aren't in the exact right place you can use Vertex Slide Shift+V to slide them into the right place.
If that model's triangulation is a problem and you want to turn them back into quads, consider the Dissolve Edges operator (in the X menu.


For some reason, at some point, Blender versions started hiding the relevant section, displaying it in the export window as collapsed by default, leading to its options not being immediately visible at first glance. The section in question is called Geometry. Expand it, and you will see the Write Normals checkbox.


you dont have to change the origin point to rotate around the 3D cursor,
just change the pivot point in the 3D view header to "3D Cursor"

The Blender Reference Manual covers this here:

https://www.blender.org/manual/de/editors/3dview/transform/transform_control/pivot_point/index.html


What do I need to become a Blender developer?

Great question! There are many ways to help developing Blender. The best way is to find things to improve first, like fixing bugs. That'll help getting familiar with the code and structure of Blender. The first place to start is the wiki page https://wiki.blender.org/index.php/Dev:Contents, mostly the "Getting Started" section.

Also drop by on IRC, channel #blendercoders on Freenode. There you'll find friendly developers you can ask all kind of questions.


Yes, this is possible.
Open up the File > User Preferences (see 2nd image) by pressing ⎈ Ctrl⎇ AltU and go the the Input section (the third rider on the top menu of the User Preferences window).
First, we have to remove/change the existing bindings for a  LMB as well as Space.

The functionality bound to  LMB click is called Set 3D Cursor. Search for 3D Cursor in the search window. Remove the item by pressing the X - button.

Find the Spacebar command by searching for Space via key-binding. Remove this item as well.

Now search for Rotate View. Click on the items shortcut, then perform a left click again to enter a Left Mouse value. To set the modifier key to space, click on the (currently empty) input box in the right of the third row and press the Space key. It is going to be used as a modifier key for the action.

You can now rotate the view using Space LMB
You have to unbind Set 3D Cursor otherwise the event will not be passed on.

You press Space.
You make a  LMB down click.
Set 3D Cursor is called and all other events are aborted.

You can however set Set 3D Cursor to a  LMB using either Click or Release as the mouse mode. The action will however only be called once you release the mouse.


Apply the rotation of your mesh (CtrlA) and reparent it to the armature, it should work.


You more than likely hit O by accident, this enables proportional editing in object mode just as it does in edit mode and can cause nearby objects to mimic the one(s) being transformed.

Just turn it off by clicking the blue icon or by pressing O again.


In my experience, this can be addressed by adjusting your Refining and Detailing settings under the Dyntopo section of the Properties Panel.

What I have found is that you want to be mindful of the rate at which geometry is being increased by your strokes, or else bad things can happen. For example, if you use the Inflate brush with high influence and high mesh density, you can get problems like the ones you have shown. The vertices influenced by the brush are trying to get further away from one another, and depending on the surface contours, they won't always be able to do this without intersecting other parts of the mesh. Blender seems to use the faces' normal direction to tell them how to respond to the strokes, so that when many faces are all intersecting, the brush won't always have full influence on all targeted faces anymore. When this happens, I find that the only real solution is a two step process: 1) Use the Simplify brush to reduce the density of the mesh in the problem area and 2) use the Smooth brush to iron out the irregular surfaces afterwards (Gratefully, the Smooth brush can be invoked on the fly with the Shift key). Sometimes, if the situation is especially severe, one might need go back and forth between these two tools in a kind of iterative process. It won't do to merely use Smooth by itself, as the shape is now too complex to get anywhere with that. The Simplify step is needed to remove the complexity of the intersecting surfaces so that the smoothing can do what you want it to do.

Another approach is, instead of using the Simplify brush, to go under Dyntopo settings and choose the "Collapse Edges" Refine Method Setting, then draw with standard sculpting brushes as normal. You might find it easier to make "Collapse Edges" your Step 1 instead of the Simplify brush.

Note: In either case, the Detail Size Slider calculates its effect in a counter-intuitive way, seeming to do the opposite of what is expected. One might assume a higher value on the slider would add more detail, given the name of the slider. But the slider actually is based on maximum edge length, and the higher the value, the more the existing edge lengths are preserved. Meaning that lower values for the slider actually lead to more subdivisions instead of fewer. This threw me off at first.

Hope this helps.


How do I create a realistic magnetic force field?

I attempted to make the outcome look as realistic as possible. The problem I was running into was adding the force field to the plane rather than adding one via SHIFT+A. From there I was able to edit it in the physics to get a strength of -2. I changed the seed to 1, for my own model and it looks similar to the real thing. Mine is also different since I made my particles based off of a teal sphere unlike the lines as seen in the video. I think it adds to showing the pathway of the particles better. You can play with the particle settings however you like for your model, and just kept changing my numbers around to find what fit best for me! If you have any other further questions let me know!


enable clipping
move the mesh slightly towards the middle (mirror axis) until the gap is closed and then back to the original position.


On the top menu click on
File->New->General


How do I make a missile that lands with the nose facing down in BGE?

Since your question is not 100% clear, I assume the following:

You are using rigid body physics on your rocket object
You want to point the "nose" of the rocket in the direction in which it is travelling

I did not find a solution with logic bricks to solve point 2, but a few pieces of python code in an old Blender Artist thread (see below 1), which did the job. My minimal example looks like this (*blend below):

It contains an Empty ("spawner"), which spits out the Rocket object (on layer 2) with rigid body physics with a certain velocity in the spawners Y-Axis, triggered by the SPACE Key. The rockets "Nose" is it's Y axis, as seen in the upper part of the screenshot. The python snippet attached to the rocket object now turns the Y axis (second argument of alignAxisToVect) in the direction of motion in every frame. In my example the rocket gets deleted on contact with the Plane object.

Update: The attached *blend uses rigid body physics on the rocket and convex hull collision bounds. This can be simplified to "dynamic" and "box" respectively, so the physics engine has less work to do.

Enjoy!

1 https://blenderartists.org/forum/archive/index.php/t-246103.html


Time delay when selecting objects in a python script!

Modal timer operator

Would suggest not using time.sleep and use a modal timer operator instead.' Example using modal timer operator template.

import bpy

class ModalTimerOperator(bpy.types.Operator):
    """Operator which runs its self from a timer"""
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"

    _timer = None
    ob_index = 0

    def modal(self, context, event):
        scene = context.scene
        if self.ob_index >= len(scene.objects):
            self.cancel(context)
            return {'CANCELLED'}

        if event.type == 'TIMER':
            scene.objects[self.ob_index].select = True
            self.ob_index += 1

        return {'PASS_THROUGH'}

    def execute(self, context):
        wm = context.window_manager
        self._timer = wm.event_timer_add(1, context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        wm = context.window_manager
        wm.event_timer_remove(self._timer)

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.wm.modal_timer_operator()


Why your code below obj_name = obj.name is outside the for-loop? It should be in the same loop, isn't it?

Use select_set() for selection:

obj.select_set(True) : select the current object, useful for exporting selection.
You need to manually deselect it after exporting, or call bpy.ops.object.select_all(action='DESELECT') to deselect all.

Minor things

Get the object's original position:

You can copy the location to a reference instead of casting it to string and convert it back.

org_obj_loc = obj.location.copy()

Sends object to zero vectors

You can assign a Vector() to it: obj.location = (0,0,0)

Whole code

def execute(self, context):
    for obj in bpy.context.selected_objects:
        bpy.ops.object.select_all(action='DESELECT')
        obj.select_set(True)
        org_loc = obj.location.copy()

        # Sends object to zero vectors.
        obj.location = (0,0,0)

        # Creates the path for the exported fbx.
        obj_path = os.path.join(context.scene.worth_group_tools.dir_path,
                                obj.name + "." + "fbx")
        # Export object as fbx. Works, except all selected objects are
        # exported into single fbx instead of one at a time from the list.
        bpy.ops.export_scene.fbx(filepath=obj_path, use_selection=True)

        # Prints each object in list.  Works.
        print(obj.name)

        # Returns the object to its original position.
        obj.location = org_loc

return {'FINISHED'}


I had an object of the same name that was hidden in a different collection. When I renamed the cube the modifier worked correctly. Blender doesn't like duplicate names for objects. Hope this helps someone.


How do you overlay an image on a shader in Cycles?

Take the Alpha socket from your image, and plug it in to the Fac of the Mix Shader node. Then switch the Diffuse BSDF to the bottom socket of the Mix Shader, and the Anisotropic BSDF to the top shader socket.

The black and white alpha channel will control which parts of the material get which node. A value of 0 goes to the bottom socket and a value of 1 goes to the top socket.


Transfer selected objects to a collection doesn't work

You can't transfer because there is no active object.

Pasting objects also lasso/border selecting doesn't set any object as active, and most operators in Blender use active object as reference for settings, since there isn't one some operations may fail.

Solve this by Shift-clicking any of the selected objects so it is set as active without deselecting others.


Why Does Blender Distort UV Maps By Default?

It depends on the model you have as well as the UV deployment method you have chosen, and where you have marked your seams.

The following is documentation on the general workflow of UV unwrap and its use in industry https://conceptartempire.com/uv-mapping-unwrapping/

Here is a blender tutorial on how UV works https://www.youtube.com/watch?v=Y7M-B6xnaEM

In this other tutorial you will see more advance UV workflow of blender https://www.youtube.com/watch?v=L3654VGZObg&feature=emb_title

Notably through the use of add-ons simplifying life by integrating tools to optimize the UV space(Tex tools, UV Packmaster...).


I was wondering if my render time is slow, for what I have

Rendering takes time. How long is entirely dependent on the complexity of your scene, render size, the resources available on your computer, and the quality you are after.

It is normal to have a frame render for 5 minutes as it is normal to render in a few seconds, 5 hours or  5 days, it all depends on the variables listed above.

You can optimize your resources is by:

Setting the number of samples to the lowest number in which you consider the noise level acceptable.

Find the optimal render tile size. Depending on the complexity of your scene and the capability and vRAM of your card. Start with something like 128 x 128 and test by doubling or halving that number until you find what size render faster. The optimal size is unique to your system. A number that works for others might not necessarily work for you, or for a particular scene.

Other than that keep,
the detail of the vertices to the lowest number of vertices that you can. Bake simulations, maybe bake materials, optimize the size of your textures according to their size on the final render.


Rigid body objects passing through each other

There are several problems in this file:

Objects scale hasn't been applied;
Setting Triangle Mesh here is required, since the prisms have holes, which means they are concave objects, so other collision types don't work well with them;
Bound margin should be tweaked carefully, as well. Considering the distance between the surface, try smaller value;
The two prisms stay too close to each other, which will cause "intersection" if bound margin is non-zero.

Demo file_v3. Just FYI.

Added a demo video for better understanding.


The Relative Offset uses the object's dimensions to generate the offset. Since the plane has no 'height' the generated copies are at the same level as the original. If you add some depth to the plane (extrude or add a Solidify modifier above the Array modifier) the Z offset will have an effect.

Use the Constant Offset (which uses absolute values) instead of Relative Offset (which uses the object dimensions) to control the array irrespective of the object's dimensions.


Jet propulsion underwater - How to create bubbles

First, create a single bubble by making a sphere and making it a glass material, or however you want the bubble to look.

Add a particle system to the engine and under render, change the default halo to object, and under object, select your bubble

To make each of the bubbles a different size, change the scale randomness to something higher like 1.

To change the velocity of the bubbles, change the direction you want them to flow under the velocity tab.

There are many more settings you can change like turning gravity on and off. Good Luck!


I found the answer, the curve resolution was too low, so even though the preview looked like a curve the actual resolution wasn't smooth. I just upped the resolution U and it worked perfectly.


Procedural material not bending correctly around mesh during animation

The problem was that you used object coordinates. Object coordinates always point towards obeject X, Y and Z-axis. To fix this you have to either change it to UV or Generated coordinates which bend with the object.
SET TO GENERATED:

SET TO UV:


Your nodes are correct, but how can you see through the "walking/thing" layer if your walking/thing render is fully opaque? You need a transparent background for that.

If what's behind your objects is only the world environment, then the simplest way to get transparency is to head over your render tab, Film panel and check the Transparent option:


Particle emmiters not even over mirrored mesh

Found the solution....
For some reason the "Even Distribution" check box was doing the exact opposite, once I unchecked it, it had the desired effect.
Thank you for your help Rich Sedman!


If you want the view to stay on a material or object settings regardless of what you have selected in the 3D window, try the pin icon (like the one next to the "New" texture button in your second and third images).

For baking to work, you must:

Have your low poly object UV unwrapped and also a new blank texture for it.
Select high poly first, and low poly second. You can Shift select in 3D window OR Ctrl select in Outliner view.
Make sure your texture node in low poly material is selected and that it has the new UV image in it.


Solidify Modifier won´t create a solid surface

Uncheck the "Only Rim" checkbox in the Solidify modifier settings and you will get the expected result.


How to iterate over selected_objects collection and ignore the active_object

bpy.context.selected_objects is a collection of references to all selected objects, and will include the active object.
bpy.context.active_object is a single reference.

There are a number of ways to get a list of selected objects that don't include the active object. The following give a list called selected of selected objects except the active object.

list Comprehension

ctx = bpy.context
active = ctx.active_object
selected = [o for o in ctx.selected_objects if not (o == active)]
# selected = [o for o in ctx.selected_objects if o != active]

# or even a generator expression.
# selected = (o for o in ctx.selected_objects if o != active)

or

set() boolean

ctx = bpy.context
active = ctx.active_object
selection = ctx.selected_objects
selected = set(selection).difference(set([active]))

then the code would be like this, see the complexity is taken out of the loop and dealt with earlier - like a pre-filter.

for obj in selected:
    obj.location[0] = act_obj_location

To use your own code it would look like this, there's nothing wrong with this approach.

for obj in sel_obj:
    if obj != act_obj:
        obj.location[0] = act_obj_location

Avoiding letting your code get too nested can help readability - it's something to keep in mind.


How to use flat color shading with anti-aliasing for multi-materials?

Each material can have it's own Pass Index set up in the Properties Window > Material > Settings > Pass Index

If you set them up correctly after rendering, using a Compositor you can use an ID Mask node to mask out each part of the image according to material.

It can be directly from the Render Layers node or from an Image node through a multi layer file format like EXR.

See the Blender Manual on how to

You an then use the compositor to extract one mask for each material and save it as an image.

This technique has the advantage that since it uses a black and white mask for each layer pass you can get full anti-aliasing for each mask, without running the risk of 'ID Collision' when the mixed anti-aliased colors match a different object from another pass.


Copying objects in 3D view along with nodes and other stuffs

I am assuming you are talking about material nodes etc. If you append the object into the new file, it will bring over anything attached to it automatically such as materials and any node setups associated with it. Use ShiftF1 or go to File > Append and navigate into the blend file as you would a folder, open the Object folder and select the object that you want to copy.

See How can I reuse existing materials, objects, etc from an existing .blend? for more info.

Alternatively, a much faster and easier way is to just copy paste the object directly into the new file by using CtrlC (Copy selection to buffer) and CtrlV (Paste selection from buffer). This will also bring over anything associated with the object.


OpenGl 3.3 Error resurfaced with Blender 2.8 Final release

Blender 2.8 requires OpenGL 3.3 or above. Your computer does not meet the requirements and as such, Blender 2.8 will not run on it.

Using random DLLs from the internet is generally not a good idea, especially with programs as demanding as Blender.


EEVEE 2.8 : the light goes through the egdes of a simple cube?

Welcome Patrick!

Yes, there are a couple of ways to handle these problems in EEVEE.

Thicker geometry reduces the problem:

Increasing the Shadow Exponent value on the spotlight makes the fade shorter.

Adding contact shadows fills in the fade:

It should however be noted that Contact Shadows are created with the depth map and may create undesired artefacts. This could be handled in a single shot but if you render a sequence it might be harder.

The VSM shadows (In render settings) generates a bit noisier shadow gradient but should be hided with less geometry.

Or if you absolutely need to keep your geometry paper thin you could add a tiny contact shadow.

Here is where you find the settings:


export selected actions with the fbx exporter

Add all actions you want to export as strips in the NLA, and then in FBX export settings, deselect All Actions and keep only NLA Strips. This should export only animation from NLA strips (i.e. actions).


Modelling Realistic Paper Poster With Curl?

I'll expand my comment above, to post an example.

As I said, if you literally mean "like the picture below", well that paper is perfectly square and not bent in any way, imho.

This is a typical fake effect for 2d apps or web sites. The shadow is simulated as if the surface below was detached from the paper in the upper and lower part, but the paper is not curved as the shadow "visually suggests".

It is more like if the below surface was a bit curved, like a cylinder, if you wish your "paper sheet" to be perfectly square and flat, as in the image, you need to curve the surface, not the paper, and use a light source not perfectly centered, to avoid shadow symmetry.

Here is a possible setup, in the image below ( the render was with slightly grey paper, I just later changed the paper color to blue, to make it stand out in the setup on the right side).

But if you really need the paper to be curved, and the surface flat, see other answers.


How do I flatten a selection of a terrain map?

To flatten a part of your mesh:

Go to edit mode.
Select the bits you want to flatten.
Change the pivot point to "Active Element" through the pivot point menu.

Deselect and reselect an element (vertex/edge/face) that represents the height for your flattened selected. This will set this element as the active element. The entire mesh will be flattened to this height.
Scale to 0 on the Z axis via: S-->Z-->0.

That's it!


Here is one way to do it:
Select your car object and add a Follow Path constraint. Select a curve as the target. This curve will be the route the car will take.
In the same place as the car object, add an Empty. Put an Follow Path constraint on the empty. Select a curve as the target.
Select the car add a Damped Track constraint. Select the Empty as the target. (remember to select the right axis orientation depending on the situation; you might want to change it later.)
Select the Empty. Right click on the Offset value field of the Follow Path constraint and choose Add Driver.
Go to the Drivers window and select the Offset (Follow Path) in the list. Press N and click the Drivers tab. For the Type choose Scripted Expression. As Expression Type "var - 1" (or "var + 1" depending on the direction of the curve). Also "1" can be smaller or bigger; the value is dependent on the size of your car object. For the Input Variable choose Single Property. Choose the car object as the target or Prop.
Select the Car and right click on the Offset value field of the Follow Path constraint (of the car) and choose Copy Data Path.
Go back to the Input Variable of the driver and hover the mouse over field net to Path. Use Ctrl + v to paste the copied data path.
Select the car and change the Offset value of the Follow Path constraint. Now the empty will move ahead of the car because of the driver. And he distance it moves before the care follows is 1. The Damped Track will cause the car object to rotate.

EDIT:
I seem to have misread that you don't want to use a path. Sill i suspect you can achieve what you want with drivers. I'll try to look into it when i have more time.


You can have one curve object with multiple segments or you can have multiple curve objects each with one segment. Sounds like you have multiple curve objects, in which case you need to extrude each object separately. You could joint multiple curve objects into one by selecting them all and pressing CtrlJ so that they all use the same extrude setting.

With multiple objects you can see that each one has it's own item in the outliner.

After joining them all together there is only one item.


How to trigger something when a game property equals a (certain value)

The script is checking if prop is an integer equal to 50, but the property is actually a string.

Solution 1

Change String to Integer in the Properties panel

Solution 2

Change

if myprop == 50:

To

if myprop == '50':

Going forward if you enable the console (Window -> Toggle System Console) it will let you know when these sort of errors happen.


Unfortunately, I don't believe there is a way to modify existing UI elements once they're in a panel.

It also appears that the panel element for DATA_PT_shape_keys isn't exposed via bpy.types so I doubt the .append() trick will work.  But if somehow there is a way to extend it that's most likely where you'd find it.


Exporting camera tracking markers from Blender

So I have come to the conclusion that blender is simply unable to export single verts in alembic files, so I ended up writing a python script that places cone objects on each vert which can then easily be exported (similar to how other tracking softwares visualize tracking markers). I have included the script below if anyone else run into the same issue.

import bpy
import math
from mathutils import Vector

class myClass(bpy.types.Operator):
    bl_idname = "dialog.box"
    bl_label = "Tracking Marker Instancer"
    nameCtrl = bpy.props.StringProperty(name = "Name:", default="Tracks")
    depthCtrl = bpy.props.FloatProperty(name = "Size:", default=2.0)

    def execute(self, context):
        obj = bpy.data.objects[self.nameCtrl]
        verts = obj.data.vertices

        # Create cones
        selection = []
        for i in range(len(verts)):
            depth = self.depthCtrl
            position = obj.matrix_world * verts[i].co + Vector((0.0, 0.0, depth/2))
            bpy.ops.mesh.primitive_cone_add(location = position, rotation = (0,math.radians(180),0), depth = depth, radius1 = depth/3)
            selection.append(bpy.context.selected_objects)

        # Iterate over selected objects and join them
        for i in range(len(selection)):
            bpy.context.scene.objects.active = selection[i][0]
            selection[i][0].select = True
        bpy.ops.object.join()

        self.report({'INFO'}, "DONE!")
        return {"FINISHED"}

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

bpy.utils.register_class(myClass)
bpy.ops.dialog.box('INVOKE_DEFAULT')


Blender Basics Tutorial, sprinkles appear underneith the surface with solidify modifier

I see the normals are different in the new version, so flipping that in the modifier -> Solidifier options sorted that out.


You have created some keyframes for your Mix Shader, and if you go in the Dopesheet you can move these keyframes as you want. In the Dopesheet, if you click on the arrow icon button (on the left of the phantom button, you will display only the keyframes related to the object selected on the 3D View, if I enable this option and select the Clouds object I see all the keyframes related to Clouds, and on the left you can see that you can clearly access to its material (Shader Nodetree).


Syncing a Blender camera tracking scene to an Fspy camera match

Looking at your tracked scene it seems to me that you don't have enough parallax to solve the scene using the default settings. There hardly any movement in those trackers, or not enough for blender to determine real 3d information.

Such static scenes should be solved as "tripod". But before, solving the scene use the field of view (or lens and sensor combination) you got from fSpy.

Once the scene is solved as tripod you can manually align it with the existing geometry. Note that tripod solve will not give you accurate 3d but just a visual reference.

Read: How can I get better results when doing camera motion tracking? and Correct tracked camera orientation

Alternatively, given that the camera is not really moving, consider doing a stabilized version of the shot, and use that with the camera from fspy.


How do I make the pattern angle match the direction of the brushstroke?

Craig D Jones is almost right, the answer is Rake.

Both sculpting and UV painting both have the same option that will do what I'm looking for.
The Rake option when checked makes the pattern follow the brush direction.


How can I render an image with sharp and uniform color edges?

It has been a while, but IIRC the method to get pixel precision is via our output resolution and the scale of your objects.

For example, if your resolution is 1920x1080, you can create a pixel precise plane if you set the plane's dimensions to 1.920 and 1.080. Note that if you use larger scales, your images will suffer from cubic interpolation that will degrade any textures you place on them.

An orthographic camera should flatten the perspectival transform to be pixel perfect.


How to configure a joystick under linux in BGE?

Here's the thing, I found the joystick input works in blender 2.72b and 2.71 in ubuntu 16.04 but not 2.76b or the latest 2.78.  I found out this has also been reported in windows: https://developer.blender.org/D1484 .  This should be reported as occurring in linux as well as windows, idk how to report it, can anyone report this additional bug info?  if not I'll try to.  This is more of a workaround than an answer but until the bug is fixed perhaps this can be the answer.