What (default) tone mapping is applied to Cycles renders when saving to PNG?

The display transform for output files is determined in Color Management section. By default, blender uses a sRGB transform, but it can be changed.

(read: Render with a wider dynamic range in cycles to produce photorealistic looking images)

EXRs are an exception and are not processed using such display transform, so they store scene referred (linear float) data.

To bypass the display transform when saving on a display referred format, use the UV/Image editor, and uncheck "save as render"

See this post for more info: What does Save As Render do to the image when saving it?


Adding a new material to a grease pencil

The script below enables you to add a new material slot for your active grease pencil.

import bpy

ob = bpy.context.active_object  # Must be a GPencil object
mat = bpy.data.materials.new(name="Mymaterial")
bpy.data.materials.create_gpencil_data(mat)
ob.data.materials.append(mat)


Black and white view after splitting window

If I'm understanding your question correctly, the issue is that you are in Solid view and want to see the Material Preview.

Click this button at the top right of the 3D viewport and you will see the material attached to the object.

As an aside, you can change the color of objects in Solid shading mode by scrolling down towards the bottom of the Material Properties tab and choosing a color for the object under Viewport Display.


Weight Paint Bone Selection vs Vertex Group Selection

When I have this kind of doubts, I generally build  a simple armature (2-3 bones), a simple object and try and experiment the behaviour I'm not sure about.

Anyway: the best way to select bones close each otheror overlapping is to separate them into different bone layers and turn on and off the needed layers.

The weight is an attribute of a vertex, relatively to a vertex group, which belongs to a mesh, so when you do some weight painting you are workng on a mesh, so if you select a new vertex group the weight painting will be relative to this latter vertex group, no matter which was the last selected bone in the armature.

When you add to a mesh an Armature modifier and select as object your armature, every time you move  a bone in pose mode Blender will search in the mesh if there is a vertex group with the same name, and will move the belonging vertices according to all weights in all vertex group.

This relationship is often set by the shortcut Ctrl+P
 (with automatic weights).

An useful and often unknown tool is: if you select your mesh, enter edit mode and select a weighted vertex, in the right properties panel (N
) you can find the vertex weights tab, which tells you all the weight assignements of the active vertex.


Start an animation nodes TimeCode Generator at a specific point

Adding n to the time will offset the time n number of frames:


How can I control the sharpness of corners using Subsurf?

You can crease edges with Shift+e as well as inputing the Crease value in the n panel:

It is also possible to model the edge loops in such a way so they get narrower where you need sharper corners or edges.

Using Subsurf is also not the only way to model things. It adds a lot of unnecessary geometry and it is always worth to consider if you could achieve similar forms with other modelling tools, for example, using bevels.


Are there any special considerations for using Blender on Linux?

The question is vague, but off hand here are some things to consider.

Compatibility

Make sure your hardware is supported,some hardware has poor support or is completely unsupported.Note: at the time of writing, NVIDIA has much better support for GPU rendering then any other hardware, but this may change with newer drivers & hardware.
Path names are case sensitive (if you share projects with ms-windows systems you need to take care of this, since ms-windows is case insensitive).
Unlike OSX, Linux doesn't support Quicktime codecs. This means some formats (such as gif) can't be loaded. Though Blender uses FFMPEG which supports many video formats (input & output).

Performance

Linux (and associated tool-chain) has been proven to be faster in some areas (many users report faster render times with Cycles for example). But this depends on your exact configuration.The ability to run Blender with no graphical desktop to use all available memory can be an advantage too (especially for render farms).
Blender for Linux takes advantage of a high performance memory allocator (jemalloc), which is less prone to memory fragmentation, see:

jemalloc home page
Sintel, Blender Jemalloc benchmarks
how-does-jemalloc-work-what-are-the-benefits

Some of Blender's code takes advantage of compiler optimizations which aren't available in Microsoft's compiler (MSVC): (explicit branch reordering with __builtin_expect and more efficient macros with statement expressions).
Greater choice for compilers (GCC, Clang, IntelC++) are supported on Linux, but only MSVC is supported on ms-windows.

With the ability to boot of an external drive, you can test how well Linux runs and that it supports your hardware, before installing onto your system.

Notes:

some of the advantages I've listed for Linux are also advantages for MacOSX, FreeBSD
MS-Windows+MSVC are also advanced technologies and undoubtedly have some advantages over Linux+GCC..or other compilers... (your-mileage-may-vary).
The questioner askes about Ubuntu, however this is not really an important detail, (pros/cons apply to other popular distros too).


Update to the answer below
I see actually that it has 12 sides, so create 36 segments not 24, and change your edge selections accordingly and the 'Auto Smooth' value

I'm pretty new to Blender and I had a quick go at this using a feature I learned about today "Auto Smooth".
Looking at the lampshade, it looks like it has 6 sides, so I created the UV sphere and before doing anything else at all, set the number of segments to 24. Please ignore the origin point as it's not important.

Then, I chose every 4th vertical edge using Alt+Left-Click for the first and Shift+Alt+Left-Click for each subsequent one.

Then using S and then Shift+Z so that only the x and y axes are scaled, I scaled those edges inwards toward the centre of the sphere.

Then I deselected them and selected each edge that was next to the edges I had just scaled:

And scaled them again using S and Shift+Z

OK. Getting close now. Go back to Object Mode and it still doesn't look quite right.

If I Right-Click on the sphere, and choose 'Shade-Smooth', that's no good because it smooths ALL the edges and you want to keep 6 of them sharp still. Leave the sphere smoothed at this point even though it looks wrong
I found out about Auto-Smooth and this might be what you're looking for.
Click on the Object Data tab - I'm using 2.90a, but if you're using 2.83, I think its in the same place...

Then click on the 'Normals' section and check the box next to 'Auto-Smooth' and I found that setting the angle value to 15.3 seems to produce what I suspect you want.


"Render Animation" from set of JPGS loaded with "Image/Sequence"

Apologies for the delayed answer.

The Render Animation option is a single call that will execute one of several options.

Blender will first check if anything exists in the sequencer. If there is something there, it renders that, and nothing else. If not, it checks the compositor for nodes that don't require the 3D scene to be rendered, such as if you have a movie clip that has some effects applied there. Finally, if there is no non-3D data to render, Blender will render the 3D scene.

So the order of operations is this:

Sequencer
Compositor
3D Scene

Under the Post Processing heading of the Output Properties tab, the sequencer and compositor can be overridden, so that Blender will skip one or both of them.

The sequencer is entirely 2D, as is the compositor. I believe all 3 are based on different underlying code. So the 3D view is entirely separate from the compositor and the sequencer. In order to get any information from the 3D view to the sequencer, you must render the scene to get a 2D image that gets stored internally or externally, then load that into the sequencer.

So the sequencer and compositor behave similar to other video editors or compositors, and aren't connected to the 3D scene any more than another software would be (that I am aware of).


It was the normal map. Always use color space on non color...


Start by adding a cone to your scene: Shift + A and select Mesh ► Cone. Next press TAB to go into Edit Mode then press NUM PAD 5 for top view.

Note the three buttons in the red box in the screenshot. These are the three mesh selection modes in blender. The left one is Vertex Select, the center one (highlighted in green) is Edge Select, and the right one is Face Select.

Here is a better view.

Now you will want to click on Edge Mode (the center one). Press Alt + A to deselect all and then C to enter brush select mode and click on the top (center) of the cone. Press Esc to leave brush select mode and right click to bring up the Edge Context Menu.

Click on Subdivide. Now open the box in the lower right hand corner that says 'Subdivide' if it is not already open. Your project should look like this:

Set the Number of Cuts to 12, then click on Vertex Select Mode as discussed above. Press NUM PAD 1 to enter front view and click on the highest point of the cone.

Now enable Proportional Editing by clicking the button below the pop-up menu in the screenshot that looks like a target. Click the button to the right of the target and select Sharp from the pop-up menu (you can experiment with other modes later for different effects). Now press the following keys in order: G, X, -, 1, Enter. Now at this point the cone looks silly I know, but we'll fix that.

In the lower right corner the box is now labeled Move. Increase the Proportional Size value till the cone has a nice curve. I used a value of 2.23. At this point you can play with the Proportional Falloff to see what the other effects do. Below to the left is linear falloff and to the right is inverse square falloff. The center one is sharp falloff as we just made.

I hope this tutorial helps.


Smoke rendering in Cycles still has a few tricks:
1- Quick smoke should have created some default shaders for the Smoke Domain, make sure they are there, if not recreate them like this:

Note that the attributes are written in lowercase. Using uppercase will make the materials fail
2- As of version 2.77 Smoke can be rendered using GPU

For blender versions prior to 2.77 you can only use CPU rendering to be able to see the smoke in render view and in the final render.

Rendered Image:

For a detailed description of nodes for Fire+Smoke on cycles read: Rendering smoke in Cycles?


Since script is not here so one handmade tech. using Dynamic Paint from Physics Properties. Tested with official 2.82

for Torus add Dynamic Paint as Brush
Join Cubes Ctrl+J, add Dynamic Paint as Canvas > Surface Type > Weight and in Output click "+" icon if "dp_weight" is marked red. When you switch to Weight Paint mode you can see all Cubes placed inside Torus are red.
Apply modifier for Cubes

When you switch to Edit mode you can see weight color as well if you enable Viewport Overlays > Vertex Group Weight.

To select red cubes go to Properties Editor > Object Data > Vertex Group > Select
Because some of the cubes were selected only partialy, you can select whole these by Select Linked Ctrl+L.

Notes: If you need Cubes separated back, just press P > by Loose parts.
(In experimental 2.83 I have some glitches in 3Dview editor > Weight Paint mode, but weight is visible from XYZ axis.Probably some personal issue with graphics card, because on Eevee mode Blender crash totaly.)
Just for fun ...


Why aliasing happens with higher emission strength?

I may share my two cents.
As official manual indicated:

Lamp strength for point, spot and area lamps is specified in Watts. This means you typically need higher values than Blender Internal...
Sun lamps are specified in Watts/m^2.

Since you cannot see lamp in the scene, there can be no such aliasing problem possibly happen like this.
However, if the emission material is used on a mesh object, it means you are using it as a mesh light, in which case, the Strength value actually turns to a multiplier to the Color value. Because the mesh is visible in the final render by default, it can be very easy to have the final render overexposed (as the mesh color can be much higher than (1.0, 1.0, 1.0)), thus, pixels on the mesh can be hardly possible to down below (1.0, 1.0, 1.0), so all you can see around the mesh can be purely white, including the outline, that's why zigzags occur.
Solution:
One way to avoid zigzags is by using a trick like this:
Duplicate the mesh light, then make single user of its material. keep the new object selected, go to Object tab in Property Editor, find Cycles Settings panel at the bottom, turn off Camera, to make it invisible, while still emitting lights. Then you can set a relatively high strength is you want. Select the original light, make sure the strength value is no more than 1, to avoid overexposure itself.
Besides, you can also consider to tweak options like Clamp and Gaussian pixel width, of course, it can be helpful by using enough render sample.
Edit
Nicely suggested by Jerryno, a much better way is by using Light Path:


In order to enter the Draw Mode you need to add a Grease Pencil Object (Shift + A) once you do that press Ctrl + Tab and you will see Draw Mode


How i can select opposite part of object in blender

The quickest and most comfortable way to do this is with a Mirror Modifier. See the images below for reference.

Where to find the modifier:

you can find it in the properties panel, just click in the little blue wrench symbol, then click on "Add Modifier" and select it from the list that appears

Properties:

now you have to make sure you select the correct axis in which you want to mirror the object (you can select more than one if you need to), In the image below the Y axis is selected so the object is mirrored alongside that (the green one just to be clear). Another important property you want to select is clipping which prevents part of the object to go "through the mirror" and therefore intersect its mirrored half. In the example below the right part is the original object and the left part is the mirrored one; each vertex of the original one can never go on a position with a negative value for Y because clipping is enabled.

Mirror Plane

Another important thing to keep in mind is the so called Mirror Plane: it is a plane perpendicular to the axis you select to mirror the object (hence, it is formed by the other two axes) and it is located in the same spot where the object origin is. So you have to make sure that the origin is placed where you want the mirroring to happen. As an example, in the image below the two object are mirrored alongside the same axis but the origin (= the yellow dot) is placed in different places (and so is the mirror plane), risulting in different kinds of mirroring.

Every modification is automatically mirrored on the other side!

Final advice:

remember to apply your modifier only after you are done modeling your object, as clicking on Apply will add the mirrored part to the mesh data of the object. In that case if you want to keep modeling symmetrically you'd have to delete half of your object and use another mirror modifier.
Remember also that you must be in object mode in order to apply a modifier.


Append or Prepend a draw method to menu class.

Very closely related How to add a checkbox to a pie menu?

import bpy

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

    layout.prop(render, "use_lock_interface")

def register():
    bpy.types.TOPBAR_MT_render.append(draw)

# make your unregister and remove draw
if __name__ == "__main__":
    register()

TIP Turn on developer extras in user preferences and can right click to  view source (Edit Source, as it opens in text editor.) of most UI elements.

Add toggle hotkey to custom checkbox


Cant see Object with "ocean" modifier through glass

After getting very constructive and utterly important changes in my question structure, I have found out, that the "transmission" DOES in fact work on the Ocean Modifier. After creating the scene in a new file, I haven't changed any setting, only the material of the objects. I think there was a mistake in the light setting or a change in the World Properties, that made the transmission not working probably.


A fluid artifacts, strange long splashes. What am I doing wrong?

You have to scale up everything, in every simulation in Blender for an acceptable result. You have to rise the upper can to don't intersect each other, and it's better if you switch the slips to no slip on every obstacles.blend file


Circular selection tool is stuck on the cursor after pressing alt+c

I managed to exit it by pressing esc or by changing the selection tool in the top right.


Argument values in `bmesh.ops.similar_verts()`

Check the source where docs are lacking.

Similarly to this answer re bmesh.ops.delete look at source of bmesh/intern/bmesh_operators.h

On compare

enum {
    SIM_CMP_EQ = 0,
    SIM_CMP_GT,
    SIM_CMP_LT
};

The int enum values for equality is 0, greater than 1, and less than 2.

On types

/* similar vertex selection slot values */
enum {
    SIMVERT_NORMAL = 0,
    SIMVERT_FACE,
    SIMVERT_VGROUP,
    SIMVERT_EDGE
};

On types it appears to check, 0 checks normals, 1 linked faces, 2 vertex group, and 3 linked edges.

Note

The bmesh similar operators appear to have been removed from 2.8


This is normal if you only have that one texture. Once you create a new texture, or import an image, it will show up in that "black rectangle" and you will be able to use it. For reference: this box is not for shaders, it is for textures.


You can hold Shift while using the knife tool to disable snapping. Look in the 3D view header and you will see the knife tool options and keys to press. The image below is a screen shot of the 3D view header during the use of the knife tool.
click for full size


I'm not sure about your problem, it seems to work fine, the Pole Target is supposed to control the orientation of your knee, not its position in the 3D space, to move your leg you need to have a controller behind the foot and choose it as the Target in the IK Constraint. To be complete, this Target controller needs to be deparented, you must disable its Deform option in the Bone menu, and you need to parent the foot to it.


Blender 2.8 Front and Back Background Images

In Blender 2.8, background is an object.

select one of viewpoint (if you skip this step, the background is always visible regardless of viewport angle)
type Shift-A, and select Image → Background
select an image file

Then, you'll get an object with image. The object has settings for transparency and side, which you want.

So, add two background objects that way, and set the side to Front for one, and to Back for the other.


How to make this lighting in Blender Internal?

Do you mean like this?  I guess I don't understand the question exactly because Blender Internal does have Fresnel:


Interpolation of animation cycle extremes

Anyway, I have just created the solution (solution or workaround, others may judge). If you have encountered this page by looking for a solution, congratulations.

I created a script that solves this situation by copying the second and next-to-last keyframes before and after the first and last keyframes, forcing the curve to interpolate and removing those keyframes leaving the interpolation untouched.

Here it is:
https://github.com/aravergar/cyclic-animation-interpolation


How can I see a preview of the sequence of PNGs in the VSE?

Could be that you are looking at the wrong frame (frame zero instead of frame 1). Try advancing a frame to check.

Also check that the png is being interpreted by Blender correctly. Import just 1 frame and check.

Finally you could try using Alpha Over or Over drop in the strip's blend type. It is at the top of the strip properties bar on the right of the VSE.


There is currently no way to reconstruct a more detailed mesh between the camera-solved Control Points from within blender. Thats because the Camera Solver does not look at the image data at all, It only deals with the marker positions. The Control Point-Tracker is the one who finds commonality between frames. So you could just add more Control Points, but you'll of course never get a z-value for every pixel of the frame.

So I see this two ways of achieving, what I think you want:

Manual Scene Reconstruction - this works well with rectangular scenes like rooms, hallways, roads, houses

Blender Movie Clip Editor offers a few basic tools for scene orientation after camera solution: automatic origin, floor or wall plane setup from selected tracks. With this you can line up Blenders coordinate-grid with rectangular objects in the movie clip. In a camera-viewport with the movie-clip enabled as background its easy now to manually reconstruct rectangular objects via extrude on the axes x,y or z. Also, the BLAM Blender addon may be helpful with this process. It also features camera solution from one single image instead of a movie clip.
In the end you can texture the mesh using the UV-projection modifier to project the movie onto the mesh.

Foto Series Reconstruction Workflow - also works with non-rectangular scenes and objects, like reliefs, uneven terrain

Extract ca. 25 frames with significant parallax from your clip (e.g. take every 10th frame), then...

Option A:
Use the free 123D Catch-App from Autodesk to generate the model and export it to Blender.

Option B:
Follow this video tutorial, which describes the workflow of reconstructing and texturing a mesh from a series of fotos using the free programs VisualSFM and Meshlab, and exporting the model to Blender.
VisualSFM is used to reconstruct a 3d-point-cloud from a series of fotos, with Meshlab you approximate a mesh from the points and optionally create a UV-Map with projected parts of the fotos as texture. From there the model can be exported to Blender.


Instead of using "collision" for the collider in the physics tab, use "rigid body" and uncheck "dynamic" (in the photo "dynamic" is checked)

and make sure it gets rendered.

In the particle tab of the emitter set Collision Group on RigidBodyWorld (it should appear if the collider is set as Rigid Body).

It should work.


Converting light emitting objects from Cycles Render to Blender Render

I did some changes to your scene. The strange artefacts result from the high emit value and the curves themselves.

I adjusted emit value to 15 instead of 1000.
Give the curves some extrusion. No neon light is total flat, it has some depth. A value of 0.001 works great.
I added some ambient occlusion. A value of 0.008 makes the scene less dark but preserves the night mood...


List bpy.types in a scene including empties

I guess, you just want to execute something based on the actual type of object while running through a list of objects in the scene. In this case, better use the type attribute of each object, which returns (as you probably guess) the type per object so no need to compare against RNA types:

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

>>> C.object.type
'EMPTY'

Test all objects of the collection in context (active collection):

import bpy

C = bpy.context

for obj in C.collection.objects:
    # Check for geometry type
    if obj.type not in ('EMPTY', 'CAMERA', 'LIGHT'):
        print ("Geometry object:", obj.name)
    # Check for empty
    elif obj.type == 'EMPTY':
        print ("Empty object:", obj.name)
        # Print the type
        print ("Draw type:", obj.empty_display_type)

API: https://docs.blender.org/api/current/bpy.types.Object.html?highlight=type#bpy.types.Object.type

All types of objects for reference: 'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'ARMATURE', 'LATTICE', 'EMPTY', 'GPENCIL', 'CAMERA', 'LIGHT', 'SPEAKER', 'LIGHT_PROBE'


Is there an Inflate/Deflate Mesh option in Blender?

CharlesL's answer is the closest thing to what you ask but adding this as it can produce some interesting results. You could experiment with the Simple Deform modifier set to Stretch and adjust the factor.


A rig could (theoretically) function perfectly well in pose mode without the roll set at zero.  But this depends on the goals of your animation and rig.  Nothing will blow up like in Maya if roll isn't zeroed out.  But it may not bend the way you intend, and an IK constraint might behave strangely too, depending on the poll target.


Creating a planet Atmosphere (Blurry Edge)

Final:

Overview:

In my setup I have used two objects - planet and rocket (created by t4k1t) and for lightning - Sun Lamp and Environment Map (HDRI).

Both objects are on separated layers.

In Render Layers tab you need to create two Render Layers and set it up accordingly to your object layers. Note that I've turned on Environment pass for Planet layer to have some background. You can skip this if you are using other method for it.

Turn on Transparent in Film section under Render tab.

After rendering your scene go to Composite and here are the blocks from screenshot explained:

Glare + Lens distortion for "blur" effect.
Combined and Inverted layers Alphas.
Combined layers.
Combined layers with Environment pass.

If you are not using HDRI map you can skip 2 and 4.


How can I invert the value range of a node group's input node?

So I found the solution pretty quickly! I just needed a "Map Range" node.
Here's a link to the documentation:
https://docs.blender.org/manual/en/latest/compositing/types/vector/map_range.html

Hopefully this will help someone in the future.


How do I stop Blender from adding numbers to end of object names?

This is normal. Blender has been doing this for a very long time and this is what it should be doing. Every object name needs to be unique in Blender so when it encounters an object being named with something that already is a name of another object, it automatically fixes this by adding the numbers and this way making the names unique. If you do not wish to have the numbers there, you can give unique names to all of your objects in the first place.


Waist bone won't move. Only rotates in place

Its is related,  actually, since your Main bone is acting like the last bone in a connected chain

Enter Edit Mode, select the Belly bone and go to its Bone Data Panel to uncheck Connected. Do the same for the Hips bone. Now you can translate the Main bone in Pose Mode


Delete edge loops

Switch to face select mode (⎈ Ctrl↹ Tab>Faces)

Select the face loop inside the inset (⎇ Alt RMB on an edge. See How can edge rings be selected in a predictable way?)

Switch to edge select mode (⎈ Ctrl↹ Tab)

⎈ Ctrl⇧ Shift⎇ Alt RMB on an edge to deselect the edge ring.

⌦ Delete> Edge loops (the menu accelerator G can be used for extra speed)

Scale and remove doubles
This is only really practical if your inset is aligned to an axis. Setting up custom axes and such would sorta defeat the purpose. However, if your inset is aligned (as it appears in your case), then this might well be faster than the first method.

Select the inset as shown in your screenshot

Scale to 0 along the Z (or whatever axis your inset is aligned to) (SZ 0)

W> Remove Doubles, or WE if you use the menu accelerator.

⌦ Delete> Faces (⌦ DeleteF with the menu accelerator).

Apologies in advance if the gifs are too fast. I was attempting to show what it looks like at sortof-full speed, but I'm not sure if it's possible to follow at gif framerates..


how to combine two meshes without ugly overlapping?

I think I would use a booline, then relax the edges of the cut where the meshes join until they are smooth and clean looking.


Why does vertex merging cause non manifold geometry?

Your mesh contains flipped faces, which is considered non-manifold geometry.
It's probably not caused by merging vertices, and it's easy to repair

Select all faces
Go Mesh > Normals > Recalculate Outside
Done.

After this, there are still some non-manifold vertices on the outer rim, because the mesh isn't 'closed'.


How do I delete actions from the Browse Actions list?

In the Dope Sheet Panel
In the Actions Editor
Click on the Browse Actions and select the animation you want to delete.
Hold Shift and press the X next to the + sign.
This will add a 0 prefix to the name of the action.
When you reopen the file all marked with 0 will be eliminated from the list.


Distortion when using displacement modifier

A way to obtain a smooth transition from a displaced surface to the non displaced parts is to use a vertex group and to assign the good value for the vertex weights:

Here is a view of the weights (blue = the smallest value = 0, red = the highest value = 1):

This is done with the following steps (some of them will depend on your actual mesh and the way the ring is modeled):

Create a vertex group: in the property panel, use the "plus" button as below

In the displacement modifier, assign the group:

Now we have to assign vertices to the group and fix their weights

This part depend on how the model is done.
Here I used a parallelepiped base, set an array on it, then subsurface and a curve:

To assign the wanted vertices:

Select them
Tune the value of the weight
And assign

So going progressively to the border, while decreasing the weight value to 0, you obtain a smooth edge.

The values are visible vertex per vertex on the right side panel:

The blend file


You may use the Paste mirrored keyframes from buffer button.

In 3D View window select all bones with A (or select only the ones you want to mirror). Do the same in the Dope Sheet Editor. Press the Copy selected keyframes to the buffer button (or Ctrl+C, while being in the Dope Sheet Editor), go to the frame where your half-side animation ends and press the Paste mirrored keyframes from buffer (or Shift+Ctrl+V).


Pressing u and clicking unwrap should give you your new mesh with the seams that you have defined. You don't need to "delete" that one.


2.8 remove doubles has changed to Merge by Distance

As of writing this answer, the option is not present in Blender, or at least not searchable through F3 and buried somewhere deep. What works instead, is merging by distance by either of these methods:
(remember to first select at least two vertices: at least one will be kept, while those, that are too close to kept vertices (depending on the setting), will be removed)

From the Mesh menu select Clean up and then Merge by distance.
[No longer in 2.90.1] From the Vertex menu select Merge Vertices and then by distance.
From the context menu (right mouse button by default) select Merge Vertices and then by distance.
Press M, then B keys. [before 2.90.1 Alt+M, then B keys.]

A panel with settings will appear on bottom left:

After clicking it, it will expand:

On bottom you should see the number of removed vertices, depending on current setting:

Step-by-step example

Press CTRL+N, then G for a new general file.
Make sure the cube is selected.
Press TAB to enter edit mode
Press ALT+A to deselect all vertices.
Click on a vertex.
Press G twice, and slide the vertex as far to another vertex as possible, so they both occupy the same position, confirm by clicking.
Press A to select all vertices (to make sure both vertices in the same spot are selected)
Press M, then B to merge by distance. Regardless of the setting, at least one vertex will be removed which should be confirmed by a status bar message:
Press ALT+A to deselect all vertices again.
Click on the vertex that had a "duplicate" on the same position.
Either press G to start moving the vertex and see all edges are connected to just this one, and the other is gone or H to hide the vertex and see there's no second vertex at the same spot.

Beware, that this will remove not only vertices that have the exact same coordinates, but also those that are within 0.0001m of each-other. You can decrease this value to as low as 0.000001m.
Thanks to the comments from Hikariztw and JtheNinja, I investigated the issue and indeed the old remove doubles worked exactly the same.
In Blender 2.79 the merge distance seemed to default to zero:

but after clicking the input field it would reveal that the 0.000 was just a rounded view of an actual non-zero value:

In both cases (Blender 2.79 and Blender 2.8) the default value is 0.0001m and the minimum value is 0.000001m (in Blender 2.79 you have to go to scene settings and set metric system for length in order to see 1 micrometer instead of 0.000001 without a unit).


How can I see the result value in shading?

Use Math nodes. If the material output is white, the value is inside of the range. Carefully change the value to find the range of value.
Maybe there is more precise way to find value.


UV unwrapping is an art… Some things that have helped me:

In “Object Mode” apply the scale Ctrl + A then select “SCALE” from the drop down menu Before you attempt to unwrap the mesh.
In general seams are placed on object edges. The order of their selection shouldn't matter.
After unwrapping you can move/rotate individual maps. Easily selectable by selecting one vertice of the UV map then Ctrl + L to select the rest of the linked vertices.
Try unwrapping using “Smart UV Project” with the “Angle Limit” set to “89” (Doesn’t always help).
Unwrap the mesh and then export the UV layout. Found under UVs then at the top of the drop down menu “Export UV Layout”. Bring the exported UV layout into Photoshop or Gimp and place your textures there.
In a pinch assign a different Material to the mesh faces for each Texture.
This simple tutorial helped me to begin to understand UV unwrapping.
https://www.youtube.com/watch?v=fDABx8wWGR4


Rough edges on mesh in final render[cycles]

...you could start by clicking anti-alias in both the ID Masks....


Blender 2.8 Shader editor : I can't add any node

You need to create a material by clicking on the NEW button in the Shader Editor header.


How can I make object visible when it intersects with a view of another obect?

You can use OSL to fire a ray forwards from the shading point, and return information about the next point hit. You can then use that information to control the response of a material at the shading point. To use OSL, you must set the render device to the CPU, and check 'OSL'.

This little OSL script fires a ray forwards continuing in the direction of the incident ray, and returns the Pass Index of the next object hit.

#include "stdosl.h"

shader NextObj(
  output float nextObjIdx  = 0.0
)
{
    if (trace(P,-I,"mindist",0.0001)){
        getmessage("trace", "object:index", nextObjIdx);
    }
}

It can be used, for example, in combination with these nodes to control the shading dependent on the next object:

With this sort of result.. the plane in the background has been given a Pass Index of 5:

.. and you can change the yellow Diffuse shader for a Transparent shader with color (1,1,1) to make the circle disappear when it's not between the camera and the plane. However, you'll find that then, it won't cast a shadow. That's because for a shadow ray, the incident ray I doesn't point towards the camera and so the forward ray points towards the environment, or a light-source, which doesn't have a Pass Index > 4, so as far as shadows are concerned, the object is always transparent.

That may be what you want .. if not, you can fix that as follows:

#include "stdosl.h"

shader NextObj(
  output float nextObjIdx  = 0.0
)

{

    point cam_pos = transform("camera","world",point(0,0,0));
    vector viewdir  = P - cam_pos;

    if (trace(P,viewdir,"mindist",0.0001)){
        getmessage("trace", "object:index", nextObjIdx);
    }
}

..which ensures the probing forward ray is cast onward in the camera viewing direction for all incoming rays, including shadow rays. That means the part of the circle that is between the eye and the plane casts a shadow. The rest doesn't, if it's transparent. There are quite a few more variations on the behavior you can achieve by tweaking the script and using a Light-Path node.. if these examples aren't right, perhaps you could specify more closely. You could, for example, use the material index rather than the object index; then all objects with that material would make the foreground circle appear.


So to get alpha working on a texture, click in the material on "Use Nodes" and change the color to use an image:

Also make sure to set the Settings/Blend mode of your material to Alpha Blend:

Then, open the Shader Editor to edit the nodes, and make sure that the alpha is set to Premultiplied in the settings (press N) of your texture. Then, create a node (Shift-A) Transparent BSDF, make sure it is white, and mix it with your image, using the alpha as factor (if you want to keep material, you can use the Principled BSDF node as input to your color instead):

This gives you something like that:

If you get a white border around edges, make sure that you selected Alpha: Premultiplied.


Sculpting on 2 joined meshes is not working as intended

Let's say that you want to sculpt these two objects together:

First, apply their scale, then apply all their modifiers except Subdivision Surface that you just disable. Keep in mind that when you join objects, the last selected while keep its modifiers (and they will affect the joined meshes) while the others won't:

Join them with CtrlJ, then select all the meshes except one and go into Face > Intersect (Boolean) and in the Operator box choose Boolean > Union:

Set the origin of the object to its geometry, switch to Sculpt mode, enable Dyntopo, it works:


Mesh is not moving with bone even with correct weights

I would use automatic weights, and verify that the mesh is moving with the bones and then manipulate the automatic weights with your weight painting. I'm a novice though.


Efficient method of inserting an image into the horizon of handheld footage

Terrible shot to track, since everything is moving (the character, the waves and the camera). There are hardly distinct features to compute any parallax, lens distortion or extract any spatial information. 3D tracking and reconstruction are not going to work here.

On the other hand because there is so little to go by, any errors on the composite will not be as noticeable... so a 2D solution might indeed work.

Track just two points on the sky an the clouds, they are about the only thing that will not change from frame to frame. One tracker on the left side of the frame an one on the right . That should give you enough information for 2D stabilization.

Use both trackers to stabilize the shot (with the trackers selected press the + sign to the right of the 2D stabilization box)

Make sure you don't use Autoscale.

and use only one to compute the rotation:

The trick now is doing the rest in the compositor: Instead of stabilizing the shot you want to make the 3D scene move (and rotate) in the opposite direction as the stabilization, and thus match the movement of the camera...

A node setup like this would work.
Where you first flip the render layer, stabilize it and scale it to -1 (flipping it again it and making it move like the camera) before compositing on top of the movie clip.

Now, how do you match the perspective? you'll have to guesstimate a bit. or use the technique from this answer: https://blender.stackexchange.com/a/40330/1853 using the background image as a reference and moving the camera using Lock Camera to View...


Select everything in edit mode and hit Ctrl-N to recalculate the normals on your object. It looks like some normals are facing outward, others inward. That is why flipping the normals didn't fix your issue, as it flips them all, and you still had some facing in and some out.


I have a large scene with a hierarchy of nested Empties. I need to select and delete all the objects under Empties with a specific name

This should be rather easy, if I didn't miss anything.

Select and delete all
Filter name through the search bar.
Press Enter to confirm the search.
Select all, shortcut A
RMB > Delete

Delete hierarchy
Deleting the whole hierarchy of empties for some reason doesn't work well in the outliner.
Just move your mouse over to the 3D viewport and it works well.
RMB > Select Hierarchy
Delete Key in the 3D viewport to delete selected.

The grayed out items are hidden objects.
To make them visible in your scene, use the outliner toggles:


In Python rotate a polygon to face something

import bpy
from mathutils import Matrix

def turn_face_to_point(obj, face, target):
    #init
    mat_world = obj.matrix_world

    #transform the face to world space
    #to take non-uniform scaling into account
    #which may change the angle of face.normal
    for index in face.vertices:
        vert = obj.data.vertices[index]
        vert.co = mat_world @ vert.co

    #get the rotation difference
    track  = empty.location - face.center
    q = face.normal.rotation_difference(track)

    #compose the matrix
    #rotation around face.center in world space
    mat = Matrix.Translation( face.center) @ \
          q.to_matrix().to_4x4() @ \
          Matrix.Translation(-face.center)
    #transform the face back to object space afterwards
    mat_obj = mat_world.inverted() @ mat

    #apply the matrix to the vertices of the face
    for index in face.vertices:
        vert = obj.data.vertices[index]
        vert.co = mat_obj @ vert.co

#test
obj   = bpy.data.objects['Plane']
empty = bpy.data.objects['Empty']
face  = obj.data.polygons[0]

turn_face_to_point(obj, face, empty.location)


How to load external modules/packages into blender python

For pip-installable dependencies (like PyPI or wheels), all you need to do is the following:

Locate your Blender's Python binary path, let's call it <BPYTHON> (in my case 2.80/python/bin/python3.7m at the Blender installation).
Run the following to enable pip operations in bpython:

<BPYTHON> -m ensurepip
<BPYTHON> -m pip install --upgrade pip

Now any time you want to install a package simply call pip from bpython:

<BPYTHON> -m pip install <YOUR_PACKAGE>  # no --user needed
<BPYTHON> -m pip install <PATH/TO/WHEEL>.whl  # also works with wheels as expected

As usual, you just have to install a package once and uninstalling works the analogous way.

Blender's Python has its own environment, so this procedure will install the dependencies there (in my case the 2.80/python folder). AFAIK this will work irrespectively of your OS, system's Python version and Blender location so I found this to be most convenient. You can encounter some issues if installing cython-related packages like tkinter but this can also be fixed as I did here.

Let me know if this works out!
Cheers,
Andres


It turned out that the rest positions for those bones were wrong.  This was extremely hard for me to detect because the mesh layer was following the control layer in pose mode.  To catch it, I looked at the armature with all layers turned on in edit mode.


Add a solidify modifier to the object, this will create two sides to the object.


Noob Question: Can't find my skeleton after upating to 2.9

it's disabled in the viewport. select it in the outliner, enable disable viewport filter, and switch it back on -


How do I improve bevel shading without adding more geometry?

There are three things that could improve the corners and shading.

Change Outer Miter Type of bevel
Check Harden Normals in Bevel Modifier
Enable Autosmooth in Mesh tab


Is it possible to get the path of a .blend file from within OSL?

OSL itself doesn't provide any facilities to access files relative to the .blend file.
However, when passing a 'string' into an OSL script node, Blender automatically assumes that the string represents a filename. As with other filenames in Blender, prefixing the filename with '//' will indicate a path relative to the saved .blend file.
Therefore, in order to get the filepath to the .blend in an OSL shader simply add a 'string' input and set its value (within the node field) to '//'.


Go into edge mode ⎈ Ctrl↹ Tab and ⎇ Alt RMB select the spiraling edge loop. Follow it untill you hit a pole vertex with an uneven edge count.

Starting from the pole vertex, ⇧ Shift RMB select the chain of vertices which is perpendicular to the spiraling loop. V Rip them, then make new faces F joining the correct vertices on both sides.


What exactly does the "Non-color data" option for image/environment textures do?

This option stops blender from applying color-spaces to the image, this is useful when you want to use the numeric value of an images pixel rather then the perceived color value.
By default Blender converts an 8bit-per-channel image (As you would get with JPG, TGA, PNG, BMP etc.) from sRGB-colorspace to linear-colorspace (also known as rec709), before using it for compositing - where all color is assumed to be in linear-colorspace.
Examples where you don't want this include normal-maps, z-depth-buffer and displacement-maps - Where 0.5 should displace half the distance then 1.0.
Color spaces are fairly involved, so more could be written about the topic - but simple rule of thumb is if you are not viewing the image data as a RGB-Color, then you should set Non-Color Data.

Note that OpenEXR is an exception and color is assumed to already be stored in linear/rec709 colorspace, to display these images Blender converts them into sRGB (unless you choose a different colorspace).


How to get same size in every direction while Extrude Along Normal?

You need to use Offset Even Extrude function


Go to Edit Mode and select desired faces. For example:

Press X and Remove Faces.
Change Transformation Orientation to Normal (a). It will help to reduce distortion of the mesh.
Enable Proportional Editing (b).
Grab handles and position vertices (c). You can use mouse scroll to change size of the influance ring.

Update:

Turn off Proportional Editing and change Transforamtion Orientation to Global.
Select loop around cutted hole.

Press E to extrude it along Y axis.
Now turn on Snap and choose Vertex.

We need to remove the vertex that is overlaping our mesh. To do so, grab it and position over the nearest vertex, then hit A to select the whole mesh and W > Remove Doubles.
To make face and complete frame select vertex point, extrude it along Z axis (E > Z and hover cursor over another vertex on the bottom). Now select all 4 of them and hit F to make a new face.


So first I made a really messy mesh and added a Particle System with settings that shows dots instead of hair because this shows the uneven distribution more clearly.

Next I added a cube then applied a Sub-Surface Modifier with 3 iterations.   I also scaled it up so that it is completely outside of the mesh that it will be shrunk to.

Now I used the Shrinkwrap Modifier to fit the new mesh to the messy one. You can already see that the particle distribution is much more even.  I also used the Make Links tool Ctrl+L -> Modifiers to copy the hair particle system over to the new mesh.

I kept the modifier on and activated it's button for "Show Modifier while in Edit Mode" and also "Apply Modifier To Editing Cage during Edit Mode". They are right next to the Modifiers other visibility buttons.  Now I used the Smooth Vertex tool to even them out.  You can press F6 to bring up the interactive pop-up window for the Smooth Vertex tool and increase the number of iterations for smoothing until the extra sphere's quads are more even.  I also scaled this sphere using the Scale by Normals tool Alt+s so that it would be slightly below the surface of the model the hair is being applied to but if I recall correctly, there is a way to make the hair proxy object invisible while keeping the hair itself visible, I'll look that up when I get back and edit this post if I find how to do that.(Unless someone else posts that first)

To finish it off, I subdivided the mesh one more time and set the Particle Emitter to Verts because Faces was leaving obvious clumps.


How do we assign a second material to selected faces in 2.8?

This is a known issue when using multiple materials with a number of older GeForce, Quadro and other end of life graphics cards even though they seem to meet the minimum requirements.

  Blender Known Issue: Drawing error with multi-material object. Faces disappear or showing artifacts with 2 or more material slots applied to same object. When trying to use a second material or more on an object, the faces where it is applied become transparent or in some cases they are distorted as black rectangles that stretch to the origin (this second occurs above all with more complex models than a cube). It happens in Blender 2.81 as well as in Blender 2.82, but in Blender 2.80 there is no such error.

While the bug report lists multiple cards, the list is not exhaustive (I have this issue on my card, the GeForce 9800 GTX+, which is not listed). The core issue is the recentness of the video driver. In the case of NVIDIA GPUs, they have to be able to run NVIDIA drivers greater than v400. The highest driver that I can install on the GeForce 9800 GTX+ is GeForce v342.01.

I can confirm that as listed in the bug report, I can use multiple materials in Blender 2.80 without a problem.


How do I rotate a group of objects around their respective centers?

Normal behavior is like this

Set the menu as below:

You will get look like this:

Best of luck :)


It appears that you have sun lamps and they are pointing downwards. So even though physically one or two are below the object they are only emitting light "down" so the bottom of your object is in shadow.


You can always create an empty, and parent your animated object to it. Select first your object(s), and at last the new empty. Then, press Strg+P and select Object (Keep Transform). After that, you can rotate or move the empty around, and your animation will follow.


Object Appering in preview mode but not in renders

Per my comment above, you should first check if the Disable in Renders toggle is Enabled or Disabled. You can find this in the Outliner, which will appear in this area (circled in red) of the default workspace:

If the Disable in Renders toggle indicates that the object should be rendered, then the problem may be more complicated. This seems like the most likely problem, though.


2.80 nla.bake - returns 'Nothing to bake' - when selecting bones through script

(Question duplicated from blenderartists.org. I answered it there, and am copying my answer here.)

I’ve seen that “Nothing to bake” error in 2.80 when another object is selected in addition to the armature. Try deselecting everything in Object mode, selecting the armature, re-entering Pose mode, then baking. Here is a code snippet that works for me:

scene = bpy.data.scenes[0]
arm   = bpy.data.objects['metarig']

# ensure that only the armature is selected in Object mode
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')
arm.select_set(True)
scene.view_layers[0].objects.active = arm

# enter pose mode and bake
bpy.ops.object.mode_set(mode='POSE')
bpy.ops.pose.select_all(action='SELECT')
bpy.ops.nla.bake(frame_start=0, frame_end=10, step=1, only_selected=True,
                    visual_keying=True, clear_constraints=True, clear_parents=False,
                    use_current_action=True, bake_types={'POSE'})
```


Rendering taking too long. Is there a way to improve it?

There are several ways to speed up render times.

Enable auto tile addon to set tile size correctly.

User preferences => Addons => Enable Render: Auto Tile Size => Save Settings

By utilizing denoising you should be able to decrease render samples.
Scene tab => Check denoising box
Bake your materials. Its too complex to explain here, so check out this tutorial.


Moving a character with a walk cycle on a path with these requirements?

I figured it out. I wrote a Python script (pretty rough, but it works) where I set the name of the curve object, the distance for a full stride, how many frames it takes to go a full stride, the start frame, and the desired end frame. Then it'll print out the values needed for the Follow Path constraint's Offset parameter. If I put in too many frames and the calculations happened to overshoot the distance on the path (so much that the Offset value is greater than 1), then the script will show a different end frame where we are as close to under 1 as possible.
I've tested this and my character walks perfectly along the path -- no sliding at all. It's exactly what I was looking to do. As I thought about it, I could make the character follow different paths simply by reducing the influence of the Follow Path constraint as needed. (Of course, I would have to re-position the character so it would look seamless, but it would be possible. I may not end up doing this, though...it's probably more hassle than it's worth.)
I plan to improve this script, where it'll automatically insert the keyframes in the Follow Path constraint (as well as provide an option to not start at the very beginning of the path), but this is sufficient for now.
Here's the code in case if anyone finds it useful. Note that this expects to be run from Blender 2.8's Scripting workspace, where a Python Console window is present. I also used some code from MacKracken's Arc Length for the curve distance calculations.
from console_python import get_console
from contextlib import redirect_stdout
from mathutils import *
from bpy.props import *
import bpy
import math

###############################################################################
# Calculate Path Offset Value
#
# Figure out the Follow Path constraint's Offset value that we need in order to
# use a walk cycle along a path.

PATH_NAME = 'NurbsPath'                     # The name of the path we want to walk
FULL_STRIDE = 0.25                          # How far is our full stride in Blender units?
FRAMES_TO_GO_FULL_STRIDE = 13               # How many frames do we need to go per one full stride?
FRAME_START = 101                           # When do we start walking on the path?
FRAME_END = 520                             # When do we stop walking on the path?

###############################################################################
# Version History
#
# 1.0.0 - 2020-08-03: Original version
#

###############################################################################
SCRIPT_NAME = "calculate_path_offset_value"
###############################################################################

def add_scrollback(override, text, text_type): # Necessary for printing to the console
    append = bpy.ops.console.scrollback_append

    for l in text.split("\n"):
    txt = l.replace("\t", "    ")
    append(override, text=txt, type=text_type)

def print_msg(text): # Necessary for printing to the console
    con = stdout = stderr = None
    for area in bpy.context.screen.areas:
    if area.type == 'CONSOLE':
        hsh = hash(area.regions[-1])
        con, stdout, stderr = get_console(hsh)
        break

    stdout.seek(0)
    stdout.truncate(0)

    with redirect_stdout(stdout):
    con.push('print("' + text + '")')

    out = stdout.getvalue()
    if out:
    override = {'area': area, 'region': area.regions[-1], 'space_data': area.spaces.active}
    add_scrollback(override, out, 'OUTPUT')

#calcs a nurbs knot vector
def knots(n, order, type=0):#0 uniform 1 endpoints 2 bezier
    kv = []
    t = n+order
    if type==0:
    for i in range(0, t):
        kv.append(1.0*i)

    elif type==1:
    k=0.0
    for i in range(1, t+1):
        kv.append(k)
        if i>=order and i<=n:
        k+=1.0
    elif type==2:
    if order==4:
        k=0.34
        for a in range(0,t):
        if a>=order and a<=n: k+=0.5
        kv.append(floor(k))
        k+=1.0/3.0

    elif order==3:
        k=0.6
        for a in range(0, t):
        if a >=order and a<=n: k+=0.5
        kv.append(floor(k))

    ##normalize the knot vector
    for i in range(0, len(kv)):
    kv[i]=kv[i]/kv[-1]

    return kv

#nurbs curve evaluation
def C(t, order, points, weights, knots):
    #c = Point([0,0,0])
    c = Vector()
    rational = 0
    i = 0
    while i < len(points):
    b = B(i, order, t, knots)
    p = points[i] * (b * weights[i])
    c = c + p
    rational = rational + b*weights[i]
    i = i + 1

    return c * (1.0/rational)

#nurbs basis function
def B(i,k,t,knots):
    ret = 0
    if k>0:
    n1 = (t-knots[i])*B(i,k-1,t,knots)
    d1 = knots[i+k] - knots[i]
    n2 = (knots[i+k+1] - t) * B(i+1,k-1,t,knots)
    d2 = knots[i+k+1] - knots[i+1]
    if d1 > 0.0001 or d1 < -0.0001:
        a = n1 / d1
    else:
        a = 0
    if d2 > 0.0001 or d2 < -0.0001:
        b = n2 / d2
    else:
        b = 0
    ret = a + b
    #print "B i = %d, k = %d, ret = %g, a = %g, b = %g\n"%(i,k,ret,a,b)
    else:
    if knots[i] <= t and t <= knots[i+1]:
        ret = 1
    else:
        ret = 0
    return ret

#gets nurbs polygon control points on global coordinates
def getnurbspoints(spl, mw):
    pts = []
    ws = []
    for p in spl.points:
    v = Vector(p.co[0:3]) @ mw
    pts.append(v)
    ws.append(p.weight)
    return pts , ws

#calculates a global parameter t along all control points
#t=0 begining of the curve
#t=1 ending of the curve
def calct(obj, t):
    spl=None
    mw = obj.matrix_world
    if obj.data.splines.active==None:
    if len(obj.data.splines)>0:
        spl=obj.data.splines[0]
    else:
    spl = obj.data.splines.active

    if spl==None:
    return False

    if spl.type=="BEZIER":
    points = spl.bezier_points
    nsegs = len(points)-1

    d = 1.0/nsegs
    seg = int(t/d)
    t1 = t/d - int(t/d)

    if t==1:
        seg-=1
        t1 = 1.0

    p = getbezpoints(spl,mw, seg)

    coord = cubic(p, t1)

    return coord

    elif spl.type=="NURBS":
    data = getnurbspoints(spl, mw)
    pts = data[0]
    ws = data[1]
    order = spl.order_u
    n = len(pts)
    ctype = spl.use_endpoint_u
    kv = knots(n, order, ctype)

    coord = C(t, order-1, pts, ws, kv)

    return coord

def get_path_length(obj):
    length = 0.0

    if obj.type=="CURVE":
    prec = 1000 #precision
    inc = 1/prec #increments

    ### TODO: set a custom precision value depending the number of curve points
    #that way it can gain on accuracy in less operations.

    #subdivide the curve in 1000 lines and sum its magnitudes
    for i in range(0, prec):
        ti = i*inc
        tf = (i+1)*inc
        a = calct(obj, ti)
        b = calct(obj, tf)
        r = (b-a).magnitude
        length+=r

    return length

###############################################################################
# Main program
###############################################################################

print_msg('**********************************')
print_msg(SCRIPT_NAME + ' - START')

path_length = get_path_length(bpy.data.objects[PATH_NAME])
stride_length = FULL_STRIDE / path_length
total_frames = (FRAME_END - FRAME_START)
end_value = (total_frames / FRAMES_TO_GO_FULL_STRIDE) * stride_length

print_msg('  ----- RESULTS -----')
print_msg('    ' + str(PATH_NAME) + ' has a length of ' + str(path_length))
print_msg('    One full stride length for a Follow Path constraint Offset: ' + str(stride_length))

if (end_value > 1.0):
    print_msg('    *** WARNING! INPUT PARAMETERS OVERSHOOT THE OFFSET VALUE! ***')
    print_msg('    *** We are going to modify which frame where the animation ends so that we can end with a useable Offset value. ***')
    while (end_value > 1.0):
    end_value -= stride_length / FRAMES_TO_GO_FULL_STRIDE
    FRAME_END -= 1

print_msg('    FRAME ' + str(FRAME_START) + ' Offset: 0')
print_msg('    FRAME ' + str(FRAME_END) + ' Offset: ' + str(end_value))

print_msg('  -------------------')
print_msg(SCRIPT_NAME + ' - END')
print_msg('**********************************')
print_msg('Done running script ' + SCRIPT_NAME)


I figured it out again... you have to press F.


Tweening for 2d strokes in grease pencil

If the lines share the same points (ie: copied keyframe and tehn used sculpt to push the line around) you can simply use the "interpolate" menu in edit mode, and it will VERY cleanly add inbetweens


Two (of many) ways to do it:

Select the radar in edit mode and press P to have it separated in a new object, and animate the whole object, without even the need of an armature.

Or

Create an armature which has a "Radar" bone, parent (Ctrl P) the mesh to the armature and choose "with empty groups" option, then in edit mode select all vertices of the radar, select in the properties panel the newly created "Radar" vertex group and click the "assign" button.


Python: Check if vertex is on camera field of view

import bpy
import bmesh
from mathutils import Vector
from bpy_extras.object_utils import world_to_camera_view

scene = bpy.context.scene
cam = bpy.data.objects['Camera']
obj = bpy.data.objects['Cube']
mesh = obj.data
mat_world = obj.matrix_world
cs, ce = cam.data.clip_start, cam.data.clip_end

assert obj.mode == "EDIT"
bm = bmesh.from_edit_mesh(mesh)

for v in bm.verts:
    co_ndc = world_to_camera_view(scene, cam, mat_world @ v.co)
    #check wether point is inside frustum
    if (0.0 < co_ndc.x < 1.0 and
        0.0 < co_ndc.y < 1.0 and
        cs < co_ndc.z <  ce):
        v.select = True
    else:
        v.select = False

bmesh.update_edit_mesh(mesh, False, False)


create random distribution of dupli objects on particle system but keeping one object per face

I noticed that you haven't changed the random slider (the one next to the 'object' slider, at the top of the particle settings). For the rest of the random settings to work, you need to make this a non-zero value. This only controls the distribution, rather than the rotation, so you shouldn't have any worries on that score.

This might not solve your one object per face issue, however. Perhaps try applying your group particle system to a plane the size of one of those faces and using an array modifier. This should achieve the intended result.


How to rotate around some coordinate axis in camera view?

In the 3D view header change the Transform Orientation to View.

Then when you want to rotate something around one of the other axises of the current view just press R then Y Y or X X. The Z axis in view mode is how it will rotate with out any axis constraints.


Use Ctrl + K  to link the data from the Active Object to the selected Objects (the fractured pieces).


Divide and conquer!

I think the main point for performance is to have smallest objects as soon as possible.

For that, the idea is to use a dichotomy: split the object in half, then each half in half, etc. So cutting an object is faster at each iteration.

The following code is doing it using the bounding box of the object. Boundings are in local coordinates in Blender.

So we get the boundings. Find the spatially largest axis then cut in half on it.

Once vertices are selected, we use 'select linked' to avoid the faces or edges to be cut.

import bpy
import bmesh
import time
from mathutils import Vector

def cut_object( obj ):
    #Gets the bounds
    bounds = [b[:] for b in obj.bound_box]
    #0 is the min
    min_bounds = Vector( bounds[0] )
    #6 is opposite corner to 0
    max_bounds = Vector( bounds[6] )
    delta_bounds = max_bounds - min_bounds

    #Get the axis which corresponds to the largest area
    axis = 0
    if ( delta_bounds.x < delta_bounds.y ): axis = 1
    #Commented below as using Z axis has unwanted effects in your situation
    #if ( delta_bounds.y < delta_bounds.z ): axis = 2

    #The center is the limit
    limit = min_bounds[axis] + 0.5 * delta_bounds[axis]

    #Set the object active
    bpy.ops.object.mode_set(mode = 'OBJECT')
    bpy.context.scene.objects.active = obj
    #Set selection mode
    bpy.ops.object.mode_set(mode="EDIT")
    bpy.ops.mesh.select_mode(type="VERT")

    #Select the wanted vertices
    bpy.ops.object.mode_set(mode = 'OBJECT')

    for v in obj.data.vertices:
        v.select = v.co[axis] < limit

    #Extend to linked parts (so wont cut the faces or edges)
    bpy.ops.object.mode_set(mode="EDIT")
    bpy.ops.mesh.select_linked()

    #Get the selected vertex count
    selected_count = sum( 1 for v in obj.data.vertices if v.select )

    print( "Axis: " + str( axis ) )
    print( "Selected: " + str( selected_count ) + "/" + str( len( obj.data.vertices ) ) )

    result = True
    #Check that will separate something
    if selected_count == 0 or selected_count == len( obj.data.vertices ):
        result = False
    else:
        bpy.ops.mesh.separate(type='SELECTED')

    bpy.ops.object.mode_set(mode="OBJECT")

    return result

print( '-----------------' )

max_vertices = 10000
max_iterations = 20
iteration = 0

found = True

start_time = time.time()

discarded_objects = {}

while found and iteration < max_iterations:

    found = False

    #Get all objects that have more than the wanted vertex amount
    for obj in [x for x in bpy.context.scene.objects if len(x.data.vertices) > max_vertices and discarded_objects.get( x ) != True]:
        if cut_object( obj ):
            found = True
        else:
            #We can not cut it, so discard it
            discarded_objects[obj] = True

    iteration += 1
    print( "Iteration: " + str( iteration ) + "   Objects: " + str( len( bpy.context.scene.objects ) ) )

end_time = time.time()

print( "Elapse: " + str( end_time - start_time ) )

The code is commented. So I think all is said about that.

Results

For a limit of 25k per chunk that gives 33s here.

For 10k, this is 50s.

Comments

You may prefer cutting differently. For instance defining a virtual cube surrounding the object, then cut it in half and use its part to cut the mesh.

The given code version does not included cutting along Z. It works, but is far longer when the wanted amount of vertices is low (10k for instance). The reason is we can only separate few faces at each iteration.

I'm also wondering why you need to start with such large mesh? Why the process does not allow to start from small parts instead this big one?

Here is the blend file with the script included:

Edit

Here is a version with no iteration limit and including the cut along Z.

But, practically cutting along Z won't work for small chunks (tested on 10k).

The reason is several parts of the mesh are tall and close to each other. So they can't be separated the way the algorithm works because select linked will nearly select them all and only few very small parts will be separated.


how to test if there is a link to a specific node socket?

OK I've found out

for m in bpy.context.object.material_slots:
mat = m.material
if (mat.use_nodes):
    nodes = mat.node_tree.nodes
    links = mat.node_tree.links
    for n in nodes:
        if (n.type == 'BSDF_PRINCIPLED'):
            print(mat.name)
            alphasocket = n.inputs[18]
            if not(alphasocket.is_linked):
                print("No Alpha node!")
            else:
                print("Alpha node connected")


How to place annotation stroke on the surface of the object in Blender 2.8?

I emailed the author of the addon and he sent me a screenshot where this option is located in the newest 2.80 beta build:


How to export multiple animations for a game character? (specifically, Unity)

NOTE: for ue4
what i do is i put every animation in its own action and then set the anim player equal to whatever the keyframing is for that specific anim. i then export it as fbx using selected only and unchecking nla strips.


The viewer node is actually an Emission BSDF with its label changed to "Viewer."  ShiftCtrlLMB on any node with an output and the the first output will be connected to the color input of "Viewer."  Successive clicks will cycle through all the outputs of the desired node.  Also note that if your scene exposure is changed, the viewer's strength will automatically adjust to compensate, but it will not compensate for changes to gamma or adjustment curves.


Easiest process for me to apply textures, created externally, to my models

You have to UV unwrap your model, lay it out the way it should be (and then don't change it). Send that UV layout to the texture artist.

That is the only way you can have textures custom built for any 3D object.
The person painting the texture, you or somebody else makes no difference, has to know where to put and how to shape the texture. (How could you paint a room if you did not know what the room looked like?)

You can export the UVs from the UV/Image Editor's header by clicking on UVs > Export UV Layout.
Blender's file browser will open up letting you choose the name and location for the new image. There are some important settings on the left side.

Make sure the export size is the same size that your target UV map will be.
Set the Fill Opacity to something higher then the default of .25 (the default is too transparent to be useful). I like 1 as it is completely opaque which gives a good base layer to work off of.


Image texture won't appear correctly in Unity... Fine In Blender (And Yes It's Baked)

Okay, I had to outsource this to a smart person because I'm a beginner and frankly ignorant of all this stuff... but I'm going to post the answer for future newbies like me!

Okay, so the problem was in Blender. Inside the Object Data > UV Maps panel, I had several UV maps left over from my frantic attempts at baking. I had to delete those and re-import the armature+mesh.

Then, in Unity, I followed these steps (I did not need to re-bake my texture by the way):

In Unity, make sure to re-do everything like mark the rig as humanoid and force T-pose and stuff. I was frustrated for an hour because I forgot to do this and couldn't figure out why my animations wouldn't run.


Paste X flipped post not working correctly

Every bone .L should have a bone roll value equal and negative to the corresponding .R.
Set a front ortographic view, select the armature, Ctrl A (Apply rotation and scale), go to edit mode, select all bones, Shift N (recalculate roll - view axis).
This procedure will make the flip pose possible, but it will break all the previously done animations.


Action For Empty Object Appears Not to Play in Game Logic Layout, DOES Play In Default Layout

RESOLVED!
   I had the collision proxies set up with Empties using Locked Track Constraints.
   Didn't know regular constraints and BGE aren't happy together.
   Switched to Rigid Body Constraints.
   Now everything seems to be working correctly in both Defailt Layout and Game Logic Layout.
Thanks!


I found the problem. By selecting Output/Overwrite, it began rendering properly. I assumed with Overwrite not selected, it would simply generate the images with a new file name.


Blender 2.8 Cycles All Materials Same Color As Viewport

SOLVED
At some point I accidentally moved my objects to background layer. I had the transparent background turned on, so they got invisible. Moving them back to foreground solved the problem.


Constraining vertices in the Z axis when array, curve and shrinkwrap modifiers applied

I managed to solve the problem by using the shrinkwrap modifier on the bezier so it followed the terrain, then I simply applied the road section to the bezier using the array and curve modifiers.
Set the bezier twisting setting to 'Z-Up'.
It was necessary to hit 'apply' to the shrinkwrap modifier on the bezier, otherwise the road simply followed it in 2D.
I hope that helps someone.


PyQt5: The specified module could not be found

I remember that i ran into this error too. I think the problem was the qwindow.dll.

For me the necessary steps were: install the correct PyQt5 version directly into the python directory of the binary. For 2.76 the PyQt folder has to be in the 2.76\python\lib\site-packages directory.Then you need to grab the qwindow.dll, put it into a folder called platforms, and put it asides the Blender exe. And you should be ready to go.


How do I set FPS if I don't know what it is?

Don't know if this is helpful but you can use mediainfo-gui to get all the information of the file. Or if you know how to use the terminal you can use:

ffprobe yourclipname.mp4


I had the same problem and here is what I discovered: Under 'Properties > Output properties > Dimensions' I accidentally had the option 'Render region' checked. Once I unchecked this option, Cycles was back in bussiness. A simple solution but it can be very confusing if you don't know what's going on, since Eevee would render with this option checked. Hope some day this helps someone out there.


How to play a video strip backward in blender 2.8?

Check out your FPS readout in the Preview pane and the cache indicator in the Sequence view.

If your FPS is flashing red numbers that are lower rates than the source video, your machine's struggling to keep up.

Play in reverse Shift-Ctrl-Spacebar usually lags for me until the clip is mostly cached. You'll see the clip cache build as an orange bar below the tracks in Sequence.

Look into cache allocation via Blender's Preferences ... System ... Sequencer Cache Limit and into Proxies. These and other tips will help you squeeze more performance from your machine.


How can I jump to the first frame in the timeline?

Pressing Shift + Left Arrow, in the timeline, moves you to the first frame; Shift + Right Arrow gets you to the last frame.


To get even texture pattern I think the seams on the mug indeed should be re-arranged.

That "vertice" in the original UV map actually represents all the inner faces of the mug together with mug's handle. That's why the model should be unwrapped and so the seams can be put in this way:

In this example the seams are placed on:

The outer mesh handle's loopcut; it starts on the bottom of it outside and ends on the bottom inside.
The inner mesh handle's loopcut.
The loopcut opposite the mug' handle.
The very top loopcut of the mesh (inner one, so as not to be seen from the outside).

After some UV map tweaking (scaling loopcuts so the shape to be more quad-like and without distortions) and arranging islands, it can look like this:

Note: if texture on the bottom of the mesh will be seen somehow, then topology there should be rebuilt.

Thus the texture on your mug will be placed in this way:

Blend file


It was because I was using time remapping on the output options. If "Old" and "New" are set to different values, it creates offsetting behavior with keyframes in the dope sheet and timeline.


Can Blender be used to render 80s style wireframe graphics and animations?

you can try the Wireframe node in cycles( produces a triangulated mesh ), using the following node setup :

and with some distortion and blur in the compositing :

solid view :

a test render :

another way is to use the wireframe modifier to get the real wireframe, and a simple material:

solid view :

the render result :


Reducing viewport slowness while working on a .blend with lots of particles?

Expanding on stacker's answer, in case you are not using child particles, you can also reduce the percentage of real particles displayed in the viewport in Particle settings > Display:

Note that you should bake your simulation with this set to 100%, and any simulations with it at less than 100% will not be the same a simulations with it at 100%.

You can also set the particles to draw in the viewport as something other than what they will appear as in the render.

This will probably increase viewport performance a lot


You need to change the Transform Orientation. In some case, changing to local orientation will work, but in your case, you need to create a new referential :

Create specific Transform Orientation

On edit mode, select an edge that has the correct direction for the pivot of the box. (for example the edge on the bottom of the lid )

Press n to open the right menu in the 3D view. Find the "Transform Orientations" menu and press on the little +. This will create a new orientation that you will use for your rotation.

Go back on object mode and change the transform orientation (on the bottom of the 3d view) to your newly created orientation wich should be named "Edge" or "Edge.00x".

You can now use the 3d manipulator to rotate the top of your box along the newly referential created.


Calculating acceleration or velocity of a point on a rigid body?

In rigid body simulations, external forces create two different kinds of effects on an object: linear acceleration and angular acceleration. Linear acceleration is how fast an object is moving incrementally, and angular acceleration is how fast an object is spinning incrementally.

To obtain the net external force on a single vertex or edge doesn't really make sense, because a vertex or edge doesn't have any volume and therefore doesn't have any mass. In the equation F=ma (Newton's second law of motion), solving for a, a=F/m, since a vertex or edge doesn't have any mass, the acceleration due to the force would be undefined, because you're dividing by 0. Forces have to be applied to masses. Therefore, when a rigid body is affected by a force, the force is applied throughout the entire mass, producing a linear and maybe angular acceleration.

To get the velocity vector, you need to use cross multiply the angular velocity with the vectorial distance of the vertex from the center of mass, and then add that to the linear velocity. (More info)

In script, it should look something like this:

v = object.getLinearVelocity(False)
omega = object.getAngularVelocity(False)
r = Vector((1,1,-1)) # offset of vertex (or point) from center of mass.

v_net = v + omega.cross(r)

Make sure you import the Vector class from mathutils


Objects appear bright white or black in material preview mode

Happens to me too, I usually solve this way:

Select EEVEE as renderer if it's not already, then go to Indirect Lighting and Delete Lighting Cache, then bake it again.

At this point switch between shading view modes, it should get fixed.

We should probably mark this as a bug, not 100% sure about it but looks like it.


When toggling fullscreen on MB Pro Retina 15 - a red bar appears

The solution was to resize the blender window to a smaller height. And toggle fullscreen after the window height has been decreased.


How to force multithread on video rendering?

You can use Pulverize to do multi-process rendering from Blender's Video Sequence Editor:

https://github.com/sciactive/pulverize

Pulverize will render multiple parts of your video in separate processes, then concatenate them into one video file using FFMPEG. It uses the Blender command line to select frame ranges for each render.


Is there a way to enter the absolute (not relative) value of a transformation?

Not entirely the answer you're looking for, but at least for some cases it works nicely to do one or more of the following:

Object > Clear > Location  Alt+G
Object > Clear > Rotation  Alt+R
Object > Clear > Scale     Alt+S

And after that make the transform and input the desired value.

Also, it's important to mention that after pressing move G, rotateR or scale S, you can define:

global axis by pressing X,Y or Z
local axis by pressing XX, YY or ZZ.


Some pixels doesn't render on the image ID MASK

Don't use ID Masks
Just don't. They have little use, this is a really poorly designed feature. You simply cannot make a good mask with a 2bit color depth image.
Cryptomatte is the solution
Look into using Cryptomatte. You need to enable it's layers in the View Layer properties tab:

You can then get any masks easily using Cryptomatte node in the compositor and they will be a lot higher quality:


How to define dependent geometries (e.g. for a male-female connector design)

The plan is to use the Bool tool addon that is Default in blender and can be activated in Edit > Preferences > Addons ,then create a big cube

this will act as a female port holder , where we will create our female port
Now you can add another small cube to be used as our male adapter

Then select the small cube > then the big cube(please follow the order) and click  N
to open properties tab , go to Edit tab and expand Bool Tool to find the brushes.

now Choose the slice option .You can notice that the part of smaller cube intersecting with the mesh has sliced it to create a new block , now you can change the geometry of the original small cube to change the slicing in both big and sliced cube

This method is responsive and geometry changes in real time
for legos this can be done with a boolean brush
Model a Lego

Make sure that the bottom of the lego is a little bigger and the top a little smaller then duplicate the lego and put it a little above the first lego.

Run a boolean brush , like this (Remember select the bottom lego first )-


Is the "Fit camera view to viewport" function accessed via the "Home" hotkey available in the UI somewhere?

Those are two separate functions, and have two separate places in UI menus:

or, you could find them through space bar search menu. like:


In order to rotate around desired vertex / vertices you can make choose them as origins of transform and change Pivot Point.

Rotate around active

Enter Edit mode of the object.
Select everything that should be rotated. To select entire mesh select one of its vertices and press Ctrl + L to select linked  edges / faces.
Deselect desired vertex which should become origin point for this moment, and select it again. This will make it active.
In 3D View header change Pivot point to Active Element or press Alt + . (period). Rotate mesh.

Rotate around 3D Cursor

You can set 3D Cursor to that vertex and rotate around it.
This method might be more flexible because you can use it in Object mode.

Enter Edit mode.
Select what you want to be origin point. Press Shift+S > Cursor to Selected.
Change Pivot point to 3D Cursor in 3D View header (or press . (period)).
Select what should be rotated, and rotate (if several objects should be rotated go to Object mode in this step).

See also related question:

Rotate object on axis between two points


How to deal with 45deg angles and sqrt2 multiples?

Select the edge from where you want to have a wall at an angle. Extrude along one axis by pressing E then the axis you want to extrude along and typing the distance. Press Enter. Then move along the other axis by the same distance. In the GIF below, I used E -> X -> 2 -> Enter to extrude by 2 BU along the X axis then G -> Y -> 2 -> Enter to move the new edge by 2 BU along the Y axis.
If the wall gets its normal in the wrong direction, select the face and press CtrlN to point the normals outwards or ShiftCtrlN to point the normals inwards.


How to "Separate by loose parts" in 2.90?

You just need to Hit P on the keyboard and select one of the options


Where are the key frames in this animation?

You have "Only Show Selected" turned on in the bar at the top of the Action Editor

If you switch to pose mode and select a bone, it will show you the curves for that bone only. You can turn it off to see all the curves instead.


How use Integer / string in EnumPropery items

Since the EnumPropertyItem(bpy_struct) only accept String as identifier,
you can use Python built-in int() and str() to convert between String and Integer.

A Quick example:

a = 13
int(str(a)) is 13 # True


Possible to add more than one object via Boolean modifiers?

Why not add Boolean modifiers based on selected vs active states. If you have 5 selected objects, the last one selected is active.

The concept

import bpy

def get_active_and_selected(context):

    active = context.active_object
    selection = context.selected_objects
    selected = set(selection).difference(set([active]))
    print('active:', active.name)
    print('selected (not active):', [o.name for o in selected])

get_active_and_selected(bpy.context)

If the cube is selected last it will print:

active: Cube
selected (not active): ['Sphere.004', 'Sphere.002', 'Sphere.001', 'Sphere.003']

The function

Adding multiple modifiers to the active object

import bpy

def add_selected_to_active(context):

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

    if not (active and selected):
        return

    for idx, cutter in enumerate(selected):
        bool_mod = active.modifiers.new('cutter_' + str(idx), 'BOOLEAN')
        bool_mod.operation = 'DIFFERENCE'
        bool_mod.object = cutter
        cutter.hide = True

add_selected_to_active(bpy.context)

The operator

This could be easily turned into an Operator and employ error checking to avoid doing anything until all necessary conditions are OK.

At this point it's worth your time to read up on operators. How to make them, register them and call them from UI. It's just a bit of boilerplate which is similar for all add-ons. Blender's TextEditor has a few Operator templates, most notably: TextEditor > Templates > Python > Operator (Simple)


3D character not aligned to the world origin after deleting keyframes added by a BVH file and resetting the pose

This is common with BVH files. There is a great app called bHacker which was created to solve these kinds of things.

http://www.bvhacker.com/

What you need to do is basically reset the origin on the BVH file so that the feet rest on the ground and the reprocess the animation by saving it out. It has been a number of years since I had to do this, so I don't remember the exact steps.

Luckiy I wrote a tutorial about this for 3D Artist Magazine back then and I think most of the steps are there.

https://www.3dartistonline.com/news/2011/03/free-blender-tutorial/

The issue is that even if you "apply pose to rest pose" in Blender it will just put the animation to that degree above the ground, which is not what you want. You could theoretically use some kind of workaround in Blender using NLA layers and rebake the animation to the ground after resetting the rest pose. So if BVHacker does not work, that would be the second best option. But NLA Layers can be very tricky to work with. It would require making an additive layer and animate the root bone down through the whole animation, and bake.

BVHacker is a much more elegant solution.


How to start with nothing on texture, then paint texture on?

To clear the texture open UV/Image editor, set Blend Type to Erase Alpha and Strength to 1 and clear the image with the brush. Same can be done in 3D view paint mode.


Audio sync issues with speed control, pitch and keyframes

The following seems to work. I’ve included the blend-file.

The movie is ”Spring”  from the Open Movie project of Blender. You can download it here.
Let’s say you want to speed up the movie from time 16+23 (frame 407); just after the falling waterdrop with distinct sound until the dog chasing  after the wood stick (time: 42+23 or frame1031).

Add the movie. The frame rate is 25 f/s.
Add speed Control effect strip
Disable stretch to input Strip Length. Set the speed factor to 1.
Place timeline cursor at position frame 406. Keyframe the speed factor to 1.
Select the sound strip and keyframe the pitch to value 1.
Select the speed Control strip
Move to frame 407. Keyframe the speed factor to 3 (triple the speed)
Select the sound strip and keyframe the pitch to value 3.

So, you create a very abrupt speed up from frame 407 (see the block profile in graph editor in figure 1). Now comes the tricky part. You want to triple the speed until the original time 42+23 or frame 1030. But the actual frame 1030 (after the speed up) is now way further in the timeline. You can see this happening, if you select the actual frame 1030 and disable the speed control (shortcut: H).
So, until which frame or time do we have to speed up? You want to play the original time period of 26 s (42+23 s – 16+23 s) with 3x speed. So, it will only take 26s/3 = 8+16 s. So, the speed control should be reset to one after 8+16 s or at time 25+14s or about  614. The calculation in terms of frames is the same. The original range of 1030 – 407= 623 frames is played at 3x. So, they will take only about 623/3 or about 207  frames  of time. The speed control should be reset at 407 + 207 = 614.

Select the speed Control strip. Move to time 25+14 or frame 614.
Keyframe the speed factor to 1.
Select the sound strip and keyframe the pitch to value 1.

Don’t forget to View > Refresh All (Ctrl+R) to remove the eventual cache. The indicated period will be played at 3x no matter from where you start.


Is it possible to get vertex locations (world) from a vertex group?

Copy Location Constraint.

From https://blender.stackexchange.com/a/139758/15543

Can leverage the existing behaviour of the copy location constraint, targeted to a mesh, subtargeted to a vertex group.

Test script, run in object mode with mesh object selected. Will add an empty for each vertex group at the mean location (as determined by constraint) of each vertex group.

import bpy

context = bpy.context

ob = context.object
me = ob.data

for name in ob.vertex_groups.keys():
    bpy.ops.object.empty_add(location=(0, 0, 0))
    mt = context.object
    mt.name = f"{ob.name}_{name}"
    cl = mt.constraints.new('COPY_LOCATION')
    cl.target = ob
    cl.subtarget = name

  Thanks, this gives me the center of the vertex group. Is it possible
  to get the location of all vertices (not only the center)?

Or using another slightly updated example from https://blender.stackexchange.com/a/139758/15543

this one adds an empty parented to each vertex in the vertex group.

For vertex group named "Group" containing vertex index 3, there will be an empty object mt named "Group_3" parented to vertex 3.  At any frame the global location of vertex 3 will be mt.matrix_world.translation.

import bpy
from collections import defaultdict
context = bpy.context

vgs = defaultdict(list)
ob = context.object
me = ob.data
for v in me.vertices:
    for g in v.groups:
        vgs[ob.vertex_groups[g.group].name].append(v.index)

for name, vg in vgs.items():
    for i in vg:
        bpy.ops.object.empty_add(location=(0, 0, 0))

        mt = context.object
        mt.parent = ob
        # mt.name = "%s_%d" % (name, i) # for python < 3.6
        mt.name = f"{name}_{i}"
        mt.parent_type = 'VERTEX'
        mt.parent_vertices = (i,) * 3

Note would be a good idea here to jam empties into new linked collection, so they can be removed / hidden easily

Another way is to use one of the solutions outlined here

How do I get a mesh data-block with modifiers and shape keys applied in Blender 2.8?

for a modified mesh. However if you have a subsurf, for example,  will have a lot of extra generated vertices.


How to define an object in another layer?

Layers are properties of the object see this snippet:

import bpy

# create layers vector with only one layer enabled
def layers(l):
    all = [False]*20
    all[l]=True
    return all

o = bpy.data.objects["Cube"]
# set object to layer 2 only (layers from 0..19)
o.layers = layers(2)

# lookup scene by name
scene = bpy.data.scenes["Scene2"]
# link object to scene
scene.objects.link(o)


Make sure Alpha is set to Sky in Render settings > Shading:

And Sky is enabled in Render Layers > Layer:


To enable alternate modes, you generally need a to add a BoolProperty to your operator which will represent the two modes of operation.

To control the value of this property through the F6 menu, you also need to add a Draw function to your operator. You can display the other paramters affecting your operator's behavior there if you want. This seemed to work only if the operator is launched through a Panel or Menu, not when launched from the console though. Maybe some other user here can explain why that is.

class softsharpenOperator(bpy.types.Operator):
    '''Sharpen Without Modifiers'''
    bl_idname = "ssharpen.objects"
    bl_label = "softSharpen"
    bl_options = {'REGISTER', 'UNDO'}

    ssharpangle = FloatProperty(name="SSharpening Angle", description="Set SSharp Angle", default= 30.0, min = 0.0, max = 180.0)

    angle = FloatProperty(name="AutoSmooth Angle", description="Set AutoSmooth angle", default= 60.0, min = 0.0, max = 180.0)

    # ADD A BOOLEAN PROPERTY TO DISCERN BETWEEN THE TWO ALTERNATE MODES
    alternate_mode = BoolProperty()

    # ADD A DRAW FUNCTION TO DISPLAY PROPERTIES ON THE F6 MENU
    def draw(self, context):
        layout = self.layout

        box = layout.box()
        # DRAW YOUR PROPERTIES IN A BOX
        box.prop( self, 'ssharpangle' )
        box.prop( self, 'angle' )
        box.prop( self, 'alternate_mode'  )

    def execute(self, context):
        if self.alternate_mode:
            # DO SOMETHING ONE WAY
        else:
            # DO IT THE OTHER WAY

        return {'FINISHED'}

If you want to play around with a simple example that works out of the box (copy and paste to a text editor and run), here's one that alternately creates a sphere or a torus, depending on whether the bool property is set to True or False (to execute the operator either call it from the console, or using the Add Mesh menu - Shift + A --> Mesh --> Test):

import bpy

class testOperator( bpy.types.Operator ):
    """This is a test"""
    bl_idname  = "mesh.test_me"
    bl_label   = "Test"
    bl_options = {'REGISTER', 'UNDO'}

    sphereOn = bpy.props.BoolProperty()

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

        box = layout.box()
        box.prop( self, 'sphereOn'  )

    def execute( self, context ):
        if self.sphereOn:
            bpy.ops.mesh.primitive_uv_sphere_add()
        else:
            bpy.ops.mesh.primitive_torus_add()

        return {'FINISHED'}

# Operator adding function (used to inject operator to menu)
def menu_func( self, context ):
    self.layout.operator(
        "mesh.test_me",
        text = "Test",
        icon = "PLUGIN"
    )

def register():
    bpy.utils.register_module(__name__)

    # Add "Snowflake" menu to the "Add Mesh" menu
    bpy.types.INFO_MT_mesh_add.append( menu_func )

def unregister():
    bpy.utils.unregister_module(__name__)

    # Remove "Snowflake" menu from the "Add Mesh" menu.
    bpy.types.INFO_MT_mesh_add.remove( menu_func )

if __name__ == "__main__":
    register()


How to copy an object without linking it to the first one?

You simply copied the object data block, but it remained linked to the same mesh data block.

After copying the object datablock with new_ob = ob.copy(), add a line to copy the datablock.

new_ob.data = ob.data.copy()


Here, Window, Toggle System Console

But if you run on linux / mac perhaps you need to see if you run Blender from terminal usually from that you going to find the error


Blender Scale Issues with MakeHuman and Mixamo Fuse

Without seeing a ~.blend file containing both imported images, this is a bit of shot in the dark, but the first thing I would try is to open the file, select the model that is in the smaller scale in object mode, then switch to edit mode, and scale the model up until the proportions approximate those of the first model imported. Then switch back to object mode, and apply the scale of the object using CTRL - A.

Of course you could use the same technique in the reverse direction to scale the larger object down to the smaller one.


Black lines around alpha cutoff in Cycles?

I found the soultion, it was to add a greater-then node to the image-alpha>mix-factor connection.


Help building a square box under my complex 3D model!

The following approach gives you an object with the river bed on the bottom side and a volume with planar surface.

First load the model of the riverbed, then switch to edit mode and select all vertices A.

Then extrude the surface either with the extrude tool on the left hand side or by pressing E. Then move the mouse cursor upwards so that the model is a bit taller then the desired end result.

The following steps depend on whether you want to modify only the Z-direction or if you want intersect the entire model with another volume.

If you just want to modify the Z-direction press S, Z and 0 with the extruded part still selected. This will scale the Z-direction to zero making it completely flat. You may have to adjust the Z position to the desired height by pressing G and Z. Then you should be done, unless you want to flip the normals which is described in the last step below.

If you'd like to intersect the model with a cubic volume you need to do the following steps.

Next add a Cube in object mode and scale it so the desired section of the riverbed is inside the volume. The height of the Cube should be the height you want the final model to have.

Now apply a Boolean modifier to the Cube.

Set the Operation to Intersection  and set the object to your riverbed model.

Now you can remove or hide the other model and just keep the result of the boolean operation. If you need the normals to face inwards for the simulation you can switch to the edit mode and recalculate the normals inside (Mesh > Normals > Recalculate Inside) or SHIFT+CTRL+N.


Can I recover my old keymap without opening Blender?

All you need is to copy the userprefs.blend file from the old computer to the new one.
If you are using windows the file is usually in your user's app data roaming folder. For more. Info please refer to this post:
Where is the startup file stored?


Image textures 'wiggling' when the mesh moves?

ISSUE
Problem is TV screen topology (not Material or assigned Armature). Screen is ngon that doesnt have enough geometry in surface.
You have curved edges, but there is not an information how to model surface. So blender generates some :)
In viewport it looks flat ...

... but for rendering are ngons triangulated. What Happens with surface when rendered you can see when in edit mode search for Triangulate Faces

QUICK FIX
Simplify corners, delete screen face, select border with active vertex (white) in corner

and search for Grid Fill, set Span to 16 in my case.

To make screen edge sharp after Shade Smooth, select it and search for Mark Sharp

Easy check surface with some Matcap view type

Or you can try to model screen like here.


How to export animated object using NurbsPath to Unity

You have to program the animation with armature and bones (which can have a follow path constraint). Then in pose mode go to the 3D window menu "Pose-Animation-Bake Action", and bake your animation checking the "Visual keying" and "Clear constraints" options.


Unless you create a specific setup using the Game Engine where the camera has controls for this, it is not possible to do so out of the box with Blender. Also, in my opinion, it is not entirely worth the trouble doing this as there are better ways to go about it. From experience, such a setup can quickly get clunky as there are performance issues across platforms and other things you might need to take into consideration.

I would instead recommend going with a browser solution. By doing this, you only need export once to some supported mesh format such as .fbx or .obj and there are very little to no dependencies (game engine standalones tend to be a bit large), the user just needs to have a modern web browser.

See this answer and there is also p3d.in (I highly recommend this site) and Sketchfab. Example of a model on p3d.in. It also supports textures and several other rendering options.