To expand on Jerryno's answer, a Rigid Body Joint is a perfect way to do this. To start with, make both your truck and trailer to the Rigid Body physics type, and position the trailer behind the truck where it would naturally sit while towing it. On your trailer, add a Rigid Body constraint, with the Pivit Type set to "Generic 6 DoF"

You can enable "Display Pivot" to help with placing the pivot, or leave it off if you know the offsets needed to put the pivot on top of the trailer hitch. (The pivot will not show in-game, so this option is only to help set up the constraint.)
To eliminate the possibility of collision problems between the truck and trailer, enable "Linked Collision." Ordinarily this would make the trailer able to clip into the truck and look really weird in the process, but you can adjust the rotation limits to stop the trailer from rotating too far. It is important to enable the X, Y, and Z location limits and leave them 0. This will lock the trailer in place behind the truck, and unable to move relative to the truck, it will only be able to rotate around the pivot within the rotation limits specified.

Using stand-in objects to test, this behavior is exactly what we want.


Activating an imported module - Python version mismatch

No, you need to wait until someone upgrade it.

Since Blender 2.8 change a lot of code APIs (and Python to 3.7.0), it is currently not possible to use the add-on directly if the code is not upgrade to 2.8 APIs.

It might be possible to upgrade the script by your self, but for those complicated scripts like Animation Node, there will be a lot of thing need to fix.

Here is a discussion: Updating Built In Addons to Blender 2.8, and some one even maintain an APIs change list under the discussion.


Your compositing nodes are the cause. Because the blend does not have textures packed, I'm not 100% sure why you are compositing it the way you are.
However to fix the harsh edge around the container, simply check the Anti-Aliasing check box on both of the ID Mask nodes.

Here is what the mask looks like Anti-Aliased on the left, and without Anti-Aliasing (how you have it now) no the right.


As already pointed by batFINGER, the correct answer is F9.
Also, remember that you can only do this until you haven't made any other changes to the mesh itself.
Also, the undo system which was very buggy between 2.8-2.81/2 .. is now fixed and rewritten from scratch. So you won't have problems in doing undo, just saying since a lot of people hated to do undo because of that.


How to see an object by looking throug another object?

As Millad already pointed out, this would be done with the Light Path node.

Material for the portal is just a refraction shader with an index of refraction set to 1 (so it doesnt actually refract the objects behind it).

The "magic" happens in the material you want to see through your portal.
use a mix shader to mix a transparent node (be sure the color of the node is pure white. its often a bit grey per default) and the actual material of your object. I used an emission shader just for an easier demonstration but pretty much everything works here. THere could be some problems with refration materials making objects visible that are not supposed to be visible. If you stumble across this problem, let me know.

for the factor input use the boferementioned light path node > transmission depth.


How to remove attached scripts files on deleting add-on?

In my __init__.py file

I put this:

if "bpy" in locals():
    import imp
    imp.reload(myScript)

and everything works fine :)


If you have an n-gon face, then you can get a triangulated representation of that face using the following method (Bridge Edge Loops):

Select the object with this n-gon face.
Go into edit mode (Tab).
Go into Face Select mode.
Select the n-gon face.
X >> Only Faces.
Go into Edge Select mode.
Select the edges that make up the perimeter of the original n-gon.
Visually De-Select two opposing edges.
W >> E.

After getting more feedback from the comments, Is this more along the lines of what you are after?:


Imaging you are wrapping this object with paper with this print; How would you like the pattern to be cut? There is no magic button for this. You need to UV unwrap it carefully and make decisions about how you want the pattern to be distorted.


I for myself always try to connect objects in "a clean way" whenever possible but there are many cases where objects just won't fit in a way that justifies the effort for the sake of that rule.

While you can certainly split your geometry on both objects it's not the best thing to do here, because

you will increase your vertex count unnecessarily nonetheless
your topology won't get cleaner.

In the case of your model I'd just keep the objects as they are. If however you still want them to be connected I would rotate the disk so that the cone meets a flat part of the disk's edge and then rotate the cone so that the loop cut of the disk hits one of the cone's edges. It then should be at least a little easier to connect both pieces.


Does Switching From Blender Render To Cycles Mess Things Up?

All matierals in cycles use nodes (even if you set up the material in the Properties panel, it will create nodes in the node editor).
Since BI materials don't use nodes by default, when you switch to cycles from BI there won't be any BI nodes in the node tree, yet nodes will be enabled. This will make the material render as transparent.
You can disable nodes (this will restore the old BI material settings, and it will not delete any nodes) by:

Pressing the node icon in the Materials panel:

Disabling the checkbox in Node editor > Header:

If you want to make a single material which works for both BI and Cycles, see Is there a way to have one material for cycles and the BI


You can copy the polygons from 2.8 to 2.79. You will lose your node setup but at least you will get back your scene. This happened to me just now - I couldn't find any answers anywhere, so i figured it out myself. I thought of this because you can do the same in Maya too, so I thought: "must work with blender too".


Depending on the axis I was going to use the most I changed some bones from the default rotation order to another axis rotation order (Euler XYZ to ZYX for example), but I forgot to change the rotation mode on the other side of the rig.

After fixing the rotation mode in both sides everything works fine:


Gap between edge of lattice and mesh when using simple deform

In the Lattice properties, change the interpolation from B-Spline to Linear. There is by default a smooth interpolation between the control points when using a Lattice.

Side note, for this kind of transformation, you only need a 1-dimensional lattice.
Result, with a Weld and a Solidify modifier :


How do you change the camera focal length in Blender 2.8?

You can change the lens settings on the properties window. Select the camera, look for the camera options and in the lens section you can set the focal length.

Or you can also set it visually by clicking on the camera and dragging while holding the control key.


If the IK constraint isnt pointing at the pole target the right way, you might want to try changing the pole angle

also, looks like you need to recalculate the normals on your mesh because the leg looks flipped inside out.


One thing - disabling Eye icon in Outliner Editor hides object from viewport not from Rendering, for that you have to enable Render (Camera) icon in filtering.

Disableing these objects from rendering will affect both Layers. To fix it you have to place them into separate Collection (I called it "Scene"). Like that you can disable it for one layer and keep in others by switching checkbox of collection.

Second thing - To add additional Lights with Glare in compositor I would use rather enable Film > Transparency and in compositor use Alpha socket as input. Alpha because even you disable whole Scene collection you still use world light that will affect compositing. Like that you can also save one Mix node from tree to get same result.


Yes, this can be done.

keep a single whole object(this is the reference for correct normals).
enable auto-smooth on all broken parts(needed for custom normals to show).
using the Normal Edit modifier on the broken parts to copy the normals from the whole object to the broken parts.

If you want to avoid some slow-downs from continued updates, you can apply the modifiers to store the custom normals.


Plainly as a number, no.  Approximately, yes.

You can plug anything into the color input of an emission node and plug that into the surface material output.  This will let you visualize the values across the mesh in the viewport with rendered viewport mode.

There is a handy addon written by Greg Zaal, called node wrangler, which (along with a billion other useful things) will do this automatically by Ctrl + Shift + LMB (left clicking) on a node.

To make numerical values easier to distinguish you can plug the value into a color ramp node first, then you can create a colorful gradient in the color ramp which will make it easier to see the value in the viewport.


I would start with one bone for the whole rod (the bendy part anyways), and weight all the geometry to that bone.  Then...

Get into bone edit mode, select the bone.
Invoke the Subdivide command on that bone, for that rod, I'd subdivide it about 6-8 times.  But use your judgement.
Get into Pose Mode, and select all the bones.
Select the rod mesh, and get into weight paint mode.
Hit the "W" key, and select "Assign Automatic from Bones" from the popup menu.

Automatic weights for stuff like this usually works out pretty good.  I'd recommend b-bones subdivision to you, but if your exporting to a Game Engine, I'm not sure those would be supported.


How to create Light smear in blender animation

The glow can be created by using a glare node in the compositor.  Since the second accomplishes most of what you want, here's an example:
I created a simple sphere and give it two materials, a shiny dark blue, and a white emission:

dark blue shader:

emission shader:

This is all basic stuff, of course.  Next I rendered the image with F12 and then I went to the Compositing work space and created the glow:

The result looks like this:

You can control the strength and size of the fog flow of course.


Edinting normals will be implemented in the future, according to Blender Wiki.

You can try to use the split normals modifier on this way:

1) Create Empty Objects in the direction of your vertex normals.

2) Create a Group Vertex for those vertices which you want to have a perpendicular normal in the same face. For a cube you should create six groups, one per each main square face.

3) Create a Split Normals Modifier per each Group Vertex. Set mode to Directional , check Parallel Normals and select appropiate empty object for target and group vertex.

You will get an effect similar to rounded edges:

Finally you can apply all modifiers and your object will keep these normals.


Bone snaps back to its original position when setting new keys

Another clue, can be an other constraint is on the chain and conflicts.
In this case, you have 2 bones colored in yellow in the chain.
So delete or fit conflicting constraint.


How do you import an object from another Blender file without losing textures?

Use a consistent set of materials for a Render engine.  Cycles Render or Blender Render.   Do not mix Cycles and Blender materials.

It appears you have tried to mix materials for the two different render engines.

If you are producing a single still photo you may be able to render one image as transparent .png file.  You may be able to render the album disc as a texture and apply it as .png which is render engine neutral.


Select the front two middle edges (like in the image below).

Turn on vertex (or edge) snapping, and extrude those selected edges along the Y axis to the middle.

Now select the pairs of edges to create the new faces.
In this image I already filled one face and have another selection ready for filling.

Do note that this does create a triangle in the corner, depending of what you are going to do with this mesh that may be undesirable.

Now here is an animated gif of the whole process.

Another way, if you have the F2 addon enabled, is to select the corer vertex and simply press F. Repeat for the bottom three faces. Then fill the vertical faces like before.


When you rotate an object visually in the 3Dview, the rotation value that is used is not always the value you expect. You can get more predictable results by entering values directly in the properties of the object, which can also be found in the properties sidebar by pressing N

When you do have trouble with direction of rotation (or movement), the graph editor shows you visually how the values are interpreted and gives you full control over the keyframed values.

In this example the rotation goes to 180 then back to 0

By adjusting the third keyframe we change it to go to 180 then to 360

You can also change the channels extrapolation (ShiftE or Channel->Extrapolation Mode) to linear and have a constant rotation with only two keyframes.


If you want multiple blender versions (I have three) to play nicely together you have to download them as zips and then extract them instead of just running the installer.

Alternately you can put your older blender installations into zip files, run the installer, and then unzip the old versions again back to where they were. I have used this method myself in the past but it's so much easier to just get the zip for the latest version to start with.

I got this answer in part from here.


(Rigging) Why are some of my vertex groups affecting blue areas?

Blue doesn't necessarily mean zero. When a vertex is only affected by one bone, a tiny amount of weight is enough to deform it like it had a weight of 1.0.
And even if a vertex has a main deforming bone near by (even with a weight 1.0) it can be noticeable when a bone with low influence is too far away and moves differently.

You can easily see the offending groups by going into Edit Mode, choosing a group of interest (Vertex Group list in the Vertex Group panel) and clicking on the Select button of the Vertex Groups panel. This will select all vertices in this group, no matter what weight they have. You can also remove the stray vertices from the group by selecting them only and clicking on the Remove button of the panel.

You can also see the groups of a vertex in the N-Panel and remove them there (click the X button of the group you want to remove). When you choose Deform, only the deforming groups are visible.

In Weight Paint mode you can also use the Use Zero Weights option (T-Panel,Options) to show problems in your weighting. Select Active and all vertices with zero weight of the selected bone are shown in black. As you can see, selecting the leg shows weights in blue around the head. Which means the leg bone is deforming the vertices of the head.

You can also see problems with no weights at any bone using All. As you can see there are some black areas near the leg. This would mean these vertices will not move at all. Note that this also includes non-deforming groups, so seeing no black vertices can be misleading.

To clean vertex group weights (in Weight Paint mode) use the Clean tool (T-Panel,Weight Tools). Click the Clean button and the tool options will be shown as in the image below. You can select a threshold in the Limit field. All vertices below this weight will be removed from the group automatically:

Another thing useful while weight-painting is to use Wireframe Display mode (with Limit selection to visible turned on) frequently. That way the shading doesn't obscure the weight colors. It also helps to locate the vertices better so you don't have to guess where to aim with your cursor.

Usually these problems stem from using a blend mode like Mix while painting. If you want to remove weights completely, it is often better to use Subtract with full Strength and Weight.


The process of ending an object is different to the process of creating it. Typically you delete it using a reference to the object, using the function piece.endObject()

Modifying your above code:

if key[bge.events.PAD5] == pressed:              # If 5 key pressed
    target = scene.objects['Empty1']             # Find where it goes
    new_piece = scene.addObject(shape)           # Create the piece..
    new_piece.worldPosition = target.worldPosition  # and place it.

if key[bge.events.PAD0] == pressed:
    # First up we retrieve the existing object. In this case we get it by name.
    # Make sure the name is the name of the object you want to remove
    existing_object = scene.objects.get(shape)
    # If it exists, then remove it
    if existing_object is not None:
        existing_object.endObject()


How to execute python code before blender operator is executed

I don't think that there are listeners which you can use in that way.

But what you can do is your idea in the second question. You could replace the button with a custom operator which executes your code first and calls the original operator afterwards.
You can access the sources if you right-click on that original button and choose edit source. After that go to the scripting view and choose the source file available in the dropdown box


I solved my problem.
For every bone in Edit Mode, I had to set the Roll value to 0.
Then, for some bones with Bone Constraints, I had to set the Pole Angle to 0 or 180.
Finally, I had to clear parents for my meshes and parent them to the bones again.


Sapling addon - Is it possible to have controls for split levels over 4?

The levels property is defined around line 295 of 2.78/scripts/addons/add_curve_sapling/__init__.py

    levels = IntProperty(name='Levels',
        description='Number of recursive branches (Levels)',
        min=1,
        max=6,
        soft_max=4,
        default=3, update=update_tree)

As you can see only soft_max is defined as 4, meaning you can slide past, or because it's pretty heavy duty going beyond 4, just type in 5 or 6 and WAIT.


How to model a tessilated hyperbolic dodecahedron?

You can try to use the Subdivision Surface modifier with a high edge crease on the sharp edges to achieve this effect. This will probably not be the mathematically correct surface, but it will give a good visual result.

To make it work, first you have to make sure your Rhex is one single mesh, consisting only of the shell of the volume and make sure there are no double vertices in the mesh (go into edit mode, select everything, press W and select Remove Doubles).
For testing I modeled the mesh by eye. This is what I started with:

Now you need to give the edges you want to make sharp a high edge crease. Select them and press ShiftE to change their Edge Crease. Press 1 on your keyboard and then Enter to give the edges a Crease of 1.0 whih will make them completely sharp when using the Subdivision Surface later. The edges should turn pink:

Tip for easy selection: If you are in edge selection mode (press CtrlTab and select 'Edge' to get there) you can select one of the sharp edges and press ShiftG to bring up the 'Select Similar' menu, and choosing 'Face Angles'. Now all edges with a similar angle between the connected faces are selected. This should be all your sharp edges.

Now that your mesh is set up, you can add the Subdivision Surface modifier. Go to the Modifier tab in the properties panel, click on 'Add Modifier' and select 'Subdivision Surface' (third from the bottom in the second column). Set the subdivision level to something like 4.

The result should look something like this:

One final note: The modifiers are only changing the visual appearance of the mesh, not the underlying mesh itself. If you want the mesh to be altered, click the 'Apply' button of the modifier. But after that you can not make any changes to the modifier anymore, so keep a copy of your unapplied object.

I have uploaded my version of the rhex here for reference.

Edit: For even better visual results you should enable smooth shading and also add an 'Edge Split' modifier to your model.


This character is quite complex, and requires a lot of work to get rigged, because it's maden of lots of spare parts and intersecting geometry. Some geometry requires to be organically deformed, while some others parts are supposed to be rigid, so it's impossible to obtain a good result with automatic weights, even if you get it to work without bone heat failings.
My suggestion is to enter edit mode, use the L and Ctrl L functions to select all blocks of vertices that are part of a piece and separate them (pressing P). Then some of theese new spare parts can be weighted automatically, some others will need to be manually weighted. You will find all Rigify Deforming bones in the 30th bone layer.
After the procedure is done you can rejoin them (Ctrl J), the weights will be carried intact.
In the picture an example on the Left leg, which still needs some more refinements.


How do I make edges go around a whole object?

In order to select an edge to go around the whole model press ⌥ Alt + LMB


Control camera movement with mouse in bge?

You can probably edit the python script found here

http://www.tutorialsforblender3d.com/Game_Engine/MouseLook/blend/MouseLook249.txt

follow the tutorial
http://www.tutorialsforblender3d.com/Game_Engine/MouseLook/MouseLook_First_3.html

just change this part:

# set the values
act_LeftRight.dRot = [ 0.0, 0.0, leftRight]
act_LeftRight.useLocalDRot = False

act_UpDown.dRot = [ upDown, 0.0, 0.0]
act_UpDown.useLocalDRot = True

to :

# set the values
act_LeftRight.dLoc = [ 0.0, 0.0, leftRight]
act_LeftRight.useLocalDLoc = False

act_UpDown.dLoc = [ upDown, 0.0, 0.0]
act_UpDown.useLocalDLoc = True

Hope it works.


Most of Blenders properties can be animated. Just hover over the Angle Offset field with your mouse and press I to insert a keyframe. A keyframe will be inserted on the current frame. Move to another frame, change the value and insert another keyframe by pressing I again.

The created key will show up in the dopesheet and graph editor, where you can edit/remove them.


How to bake Particle System in Blender 2.79

For those having the same problem: The cache tab disappears when the physics are set to "none" because apparently without physics, there is nothing to calculate and save to the disk. Because I was after the sporadic and stationary emergence of particles from the emitter, I found that using a Particle System of type "hair" instead of "emitter" will suffice when I animate the "length" option in the clump settings. It's not ideal because they all emerge at once, but until I find a better way, this will have to do! Please comment if there is a better fix to this!


Fixed :)
For every one else with this problem:
Previous attempts to use different format was a good idea, but WOFF was not supported, so I found out that blender supports also OTF. I downloaded pack from Fontsquirrel (otf by default) instead Gooogle fonts and it works :) Converting TTF to OTF would probably work too, but I did not tried this.
So short answer - use OTF instead TTF because TTF in Blender is buggy.

Edit: I found out that font format is not the case. Blender cannot handle glyphs in fonts with overlapping shapes (so for ex. "X" should be single mesh and not two crossed boxes one on top of another one). In my case same font from other source was fixed.
But we can fix this manually (merge shapes of glyph) in any font editor like glyphrstudio.com (online) or FontForge (desktop).


Ho do i create edges like the one used on the corner of this object

You have to select the edge, press Ctrl + B , that way you bevel the edge.

If then you want to replicate the difference in length, as in the picture, you have to select the two vertices on one side and press G two times to Edge Slide.

The vertices should slide on adjacent edges getting closer or further from each other.


Flag does not move in the wind in Game Enigne

As said by BlendingJake:

  To my knowledge it is impossible to get wind inside of Blender Game engine without faking it. You can get cloth simulations by using the Soft Body physics type, but then you have to figure out a way to pin up the flag. My thought would be to create a short, loopable animation that could be played.

Posted to remove from un-answered list


Packing and Animating Rectangles in Animation Nodes

I think you should take a step back and think about this problem from a different perspective. Instead of randomly choosing the width and height of the rectangles and then try to optimize their positions to be tightly packed, you can successively split the domain into smaller and smaller rectangles. This way, the rectangles are already positioned and tightly packed as you might expect.

Algorithm

Our general algorithm can be as follows:

Create a loop that takes an initial list of rectangles as input. The list could initially contain a single big rectangles which we could consider our boundary.
For each iteration in the loop, we choose a rectangle at random and split it at a random position to produce two smaller rectangles. We then remove that rectangles from the list and add the two produced rectangles.
We could add a condition that skips the rectangles that have an area less than some threshold value. This ensures rectangles don't get too small. We could also add a condition for the areas of the resulted rectangles, but we shall not do this in this instance.

We shall define each rectangles by two 2D vectors, a vector representing the location of the lower left corner, and another representing the location of the upper right corner. Let those two vectors be $(x_1, y_1)$ and $(x_2, y_2)$. We have two ways to split a rectangle into two smaller ones, horizontal splitting and vertical splitting. This diagram demonstrate how one can compute the two smaller rectangles from the original rectangle using vertical splitting:

First, a random float $\delta \in [y_1, y_2]$ is chosen as the $y$ location of the splitting. Then the two rectangles are defined as:

$(x_1, y_1)$, $(x_2, \delta)$.
$(x_1, \delta)$, $(x_2, y_2)$.

Similarly, horizontal splitting can be done by choosing a random $\delta \in [x_1, x_2]$ and forming the two rectangles based on it.

Implementation

We shall define each rectangle using a struct of four floats. Our initial rectangle list will be composed of a single struct representing a rectangle defined using an empty in the scene. The loop will output a list of structs, those structs can then easily be used to construct quad meshes which can be output and used. The high level node tree look like this:

With the Generate Rectangles loop defines as:

As for the Compute Rectangles loop, we first get the index of some random rectangles from the list. We use that index to get the rectangle and delete it from the list:

Then we compose the four rectangles (Two for each split type) based on the formula above. A random number is used to determine if the type is horizontal or or vertical by switching between rectangles. Finally, the two rectangles are combined with the rest of the rectangles and are reassigned if the area condition is met:

And by adding some value to the seed for seed control, we get:

Which gives the following result:

Blend file:

The animation should be easy, so I will let you do that on your own.


Combining two different material in to one in node editor

For your mountain example, you can use position attribute in geometry input node as a factor for high in Mix Shader or MixRGB (depend on using shader or using  texture).

In the other way, you can use weight paint for highlighting the area you want, and then use Layer Weight node as a factor.


Open GL Render. Anti-aliasing differences

OpenGL rendering in the VSE ignores the AA settings because it just pipes the viewport output through while

  Render -> OpenGL Render Animation

is more like an own render engine utilizing OpenGL. The OpenGL AA setting is only used by that "engine".

You can still get AA by setting the resolution of your original scene way bigger (like 400%) than the VSE scene. Blender will first render the scene really big in OpenGL and then scale it down in the VSE, wich essentially results in antialiasing.


You have Restrict enabled in the options tab(not 100% sure on this since I don't have a .blend). Restrict disables weight painting on vertices that are not in the current vertex group. To fix this, simply un-check restrict.

The black is a display of the non weighted vertices. to disable this, set Show Zero Weights to None.


Blender 2.8 Array modifier rotating individual parts

Have you tried to tilt the vertices? Select your curve, go in Edit mode, select the vertices you want, and CtrlT to tilt, or use the N panel:


Sheep it render farm outputs blank frames

Your active camera is a plane. Select your camera and hit Ctrl+0.


Problem with extrude along the local axis hotkeys

If you press a key for an axis like Z multiple times after activating a transformation like Scale (S), it will cycle through a few Transformation Orientations (Local, Normal, Global, ...).
You may have set a different value in the "Transformation Orientations" selection box than in the tutorial. Check the value of this box.
The selection box is located in the top center of the header of the viewport (or at the bottom of the viewport if the header is there). See screenshot here in Blender's documentation.


bpy.types.Operator meta info based on current Frame

A StringProperty gives you a single value for the scene, to get a new value for each frame you will need a list or collection to hold all the values for each frame.

Blender does offer a CollectionProperty which should suit your needs. You want to have a value for your string then an index or key that will be the frame that value is good for.


How do I animate a person taking out a sword from his back?

Dude you need to use constraints to make your sword get attached with and follow your hand movement.I suggest you learn some concepts about how constraints work in blender.Apply constraints to your sword and set your hand as target to copy transformation.Then play around with the influence slider to get the desired result.You don't need a separate bone for your sword.See if it helps.


A mishmash of questions about lighting and messing with parallel line textures

#1 I think you got the general setup right, you use an Emission Shader node down to the Light Path node, but made a mistake in your setup. Down the nodetree you later mix the emission with a diffuse defeating the purpose. Also your node tree seems overly complicated, and unnecessarily convoluted for the setup.

#2 As Jerryno already mentioned, it is not trivial to do with material nodes alone, but see bellow.

#3 Add a Noise node to your texture coordinates, use a Color Mix node to control the amount of noise you add to the coordinates. Some scale change is to be expected, so compensate the size.

#4 Camera settings like Focal Length will dictate the perspective

Alternatively if you want true constant width, and don't mind a geometry based solution, convert your terrain to a mesh, select all the edges in one direction, and erase everything else. Convert it to a curve then use the Bevel Depth property to add constant thickness.


looking for help with base rigging a game model

It looks like you might need to start with some re-topology or a decimation modifier first. Lower the poly count so the engine can cope with your model, if it's not for a rendered cut scene that is.
Next Add some bones, the first bone must be created in
object mode (Tab), add a armature bone (Shift + A, A, S).

To keep the bones visible in front of your mesh, select a bone then go to the
Properties panel, Object Data tab, Display drop menu, TICK In Front.

In edit mode: Extrude bones (E), Parent bones (Ctrl + P), Clear Parent Bones (Alt + P)
or
add bones (Shift + A).
Parent the object (mesh) to the armature (Bones): Select the object, and the armature together
(Shift + LMB) and parent them with automatic weights (Ctrl + P, I).


Blender as python module, 'Context' object has no attribute 'object'

Variables are not always available in the context, typically you can access them directly, in the case of the active object you can access it from
scene.objects.active (most collections that have an active member work this way).


Is it possible to invert normal maps in cycles

Bump map

For a bump map you can just drop in a invert node between the bump image and the bump node.

Normal map

For a normal map you can separate the RGB color channels and invert just the red and the green channels. Like in the image below.
click image for full size


As Christopher suggested in the comments, this glass hack has too high Fresnel value that is causing the issue. I'll use a different glass node setup.


Method 1:
First you would want to separate the zig-zag part from the bag, select the edge using Alt-Click that you want to cut like in the picture.

Then you can press V and move your mouse upward to rip the edge loop off.

Then you can select the vertical edge loops using Alt-Click in a pattern: select 3, not select 1 (It doesn't have to be 3 and 1 but I found it to work quite well). Unfortunately, I couldn't think off an automatic way to do this, so you may have to do this manually.

After you select all the edge loops, click X and select Dissolve edges.

This is the final outcome

Method 2: This is faster but it may changes the mesh a little.
Use Vertex>Smooth vertices and change the settings until you are satisfy with the result.


Cycles Renderer - Updating Shaders and Images Every Frame?

For years this was left on the shelf because it was very hard to determine what was being changed and what wasn't between 2 frames due to the older dependency graph.
However recently Brecht and Sergey tackled the problem and the feature "persistent data" is going to make it into Blender 2.93.
You can read more information here:
https://developer.blender.org/rB50782df42
excerpt:

For Cycles, when enabling the Persistent Data option, the
full render data will be preserved from frame-to-frame in animation
renders and between re-renders of the scene. This means that any
modifier evaluation, BVH building, OpenGL vertex buffer uploads, etc,
can be done only once for unchanged objects. This comes at an
increased memory cost.

Here's some more information on the matter:
https://devtalk.blender.org/t/persistent-data-limitations/18427/2


How to get a label in the ui panel, with the bpy.data.materials count?

len(bpy.data.materials) returns the number (int) of all materials in the file. To draw this number onto a custom panel, means that you have to pass it to the text argument of the label() call (string).

In fact, you can either use str.format() or the old C-style formatting syntax for integers "%i" % number to pass the variable. A nice collection of examples here: https://pyformat.info/

# Number of all Materials in the .blend
layout.label(text="Materials: {}".format(len(bpy.data.materials))

Following example displays the number materials per file (Data.materials) as well as all materials in the current scene (custom object iteration). Layout code is ripped from How to create a custom UI?

import bpy

from bpy.props import (BoolProperty,
                       IntProperty,
                       PointerProperty
                       )

from bpy.types import (Panel,
                       PropertyGroup
                       )

# ------------------------------------------------------------------------
#    Scene Properties
# ------------------------------------------------------------------------

class MyProperties(PropertyGroup):

    my_bool: BoolProperty(
        name="Enable or Disable",
        description="A bool property",
        default = False
        )

    my_int: IntProperty(
        name = "Int Value",
        description="A integer property",
        default = 23,
        min = 10,
        max = 100
        )

# ------------------------------------------------------------------------
#    Panel in Object Mode
# ------------------------------------------------------------------------

class OBJECT_PT_CustomPanel(Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_custom_panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

    def scene_materials(self, context):
        mat_list_per_object = []
        for ob in context.scene.objects:
            if ob.type in ("MESH", "CURVE", "SURFACE", "FONT", "GPENCIL"):
                if ob.data.materials:
                    mat_list_per_object.append(ob.data.materials.items())
        # Flatten the list and return a set (unique)
        return set([i[0] for i in sum(mat_list_per_object, [])])

    @classmethod
    def poll(self,context):
        return context.object is not None

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

        # Custom Properties
        #layout.prop(mytool, "my_bool")
        #layout.prop(mytool, "my_int")

        # Number of Materials in File (bpy.data)
        layout.label(text="Number of Materials in this File: {}".format(
                len(bpy.data.materials))
            )

        # Number of materials (unique) per scene in context
        layout.label(text='Unique Materials in "{}": {}'.format(
                context.scene.name,
                len(self.scene_materials(context)))
            )

        # Draw a list of materials per scene
        layout.separator()
        layout.label(text="List of Materials:")

        for i in self.scene_materials(context):
            layout.label(text=i)

        layout.separator()

# ------------------------------------------------------------------------
#    Registration
# ------------------------------------------------------------------------

classes = (
    MyProperties,
    OBJECT_PT_CustomPanel
)

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

    bpy.types.Scene.my_tool = PointerProperty(type=MyProperties)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)
    del bpy.types.Scene.my_tool

if __name__ == "__main__":
    register()


Rocky mistake with key frame in timeline

You got this object 'GPencil' in your Outliner. It's not selectable, but could be made invisible. This is the object which has the keyframes. Strangely, it can't be deleted, since it's not selectable. But you could just create an empty new blender file, and append all objects from your old scene into the new one - the broken object is not among them.


Create a Vertex group

Select the faces or edges or verts

In my example i have selected faces

Press Ctrl+G a pop-up (click on assign group)

If u have multiple group and when u click Ctrl+G

Select the group to which u want to assign in the vertex

To check the vertex you have made. Deselect all the faces or edges or verts. And in the vertex panel. Select the vertex group and below press select. And it select all the faces or edges or verts assign in that group


How can i stop the fingers from stretching when i move the body in the Minecraft Rig?

this is most likely because you're currently selecting the mesh/skin when trying to move the character.

Instead you need to select those bones in order to move/rotate/scale the character.

This tutorial might help, https://youtu.be/_C3CCz5S75A?t=7m56s (at 7:56)
To move the whole character in while in pose mode, select and move that larger platform around his feet.


How to change what an object is pointing at

If you just need to point an object to another (for example to an empty) you can use an "object constraint" and targeting to the empty.

check this video:


How do I TRANSLATE relative to active/cursor?

Ideally what you are looking for is a translate using spherical coordinates, which is not currently supported; but it could certainly be added using a small script, see https://blenderartists.org/forum/showthread.php?168749-How-to-set-polar-coordinates&p=1485444&viewfull=1#post1485444

You could make a request, probably in the bug tracker, and see if anyone shows an interest, or if it is worth the effort, learn just enough about Python and Blender's add-on system to do it yourself.


One way would be to copy the normal position, from a duplicate of the mesh, without rim faces. Like this:


You can hold down Alt while dragging your view angle around. This will snap the angle to the default numpad angles.


how can i create an effect for animations that looks like a voxel engine?

Maybe try the Remesh modifier (Blocks option):


In which direction should bone axes be oriented?

In Blender the Bone's local Y-axis always runs along the bone's longitudinal axis (from head to tail). I believe this convention comes from the definition of the bvh format.

Regarding the orientation of the local x and z axes a typical approach seems to be to to orient all bone's local x axes along the global x axis. However this does only work for bones which have their local Y axis oriented mostly along the global Z-axis.

So this general rule does no longer work when you have a character that is in T-Pose for example. In that case i found that a common approach is to orient the local z axis along the global z axis.

I have made my own convenience rule of thumb out of this:

for mostly vertical bones: orient their local x axis towards the global x axis

for mostly horizontal bones: orient their local z axis towards their global z axis

These rules of thumb worked for me in most cases so far. The only wonky situations are where a bone is half vertical half horizontal. I think i then used the same orientation as the other bones of the limb have.


How to draw a text using the bge module II

A python controller will run the script from top to bottom, the same as if you were running any python script.

The code you show defines two functions but does not call them. I expect you need to add a call to the functions for your script to work.


Python: How to move collection into another collection?

Basically you just have to .unlink(collection) the sub-collection from its current parent and then .link(collection) it to the new parent collection.

Problem is there is currently no way (attribute) to get the parent collection so we need to find the parent in the first place. I'd suggest create a lookup (dict) to store the relationship and then (un)link:

import bpy

def traverse_tree(t):
    yield t
    for child in t.children:
        yield from traverse_tree(child)

def parent_lookup(coll):
    parent_lookup = {}
    for coll in traverse_tree(coll):
        for c in coll.children.keys():
            parent_lookup.setdefault(c, coll)
    return parent_lookup

C = bpy.context

# Get all collections of the scene and their parents in a dict
coll_scene = C.scene.collection
coll_parents = parent_lookup(coll_scene)

# Get collection references
coll_target = coll_scene.children.get("Collection")
active_coll = C.view_layer.active_layer_collection.collection

# Get parent of *active_coll*
active_coll_parent = coll_parents.get(active_coll.name)

if active_coll_parent:
    # Unlink *active_coll*
    active_coll_parent.children.unlink(active_coll)

    # Link *active_coll* to *coll_target*
    coll_target.children.link(active_coll)

traverse_tree(t) function from How to get all collections of the current scene?


Actually it is still not clear to me if you want to fake the 3D effect or if you want to really displace the topology, for example for 3D print purpose.
I don't know if you can achieve an accurate real displacement just from a b&w photo, because for this purpose you will need a picture that will precisely use black for bottom surfaces, white for peak surfaces, and all the shades of grey inbetween respecting the heights of the object surfaces, which is rarely the case with most photos.
Here is what my attempt gave from you coin picture. I chose a coin that had a better chance to give a good result: no oblique shadows, and the dark areas can be interpreted as the the bottom surface, bright areas as the peaks. As you see it is not very satisfying:

So the following answer is not for real displacement, it's only to fake 3D with Normal or Bump maps, in that case it's much less important if the grey spectrum doesn't respect exactly the heights of the real object.
I gave it a bit of additional margin to make the mapping easy:

I created a normal map with CrazyBump (a bump would have worked as well, no big difference):

Then I unwrapped, mixed a Diffuse with a Glossy, plugged the original (extended) image in their Color inputs, plugged the Normal map into their Normal inputs:


In your example, the big extruding portion is geometry.

In the general case, it very much depends on how close you look at it and at what angle.

With a normal map you always see all faces of a detail. From some angles it can seem wrong since they are facing away from you.

Here we have some geometry represented by... geometry and a normal map. Normal map below. Can you tell wich one is the normal map? Yes, of course you can. But this is realy up close. Still, if you are rendering a space ship and are flying by it's side, go for geometry.


How to exclude hair particles from Freestyle using Cycles?

In the particle hair Render settings, check 'Strand Render':


What is the best steps to snap the torus to floor level?

Align Objects [space menu search]

The Torus was selected. Next yellow floor last to become the active object.

The figure on the right shows two objects not yet aligned.  Torus and Plane.
The figure on the  left show two objects aligned.
The Tool Shelf shows the parameters used in this example ... Negative Sides, Active, Align Z.  The plane has the negative side and positive side in the same location .... plane.

Other options show in the Tool Shelf. Selection, 3D Cursor, Scene Origin


How can i flip the Y axis of a normal map in the Blender Render texture tab?

Invert the Y/green channel with RGB Curves


There are a couple of issues that might be affecting you.

Firstly your model is extremely small (switch to camera view to see how small it is). This will affect the default Boolean modifier settings, which has certain error thresholds. Try scaling everything up about 10 times.

In each Boolean modifier you need to select one of the smaller cylinders as the thing to work with.

Also, the smaller cylinders are not hidden by default so even if the modifier is successful you'll still see the cylinders in place unless you hide them (which you can do from the outliner in top-right).

Here's your scene after I did these things:

You may also need to hide the cylinders for render as shown here - you can do this from Object Properties > Visibility or you can add this option to the outliner for quick access as shown below. (Thanks to Nathan Hild in the comments)


When the modifiers settings are zeroed out the modifier has no effect. So it shows a red icon.


With Blender Render engine selected and a regular old non-node-based material, go to the material properties and check Vertex Color Paint. This will make the diffuse color of the mesh equal to the diffuse color of the material times the diffuse intensity of the material times the diffuse texture of the material times the vertex color.

After you're done you can bake the vertex colors to a texture if you want and use the compositor to combine them for use in a game engine if that's your thing. Or, use a shader and engine that can use the vertex color if the texture is tilable.


3d View -- How to display camera data in the camera frame?

AFAIK that's not possible by default and I guess there is no existing add-on which is able to display any kind of information in the camera frame.
However, you can draw the text using python's bgl module and create your own add-on. Following example code is based on our famous Operator Modal Draw template that comes with blender, extended by the answers from Coordinates of corners of camera view border and Multi-line Text in blf (with multi colour option) to get the ball rolling:

hud.py
import bpy
import blf
import bgl

# -> BASED ON: https://blender.stackexchange.com/a/14746/31447
def view3d_find(context):
    # returns first 3d view, normally we get from context
    for area in context.window.screen.areas:
        if area.type == 'VIEW_3D':
            v3d = area.spaces[0]
            rv3d = v3d.region_3d
            for region in area.regions:
                if region.type == 'WINDOW':
                    return region, rv3d
    return None, None

def view3d_camera_border(context):
    obj = context.scene.camera
    cam = obj.data

    frame = cam.view_frame(scene=context.scene)
    # move from object-space into world-space
    frame = [obj.matrix_world @ v for v in frame]

    # move into pixelspace
    from bpy_extras.view3d_utils import location_3d_to_region_2d
    region, rv3d = view3d_find(context)
    frame_px = [location_3d_to_region_2d(region, rv3d, v) for v in frame]
    return frame_px

# -> BASED ON: https://blender.stackexchange.com/a/31799/31447
def draw_string(x, y, packed_strings):
    font_id = 0
    blf.size(font_id, 18, 72)
    x_offset = 0
    y_offset = 0
    line_height = (blf.dimensions(font_id, "M")[1] * 1.45)
    for command in packed_strings:
        if len(command) == 2:
            pstr, pcol = command
            blf.color(font_id, pcol[0], pcol[1], pcol[2], pcol[3]) # #bgl.glColor4f(pcol)
            text_width, text_height = blf.dimensions(font_id, pstr)
            blf.position(font_id, (x + x_offset), (y + y_offset), 0)
            blf.draw(font_id, pstr)
            x_offset += text_width
        else:
            x_offset = 0
            y_offset -= line_height

def draw_callback_px(self, context):

    WHITE = (1, 1, 1, .7)
    CR = "Carriage Return"

    x, y = view3d_camera_border(context)[3]
    cam_ob = context.scene.camera

    if cam_ob is not None:
        ps = [
            ("{} {}mm".format(cam_ob.name, cam_ob.data.lens), WHITE),
            CR,
            CR,
            ("T: {:.2f}, {:.2f}, {:.2f}".format(
                cam_ob.location.x,
                cam_ob.location.y,
                cam_ob.location.z), WHITE),
            CR,
            ("R: {:.2f}, {:.2f}, {:.2f}".format(
                cam_ob.rotation_euler.x,
                cam_ob.rotation_euler.y,
                cam_ob.rotation_euler.z), WHITE),
        ]

    draw_string(x+10, y-20, ps)
    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)

# -> MODAL OPERATOR TEMPLATE
class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "view3d.modal_operator"
    bl_label = "Simple Modal View3D Operator"

    @classmethod
    def poll(cls, context):
        return context.area.type == 'VIEW_3D'

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        if context.space_data.region_3d.view_perspective == 'CAMERA':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "Switch into Camera View")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

Copy and paste the script into the text editor, run it, move over to the in 3d View, press F3 and type "Simple Operator..." to execute. If you'd like to convert it into an Add-on, just add a python dictionary named "bl_info" at the top of your addon: https://wiki.blender.org/wiki/Process/Addons/Guidelines/metainfo

In order to make it work for 2.7x versions you would have to replace 2 lines due to changes in Matrix Multiplication and on how to set the text color using blf.color in newer versions:
# draw_string()
- blf.color(font_id, pcol[0], pcol[1], pcol[2], pcol[3]) # Blender 2.8x
+ bgl.glColor4f(*pcol) # Blender 2.7x

# view3d_camera_border()
- frame = [obj.matrix_world @ v for v in frame] # Blender 2.8x
+ frame = [obj.matrix_world * v for v in frame] # Blender 2.7x


The comment by Chebhou is almost correct... One thing that may not be clear, is that you can import bpy into bge scripts (many sources say this is not something you should do, but I have experienced no harm in using it during development, however, you can only use it in Blender - it will not work when you build/compile your final game). Thusly you can use the examples on the wiki page they linked to get started in generating meshes procedurally for your game, within Blender during development.

Unfortunately, there appears to be no way currently (as of version 2.78a) to construct a mesh from scratch during runtime of your game.

A couple of potentially useful rabbit holes, to show there may still be hope (will update this answer as/when I discover more):

Generate, or "hack" a .blend file with your mesh data, and feed it to the dynamic loading system. This is all open source, so the specification should be readily available (or possible to glean from the source code).
Alternative builds of Blender, which rumor suggests some are available with this functionality out of the box
Modify Blender yourself...again: open source!
Here is a nice thread about using BGL in BGE: https://blenderartists.org/forum/showthread.php?301350-BGL-in-Blender-Game-Engine this appears to be the most promising approach and here is thoe documentation for BGL: https://docs.blender.org/api/blender_python_api_2_60_4/bgl.html


Plane and Grid are not working as Fluid Effector Collision in Blender 2.82

I had the same problem.. So I added a value of 0.75 on surface thickness, and it work well !! :)


How can I model pagoda roof rafters arangement in blender

What you could do is use Instancing (Duplifaces in 2.7), a bit different from a simple Array + Curve as it won't distord your object:

Create a curve that follows the roof shape, put its origin at its beginning.

Create a plane, scale it as necessary, apply scale and rotation, make it follow the curve with Array + Curve modifiers.

Keep your plane selected and in the Properties > Object > Duplication (Instancing in 2.8), choose Faces. It means that the object that will be parented to the plane will be duplicated on its face.

Create your trunk, put its origin on one of its extremities, then put it on the exact same point as the curve origin, parent it to the plane, it will duplicate along (in my case it would need more plane to stick to your example though).


Deleting face leaves 'hole' where it shouldn't

From the video I see he's setting a mirror modifier (on Z and Y), and that the bottom edge of the face that is deleted is just on the lower limit of the vertical mirror (Z). So the geometry you see below is a mirrored face, mirroring the above face.

The "trick" should be that he has "merge" in the mirror modifier, so, I think that in his model the "deleted face hole" height is in the range of the "merge limit", so the modifier is "filling" the missing area.

If your does not, try increasing the "merge limit" until you get the same effect... (I tried with a simple plane, and with my mesh scale this happens setting a mirror merge of 0.1117)

Obviously it is not sane to have a "merge limit" too high, but if it works, this will confirm that it is what he did in the video.

Btw, just after that point he also set the "clipping" so that the modifier prevents him to add vertices below the Z mirror line (while he's dragging the lower edge of the lowest face remained), since there's a mirror, and adding vertices below that line could probably make accidentally troubles in the mesh, without it.


First create a prototype of your cannonball and name it "prototype".

Here is code which will stack cannonballs for you:

import bpy
from math import *

def construct_cannonball(mesh, x,y,z):
    scn = bpy.context.scene

    obj = bpy.data.objects.new("ball", mesh)
    scn.objects.link(obj)

    obj.location = [x,y,z]

def mission1(mesh, r, xyz1, xyz2, construct_cannonball=construct_cannonball):

    dx = 2*r
    dy = sqrt(0.75)*dx

    dz = sqrt(2/3)*dx   # thank you, CRC Concise Encyclopedia of Mathematics

    w = 0
    z=xyz1[2]
    while z<xyz2[2]:

        v=0
        y=xyz1[1]
        if 1==w%2:
            y += dx/2 * tan(pi/6)
        while y < xyz2[1]:
            x = xyz1[0]
            if 1==w%2:
                if 1==v%2:
                    x -= dx/2 / cos(pi/6)
                else:
                    x += dx/2 / cos(pi/6)
            if 1 == v%2:
                x += dx/2
            while x < xyz2[0]:
                construct_cannonball(mesh, x,y,z)
                x += dx

            y += dy
            v+=1

        z += dz
        w += 1

def purge(scn, prefix):
    for obj in scn.objects:
        if obj.name[0:len(prefix)] == prefix:
            obj.name = "discard"
            scn.objects.unlink(obj)

purge(bpy.context.scene, "ball")

mission1(bpy.data.objects['prototype'].data,
         1, [-5,-5,-5], [5,5,5])

You can see a copy of the code at http://web.purplefrog.com/~thoth/blender/python-cookbook/cannonball-packing.html


Script to move object to world origin without changing z-axis position

You've lost the original locations of the objects so technically they are at the origin. In the script below I've cheated and used bpy.ops to reset the objects origins to Center of Mass.
import bpy
C = bpy.context
D = bpy.data

bpy.ops.object.select_all(action='DESELECT')

for obj in D.objects:
    obj.select_set(True)
    C.view_layer.objects.active = obj
    ### Pick one ###
    #bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
    #bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME', center='MEDIAN')
    bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')
    obj.location[0] = 0 # x
    obj.location[1] = 0 # y

    C.view_layer.objects.active=None
    obj.select_set(False)

After batFINGER's suggestion I modified the code to not loop through bpy.ops calls. I also changed it to only affect selected objects. The original version would have moved cameras, lights and whatever else.
import bpy
C = bpy.context
D = bpy.data

### Pick one ###
#bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_VOLUME', center='MEDIAN')
#bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')

for obj in  C.selected_objects:
    obj.location[0] = 0 # x
    obj.location[1] = 0 # y


There are two free add-ons for Blender that can convert curves and sheets (hair cards) to hair particles guides:

HairNet 0.6.3 (https://github.com/Jandals/HairNet/releases) forum thread at blenderartists.org
Particle Hair Guides (https://github.com/Lichtso/hair_guides) forum thread at blenderartists.org

The add-on Select Islands by Face Count by Stan_Pancakes is a useful helper if you want to convert hair cards to particles with one of the add-ons above.


With an IK Constraint, you specify a pole target to control the way the bones bend. I expect you created Bone.009 and Bone.010 to be these pole targets.

Set the pole target to the armature and then the choose the bone to use. To control the direction of the rotation, you adjust the PoleAngle. You can then animate the pole target bone to control the bend during animation.


Your are in orthographic projection view.

For obvious geometric reasons you cannot view a equirectangular images in orthographic views because there is no perspective to speak of, so you are looking in a single direction, viewing a theoretically infinitesimally small portion of the background image, yielding an apparently flat looking background.

Switch back to prespective view by pressing Numpad 5


Weight Paint x mirror is painting left and right weight to the left side of the mesh

Under options, uncheck "topology mirror"


Need help to recreate a metal material with multiple colors

I tried something, more complex than I expected. The mesh is not flat, a bit deformed (large area proportional edited vertices, very low distance)

Basic scratch texture form CGTextures.com, not reworked, not tilabled.
Lights are a pain, could use a ref to get something decent. It looks like something is throwing light (ground reflection?) on the seats shadows.
I think the Blue/green colors are due to the use of acid on copper, could be textured.


Did you accidentally turn off that plane in render setting?

The preview in 3D view doesn't follow render visible setting in the outliner

Toggle the icon on again and see if the problem is resolved.


How to list all selected elements in python?

You may be interested into bmesh module's select_history

import bpy
import bmesh

me = bpy.context.object.data

bm = bmesh.from_edit_mesh(me)

for elem in bm.select_history:
    print(repr(elem))

# Variant 1 - get the active edge
try:
    active_edge = filter(lambda elem: isinstance(elem, bmesh.types.BMEdge),
        reversed(bm.select_history)).__next__()
except StopIteration:
    active_edge = None

# Variant 2 - same, but less geeky ;)

for elem in reversed(bm.select_history):
    if isinstance(elem, bmesh.types.BMEdge):
        active_edge = elem
        break
else:
    active_edge = None

# Get selected faces in order

for elem in bm.select_history:
    if isinstance(elem, bmesh.types.BMFace):
        print(repr(elem))

# Get all selected faces
# Note: bm.select_history lacks geometry selected via border select, lasso, etc.
#       (mass-selection operators)!

for face in bm.faces:
    if face.select:
        print(repr(face))


Boolean difference modifier merges two object

You need to have consistent normals on your objects - normals determine what is outside and what is inside.

To recalculate normals go into Edit mode (Tab), select all geometry (A) and perform "Recalculate normals outside" (Ctrl+ N)

After all your pieces have correct normals (you will also notice consistent shading of all objects) - booleans will work as expected.

You might also want to set the object that you do boolean with as wireframe (you do that under Object Display options):


How to move assets with a button click in BGE

Possible example: This will move the ball in one direction, if you press the button.
Welcome to the Blender StackExchange!

To detect the click on your button add a mouse over sensor and a left button sensor to your button. Combine them with the default AND controller and use a message actuator to send a message e.g. "moving" to your ball.
Make sure that one of the Sensors has true-level-triggering enabled, so your ball keeps moving while you keep pressing.

Catch that message to your ball with a message sensor (set right subject) and connect it with the motion you want.


Add F-Curve Modifier for multiple F-Curves at once?

With a script

These things are most easily done with a script.

The script below, looks for all pose bone fcurves, all posebone scale fcurves and all posebone quaternion fcurves and assigns them to variables pbfcurves, scalefcurves and rotfcurves respectively.  Note if you are using Euler rotation change to rotation_quaternion to rotation_euler

If you know the action is named "Snurfball" then uncomment and edit  #action = bpy.data.actions["Running"] to

action = bpy.data.actions["Snurfball"]

Uncomment, (delete #) to remove all modifiers from all posebone fcurves

demod(pbfcurves)

To add strength 2 noise to all scale fcurves

noise(scalefcurves, strength=2.0)

To add strength 2, depth 4 noise to all quaternions

noise(rotfcurves, strength=2, depth=4)

Make your edits, Select the rig object and run script.  A single CtrlZ generally does a good job undoing, but as always: please backup first.

import bpy

context = bpy.context
ob = context.object
action = ob.animation_data.action
#action = bpy.data.actions["Running"]

def demod(fcurves):
    fcs = fcurves[:]
    while fcs:
        fcurves.remove(fcs.pop())

def noise(fcurves, scale=1.0, strength=1, depth=0, phase=1.0, offset=0.0):
    for fc in fcurves:
        m = fc.modifiers.new(type='NOISE')
        m.scale = scale
        m.strength = strength
        m.depth = depth
        m.phase = phase
        m.offset = offset

pbfcurves = [fc for fc in action.fcurves if fc.data_path.startswith("pose.bones")]

scalefcurves = [fc for fc in pbfcurves if fc.data_path.endswith(".scale")]

rotfcurves = [fc for fc in pbfcurves if fc.data_path.endswith(".rotation_quaternion")]

# clean modifiers from all fcurves

#demod(pbfcurves)

# add noise to all scale fcurves

noise(scalefcurves, scale=0.4, strength=2.0, offset=-5)

Further to this if you are adventurous, can do this from the python console.  Here I've found all the fcurves with a datapath, converted to lower case that contains the word "arm"

>>> action = D.actions['metarigAction']
>>> armfcurves = [fc for fc in action.fcurves if fc.data_path.lower().find("arm") > -1]
>>> for fc in armfcurves:
...     fc.data_path, fc.array_index
...
('pose.bones["upper_arm.L"].location', 0)
('pose.bones["upper_arm.L"].location', 1)
('pose.bones["upper_arm.L"].location', 2)
('pose.bones["upper_arm.L"].rotation_quaternion', 0)
('pose.bones["upper_arm.L"].rotation_quaternion', 1)
('pose.bones["upper_arm.L"].rotation_quaternion', 2)
('pose.bones["upper_arm.L"].rotation_quaternion', 3)
('pose.bones["upper_arm.L"].scale', 0)
('pose.bones["upper_arm.L"].scale', 1)
('pose.bones["upper_arm.L"].scale', 2)
('pose.bones["forearm.L"].location', 0)
('pose.bones["forearm.L"].location', 1)

All location.y arm fcurves

>>> armfcurves = [fc for fc in action.fcurves if fc.data_path.lower().find("arm") > -1 and fc.array_index == 1 and fc.data_path.endswith("location")]
>>> for fc in armfcurves:
...     fc.data_path, fc.array_index
...
('pose.bones["upper_arm.L"].location', 1)
('pose.bones["forearm.L"].location', 1)
('pose.bones["upper_arm.R"].location', 1)
('pose.bones["forearm.R"].location', 1)

>>>


Blender hangs on exit with console window open?

Clicking in the console window and accidentally selecting some text will put the console window into 'selection' or 'mark' mode to mark the part you want to copy to the clipboard. This will cause any additional output to the console to ‘hang’ (it blocks any further output to the console so the visible text doesn't change while you're trying to mark your selection) which will block Blender when it tries to output additional text to the console such as just before it exits. Pressing Return or Esc while on the console window will accept or cancel selection mode, allowing Blender to continue outputting to the console so it can continue.

This is how the Windows console works (rather than being a Blender feature) and the only way of avoiding it is to be careful when switching to the console window and avoid selecting any text (or immediately cancel 'mark' mode by pressing Return or Esc).


Select vertices based on other object (like boolean modifier)

Solved it myself now with a littles script I cobbled together based on zeffis answer to this: How to find if a point is inside a mesh?

import bpy, bmesh

def is_inside(p, max_dist, obj):
    # max_dist = 1.84467e+19
    point, normal, face = obj.closest_point_on_mesh(p, max_dist)
    p2 = point-p
    v = p2.dot(normal)
    return not(v < 0.0)

obj = bpy.context.active_object
bowl = bpy.data.objects['bowl']
bpy.ops.mesh.select_all(action="DESELECT")

mesh=bmesh.from_edit_mesh(bpy.context.object.data)
for v in mesh.verts:
    p = obj.matrix_world * v.co
    if is_inside(p,1,bowl): v.select = True

This can be a little slow, but does the trick:


how can i make black and white alpha video effect

Press Shift+A - Adjustment Layer to add an  Adjustment strip, and place it above all video strips.
In N-panel find saturation value and change it down to 0
In N-panel open modifiers tab and add curves modifier. Draw a curve in the modifier like this:

Here is the result:


getting the most out of tracking vs memory

More tracking points are not better, but accurate ones are. More inaccurate trackers will only make things worse, not better.

The automatic feature detection sounds good in theory, but I still prefer choosing the tracking points myself, focusing on what items will be in frame for the longest time in the scene and which will help blender determine the 3d space.

To get better performance, let blender cache the  whole shot into RAM. You might need to increase the cache size in the system preferences.

For more tips on motion tracking please read: https://blender.stackexchange.com/a/42332/1853


You could use normals to fake the stripes:
Create a plane, subdivide it, bump it, create a second plane to bake the first one:

Use the normal map to fake the stripes:


How to change hair color along length of strand?

You can accomplish this in multiple ways, the easiest way is to use a Hair Info node, and use the Intercept value to drive a Converter > Color Ramp node. Use this to drive the Factor on your mix or add shader node. Here is a quick example node setup:

And here is how it renders:

As you can see, the lower input into the Mix Shader is on the base of the hair, and the upper input is on the top of the hair. This will work on a Color > Mix RGB node as well.

EDIT: It is also possible to add another set of colors on top of the first two, giving even more controlability:

How it renders:

More realistic colorings:


Adjust the camera view actually separate all my objects

You had "proportional editing object mode" enabled. Toggle it off and it should work as expected.


Is there a way to save preferences for import/exporters?

Yes, you can use operator presets. (Press the + icon to the right hand side of Operator Presets dropdown).


switching between layouts Blender 2.8 (Mac laptop)

Go under preferences
select input
then under keyboard select emulate keyboard


Extrusion axis incorrect in Blender 2.90

From what I understand, since 2.9, the default axis for extrusion is still the face normal, but if you press X or Y once, the extrusion will follow the face X or Y direction, not the global direction anymore.
Now if you press XX or YY, the followed direction will be along the global orientation. But you don't need to press Z twice to make the extrusion follow the global: As no Z was necessary in the first place to follow the face orientation, you just need to press Z once to make it follow the global.
Here is how, when you extrude then press Y or Z, the face may follow the same direction, because the face Y direction and the Z global orientation may be aligned.
Yes, a bit confusing, but the previous method was not perfect either, one X or Y meant global axis, but for example, as the default extrusion occurred along the face Z direction, to extrude along the Z global axis you needed to press Z three times.


How to select how many subdivisions will a curve have?

go into edit mode, subdivide pressing W and type the number of subdivisions you need.


Use texture painting to determine transparent areas

Here's an examples using the painted texture to control the mix between diffuse and transparent shaders on a plane. Areas painted in white will be opaque, black will be transparent.

If you are getting the opposite effect switch the transparent and diffuse nodes. Or add a Color>Invert node between the texture and the Fac input fot the Mix Shader node so that the black areas are opaque and white becomes transparent.

Note that this texture painting controls the transparency only. The texture for the difuse shader has to be a different texture (or image), plugged to the color socket of the shader.

If you are going to paint directly on the 3D viewport make sure that you select the correct paint slot.


Part of Object Goes Through Plane When Falls

As with all simulations, make sure you use realistic properties for your objects - ie, each domino should be a realisic 'real world' dimension with suitable real-world mass and centre of gravity. If need be, set your Scene to suitable units so that your objects do not have to be unreasonably scaled (eg, if working with very large objects set the scale to Kilometres, if very tiny, maybe set to Milimetres or Micrometres, etc.).
Ensure you have 'Applied Scale' to all of your objects. This helps with producing a consistent simulation.
In Scene Rigid Body World parameters consider increasing the Steps Per Second and/or Solver Iterations above the default values (defaults are 60 and 10) - eg, 6000 and 600 would not be unreasonable and shouldn't slow down the simulation too much. Avoid excessively high values as this can result in rounding discrepancies which can affect the stability and accuracy of the simulation. If in doubt, change one value by a factor of, say, 10 and re-try the simulation to see if it makes it better or worse before deciding on whether to change it back and/or change something else. Note that there are no 'universal best values' for these - it depends on your situation and simulation requirements.
If you're still getting intersections, consider enabling the Collision Margin in the Physics properties Rigid Body settings. This defaults of 'off' and can be enabled and a margin set. The default (0.04m - 4 cm) will likely be way too large (depending on your scene units and what it is you're simulating) - try the lowest permitted value first (0.001m (1mm)) and try higher values if still getting collision issues.
Using these changes I managed to get a clean simulation without clipping. If you still cannot get the expected results, please edit your question to add further details.


Nothing is wrong with your UV set up. It looked fine when i opened it. I didn't change anything in your blendfile, except for the lighting. I put 2 sun lamps in the scene near the camera and pointed it at the object. And deleted the 3 lamps you added.


That means you have zero sized faces over those edges and you mesh topology is messy. Probably the leftover of unfinished operations or the result of some undesired zero sized extrude.

You can try and clean it up by selecting all with A and then with W Menu > Remove Doubles option.


This answer might be a bit late for you but may help other users.
I have found that ctrl + trackpad-scrolling or ctrl + magic-mouse-scrolling zooms.


2.8, how to automaticaly merge overlapping vertices

nvm, found it. It's under mesh options all the way to the topmost corner of the window. :) It's called AutoMerge editing


Python, measuring distance using ray_cast

The location of hit loc is the local coordinate on the cube face that the ray hits.

Its local distance from origin

(origin - loc).length

its global distance from origin

(mw * loc - src.matrix_world.translation).length

With no rotation or scale applied all local coordinates  on default cube are either 1 or -1.  The top and bottom faces are the planes z = 1 and z = -1 respectively.


You can use Transform Matrix node to rotate whole matrix list.


I would do something like this. But depends what you want to do next


The colored image as shown in the question is the output from the picker image of the cryptomatte node. This image is used to quickly pick an object or material from the cryptomatte data. It is not the actual matte.
After picking objects and materials the anti aliased mask will be available from the matte output of the cryptomatte node. This is answered in more detail in Cryptomatte - Clean edges


Whats the best way to make smooth waterslide type tracks?

Create a bezier circle. Go into the curve properties, and increase the Extrude property.

Go into edit mode, select all the control points with A and set the tilt to 90°. (Press N to open the right hand panel if it is closed)

Tweak the tilt of each control point to have some kind of curvature.

Add a solidify and edge split modifier to get depth.

Select two control points and richt click > Subdivide to add a new one between the two. Tweak them, tilt them to your liking.

Adjust the resolution units to keep the poly count low

If you want a custom profile, add a bezier curve

And use it as your bevel object

Result : 676 verts


Is it possible to render modifiers at preview settings?

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


Can Someone explain to me what the bone driver properties do?

Drivers are basically relationships between object settings.

Let's say I have a cube and a sphere in my scene.
I want my cube to move 2 units in the x direction when my sphere is moved 1 unit in the y direction.

First, I add a driver to the x location of my cube and bring up that panel (the one on your image).
The variables below allow you to retrieve information from other objects (here, I want to grab the y location of my sphere since that's what's going to influence the x location of my cube). "var" designates the name of the variable.

Now that I have the y location of my sphere as "var," I can use that variable under "Scripted Expression" to write a Pythonic script the value of which will be assigned to the x location of my cube.
Since I want to move 2 units in x direction for each 1 unit in y direction of the sphere, my expression should be 2*var.

Now when you move the sphere by "var" in the y direction, the cube will automatically move "2*var" in the x direction.

You can add more variables to write complicated expressions. As long as it is syntactically Pythonic, it should work.

You have to enable Auto Run Python Scripts under User Preferences > File.
Try messing around with the graph and see how it affects things.
Try the Blender Manual https://www.blender.org/manual/animation/drivers/introduction.html


How to change the speed of an action in bge without interrupting the loop?

I suggest to use skip the automatic play modes and implement an on counter.

You can do this even without python. Define a float property "frame" that is supposed to hold the frame of the pose to be played.

Whenever the property change activate an action actuator in property mode with that property.

Now you can implement logic that manipulates the property frame.


glitches in texture in blender texture drowing

Painting

If the model is only one color directly you can assign the material.
You can paint the model directly with different colors.  You may need to twist and turn the model so the faces of  little nooks and crannies (small tight spaces) are directly facing you the painter.  You can hide parts of the 3D Mesh so that the tight spaces are more obviously accessible.
You may paint on the texture directly to fill in the holes.  Enter paint mode for the texture and paint directly to fill in holes.


It's possible, but you're going to have to "animate" with Python. There's no way to animate property values using the Dope Sheet or Graph Editor. Assuming you have the default cube and you've given it a custom string property called MyString (through the interface... this would also work for custom properties defined with Python; it's just easier to see what's happening this way), you could write a handler that's triggered by the frame_change_pre event. It would look like so:

import bpy

def animate_string(scene):
    ob = bpy.data.objects['Cube']

    if scene.frame_current < 25:
        ob['MyString'] = "First bit text"
    elif 25 <= scene.frame_current < 46:
        ob['MyString'] = "Next text part"
    elif 46 <= scene.frame_current < 100:
        ob['MyString'] = "Another bit of text"
    else:
        ob['MyString'] = "Text after frame 99"

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

Now... if you want to be clever and still animate using the Dope Sheet, Graph Editor, or even the Timeline, you could probably extend this with some clever code that populates your string property with the string stored in a marker (e.g. find the closest marker less than the current frame and use the String stored there). If you only have one object in your scene that needs to be animated this way, it should work great.

A caveat... In my testing (r60747), you could only watch the custom property change values if you scrub through one frame at a time (Left Arrow and Right Arrow). Playing back animation with Alt+A works (you can check with a print statement), but the value doesn't update in the interface. In fact, when I put my mouse cursor in the Properties Editor while playing back with Alt+A, it crashes Blender (bug report submitted).


Create Multiple Edges at once and align them very precisely with extrude? (Watch Video as Ex.)

It looks to me like he's using Extrude (E) in combination with transform snapping (magnet icon in the header).
You can also toggle transform snapping on the fly by holding ⎈ Ctrl during the modal transform (no need to click the magnet icon constantly):

Where it looks like he extrudes several individual edges, I think he extruded faces but they where hidden due to backface-culling and inverted normals. In the example gif I selected these and flipped their normals with ⎈ Ctrl⇧ ShiftN to make them visible.

Note that in the video he merged double vertices manually after extruding (W > Remove doubles), but it's possible to have blender do this on the fly by enabling automerge in the header.


Mesh Part deforms without Weight painting being applied to it

Select a vertex which has unwanted movement and check in the "N" properties panel which are its weights, then clear out the unwanted weights, even if they look "blue" in weight paint mode.


Check that the bone rolls and root bones roughly correspond, otherwise it may be quite difficult. If the bone rolls don't match, consider experimenting with using a combination of damped track (will ignore twist, so effectively copy rotation for just x and z) and copy rotation (just for y, in local space).

In the images posted you seem to not have constraints on many of the bones which may be causing issues due to mismatched rotations inherited from parents.

I would suggest start from the root bone of mesh's armature and get that to match the movements of the animated armature. Then slowly work your way down the bone hierarchy.

The process of transferring animation data from one rig to another, which looks like what you are trying to do is generally called retargetting, and searching for that may yield helpful results.


The slots are for giving different faces different material, all in the same object. If you have only one slot, you can use the button you marked to give your object material.

In Edit Mode you can select faces and assing them to certain slots. Lets say you want two slots. You press the little down arrow next to Slot 1 and press + to add a new slot. Select a face, select slot 2 and press assign. Now you can give the selected face different material by pressing the button you marked.


Materials: How to get this transparent screen look?

This effect could be achieved with 4 nodes.

Add a emission shader (that your image will plug into)
Add a transparent shader
Add a mix shader

Plug your two shaders into the mix shader and slide the FAC value to taste.

After rendering I would bring the image into a compositor and add some glow around the hologram image to make it a little more believable.

Pics taken from Unsplash.com

Photo by Javier Ramos on Unsplash
Photo by Justin-Lim-500765-unsplash


How to make a vertex meet an edge exactly?

Hold CTRL while moving the vertex and it will snap to the midpoint of the edge (it will also snap to other vertices). Once you get it on the edge, you can switch to the "Normal" coordinate system and slide it back and forth along the edge.


Cycle though multiple MixRGBs with one value

Check 'Clamp' on the first one and add a 'Map Range' node between the value and the 'Fac' of the second one. Check clamp on it and set its parameters: 'From Min' to 1, 'From Max' to 2,  'To Min' to 0, 'To Max' to 1.


Object disappears when trying to simulate Soft Body physics

Checked out the file and found the culprit : Cartman is the bugger.

Aside from some wrong normals, the biggest problem is overlapping geometry.

Very heavy/bad for simulations that base on calculations using the geometry data of an object.

Suggestions to fix the problem:

Retopologize the object, reducing the vertex count and at the same time leads to not only a cleaner mesh, but a faster simulation.
Fixing the geometry of the object to have no overlapping parts anymore. If possible reduction of vertices wherever possible.

While both will take time, i'd go with the first one, as it would be training, and in a way easier, as you work from outside and around. While the latter would take longer i believe alone due to the very tight geometry in the leg/feet (bottom) part.

Without cleaning the the object, i don't think you should try getting the soft-body simulation to work, as all the fine tuning to get the object react as should won't compensate for the underlying problem.

There is a 3rd option, in case you just want the figure to fall in the glass.
No deformation like soft-body possible, but bouncing would work.
Rigid Body Simulation, making the figure an active object and both glass objects passive (important to set all objects to "Mesh" shape), will at least give you the experience of an Erik Cartman falling in a glass-jar.


How do I render animations in a workspace-like manner? (Blender 2.8)

Speeding up the render

By default, the samples are higher for the Render than for the Viewport (so the render is slower). You can set them in Render properties, under Render.

Also, the render is done at full the resolution, but the viewport is rendered, well, at viewport resolution, which is usually lower. The larger the resolution is, the slower the render is.  You can set the Render resolution in Output properties, under Dimensions / Resolution X and Y.

Rendering the viewport without external tool

Do you know Blender allows you to export the viewport cleanly, without the need of OBS or whatever ?

In the View menu, select 'Viewport Render Animation'. It will render exactly what you see in the Viewport, and export it as a video file. You can set the Path and the File Format in Output properties, under Output.


How do I Fill a Subdivided / Smoothed Barrel's cutout With 2 Sided Right Angle Face?

I'd do this in several stages, to make sure the topology stays nice and works well with both the subdivision modifier and the smooth shading.

Start with filling the horizontal surface. Connect the two verts that delimit this part and join them into an edge with F.
Subdivide this edge 5 times with W --> Subdivide --> crank up to 5 in the tools panel.
Then fill this surface with a grid fill (Spacebar menu --> Grid fill), using 6 spans and an offset of 6.

Repeat this process for the upper cap (6 spans and an offset of 3 for the grid fill this time):

Add a loopcut in the perimeter of the barrel, at the same height as the edge we started with in the last step. Create faces for the rim at the left and right by selecting 4 verts and filling a face (F).

Now you can fill the last hole with another grid (see span and offset params in gif below). Add another cut by selecting the two verts near the bottom and creating and edge with join J, to maintain a nice flow of vertical loops. Select the loop above which is distorted due to the current topology, and straighten it this way: make the leftmost vertex, that representing the desired height for all the verts, active by deslecting and reselecting it (Shift + RMB). Change the pivot point to active element, then scale all verts to 0 on the Z axis (S --> Z --> 0).

Now, if you like, you can add more loopcuts or increase the crease value to control the curvature of the subdivided surface.


Input image strip without stretching to fit output frame

The default behaviour of an image strip added to the VSE is to scale to the render resolution set for the blend file. To change this behaviour in the way you have specified; enable "Image Offset" in the Strip Input panel on the properties bar for the selected image sequence, then use the X and Y value inputs to position the image within the output image space. You also want to set the blend type to "Alpha Over" so that the underlying strip is visible.


The rig is on a layer you have hidden.  Layer nine. Right now you have X-ray on for the model; you may need to turn X-ray off of it before you will see the rig.

You need to have all layers you want to see visible. If you hold shift while selecting, you will be able to make multiple layers visible.


Till there is no changes you can use API reference form 2.80, for example CyclesRenderSettings

Source of Cycles types contains in Blender_installation_path\2.8*\scripts\addons\cycles\properties.py, you can use it as reference simultaneously.


How to manually mirror armature in blender 2.78a?

As Mzidare said, you can try Symmetrize. Here's a mirroring technique that circumvents this problem:
You can enable X-Mirror, then extend from a central bone with E. The extension should occur symmetrically, and any changes to one should affect the other. I hope this helped :)


How to fix messed up vertices after sculpting a model

You can use remesh modifier or remesh option from properties or any other tool like instant mesh
Mesh at start:

Remesh Modifier:(make sure not to drag voxel size too quickly or blender will crash)

Remesh option in blender:

Result of remesh option:


Here is a setup I like to use for adding imperfections that allows for a good amount of control in placement.

To start with, I typically will give imperfections a separate UV map, as it tends to give a bit more control.

After adding a second UV map, you can use a  Mix RGB node to add(or multiply) the scratches texture to your roughness map. Then, use a node group such as this one from BlendSwap to combine your scratches normal map with your base normals if desired. (See this question for some other solutions on combining normal maps also.)

With that done, it is only a matter of using a gradient texture (or any other procedural texture if needing some other kind of mask) as a mixing factor controlled with a color ramp to determine where the scratches should be.

You can change the interpolation on the color ramp to something other than linear for a bit more control over the mix as well.

A node setup like the one shown below  should suffice in most cases, and is adaptable to use in most situations where you might want to add some kind of imperfections to an object.

click to enlarge

Here is a quick example  with a cylinder using the node setup above:


Click on Object Data Properties (green triangle) then the Normals down arrow and finally check Auto Smooth.


Make sure each bone name to be mirrored ends with .L which means LEFT (e.g.: hand.L) and press Shift+C to center the cursor.
Hopefully that will help.


How to give particles systems a moving target (key)?

Simple solution
Setting the physics type to 'No' causes the particles to stick to their emitter, even if it moves. This can be used to make moving targets for other particle systems.
Before, I was using the "Newtonian" physics type, which caused the particles to stand still in the absence of any forces or initial velocity. I assumed 'No' physics would also result in stationary particles, but they actually stay stationary in the emitter reference frame. So yeah. That's it.
More complicated solution
Before realizing the simple solution exists. I did it by creating a 'middle' layer of keyed particle systems, which move and serve as targets for the rendered particle systems.
This is more complicated and taxes a computer significantly more, but leaving it here since it seems like it could be used to add field effects to the targets, which isn't possible with the 'No' physics setting from the simple solution.

The initial and final objects in the morph each have three, rather than one particle system.

The first particle system emits stationary particles at the beginning frame of the morph.
The second particle system emits stationary particles at the ending frame of the morph.
The third particle system has keyed physics and uses the first and second systems as targets. This causes it to move, tracing the motion of the emitter object (or at least going in a straight line between toward a destination, which is good enough to create the illusion).

This third, moving system (one in each mesh) is part of the 'middle' layer mentioned above in that it's used as a target for one of the rendered particle systems.
Here are the layers of particle systems:

Bottom layer: Stationary particle systems emitted by each mesh at the beginning and end of the morph.
Middle layer: For each mesh, one keyed particle system. For targets, this system uses the two stationary systems for its mesh (beginning and end). The particle systems in this middle layer are the moving targets the initial question is asking for.
Top layer: These are the rendered particle systems. Each of these systems is keyed and has two targets from the middle layer, one each for the pre- and post-morph meshes.

The resulting .blend file:

It has some additional complexity because each pre-morph mesh morphs to every post-morph mesh. Also, each morph has two rendered particle systems, one each for the pre- and post-morph mesh materials. In total, there are 96 particle systems! (Though this isn't the minimum necessary since the "bottom layer" systems are duplicated.)


smoke domain, original object material, how to make it show through smoke: AOQ

Just to remove this from Unanswered Questions, I am answering it myself.  Turns out it was a dumb question anyway.

Point 1:  when textures look weird and you are using BI, check the World carefully for environmental lighting.  This was 90 percent of my problem, just dumb n00b error.

Point 2:  the smoke effect seems to reveal more of the cube surfaces when I make the proportion of Volume smoke higher and the proportion of Face smoke lower, unsurprisingly.  Tweaking this enabled me to get pretty much the look I wanted.


UV coordinates are locked from -10 to 10?

In code most UI widgets such as sliders, number fields etc ask you to set min and max values.
In some cases this can be relevant to how the widget behaves (for example, sliders with large ranges are harder to slide to specific value due to display precision).
In this case the limits are most likely arbitrary.

For things like texture looping or tiling, normally this is done by using the vector mapping node in the materials edit to scale the UV coordinates, rather than in the original coordinates.


Requirements for auto running a script.

Press CTRL+ALT+U
to open user prefernces.

In the File tab ensure Auto Execution is checked.

Save User settings.

In Text editor:
Create new text block.

Copy script into new text block (ensure the script has an explicit register function note bottom lines).

Save text block as cp.py. Unlink text block. Open cp.py.

Click Register checkbox.

Save Blend file
Close Blend file
re-Open Blend file ... panel should auto run.

import bpy
from bpy.types import Panel

class ExamplePanel(Panel):
    bl_label = "Background Colours"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'

    def draw(self, context):
        layout = self.layout
        obj_types = ['MESH', ]  # add types as needed
        objs = [obj for obj in bpy.data.objects if
                obj.type in obj_types and obj.select]
        col_types = ['RGBA', ]  # add types as needed
        for obj in objs:
            box = layout.box()
            box.label(obj.name)
            # for viewport or non node colors
            if obj.active_material:
                my_mat = [mat for mat in bpy.data.materials if
                          mat.name == obj.active_material.name]
                box.label("Viewport Color")
                box.prop(my_mat[0], "diffuse_color", text="")
            else:
                box.label("Requires active material")
            # for materials using shader nodes
            if my_mat[0].use_nodes:
                my_nodes = [nd for nd in my_mat[0].node_tree.nodes]
                box = box.box()
                box.label("Render color")
                for node in my_nodes:
                    for ip in node.inputs:
                        if ip.type in col_types:
                            box.prop(ip, "default_value", text=("%s: %s" % (node.type, ip.name)))

classes = [ExamplePanel, ]

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

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

#if __name__ == "__main__":  # only for live edit.
#    register()

register()  # required for autorun


Best video format to use for multiple resavings

Don't.

Control the rendering of your codec to a lossless stills format to load into your pipeline. Do so only after having locked your picture edit.
Save to EXR when you must save to a file format, and stay in EXR until your final grade. Even half float EXRs would be satisfactory.
Conform to a display referred format such as JPEG or TIFF at the very end. DPX is the standard here, but is likely a more complex path for reasons that are too vast to list here.
Encode from there.

If you ask a follow up question, I could give you a very standardized production pipe that might illuminate why this is advised.


PNG animation render, saving images without a file type

In the Render panel in Input, check "File extensions"

(They are saved without a file extension, which is not the same as a file type.)


What should i do if my fluid falls through an object?

Try increasing domain resolution. Notice resolution has two settings : one for render (= what you see when you press f12), and one for preview (= what you actually see in your screenshots).

However, fluids are designed for smaller scale simulations (like, a bathtub, or maybe a small swimming pool). Maybe it's not the best solution for this case.