Render depth maps with world-space z distance with respect the camera

Short Answer

If you are looking for accuracy, Do not save the Z pass as PNG or any other display referred format. OpenEXR is the only format that will allow you to use the linear information from the Z pass.

The only way to get a Z depth pass without distortion is by avoiding any kind of processing except [proper] inversion or normalization. Just plug the Z information to a file output node, and save as OpenEXR.

Long Answer

First let's separate the apples from the oranges:

The Z pass should not be thought of as an image, since its values do not fall into the parameters set for most image formats.

What is the Z pass then?

The Z pass is the absolute distance from the camera to objects in the scene for every given pixel on the image. The camera is the 0 on the scale and the units used for its values are the working units set for the scene (blender units, meters, cm, inches, etc). The minimum and maximum value are clipped according to the camera's start and end clip distances.

The Z depth values work in a linear scale, meaning that 6 will be twice as far than 3 and one half of 3 will always be 1.5
The Z pass is not meant to be viewed.

The main issue is that Z depth information, will generate values larger than 1 and image formats cannot deal with values larger than 1 (where 0 is black, and 1 is white)
What happens when you normalize the Z pass?

The minimum and maximum values are set as 0 and 1 respectively and all other values are spread in a linear scale in between.

The real effect of doing this is that the scale is both compressed and offset from the real values. The values for absolute distance are converted in relative values and from then on you have to do conversions to find what the real values are.
What happens when you invert the Z pass?

The maximum value is set to 0 and the minimum value is set to the maximum value. All other numbers in between are also inverted. Inversion is a reversible (invertible) operation (source)
Why do people normalize the Z pass then?

Because the information contained can then be viewed as an image, since it has values from  0 to 1 that can then be expressed as an image. Normalize only when  you want to make sure that the Z pass is working, or to use it on programs that cannot deal with the Z channel properly and need the information as an image in grayscale.
So why not PNGs or other formats?

Normalizing the image to make it fit on a 0 to 1 scale is really not the problem (because even though normalizing has moved the values for the scale, it has kept the values linear). But when you save as an image format you are re-mapping those values yet again to a very limited number of values. Saving to an 8bit format will result in 255 possible values, greatly reducing the precision of the information. Even on 16 bit where you can have a much larger different gradations from black to white (4096) you might find that values that are close together are no longer represented.

But the main reason not to use display referred formats like PNG is that those formats presume to be encoding values in sRGB, that is not a linear format anymore, but has a transfortmation curve in which 3+3 might not equal 6 anymore... The values will have been re-mapped yet again to a point that will not reflect the proper scale of the distances represented on the Z depth information.
How is OpenEXR different?

OpenEXR is a format that has been designed to store linear data and has no issues with values larger than 1. The information suffers no distortion and is as precise as when you rendered your scene in the first place.


Boolean-like modifier for 2d objects or very thin 3d form?

Boolean modifier works best with meshes whose Volume can be correctly calculated.

This means that the mesh must have some features:

Watertight
Manifold
No overlapping faces
No loose faces
Consistent normals
...and many more

As long as you provide a "good" mesh, there should be no issue.
Even if 2D meshes has no volume, so they actually don't fall in this category, the modifiers should be capable of giving a sort of result of their intersection, but you cannot expect a ready-to-use mesh.

In the provided example, the solution could be to apply the modifier and just delete the unwanted faces (they should be already selected):

or to use the Intersect tool  in edit mode once joined the shapes in one object as shown below:

or even play with the modifiers options, hoping to get a lucky(+) strike

(+) We may consider that lucky because it was unexpected, as we always figure out the model as if it is a real object (e.g, a paper). The truth is that we have never experienced a 2D object at all, so we tend to apply the known rules that belongs to the 3D objects, while the software isn't.

Obiuvsly the methods shown above require an extra effort in cleaning the mesh after the operation or can't ensure good results always. That's why the Volume's way is preferrable and human-predictable: I would suggest to temporarily close your mesh ( then apply the modifier and remove the unwanted faces)

Or stacking up a Solidify modifier above the Boolean to give some thickness to the to-be-cutted mesh (if this kind of shape is suitable for your project).


rotate object list (with different origins) around a single pivot Animation Nodes

You didn't show the render, so it's a little bit confusing to see what you want to achieve and ask, especially you change the question as well at the end. So if I understand incorrectly your question, please point that out.

I think maybe your are looking for the node called "matrix math".
A matrix is like an object, it contains "translation (similar to transform)", "rotation", "scale".
Matrix math currently only contains "multiply operator". The name may sound very confusing, but it allows to transform each individual matrix (ie. object).

Two images are used to states the difference between matrix math and transform matrix.
matrix math works on object's own pivot. Transform matrix works on "world origin".

There are many operator that's only available to a matrix but not a vector. Such as "replicate matrix". So sometimes it may be preferred to "compose a matrix" for distributing objects, or simply use "distribute matrix" node for doing so.

Back to the most beginning, instead of using circles' vertex, you may simply use "distribute matrix", if you really are just looking for a circle.


Blender's default font for Text Objects (called "BFont") doesn't have the Euro symbol (August 2015). Import a different font, one that does have the Euro € symbol.

obj = bpy.data.objects['some_text_object']
obj.data.body = chr(8364) * 4

This would show 4 Euro symbols, if the Glyph is present in the table.


F12/devtools like JavaScript in browsers

Using an external IDE for Blender dev.
In this example, I am going to show you my setup using VSCode on Win 10. You can use any other IDE you want and it should also work on Mac and Linux too (I never tested).
Install Python and put Blender in your environment variables
I won't explain these steps as you can find great and easy tutorials on internet. Also, you can skip this part if you already did this.
You need to install Python in order code for Blender and you need to put Blender in your environment variables in order to launch it directly from your IDE (we'll see that later).
Create an addons directory
On your computer, wherever you want, simply create a directory called srcipts and a sub-directory inside called addons.
In my case, my directories are D:\Dev\Blender\scripts\addons

Your script or addon folder will be here as shown on the image. Using a folder to organize your addon is a good practice as you will be able to add sub-folders for libraries, icons and so on.
Specify the Scripts folder on Blender
Open the User Preferences on Blender via File menu or using Ctrl Alt U.
Under File tab, complete the Scripts path in order to point to the scripts folder we just created before (do not point to addons, just to scripts).
Save the User Preferences and close blender.

Open VSCode, start to code and launch Blender
Create your code inside VSCode. In this example, I created a simple script my_script.py called My Hello Addon that prints "Hello World!" when activated using the Operator my_script.hello.

bl_info = {
    "name": "My Hello Addon",
    "description": "",
    "author": "Yann Masoch",
    "version": (0, 0, 1),
    "blender": (2, 78, 0),
    "location": "3D View > Tools",
    "warning": "", # used for warning icon and text in addons panel
    "wiki_url": "",
    "tracker_url": "",
    "category": "Object",
}

import bpy

class MyHelloClass(bpy.types.Operator):
    bl_idname = "my_script.hello"
    bl_label = "My Hello Script"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        print("Hello world!") # Replace this line by your own code
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

Now, simply type blender or blender.exe in the terminal to launch Blender.
Activate the addon
At the first start, you have to activate the addon. Open the User Preferences on Blender via File menu or using Ctrl Alt U.
Under Add-ons tab, search for our addon My Hello Addon and make it active by checking the box.
Save the User Preferences.
You don't need to do this step every time. Once the addon is registered/activated, this step become optional!

Launch the script
Now, you just have to launch the script we registered as an operator by pressing Space and searching for its name.

On VSCode, Hello World will appear in the terminal section.

The terminal section will show all the outputs from Blender and/or Python to help you to debug your code.
In my code, I decided to register the class as an operator (search via Space) but you can launch it from a button, a menu or more. You will find addon examples or tutorials on internet.
Reload your code with F8
Every time you change your code, save it on VSCode and press F8 on Blender. It will reload all the Blender addons such as when Blender is starting.
That's it!
It looks a bit complicated and long but not really. Most of the steps have to be done only once. If your setup is done, you just need to open Blender from VSCode, update your code and press F8.


Is it possible to do OpenCL rendering on Intel processors?

As it's still quite experimental and there are quite a few features still missing, it's only enabled for AMD gpus by default.  It's possible to "force" it to work on other opencl devices by setting the environment variable CYCLES_OPENCL_SPLIT_KERNEL_TEST=1
Linux
On Linux, run the following in a terminal:
CYCLES_OPENCL_SPLIT_KERNEL_TEST=1 blender

To make this permanent for all versions of blender which have the split kernel feature, put the following in your shell's initialization file (~/.profile or similar)
CYCLES_OPENCL_SPLIT_KERNEL_TEST=1; export CYCLES OPENCL_SPLIT_KERNEL_TEST

See this question for more detail.
Windows
On windows, create a batch file by putting the following in a text file:
set CYCLES_OPENCL_SPLIT_KERNEL_TEST=1
start blender
exit

Rename the file so it has the .bat extension and put it in the same directory as the blender executable (if you installed blender with the installer, in C:\Program Files\Blender Foundation\Blender).
Then press  RMB on the .bat file and create a shortcut which you can put on your desktop or taskbar for ease of running it later.


EDIT: Completely rewrote this answer, as I found a much better solution.

Basically you can connect two rigid bodies then keyframe their connection to decide when to turn it on or off.

Here's how:
After you set up your rigid bodies, select your cube, then your suction cup object, then connect the two using the physics tab. This will constrain the cube to the cup in a rigid body responsive manner (unlike ordinary constraints that make a mess).

Then all you need to do is to select the empty that represents the relationship between the two objects, and animate the "enabled" property on the constraint.

I guess you'll just have to figure out the rest about implementing this in BGE (which enables dynamically controlling animations).

Blendfile.


The command you need is 'shrink/fatten' which shortcut is Alt+S :

Once done, you can tune it with the operator panel on the left, and check the 'offset even' option which gives a more even... offset...


Is there a way to ignore subdivided areas in a particle system?

Try this settings:

Click Advanced to get extra settings
Click Even Distribution
Switch from Jittered to Random

Default settings:

Same geometry, but with this settings:


That's due to the step size being too large. Volume rendering works by a process called ray marching. In short, the volume is sampled at various distances and summed to get the total light coming from that bit of volume. The step size controls the distance between these samples.

In general, the bigger the step size, the fewer places the volume needs to be sampled, so the faster the render time. However, in return, you get these slicing artifacts.

To fix it, try lowering the step size in Properties > Render > Geometry > volume sampling (2.7x), or Properties > Render > Volumes (2.8).


Final:

Overview:

Make sure you have enabled Add Mesh: Extra Objects addon.

Add Mesh > Math Function > Z Math Surface.

Set up math function:

Z Equation: sin(x)
X Subdivision: higher will give you better resolution
Y Subdivision: set it to the lowest (3)
X Size: this is your wave length
Y Size: wave width

Go to Edit Mode and delete left and right edge from the mesh.
In Object Mode hit Alt+C and Curve from Mesh/Text.
You can change Z height by scaling wave in Z axis or finding more suitable equation.

As for the second question you can find several answers here.

Camera angle should follow path angle
Camera - follow path and change rotation

Edit 1:

Curve on Curve.

Make sure both objects has set Origin to Center of the Mass.
Set cursor to selected 'road' object: Shift+S > Cursor to Selected.
Move Sine Wave to Cursor: Shift+S > Selection to Cursor.
Add Curve Modifier to Sine Wave, select 'road' path and choose -Y (could be different based on object rotation).
Move Sine Wave along Y Axis to position it as you need.

  Note:

  You have really low units scale in this scene, and thus Math Function
  can't create big wave (I didn't knew about such limitations). So you
  need to create Sine wave with maxed X Size and
  Subdivision and after that Scale object up, or just change scene
  scale.

Blend file 1:

Edit 2:

To properly use Sine Wave with Array Modifier you will need to pay attention while creating the wave to have beginning and end as close to X axis grid line as possible. Remember to check Merge option under Array Modifier and set it to the moment when vertices will join.

And for the Camera Follow Path, you can just use Curve and Array modifiers on unconverted mesh (right after creating and cleaning edges from Z Math), then apply modifiers and after that do step 5. from original answer.


Animation Nodes - Extract single object from group to perform independent translations

Let us first simply your node tree into something that is more efficient. Since you are not using matrices and setting the rotation and locations independently, we can use a vectorized Object Transforms Output node to do both. Moreover, since you are only offsetting the location component of the matrices, we can use a vectorized Offset Vector instead. So our node tree reduces to:

If you want to edit the translation of each object independently, you can input the custom translation vectors into the offset input, for instance, we can translate the first and thrid objects in the opposite direction as follows:

What if you want to animate the rotation? Simply offset zero vectors, convert them to eulers and set them to the objects:

Want to implement a non animated offset? Add the offset vectors after the time based falloff offset:


I hate to say this but it appears that you have modeled your house wrong. In what way, I cannot say. It has some "impossible" faces. This can be fixed by going to mesh/Clean Up/Degenrate Dissolve in Edit mode.

Please mark this answer as accepted if you are satisfied.


Python scripting - append frame directly to video

By default blender don't allow to animate in editmode(i.e keyframing vertices properties). So to over come this problem you need to enable AnimAll addon at "preference->addon -> AnimAll".
This creates a new tab in right side panel of "3d port view". Go-to this panel unmark select only check box and Mark points check box.
Hope this help you.


If video tutorials are your thing, Andrew Price has made one on both types of rain.
Here is one for the big drops on a window:
https://youtu.be/sO8kw0a2ZeI
Here is one for the splashes onto wet ground:
http://youtu.be/XEZYcyi7JC0
(This is slightly outdated as it is for the internal renderer, but I think that the dynamic paint itself is applicable to cycles too.)
Edit:
Due to popular demand I will try to summarize the tutorials here. I skip the part about raindrops with trails, as your reference doesn't show any. I will also skip the compositing and lighting part of the tutorials.
Close-up raindrops
Modelling and materials
Start with a UV Sphere. Rotate it by 90° and in edit mode select one of the poles. Hit o to go to proportional editing and move the pole into the sphere to mimic surface tension. Go to the materials panel and add a Glass bsfd. Set the refraction index to 1.33.
Use this object as a template create about a dozen raindrops by pushing single vertices in from the sides. Using a reference image here helps. The point here is that raindrops aren't all somewhat rounded blobs. Instead, they can be of a variety of exotics shapes.
Raindrops courtesy of Wikimedia
When you have your raindrops done, add them to a group.
Particles
Select the object you want the raindrops to show on. Go into the particles panel and add a new particle system with hair as the type. In rendering select group and pick the one you just created. If the particles point the wrong way around, select normal and rotate the particle meshes.
Play around with the particle count, size, random size and random rotation until you are happy with the result.
Falling rain effect
(I tried to adapt this to Cycles.)
Particles
Start by setting up your particle system as you wish. To make it work with dynamic paint ensure that the display amount is set to 100%.
To make the particles show up, set them to appear as objects and make them spheres. Assign an emission material to them. To make them show up as trails, add motion blur.
Now select the object you want the rain to fall onto. In physics set it up as a collision object. There turn both particle dampening and particle friction up to one.
Select the particle emitter again and determine the frame the particles hit the ground by scrolling through the animation. Set the particle lifetime to [start of the animation] - [frame of contact] + 1 so that they die one frame after they make contact.
Caveat: make sure that the emitter and the ground are on the same layer.
With the particle object still selected go to particles > cache and set the cache step to 1. If the options are greyed out, save your file first. In particles > physics set subframes to 2.
In cache click bake all dynamics. This should take some time.
Dynamic paint
We are going to use the rain as a brush and the ground as a canvas. For this you must UV-unwrap the ground.
Wet areas
With the particle emitter selected go to physics > dynamic paint > brush and click add brush. Set the color to black and disable absolute alpha. Under dynamic paint source set the type to particle system and pick the particle system you have created. Set the solid radius to about 0.15. This value depends highly on your scene. This controls the size of the area wettened by a drop.
With the ground selected go to physics > dynamic paint > canvas and click add canvas. Set format to image sequence and set the resolution to 1024. Adjust the frame range to match the actual contacts. To make the simulation more stable, set the subframes to 5. Under dynamic paint output select your UV -map and pick the destination folder for the baked files. Under dynamic paint effects check use spread.
Finally, under dynamic paint output click bake image sequence.
Ripple effect
Next, add a new canvas under dynamic paint. Set the format and resolution as before. Set the surface type to be waves. Set spring to zero and the dampening to 0.6.
Check the UV-map as before and select a new output folder. Finally, change the file format to Open EXR and hit bake image sequence.
Splashes
Finally, select the first canvas we created and change its type from paintmaps to wetmaps. Under dynamic paint advanced, set wetmap drying to 8. Under dynamic paint initial color set the color to black.
With the particle emitter selected, set the solid radius to 0.010 and disable the smooth radius completely. Also set the paint to be white.
Once again check the UV-map as before and select a new output folder. Finally, hit bake image sequence.
Materials
Crack open the node editor for the ground. Add two material mixes and hook them up to reach other and the material output. Hook your old material up to the first one.
Add an image texture with the first image of the first maps you baked. Set the type to image sequence. Set the offset to the frame of contact of the particles. Where it says color set it to be non-color data. Hook this up to the value input of the first mix.
Add a glossy node and hook it up to the first mix. You may want to add some method of control between the image and the mix. math, color ramp and RGB curves are all possible candidates.
As some materials are darker when wet, you can play around with the color of the glossy. Keep in mind that the setup is not yet finished though.
Add the second image series we baked like the previous one. Run it through a heightmap and plug the resulting normal data into the glossy and the material you already have.
Finally, add the last image series and plug it into the second mix node along with an emission so that the emission is in the upper green slot and the rest of the material in the lower.
I apologize if this is unclear. It is difficult to compress almost two hours of video into a free words while typing with a touchscreen.
Anyway, I hope this helps.


Based on the same technique as in your glossy question, here is what i think would work:

Additionally you would maybe need a tilable image texture to make this work better than vornoi.
The glow like in the reference picture is post processed in with nodes.


Standard skinning approaches (e.g. the armature modifier) do not support collision behavior.

Self collision handling can be a bit tricky and certainly computationally intensive.

In blender you have two real options:

using physics simulations (cloth or softbody) which are difficult to
get right and slow to run (using a corrective smooth modifier after
the simulation can help a bit with looks though). They also don't
handle volume properly.
Manually creating corrective shapes for the intersecting poses (and potentially adding appropriate drivers if you are animating). This can be quite time consuming if you have a lot of poses you care about and want to drive everything for animation.


See t-s and t-v graphs of motion tracking points

This may help you get on the right track (the idea is to bake the tracked object's motion to an animation curve): Getting raw data from object track
You may need to write some python at some point, depending on the information you want to get out.
Edit to add more info quoted from the linked answer:

You can use a Follow Track constraint to 'project' a single track onto an object.

track your point, you dont need to solve the camera.
make a plane, and position it perpendicular to the camera... how you want to set this up is up to you, but it will effect the numbers you get out at the end.
add the constraint to an object, i just used the default Cube, and refer to the image bellow on how i set it up.
in the viewport image, I have calculated the motion paths, and you can see the path of the track is on the plane.
click the Constraint to Fcurve button, and it will bake the constraint to XYZ values. Edit: Some times this button doesn't work. An alternative is: Search->Bake Action
you can then write some python to convert your animation to CSV format.


Finding the source for "API Defined" custom properties

Leave them be, create your own panel.

For 2 of the 3 examples shown its pretty obvious from which addons they come. Disabling the cycles render engine to have a clean custom properties panel is IMO not the way to go, going forward.

Recommend leaving the so called "junk properties" alone. Let the custom properties panel be populated by props defined in other addons, including your own. (The scene's custom props is surely the most over-populated).  Accept that this panel fill with everyone's junk. Make your own panel that only displays what you want, where you want.

If a property is defined in an addon via

bpy.types.Object.foo = bpy.props.IntProperty(default=4)

The foo property is now available to all objects. Once set ob.foo = 3  its value is stored in blender via the custom property ob["foo"].  For a more detailed property setup like a collection, it displays in UI as "API defined".

Unregistering an addon may or may not remove the storage. Eg ob.foo is defined in an addon, and on unregister is no longer available, but ob["foo"] still persists, where set, and available when the addon registered next time.

As well as storing the value it also stores the properties of the property, eg min and max.  This can be manipulated via the objects ob["_RNA_UI"] custom property, with the key "foo" ob["_RNA_UI"]["foo"].

Hence not defining with  bpy.props as above can create, set, and add UI properties with:

>>> ob["foo"] = 3
>>> if not ob['_RNA_UI']:
...     ob['_RNA_UI'] = {}
...
>>> ob['_RNA_UI']["foo"] = {"description" : "FooBar", "driver_prop" : True, "max" : 10}
>>> "driver_prop" in ob["_RNA_UI"]["foo"].keys()
True

Now we have a custom property named "foo" description (tooltip) "Foobar" that has a maximum value of 10 and a flag indicated it is being used to drive something. All of the rna props, eg max, need to be of type int, float, bool or str.  The "driver_prop" key shows how these  can be other than the arguments of the bpy.props property.

For more info see  ./2.80/scripts/modules/rna_prop_ui.py on how to add your own "Add Custom Prop" button to your addon panel.

To remove all custom props from an object (for answer sake, not recommended)

for k in ob.keys():
    del ob[k]


How are quads converted to tris for games?

All 3d applications renders geometry as a bunch of Tris in the end. The Quads and N-gons are only a convenience for editing and gets converted by the render engine.

When you export models for a game engine you can export them without triangulate them. Most game engines will have the ability to triangulate by them self. The exported file such as FBX or OBJ does not get triangulated automatically.

The way different software chooses to split polygons differs so you really don't have that much control.

There are benefits of doing the triangulation explicitly in Blender: You know how your polygons are split so the normals will look as you intend them to. If you bake normal maps, High to Low, this matters. If you have an animated mesh you usually want to make sure that the meshes and textures deforms in a known way.

I usually add a Triangulate Modifier to my mesh and split the ones I care about manually. In this way I can get a preview of how the triangulation will look at when exported and I get to work with a (mostly) quad mesh that are way easier to work with.


Why not use the compositor to achieve this affect?

Doing this in the compositor is really easy. All you need to do is to add a lens distortion node.


search for unknown operator 'BPY_OT_OPS_OT_mesh.dissolve_limited()

I tried your script and had a few other issues aside from the one you mentioned. I tweaked it to make it work and had no issues. I bet you're getting the search for unknown operator from something else. Try going to File > Load Factory Settings to reset Blender.

import bpy
import os
import operator

class CustomPanel(bpy.types.Panel):
    bl_label = "OpenSource::Classicism XL"
    bl_space_type = "SEQUENCE_EDITOR"
    bl_region_type = "UI"
    bl_options = {'DEFAULT_CLOSED'}

    def draw(self, context):
        row = self.layout.row()
        row.label("Intro Directory")

        col = self.layout.split().column(align = True)
        col.operator("sequencer.add_intro" , text= "Import")

class Add_Intro(bpy.types.Operator):
    bl_idname = "sequencer.add_intro"
    bl_label = "Add Intro"

    def execute(self, context):

        def add_splash_screen():
            bpy.ops.sequencer.image_strip_add(directory="/home/doakey/Desktop/image.png", files=[{"name":"image.png"}], frame_start=1, frame_end=26, channel=1)

        add_splash_screen()

        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()


Match Depth of Field of Background Image

If you enable Transparent under Film, then the background of the rendered image will be transparent, allowing for it to be easily composited with another image:


How can I get a more realistic looking Tomato?

Actually, the photo you provided is not realistic since it was heavily editied to look more "juicy". You can achive the same result by doing some postprocessing effect over the rendered image.


bpy.path.abspath is appears to be messing up

As someonewithpc said, .. means one directory up. Thus,

D:\Pictures\3D Models\Models\..\..\main_car\file.xml

is the same directory as

D:\Pictures\main_car\file.xml

although the path is overly complicated (not cleaned up).

You can shorten it by realpath() or abspath() from os.path:

import bpy
import os
os.path.realpath(bpy.path.abspath(your_path))


My first thought was that the vectors from the origin of a regular unit tetrahedron are normal to the plane tangent to the sphere where the vector intercepts, and we must be able to recover the rotation from that.
We see that Wikipedia gives the rather ugly values of $( 0, 0, 1 )$, $(\sqrt{\frac{8}{9}},         0, -1/3 )$, $( -\sqrt{\frac{2}{9}}, -\sqrt{\frac{2}{3}}, -\frac{1}{3} )$, and $( -\sqrt{\frac{2}{9}}, \sqrt{\frac{2}{3}}, -\frac{1}{3} )$ for these vertices, so I wrote some Python to draw it.
D = bpy.data
from math import sqrt, radians
from mathutils import Vector

radius = 1

bpy.ops.mesh.primitive_solid_add(source='4', size=radius)

tetrahedron = C.active_object

empties = []

theta = radians(120)
vectors = [ Vector( (   0, 0, 0, 1 ) ),
            Vector( ( theta, sqrt(8/9),         0, -1/3 ) ),
            Vector( ( theta,-sqrt(2/9), -sqrt(2/3), -1/3 ) ),
            Vector( ( theta,-sqrt(2/9),  sqrt(2/3), -1/3 ) ),]
hack=[ 0, 2, 3, 1]

for n in range(4):
    bpy.ops.object.empty_add(type='SINGLE_ARROW', align='WORLD', location=(0, 0, 0))
    empties.append(C.active_object)

    empties[n].rotation_mode= 'AXIS_ANGLE'
    empties[n].rotation_axis_angle = vectors[n]
    empties[n].location = radius * Vector(vectors[hack[n]][1:4])

for n in range(4):
    bpy.ops.mesh.primitive_monkey_add(size=0.5, enter_editmode=False, align='WORLD',
        location=radius * Vector(vectors[hack[n]][1:4]) )
    monkey = C.active_object
    monkey.rotation_mode= 'AXIS_ANGLE'
    monkey.rotation_axis_angle = vectors[n]


YES! I solved the problem. Thanks to sardipax! It was very simple: the normals ofc were facing inwards bcs. I created the water mesh from the bowl/glas. Flipping the normals solved this issue.

Thanks for everyone who took care here.

Damned what a wasted night just because of such a simple mistake ... ;-)


How can I create a parabolic trajectory between two 3d points

Basics

You can use splines for that. Bezier splines to be more exact.
As input you need to have the start and end points with normals. Where you get these points from is the part where you have to be creative. I will show you here how to create splines from the mentioned input data as well as two methods how you can use this concept in practice.

Here is a basic setup that creates a spline from the 4 input values (note that I hid one socket in each Append Point to Spline node):

Next step is to create a subprogram (a group in this case) to simplify the following steps:

When you put this in a loop you can already do a lot of stuff. The main question is how much control you want to have over the result.

First Use Case

The goal is to connect the vertices of a given mesh.
I start with such a problem by breaking it down into smaller pieces.

How to select 2 random vertices from a list of vertices?

How should the basic loop look like?

Bringing it all together:

More control over the 'height' of the splines by multiplying the normal with something:

You may also want to implement a filter that eg only points will be used that have a specific distance to each other:

This method works quite well, but you don't have very much control over the individual splines.

Second Use Case

My second idea is to use two planes to control each spline. If this method is suitable for you highly depends on the amount of splines you want to have in the end.

Preparation:

Create multiple objects which consist of two planes and put them into a group.

Now I want to take each spline individually and create a spline between their centers (with the normal as direction). I again hid some sockets in the Polygon Info and Object Mesh Data node in the right toolbar.

Based on that you can easily create more splines and control them with the planes. Maybe you also want to control the length of the normal with the area of the polygon by using it as scale factor. Another idea is to use the shrinkwrap modifier to position the planes directly on a target object.


Fastest way to keep the last frame of a clip persistent

To hold the last frame simply drag the tail handle to the right. It will repeat or hold the last frame. If you want to do this in the middle of a strip then make a hard cut (not a soft cut) shift-k, this will remove the ghost handle, seen after trimming or soft cutting. You can then drag the tail out for a freeze frame again.


Fluid sim not working, no liquid is being made

All obstacles must be completely enclosed by the domain.  If not then the fluid won't bake. This quite often catches people out, me included.

I strongly encourage you to read the documentation at blender.org as it details what to watch out for in the Fluid Simulation section of the blender manual.  Good advice for any time you get stuck.


Object turns dark when using normal map in Cycles

Try including a normal map node between the image texture and the normal input of the anisotropic BDSF.

Also include a texture coordinate node to tell blender how to wrap the texture onto a mesh.


How can I force mesh to remesh along a polyline?

In response to you comments:
Apart from the Knife Project and using a Shrinkwrap Modifier, the only thing i can think of, is using a Shrinkwrap Modifier with a specific Vertex Group. You would have to manually select the vertices around the edge of the polyline mesh object.

If the vertices need to stay on the same height you could also extrude the polyline mesh object and have the Shrinkwrap Mode: set to surface.
For the "more control over the spacing and remeshing" (if you were to delete any unwanted faces) the commands Grid Fill and Triangulate Faces might come in handy. And possibly Randomize to make it look more organic afterwards.
That's all i got. Hope it helps. In any case, good luck. : )


Deleting a specific edge without affecting the face

I was trying to bevel the right bottom edge of the selected orange face, but the white edge was causing the bevel to result in a crashed shape. I apologize for the lack of elaboration in the question
A side with a hole must consist of two faces.
So I solved this problem by using knife tool to add a vertex somewhere else far from the side I was trying to bevel.


I'm not entirely sure what part of your render you are asking about, but here are some possibilities:

This appears to be caused by internal reflection of a light source (judging from the lighting, I would say the light source is behind the camera and a little to the left). Try adjusting the lighting in your scene and see if it improves.
The fluid simulation appears to be rendered at a low resolution. Try baking at a higher resolution (e.g. start with 100). If you did bake at high resolution, ensure that the Render display option is set to Final.
It's hard to say what's causing this without looking at your file, but a couple of possibilities are:

The geometry of the orange mesh. Ensure that the normals in that area are facing the right way, check for overlapping faces, ensure that there are no holes in the mesh, etc.
Bounces. Try increasing the number of Bounces in Render settings > Light paths (A fast way to increase all bounce related settings is with the presets, try the Full Global Illumination preset). This will increase the overall accuracy of the render as well, so you probably want to increase them anyway. Note that more bounces will slow down your render.

To help decrease fireflies, see this question. Some techniques mentioned there are:

The Clamp option (may or may not be very helpful in this scene, however I thought I would mention it). From the wiki:

  This option will clamp all samples to a maximum intensity they can
  contribute to the pixel, again to reduce noise at the cost of
  accuracy. With value 0.0 this option is disabled; lower values clamp
  more light away.

  If the image has fireflies, there will be samples that contribute very
  high values to pixels, and this option provides a way to limit that.
  However note that as you clamp out such values, bright colors in other
  places where there is no noise will be lost as well. So this is a
  balance between reducing the noise and keeping the image from losing
  its intended bright colors.

Render stacking. See the following posts:

Stacking cycles renders in the compositor?
Creating renders from Image Stacking using different sampling levels
How can I pause a render in progress and then resume it at a later time?

Fake refractive caustics
Filter Glossy
No Caustics (definitely not useful in this scene, as you need the caustics for light to reach the fruit, but again I thought I would mention it anyway)

See the manual page on reducing noise.


Reflections on glass over transparent background disappear in the final render

There is nothing wrong with your image, so don't try to fix it.

The issue is that the render viewer in blender is broken: the viewer won't show the pixels that are both luminous and fully transparent (alpha zero, RGB not zero) from an image with associated alpha (like the reflection on a window that have no occlusion but are only luminous).

Read: How do I get the Glare node to output transparent instead of Black background and: Render Halo material with tranparent background

View your render As RGB (without alpha channel) and you will see that your information is there.

Or just composite an image over a background using alpha over.

If you are planing to do the final composite in an app that is not blender, make sure that you save as OpenEXR, to keep the integrity of your image.


inverse kinematic animation alignement of mouvement issue

First you can see that if you make an altG the armature is completely messed up in rest pose. So you need to correct all this (if you want pole targets in front of the knees in Pose mode by default, put there in front in Edit mode as well).

But first to make things cleaner I would align the bones on the axis with some ctrlN > Global +X axis.

Now select your lowerleg bones in Bone mode and in the IK constraint set their Pole Angle at 0°.

Now if you want the knee to bend more inwards, you need to move the IK Pole Target a bit inwards in Edit mode, pole targets are here for this purpose. You can also move the knees a bit inwards. When you'll switch to Pose mode it will already work better.


This probably has to do with the timestep rate. The fluid is moving so fast that the timesteps are too little in order to accurately capture the motion, causing the "broken apart" effect you are having.
Just go into the simulation settings and bump up the "maximum timesteps" value.


What's the most reliable way of converting a material into reusable code blocks?

Make a dummy material with each node type of material.
Following on from the suggestion in comments by @MarkusvonBroady  couldn't resist....  Am waiting to see the excellent material serialization answer from you know who,
Pretty much zip the material node / inputs / outputs etc against a newly added default of same type,  and add to string buffer when not same. Have ignored any read only property and select.
Code and test Run.
import bpy
from math import isclose

LUT = dict()
BLACK = [0.0, 0.0, 0.0, 1.0]
WHITE = [1.0, 1.0, 1.0, 1.0]
ul = f'#{"-" * 44}\n'
buffer = []

def cmp(v1, v2):
    return (
        (len(v1) == len(v2))
        and all(isclose(*v) for v in zip(v1, v2))
    )

def vformat(nums, n, indent=8):
    nums = [f"{d}" for d in nums]
    return f",\n{' ' * indent}".join([", ".join(nums[i: i + n]) for i in range(0, len(nums), n)])

def fes(collection, prop, data, size, indent):
    output(
        f'{" " * indent}{collection}.foreach_set(\n'
        f'       "{prop}", [\n'
        f'        {vformat(data, size, 8 + indent)}\n'
        f'        ])'
    )

def groups_in_tree(node_tree):
    for node in node_tree.nodes:
        if hasattr(node, "node_tree"):
            yield node.node_tree
            yield from groups_in_tree(node.node_tree)

def group_io(n):
    output(f'node = nodes.new("{n.bl_rna.identifier}")')
    output(f'node.name = "{n.name}"')
    sockets = ("inputs", "outputs") if n.type == 'GROUP_INPUT' else ("outputs", "inputs")
    for skt in getattr(n, sockets[1]):
        if skt.type != 'CUSTOM' and skt.name:
            output(
                f"skt = group.{sockets[0]}.new('{skt.__class__.__name__}', "
                f'"{skt.name}", '
                f')'
            )
            output(f'skt.name = "{skt.name}"')
            dv = skt.default_value
            val = dv[:] if hasattr(dv, "foreach_get") else dv
            output(f"skt.default_value = {val}")
    output()

def colorramp(a, b):
    n = len(a.elements)
    output(f'ramp = node.color_ramp')
    compare(a, b, fstring="ramp.{k} = {va}")
    locs, deflocs = [0.0] * n, [0.0, 1.0]
    cols, defcols = [0.0] * (n << 2), BLACK + WHITE
    a.elements.foreach_get("position", locs), a.elements.foreach_get("color", cols)
    n = n - 2
    if n:
        output(
            f"for i in range({n}):\n"
            f"    ramp.elements.new(0.0)"
        )

    if not cmp(locs, deflocs):
        fes("ramp.elements", "position", locs, 1, 0)

    if not cmp(cols, defcols):
        fes(f'ramp.elements', "color", cols, 4, 0)

def mapping(a, b):
    output(f'map = node.mapping')
    compare(a, b, fstring="map.{k} = {va}")

    for i, c in enumerate(a.curves):
        n = len(c.points)
        pts, default = [0, 0] * n, [-1.0, -1.0, 1.0, 1.0]
        n -= 2
        if n:
            output(
                f'for i in range({n}):\n'
                f'    map.curves[{i}].points.new(0.0, 1.0)\n'
            )

        c.points.foreach_get("location", pts)
        if not cmp(pts, default):
            fes(f"map.curves[{i}].points", "location", pts, 2, 0)

def output(*args):
    s = " ".join(args) if args else ""
    buffer.append(s)

def compare(a, b, fstring="{k} = {va}", sockets="", i=0, ignore={'select'}):

    props = (
            (k, v)
        for k, v in a.bl_rna.properties.items()
        if (not v.is_readonly or k in ("mapping", "color_ramp"))
        and k not in ignore
    )

    for k, v in props:
        va = getattr(a, k)
        vb = getattr(b, k, None)

        if v.type in ('FLOAT', 'INT'):
            if v.is_array:
                if not isinstance(va, float):
                    va = va[:]
                if vb and not isinstance(vb, float):
                    vb = vb[:]

        if va != vb:
            if v.type == 'ENUM':
                va = f"'{va}'"
            elif v.type == 'STRING':
                va = f'"{va}"'
            elif v.type == 'POINTER':
                if k == "parent":
                    va = f'nodes.get("{va.name}")'
                elif a.type == 'GROUP':
                    return output(f'node.node_tree = groups.get("{a.node_tree.name}")')
                elif issubclass(v.fixed_type.__class__, bpy.types.ID):
                    va = repr(va).replace(f"['{va.name}']", f'.get("{va.name}")')
                elif k == "mapping":
                    return mapping(va, vb)
                elif k.startswith("color_ramp"):
                    return colorramp(va, vb)
            name = f'"{a.name}"' if hasattr(a, "name") else i
            output(fstring.format(**locals()))

def pnode(n, dummy):
    if n.type in ('GROUP_INPUT', 'GROUP_OUTPUT'):
        return group_io(n)
    nodetype = n.bl_rna.identifier
    default = LUT.setdefault(
        nodetype, dummy.nodes.new(nodetype)
    )

    output(f'node = nodes.new("{nodetype}")')
    compare(n, default, fstring="node.{k} = {va}")
    for sockets in ("inputs", "outputs"):
        for i, (a, b) in enumerate(
                zip(
                    getattr(n, sockets),
                    getattr(default, sockets),
                )
        ):

            compare(a, b, fstring='node.{sockets}[{name}].{k} = {va}', i=i, sockets=sockets)
    output()

def material_to_text(m):
    try:
        dummy = bpy.data.node_groups.get("DUMMY")
        if not dummy:
            output("import bpy")
            dummy = bpy.data.node_groups.new("DUMMY", "ShaderNodeTree")
            output("groups = {}  # for node groups")

        if hasattr(m, "use_nodes"):
            # material
            for gn in set(groups_in_tree(m.node_tree)):
                material_to_text(gn)
            nt = m.node_tree
            output(
                f"\n"
                f"{ul}#  Material: {m.name} \n{ul}\n"
                f'mat = bpy.data.materials.new("{m.name}")\n'
                f"mat.use_nodes = True\n"
                f"node_tree = mat.node_tree\n"
                f"nodes = node_tree.nodes\n"
                f"nodes.clear()\n"
                f"links = node_tree.links\n"
            )

        else:
            # group
            nt = m
            output(
                f"\n"
                f"{ul}#  NodeGroup: {m.name} \n{ul}\n"
                f'group = bpy.data.node_groups.new("{m.name}", "{m.bl_rna.identifier}")\n'
                f'groups["{m.name}"] = group\n'
                f"nodes = group.nodes\n"
                f"links = group.links\n"
            )

        for n in sorted(
            nt.nodes,
            key=lambda n: [n.location.x, n.location.y]
        ):
            pnode(n, dummy)
        if nt.links:
            output("#Links\n")
        for l in nt.links:
            output(
                f"links.new(\n"
                f'    nodes["{l.from_node.name}"].outputs["{l.from_socket.name}"],\n'
                f'    nodes["{l.to_node.name}"].inputs["{l.to_socket.name}"]\n    )\n'
            )

    except Exception as e:
        print("There has been an ERROR")
        print(e, e.__traceback__.tb_lineno)
        return False  # failure

    if hasattr(m, "use_nodes"):
        bpy.data.node_groups.remove(dummy)
    return True  # success

if __name__ == "__main__":
    m = bpy.context.object.active_material
    material_to_text(m)

    text = bpy.data.texts.new(m.name)
    text.write("\n".join(buffer))

Test Run on default "Material" with base color set to Red.  AFAICT Generates the material in test file linked Ok.
import bpy
groups = {}  # for node groups

#--------------------------------------------
#  Material: Material
#--------------------------------------------

mat = bpy.data.materials.new("Material")
mat.use_nodes = True
node_tree = mat.node_tree
nodes = node_tree.nodes
nodes.clear()
links = node_tree.links

node = nodes.new("ShaderNodeBsdfPrincipled")
node.location = (10.0, 300.0)
node.inputs["Base Color"].default_value = (1.0, 0.0, 0.0, 1.0)

node = nodes.new("ShaderNodeOutputMaterial")
node.location = (300.0, 300.0)

#Links

links.new(
    nodes["Principled BSDF"].outputs["BSDF"],
    nodes["Material Output"].inputs["Surface"]
    )

Revision
Unlike Madonna and @Gorgeous not so much of a "Material Guy".  TBH I'm a sub-feather-weight when it comes to blenders materials and nodes, so this was a nice little excersize for me.
Ultimately the idea, as I see it,  is to be able to copy a material via a script in one blend, and re-create it in another.
Default Values.
Have kept the verbosity down a bit by not outputting default values. Could turn this off with a flag.  Since non-default values are determined from a newly instanced copy they will be non-default at time of creation. As noted if the defaults change, will need to run script again.
Node Groups
Prior handled a  group node by simply pointing the node tree  to its bpy.data.node_groups item. Instead this version makes a copy of each node group used in the material. Was a very easy step, since nodes of both is a collection of nodes. To make sure the new group is used in the generated material by means of  a dictionary groups  to associate new with old name
groups = {}  # for node groups

#--------------------------------------------
#  NodeGroup: NodeGroup.001
#--------------------------------------------

group = bpy.data.node_groups.new("NodeGroup.001", "ShaderNodeTree")
groups["NodeGroup.001"] = group

could turn this on or off to use existing node groups.
Curves and Ramps.
Wired it up to generate mapping and colorramp nodes.  Used foreach_set which enables to add an arbitrary point for each extra (over default) and set from a list.
Color Ramp
node = nodes.new("ShaderNodeValToRGB")
node.location = (-345.2741394042969, 142.6455841064453)
node.parent = nodes.get("Frame")
ramp = node.color_ramp
for i in range(4):
    ramp.elements.new(0.0)
ramp.elements.foreach_set(
       "position", [
        0.0,
        0.25,
        0.45396339893341064,
        0.6530487537384033,
        0.7999999523162842,
        1.0
        ])
ramp.elements.foreach_set(
       "color", [
        0.0, 0.0, 0.0, 1.0,
        0.41859403252601624, 0.000635193195194006, 0.0, 1.0,
        0.0, 0.006493096239864826, 0.21146051585674286, 1.0,
        0.14895662665367126, 0.17292265594005585, 0.2819954454898834, 1.0,
        0.5389295816421509, 0.18324723839759827, 1.0, 1.0,
        1.0, 1.0, 1.0, 1.0
        ])

RGB Curve
node = nodes.new("ShaderNodeRGBCurve")
node.location = (211.58743286132812, 275.4912414550781)
node.parent = nodes.get("Frame")
map = node.mapping
map.tone = 'FILMLIKE'
map.clip_max_x = 0.8999999761581421
for i in range(5):
    map.curves[0].points.new(0.0, 1.0)

map.curves[0].points.foreach_set(
       "location", [
        0.0, 0.0,
        0.15146341919898987, 0.4256756901741028,
        0.24731720983982086, 0.7837838530540466,
        0.4675609767436981, 0.5506754517555237,
        0.5421952605247498, 0.8445945978164673,
        0.6585365533828735, 0.5608108639717102,
        1.0, 1.0
        ])
for i in range(2):
    map.curves[1].points.new(0.0, 1.0)

map.curves[1].points.foreach_set(
       "location", [
        0.0, 0.0,
        0.3512195348739624, 0.6621621251106262,
        0.5926830172538757, 0.3581080138683319,
        1.0, 1.0
        ])
for i in range(3):
    map.curves[2].points.new(0.0, 1.0)

map.curves[2].points.foreach_set(
       "location", [
        0.0, 0.0,
        0.16463413834571838, 0.581081211566925,
        0.5004880428314209, 0.5777024626731873,
        0.7858536243438721, 0.28378361463546753,
        1.0, 1.0
        ])
for i in range(1):
    map.curves[3].points.new(0.0, 1.0)

map.curves[3].points.foreach_set(
       "location", [
        0.0, 0.0,
        0.6782926321029663, 0.4425675868988037,
        1.0, 1.0
        ])

Frames
Added  the frames and set as parents to respective nodes, haven't wired up re the location changing, as demonstrated by @Gorgeous.


Go to edit mode and then Press "Shift + N" It will Recalculate your Normals of the Mesh
Just Try If it Helps


My mesh freaks out when I rig it, i think because it's made of separate pieces

Did you check whether the mirror modifier is applied or not and if the armature modifier comes first in the modifiers tab of the object?

If there are any modifiers active except the armature modifier I would try to apply those first.

Also, you can change to weight painting mode and assign the bones manually to certain vertices. But you might know this already.


Ambient Occlusion node in EEVEE not working

As @sacrish said, I had just forgotten to enable Ambient Occlusion in the render settings, causing it to not work.


Possible to fix a broken shape key with a copy of the model?

Copying shape keys doesn't work because they measure a difference of location from a basis, so your mesh should already know which is that basis location.

You can try selecting in edit mode the eye edgeloop, then with Ctrl++ expand the selection a certain amount of times (as needed, but count them), P to separate the selection.

Do the same with the other mesh, then swap and Join (Ctrl+J) the meshes, remove doubles and adjust where necessary.

If this method doesn't work I think you need a little Python script to copy location only, of selected vertices from one object to another.

Consider also the idea of starting from the correct mesh and copying all other vertex data from the textured one (Shift+Ctrl+T for vertices/edges/faces infos; select target, shift select source, Ctrl+L "transfer UV map").


You can go to the Sculpt mode, and use the Strength brush.


Anyway To Material Paint This Complex Geometry?

It looks like you're doing this in edit mode. In which case, this script (it's not free though) might be what you're looking for- it's the only one like it I've seen: https://blendermarket.com/products/accent-pro-edit-mode-layers

Otherwise, you can edit it without if you very carefully select faces you want to apply a material or paint, invert the selection, and use "H" to hide the selection you don't want to paint.

As far as key-framing the textures to change, unless someone answers it first, I'll look into that...

You'll have to be more specific about what you mean when you say you want it to be circular and change materials. Do you want to animate the mesh or the textures on the mesh?


Where I can find the filepath to a texture used in the Image Textue node?

Click on the Image Texture node, hit N to open up the Properties Panel on the right side, go to Item > Properties and you'll get all image properties like the path, size, color space etc.:

See: https://docs.blender.org/manual/en/latest/render/shader_nodes/textures/image.html


Duplicating non primitive mesh with Python

You can create a copy of the Mesh datablock, create a new Object, position it where ever you want and attach it to the current collection/scene like this:
Blender 2.8x
import bpy

C = bpy.context
me = C.object.data # use current object's data
me_copy = me.copy()

ob = bpy.data.objects.new("Mesh Copy", me_copy)
ob.location = (1,2,3)

# Link object to the collection in context
C.collection.objects.link(ob)

# Update the view layer
C.view_layer.update()

Blender 2.7x
import bpy

me = bpy.context.object.data # use current object's data
me_copy = me.copy()

ob = bpy.data.objects.new("Mesh Copy", me_copy)
ob.location = (1,2,3)

scene = bpy.context.scene
scene.objects.link(ob)
scene.update()

You may also duplicate the original object. If you set the new object's data attribute to the original mesh datablock (no mesh copy created), it will be a linked duplicate.


Blender Game Engine - How i can make my turrets aim the enemy that’s closest to the village?

I believe that your question has already been posted and answered on blenderartists here

.blend file here

======================================================================

Additional info:

Q:

  what’s the difference module vs script in the logic bricks??

A:

  script is for 1 object to use, module can be used by multiple objects, so instead of 1 tower you could connect 100 to it.

#Logick Bricks : (Always -> Python-Module track_to_closest.track -> Edit object - Track_to)
# and a property "track_distance" on the object using this script
# and place a property on the objects you want to track to: called track_to

def track(cont):

    own         = cont.owner
    scene       = own.scene
    track_to    = cont.actuators['track_to']

    ai = [obj for obj in scene.objects if 'track_to' in obj]

    if ai:

        closest_ai      = sorted(ai, key=lambda enemy: own.getDistanceTo(enemy))[0]
        distance        = own.getDistanceTo(closest_ai)
        max_distance    = own['track_distance']

        if distance <= max_distance:

            track_to.object = closest_ai
            cont.activate(track_to)

        else:
            cont.deactivate(track_to)


Join duplicated side back on to side duplicated from

Thanks Mr Zak - it worked.

In my particular version of Blender (2.77) I first had to select the side - select the Magnet symbol, select the Cube symbol right beside it to select the "Snap Element" (Volume, Face, Edge, Vertex or Increment) and then position it they way it needed it.


Add a Monkey (Shift+A)

Add a Circle (Shift+A) set the vertices say 10 or 12 (left hand panel or press f6)

Select the monkey and then the circle (order is important here)
Press ctrl+P -- object

Go to the object panel right hand in duplication section select verts

press ctrl+Shift+A then

press ctrl+J


River simulation - different approaches than fluid simulation?

Make a Procedural River using the Ocean Modifier

This technique for creating a river allows the flow of the water to follow the path of the river easily. To do it, simply create an long, narrow Ocean object, then add a Curve Modifier to it.

Create a plane:  SHIFTA -> Mesh -> Plane
(NOTE: For this technique to be easy, DO NOT move the plane away from where it is created -- the 3D Cursor is where it is created)
Add an Ocean Modifier to the plane. You may want to scale down the resulting mesh.

Lengthen the Ocean object along the X axis by increasing the Repeat X value. This will be the river object:

Add a Path Curve:  SHIFTA -> Curve -> Path
(NOTE: Again, for this technique to be easy, DO NOT move the path away from where it is created -- the 3D Cursor is where it is created, so it will appear right on top of the river)
Scale the path so it is a little bit bigger than the river, then position it so it is in the middle of the river:

Scale: Select path -> S -> drag mouse
Move on X Axis: Select path -> G -> X -> drag mouse
(NOTE: This is the one time you can move the path until you reach Step #10 below)

With the path selected, go into Edit mode and subdivide the path as many times as you have bends in the river. In your river, you have one bend, so just subdivide it one time:
Select path -> TAB W -> Subdivide -> Exit Edit Mode (TAB)

Select the river and add a Curve Deform Modifier to it and set the Object to the path:

This makes the river mesh conform to the shape of the path.
Now move the river so it is fully on the path:
Select river -> G -> X -> drag mouse

Edit the path so it is the shape you want your river to be:

Position the river on your landscape. To do this, you MUST move both the path and river together, so select them both, then move them:
Select path -> hold SHIFT while selecting the river -> G -> Position them
If you want to make the river narrower or wider in certain places, you can do that by select one of the vertices of the path and altering it with ALTS:
Select path -> TAB -> select vertex -> ALTS -> drag mouse

Animating the River

To make the river flow, you now need to animate it's properties by setting keyframes for the Ocean Modifier's properties.


Does HDR sky resolution change a lighting?

Resolution of HDRi doesn't change strength of light too much.
Resolution have an influence on sharpness of shadows.
Probably not visible too much between 2K / 8K, but for lightning with 256px result visibly differs (see end of cube shadow). Small sharp point as light source (like sun) produce sharp shade, in small images it can be just a pixel, but usually is divided into several and also small image means bigger pixels in environment.
You can test it by your self if it matters in your case. Render them and if not noticable you can even try blend renders by Difference type to see per pixel differences.
Surprisingly for me it affects noise in render too.
Probably texture shoots light per pixel, so more pixels - more light rays ...? Anyway you would have to render with more samples fór lowres HDRi, than with highres HDRi, to get same quality.
In those two images I changed only HDRi texture resolution ... same samples.
256 px

8 K

Bigger issue can be a reflection.
... in case you have any visible in render.
256px / 8K

In case you need lowres environment HDRi texture for it's size, people use jpg version of HDRi in highres for just reflections. World node tree - Light path > Reflection Rays as factor.

I can't find the specific article of Greg Zaal, but you can check those as well Link1 or Link2.


How can I reverse the direction of bones in my armature?

Switch Direction of Bones

Thankfully Blender has a simple command that will reverse the direction of selected bones called "Switch Direction". You can access this two different ways:

Select rig > Tab > select bones > Specials menu (W) > Switch Direction
Select rig > Tab > select bones > 3D View Header > Armature menu > Switch Direction


Is there a way to update my empty image? Edited in another program, saved

you can find path to external data in File > External Data > Find missing file
or in the Texture paint or UV editing under image > Reload (Alt+R)


Trouble getting video as plane to show it's image

I really won't recommend the method you are going with it is seriously troublesome and tiring. I would say use blender's built-in Video editor. You can create the effects as separate projects. In the project, go to render settings and go to film and click transparent or transparency (depending on the version you are using). Something like this:

After rendering this in OpenEXR format. The thing is most video codecs don't support alpha channels and the ones that do, aren't available in blender. So you can take the image files, plop them into the video editor built-in blender or use some 3rd party-software like kdenlive or Davinci Resolve. You can take the video file and the effects file and it will work.
Alternatively, if you still insist on using it as a background image/video. DO this. Click on the camera and go to the camera settings. Enable background images and click on the dropdown. There, click add image and click on the open button. The file explorer should pop-up and then locate and select the video file. It will come as the background video and you can happily throw in whatever effects you want. Here's the video edition of the method (WARNING: This is not the total tutorial about what you want but shows a few steps on this method and you may find this helpful):
https://www.youtube.com/watch?v=kfGXRsaBf5U
I would personally go with the 1st method but you can go with the one you prefer. Hope it helps.
P.S I also found another QnA that is related to your problem. Check it out. Link's below:
Movie Clip On Plane


edit mode grab tool doesn't work as expected

Your vertices and edges have been inadvertently set to be split automatically. Find the Options pulldown in the very top-right of the 3D View. Inside of it is the checkbox.

NOTE: If you don't see the Options pulldown at the top right of your screen, it may be that your Tool Settings bar has been disabled. To re-enable it, float your cursor just to the outer edge of any  one of the clickable buttons at the top of your 3D view (such as the buttons for View, Select, Add, etc.), but without your cursor actually touching those buttons. When your cursor changes from a cross to an arrow, right click, and you will get the option to turn on the Tool Settings. Then you will see the Options pulldown. From there you can turn off Split Edges & Faces.


Enter in the edit mode of the curve, select a control point, use Ctrl + H as shortcut select Hook to New Object.

Blender will generate an empty as a helper get out from edit mode and select the empty and after that select the rigg enter in Pose Mode, select the bone that you want to relate the control point of the curve (or the emty object) and use  Ctrl + P , from the menu select Bone.
Repeat this for every control point of your character.

It`s hard if you have a lot of curves, try to trick it with other techniques.

Model the character in mesh, use Multiresolution and sculpt the tubes after you increase the multiresolution to 4 or 5. After you finish the sculpt reduce the Multiresolution to 0 for prewiev and 4 or 5 for render. Rigg the character.

Add 2 or 3 tubes with the bezier curve technique just for effect.


How do I make a face between the inside of an outer mesh with the outside of an inner mesh?

I was able to do it by selecting the vertex group with the outer 4 vertices of the bounding box and then Mesh -> Faces -> Fill or Alt F to "Fill a selected edge loop with faces".  I'm still open to a solution that is more correct.


No Compatible GPUs found ... Blender 2.8 User Preferences

The requirements for GPU rendering are higher than the minimum requirements for running Blender.

  Supported Graphics Cards

  These requirements are for basic Blender operation, rendering using the GPU requires slightly different requirements.

The manual states that CUDA compute capability 3.0 or higher is required for GPU rendering. Graphics cards that do not meet that requirement will not be listed in the preferences.

  NVIDIA CUDA is supported for GPU rendering with NVIDIA graphics cards. Blender supports graphics cards with compute capability 3.0 and higher. To make sure your GPU is supported, see the list of NVIDIA graphics cards with the compute capabilities and supported graphics cards.

The Nvidia website lists the GeForce GTX 670M with a compute capability of 2.1, which does not meet the requirements for GPU rendering.


How can i create a shortcut that will hide an object from viewport and render?

You are right, Ctrl+H is now used for Collections.

So i wrote a little add-on that does what you asked for, as it's not possible to set the H key to do more then one function without.

Here the code, you can just copy, paste it in a text editor (blender has one too) and save it as "hide-unhide.py" and afterwards install it in Blender from the "Preferences" "Add-on" section.

bl_info = {
    "name": "Hide selected/hide not selected and unhide from View&Render",
    "author": "Xylvier",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "",
    "description": "Hides selected/not selected and unhides objects from view and render at the same time",
    "warning": "",
    "wiki_url": "",
    "category": "operator",
}

import bpy

class HideselectedSet(bpy.types.Operator):
    """Hides selected objects from render&viewport"""
    bl_idname = "object.hide_set"
    bl_label = "Hide selected Objects from render&viewport"

    @classmethod
    def poll(cls, context):
        return context.selected_objects is not None

    def execute(self, context):
        for ob in context.selected_objects:
            ob.hide_viewport = True
            ob.hide_render = True
        return {'FINISHED'}

class HidenotselectedSet(bpy.types.Operator):
    """Hides not selected objects from render&viewport"""
    bl_idname = "object.invhide_set"
    bl_label = "Hide not selected Objects from render&viewport"

    @classmethod
    def poll(cls, context):
        return context.selected_objects is not None

    def execute(self, context):
        for obj in bpy.data.objects:
            if obj not in context.selected_objects:
                obj.hide_viewport = True
                obj.hide_render = True
        return {'FINISHED'}

class UnhideSet(bpy.types.Operator):
    """Unhides selected objects from render&viewport"""
    bl_idname = "object.unhide_set"
    bl_label = "Unhide Objects from render&viewport"

    def execute(self, context):
        bpy.ops.object.hide_render_clear_all()
        for obj in bpy.data.objects:
            obj.hide_viewport = False
        return {'FINISHED'}

def register():
    bpy.utils.register_class(HideselectedSet)
    bpy.utils.register_class(UnhideSet)
    bpy.utils.register_class(HidenotselectedSet)

def unregister():
    bpy.utils.unregister_class(HideselectedSet)
    bpy.utils.unregister_class(UnhideSet)
    bpy.utils.unregister_class(HidenotselectedSet)

if __name__ == "__main__":
    register()

That said, you will have to adjust 3 keybindings in the keymap.

Go in the preferences, under keymap and open 3D View > Object Mode > Object Mode(Global).

Scroll down to find these 3:
"Show Hidden Objects"
"Hide Objects"
"Hide Objects"

Deselect them, no need to delete, like in the picture, after deselecting the 3 keymappings, we need to create 3 new ones to keep the functionality:

object.unhide_set for Alt+H
object.hide_set for H
object.invhide_set for Shift+H

Those keybindings will work only if the add-on is installed and activated though, as the operators called by the keymappings are the 3 operators registered in the add-on.
With that you have the same functionality as before, just that it affects viewport and render. BUT read below.

Word of caution:
While this works for objects, as was asked, be aware that the deeper functionality of blenders base hide and unhide as well as the inverse hide work for everything. Vertices, edges and faces and uv meshes. To incorporate all that as well would be a bit bigger task. So i mentioned that it's better to not delete the default keymaps, but instead deselect them.


Why can't I set the object on a many modifiers?

In the object drop down menu of the armature modifier, you can select armature objects (bones), and not mesh objects.


Is there any way to save different Startup Files?

Not currently natively supported, but it is planned for future 2.8 versions.

However nothing stops you from having several template files saved somewhere safe in your computer, and opening them as startup templates.

Create a "Startup Files Library" somewhere in your hard drive, and save all your desired startup files there.

You can add the folder as favorite to Blender's built in file manager, and readily open any file from there whenever you require a specific task.

If you open them frequently they may even get listed in the splash screen at startup for easier access.

One other neat trick you may use is to manually lock your recent-files.txtas read only, and manually edit it to include only your desired startup files, if you don't mind loosing the convenience of having other recently opened projects readily accessible that is.

It is just a simple plain-text file with one file path per line, so you can edit it externally with any notepad like or programmer's plain-text editor editor.

If you know how to code you can also use the Python API or create an addon for your convenience.

You may also create several desktop shortcuts (or Start Menu or saved them anywhere else you like) each with a different command line parameter, specifying a passed file for Blender to open, effectively starting it as a template. All you have to do then is Save-As to the desired location.


How can I join the geometry of intersecting faces/planes and then remove parts?

Separate, add Boolean Modifiers, then Rejoin

You can achieve this by:

Separating the different planes into different objects.
Adding a Boolean modifier set to either Union or Intersect on both of your planes, then applying both modifiers. The result is that both planes will have perfectly made edges where they intersect.
You can then Join them into one mesh and edit parts of each as you wish without disrupting the textures of either plane.

For example, here there are 2 intersecting planes, both part of one object:

Here's how you begin:

Select the object, enter Edit mode (TAB) and then separate each plane to be it's own object with the following method:

Select one plane → Separate (P) → Selection

Repeat this until each plane has been separated, then exit Edit mode with TAB.
NOTE: Do not move either plane from it's location so they will still be in the proper place when you rejoin them back to the larger object at the end.
Add a Boolean modifier to each plane:
Select plane → Object Properties panel → Modifiers tab → Boolean

Set the Operation to Union or Intersect
Set the Object to the other plane

For example, here is the modifier added to the "Blender Logo plane":

And here is the modifier on the "Blank plane":

Click the Apply button on both modifiers
Select both planes and the larger structure they were part of, then use Join (CTRLJ) to join them back into one mesh again

The result is you now have one mesh object with perfectly marked edges where the planes intersected, and you can edit the faces as you wish without disrupting the textures:

NOTE: I'm using 2.70a and there may be a bug in the Boolean modifiers: I noticed that sometimes when I clicked "Apply" on the modifiers, the planes disappeared sometimes, and other times they behaved oddly. If this happens, just use Undo (CTRLZ) to go back to before you clicked "Apply" and try again. Eventually it worked for me.
:)


Python: Checking whether a certain shapekey exists at active mesh

You can test whether a collection has an item named 'foo' with 'foo' in collection. So
def active_object_has_keyblock(name):
    ob = bpy.context.active_object
    if not ob or ob.type != 'MESH':
        return False

    mesh = ob.data
    if not mesh.shape_keys:
        return False

    return name in mesh.shape_keys.key_blocks


How do you create mask and "give it a diffuse shader" in this tutorial?

I guess you are confusing some concepts here.
You CANNOT combine the results you "save" in different render slots in the composite. (Unless you save them to a file and import them later on. But that's not what you want to do here.)
These Slots are mostly for comparing versions/settings of your render.

What you want to do, however, is add another render layer. (look at the right in your screenshot.) Use the [+]-Button to add a new render layer. You need separate layers for the planet and the atmosphere.

You should have something like this:

In this example, the first layer contains the Planet and the second contains the Atmosphere.

If you render this, that's what you'll see in the compositor:

THEN you can combine the results in Compositing.

HERE you can read more on render layers in Blender.

Hope this helps!

EDIT (answering the additional part of your question)

1)

To get more outputs from the first node, you need to select more render Passes for the render Layer, like so:

Here I selected all of them, just to show you.
However, to get the node, as seen in the Screenshot, just select "Emission".

The rest seems to be unnecessary. But I selected them as well, just to show you. (Note: Z = Depth in the current version of Blender)

2)

Those are Glare Nodes, set to "Fog Glow":

2a) The Add Nodes are NOT math nodes! - These are Color Mix nodes. Get them here:

You can click on the top right icon of the node to toggle the preview.

3) This node is a Lens Distortion

Find it here:


To have bigger scales set the texture's X and Y size, in the mapping section, to the value between 0 and 1, e.g 0.5 Repeat is necessary only with values bigger than 1.


The simplest (or maybe fastest) way would be add some squared light for the baloon surface to reflect.

In blender cycles, for baloons try a red glossy (adds some mirroring), and add a "light" shaped like a window (either four planes in a square pattern or a single "light" plane with an opaque cross frames in front), with its material set to "emission" (cycles).

In blender render, the baloon material should have a degree of "mirroring" and the light could be four planes with a white material having "emit" shading.

It's a matter of experimenting a bit.

If you need a whole complex natural environment reflected in the baloons, like trees, building, people, etc. only then you need really to use hdri.

basic blender render example:

I edit my answer to add some more, as asked by the OP.

If you would like to absolutely avoid other reflections, you could use environment lighting, instead of lamps like this (blend file will follow), or an area light instead of sun, or some more tweaks to avoid that big specular..

I'll check your blend file later (and add mine) to find why you have those very soft edges...

here is mine... http://amrc.altervista.org/wp-content/uploads/2015/10/baloons.blend_.zip

also keep in mind that stock image could also be post processed later to get a perfect result... this is quite common to achieve artistic results.

ABout your soft "window" reflection edges, they are due to your setting for the glossy bsdf node (you have a quite complex node setup in this file!)

set it to 0 for perfect sharp result, or adjust to your need

like


Can a model be both smooth and flat shaded?

You can choose which parts of your model are flat or smooth shaded from the W specials menu. Make a selection of faces and choose Shade Smooth or Shade Flat depending on what you want to achieve.


Where is the collapse edges option in 2.70?

Dynamic topology behavior was updated in this commit:

  This allows you to choose between subdivide edges, collapse and both. Being able to
  only collapse edges can be useful to simplify meshes with accidentally introducing
  more detail.

The collapse short edges option was renamed to collapse edges.

Is this what you are looking for?


How to export a 3D object from blender to adobe after effects

Bartek Skorupa has an addon that lets you export objects and camera to an AE script that you can run in AE to recreate the scene.

http://cg.bartekskorupa.com/b2ae/


You can change the view with this in the N panel:

Lens controls the field of view, start and end Clip control near and far.
For more control on left, right, bottom and top, you'll need to use a camera and change resolution. In viewport, it's display size.

for walk/fly mode, use shift+F. for parameters, in user prefs, input tab, view navigation : walk and gravity for a FPS like (WASD + V jump, space teleport) movement.

with gravity, you need a ground (plane or any object).


Select the face that is not behaving properly. Press 'x' and choose 'Only Faces'.
And fill it again with selecting two edges and press 'f'.

I hope this helps!


How do I eliminate the white outline on my layered textures?

The white artifacts are from the white background of your pattern images and the way you mix them.
A transparent PNG file has 4 channels (RGBA). The red, green, blue channels (RGB) create the color image. It's the colored pattern on a white background in your case.Note: There is no real foreground and background color, just an area of pixels.
The alpha channel (A) is a grey value image. It's automatically used as a mask by most image viewers. A black (0) means transparent, a white pixel (1) means the final image is opaque at this spot.
To avoid harsh edges the alpha mask is usually blurry and has grey values (between 0 and 1) at the edges for anti-aliasing.
You may have created the images as vectors but the PNG file format is a raster image format - unlike SVG which is a vector format. So there are grey pixels.
You can see these grey pixels of the alpha mask in Blender when you just use the Alpha output of the Image Texture node:

This is original image:

Long story short, how to get rid of it?
You could use a Color Ramp node to map the grey values. But this also destroys the anti-alias effect and you will get blocky edges.
After a short consideration, you come to the conclusion that you don't really need the color information. You can take a B/W image, which separates the image into the foreground (pattern) and background color. That is, you simply colorize it in Blender.

With help of the Fac values, you can blend between the 2 foreground colors and 2 background colors.
After looking at it, you can move this all into a Node Group:

Now you have 2 foreground colors to choose from, 2 background colors, and 2 mix values to blend the colors 1 and 2. The mask image defines the pattern. I've used the Alpha slot here but all you need is a B/W (grey value) image. Of course, you can use another image for the color slots. And you can have it all without any artifacts.

Example with 3 masks to replicate the given image in the question:


Compositor's Corner Pin node does something odd to input image

While I cannot be certain, I strongly suspect that you have been greeted by one of the many reasons that PNGs are a cancer; their alpha values are unassociated by design, making them an absolutely worthless default in a visual effects / CGI context.


Can Blender use a GPU's remotely? (over a network)

No, there is currently to have a local Blender instance access a remote GPU to make use of it from Cycles. *

There is a network-rendering component to Cycles however this isn't ready for production use, and nobody is actively developing it.

Alternatives:

Use a render farm (send your files to the server).
Use a remote-desktop login to the faster system (using standard remote desktop access).

... though realistically you may be better off to get a computer that supports swapping out graphics cards.

* Probably this has done under some special conditions, however I'm not aware of this being something you can do right now with off-the-shelf software and hardware. And while rCuda exists its only free for academic use, and Cycles would need to be modified to support it.


Blender equivalent to “select similar” in Max


The following snippet iterates through the objects in the scene and checks if their name matches a prefix. If it does it's added to the list.

objs = [obj for obj in bpy.context.scene.objects if obj.name.startswith("pad")]

If you want to select them, as in selecting them in the scene, then you can do the following for 2.7x:

for obj in bpy.context.scene.objects:
    if obj.name.startswith("pad"):
        obj.select=True

For 2.8:

for obj in bpy.context.scene.objects:
    if obj.name.startswith("pad"):
        obj.select_set(True)

You could also use:

bpy.ops.object.select_pattern(pattern="pad*")


This definitely looks like two meshes. May be a duplicate, hidden in Viewport, but visible while rendering? If you can't solve the issue, consider uploading your blend file.

Edit: After checking your file, it's clear that overlapping faces are the reason for your problems. Look at the screenshots, I raised some part of your mesh. You need to remodel your mesh, to avoid intersecting faces.


How to link an existing node group via Python script

import bpy

#you need to somehow specify the material(maybe loop through a few?..):
node_tree = bpy.data.materials['Material'].node_tree
# And a node group that you have in the file:
node_group_name = "NodeGroup"

nodes = node_tree.nodes
links = node_tree.links

# Let's at least check if some image node and output node exists
# you might need a way to determine which ones to use if there are multiple
image_node = output_node = None
node_group_exists = False
for node in nodes:
    if node.type == 'TEX_IMAGE':
        image_node = node
    elif node.type == 'OUTPUT_MATERIAL':
        output_node = node
    elif node.type == 'GROUP': # in case the script was used already
        if node.node_tree.name == node_group_name:
            node_group_exists = True
            print('exists')
            group_node = node

if output_node and image_node:
    if node_group_name in bpy.data.node_groups and not node_group_exists:
        group_node=nodes.new("ShaderNodeGroup")
        # Creating the group is not enough, we need to specify data(node tree) for it
        group_node.node_tree = bpy.data.node_groups[node_group_name]
        group_node.location = (0,0) #This is default anyway,  but in case you wish to move it

    links.new(image_node.outputs[0], group_node.inputs[0])
    links.new(group_node.outputs[0], output_node.inputs[0])


Making an elastic waistband on clothing?

You may achieve the effect you want using a cloth pinning.

In Edit Mode select the vertices around the belt and ankles areas. Create a new vertex group and call it 'pin'. Assign vertices to that group.

In the Cloth settings check the Pinning checkbox and input the 'pin' group name below.


Bezier curve-based mesh's front surface is not appearing

In this version it could be one side surface only. In 2.81 go CURVE => 2D => FILL MODE: BOTH. If you don't won't to update the software convert it to mesh and create mirror etc.


UV unwrapped ico sphere not showing up in UV editor

You're on the Render Result image in your UV editor.  Render results don't have texture coordinates.  Use the Image menu in the UV editor to load an existing image or create a new image.


I found it after browsing through the api and checking out some other people's code.

import bpy

scene = bpy.data.scenes['Scene']
scene.timeline_markers.new('F_01', frame=1)

see TimelineMarkers for more info


OSX Unrecognized Arguments Terminal Render

The issue isn't with Blender. It's with the command you're running. Using the open command is fine for opening applications, but it doesn't allow you to pass arguments to the application (as far as I know).

You want to call the executable directly with:
/Applications/Blender/blender.app/Contents/MacOS/blender "/Users/schultz/Desktop/Blender/slave.blend" --addons netrender -a -noaudio -nojoystick

Calling the executable itself will allow you to pass arguments to Blender.


The absorption node seems to be what you are looking for.

You can also add surface shaders on top of the volume shaders, for example:


ID property sortkey

Test script to demonstrate adding an ID prop as a sort key.  Creates two groups from scene objects "Group1", the second,  "Group2", in reverse order and adds a sort key  add_key(group)

Saving and reopening the file and group.orderred_list returns "Group2" still in reverse order, as created.

import bpy
context = bpy.context  # for testing

def add_key(group):
    # simple integer key
    key = 0
    # add an IDProp key for each group object
    for o in group.objects:
        o[group.name] = key
        key += 8

    return None

def sorted_group(group):
    def key(obj):
        # key is groupname prop if set else 0
        return obj.get(group.name, 0)

    g = [o for o in group.objects]
    g.sort(key=key)
    return g

bpy.types.Group.orderred_group = property(sorted_group)

# test calls
scene = context.scene

obs = [o for o in scene.objects]

for name in ["Group1", "Group2"]:
    print(name)
    group = bpy.data.groups.get(name)
    if not group:
        group = bpy.data.groups.new(name)
        if name == "Group2":
            obs.reverse()
        for o in obs:
            group.objects.link(o)
        add_key(group)
    elif name == "Group2":
        sl = group.orderred_group
        # reorder by unlink link
        for o in sl:
            group.objects.unlink(o)
            group.objects.link(o)

    print(group.objects.keys())


Add horizon line and grid lines to render image

The feature you are looking for does not exist, The laziest solution would be to just create a plane and sub-divde it a few times and apply a wireframe modifier.


Trying to retrieve current frame number for use in Cycles particle age material

One way is to animate it:

Add a value node (⇧ ShiftA)
On the first frame set the value to the frame number (in this case 1) and press I while hovering over the input field.
Do the same for the last frame.
Change the keyframe interpolation to Linear (T) in the graph editor.

Ideally you could just type #frame into the value node, however it seems the value only updates when you toggle in and out of edit mode (or in some way cause the object to re-evaluate). It doesn't update automatically when rendering :/

Hopefully this will be fixed with the new depsgraph :)


Difference between 'Bounding Box center' and 'median point' pivot?

for the second question :

the bounding box center is not the same as median center :

-The Median center is calculated as the average of all selected points ( vertices or object centers ) so it depends on the density distribution of the mesh

-The bounding box : is the smallest box (Cube ) that can contain the mesh of an object while aligned to the local space

-The bounding Box center will always be at the center of this bounding box regardless of the density distribution of the mesh inside


How to render LINE particles in cycles render?

As of Blender 2.82, Cycles only renders Objects and Collections as particles (Blender docs link here)

However, here's a solution that might be helpful.

You can create an object shaped like a line (a long rectangle):

And then use it as the Object your particle system is rendered as. Set the rotation to orient along the velocity, and make sure to check "Dynamic" in the rotation section so it updates the rotation as the particles move or bounce.

Here's a quick view of what that generates:

Hope that helps someone Googling this in the future-


"With Automatic Weights" not correctly putting weight in my model's clothing

From the images you've provided it shows, that the body and cloths are different meshes. Bones would have to be close to/touching/pertruding cloth meshes to provide correct-ish automatic weights. I don't recommend this approach though, cause it will never give totally satisfactory outcome. To get it done properly you have to join parts of the body (hends, neck, feet) with the cloths. In my opinion though, better solution is to separate cloths and shoes meshes from the model and parent them separately to the same armature as body, then add mask modifier to the body to hide parts of it, that are hidden by the cloth, but can protrude during animation.


you did something, which Blender does not support this way.
You cannot put a particle system as rendered object for another particle system.
If you change the rendered object to e.g. path here:

then Blender renders something - of course NOT what you want. But this answers your question.
Then you get this render output:

By the way: Why did you use hair as particle system? For trees the "normal" particles are good to go...


Blender 3D-View: Objects aspect ratio off

Set the resolution to 1366 x 768 pixel, your (weird) screen's native one, if your graphics card allows it.


Change the value of NurbsObject().data.splines[a].points[b].co, checking points[b].select if you'd like to restrict to only currently selected points:
def AnisotropicRandomizePoints(scale=(1,1,1,0), points=None):
    """Anisotropically randomize the coordinates of NURBS points.
    Accepts a sequence of length four as its first argument,
    with the first three elements scaling the randomization
    applied to X, Y, and Z coordinates and the fourth element
    scaling the randomization applied to W respectively. Uses a
    given list of points if specified, otherwise uses all selected
    points in the active object if in Edit Mode or all points
    in the active object otherwise."""
    import random
    import bpy
    if points is None:
        points = [p for s in bpy.context.object.data.splines for p in s.points if p.select or bpy.context.mode not in ('EDIT_CURVE', 'EDIT_SURFACE')]
    points = [*points]
    for p in points:
        for i, v in enumerate(p.co):
            p.co[i] = v + (random.random()*2-1)*scale[i]

(Do AnisotropicRandomizePoints(scale=(1,1,0,0)) to restrict randomisation to the XY plane.)


Blender Python select stored object without name

bpy.ops don't return items like that.

Instead, you want to work on the cameras and objects data blocks directly, like so:

camdata = bpy.data.cameras.new(name="Camera A")
a = bpy.data.objects.new(name="Camera A", object_data=camdata)

Then, link it to the currently active scene:

bpy.context.scene.objects.link(a)

You could then select the camera either, by just doing:

a.select = True

or by doing

bpy.data.objects[a.name].select = True


How to pass multiple operator properties via UI layout?

There may be other ways, but that's the easiest. Instead of using operator()'s return value (an OperatorProperties) right away, capture it in a variable, and assign them there:

props = row.operator("my.button", text="Button text")
props.foo = 5
props.bar = "Bar"
props.baz = True


So the way blender exports normal object actions is that every action that can be applied will be applied to an object, I would recommend doing the animation with a rig, but you can also switch tick these boxes off and it should export as one animation.


Blender 2.8 - Python - "active" removed from API - How to pick active object now?

bpy.context.object seems to still work just fine with an extra bonus of less typing.

You can use the autocomplete function(Ctrl+Space) in the Python Console to find out how things are in 2.80 as well as in previous versions.


To control the Bind of the Surface Deform Modifier with Python

Set the object active (and preferably, use the new modifier name instead of a constant name).
import bpy

obs             = bpy.context.selected_objects
modifier_type   = 'SURFACE_DEFORM'
modifier_target = bpy.data.objects['Plane']

for ob in obs :
    # Set the object active
    bpy.context.view_layer.objects.active = ob
    modifier = ob.modifiers.new(name=modifier_type,type=modifier_type)
    modifier.target = modifier_target
    bpy.ops.object.surfacedeform_bind(modifier=modifier.name)


As a general rule, rigs do not import from one application to another. You may be able to transfer bones or keyframes in some cases using formats like FBX, but nothing more than that. Things like IK, FK/IK switches, constraints, links to shapekey(blendshape) controls and so on are application specific. The only way to transfer them is to have a purpose-built script on the import side that recreates all of these in the new app. One does not exist for HumanIK in Blender that I am aware of.

If you have a Maya character that you want to add to a Blender scene, you are much better off either posing/animating it in Maya and sending over an Alembic cache, or re-rigging the character from scratch in Blender. While an FBX file may be able to transfer the bone structure, tearing it down to something you could make a Blender rig out of would likely be more work than just making a new Blender rig, or using an existing Blender rig or tool (such as Rigify).


Is it possible to shift faces by using "square" loops

You could probably do this easily with a Follow Curve constraint on a bunch of plane objects.

Create a simple square mesh with desired dimensions (example $2$ x $2$)

Create a rectangular Bezier Curve object that has an exact $5$ x $4$ squares in dimensions (for squares of $2$ units you get $10$ x $8$), minus one square length in each direction than your 6 x 5 grid so the line axis fits the squares exactly by their center points.

Under Object Data properties Activate Path Animation and set it for $18$ frames (its length in number of squares).

Now add a Follow Curve constraint to you plane, an pick the previously created curve.

Duplicate the plane without moving it, then under Follow Curve increase the Offset value to $-1$. Keep making copies of it until you fill the whole curve, progressively increasing the offset value by one unit.

Repeat the same process for a smaller curve inside the outer one, adjusting frame count for its length (in this case $10$).

You can then use your planes directly with whatever visuals you like, use dupligroups on said planes, or just model the shape after what you desire for each square directly in the plane mesh.

If you have precision troubles at the corners, increase curve resolution to improve accuracy.


Why do I have no 'Shader' category when trying to add nodes?

First, make sure you are using cycles.

On the info window

select cycles as the render engine

Then go to the node editor.
Without any addons, the Node Editor can be used in three different modes:

You are looking at the compositor nodes.

Click on the materials button in the Node Editor header.

Also make sure the Use nodes box is checked.


Create grayscale masks in Blender like Gimp

All you have to do is to multiply the image by a variable using the Converter --> Math node (This will automatically convert to BW).

Then you use the Converter --> Set alpha node while using the same image as the mask.


enable Loop Tools Addon (distributed with Blender)
convert the curve to mesh (ALT+C) (Object Mode)
Edit Mode
select all vertices (A)
set even spacing of verts: W > Loop Tools > Space
Object Mode
convert it back to curve

https://blenderartists.org/t/solved-is-there-a-way-to-evenly-distribute-splines-points-in-a-bezier-circle/1115092
urgh ...


This rarely works as expected, but you can try to recover work by going to File> Recover Last Session.


Prevent Transparent from casting Shadows

If you want to hide something completely from your render then use this method as it should give better performance.

In the outliner, there is a little picture of a camera next to each object. clicking it so it is disabled means that the object will not be rendered at all, which sounds like what you want.

This will only apply in the final render and not the preview render unless you set the view to be render only ('n'panel -> display -> only rendered or something like that).


I found the answer:

Assign the material to an object,
Shift-Click the 'X' to remove it, and
Save the file, then
Revert.

Voila. It's gone.


Blender 2.69 Properly Export UV Maps Using Python

UV's aren't per vertex in Blender, but per loop (which means per face-vertex). Also see here and here.

For triangle export, use the tessellated faces and split the quads into triangles or triangulate using the bmesh operator. Export the faces together with the UV coordinates. If UVs are the same for a shared vertex, you could simply pick the first loop, otherwise interpolate? (may give weird results...)

Print loop and vertex indices per polygon together with UV coordinate (uv index equals loop index):

import bpy

me = bpy.context.object.data
uv_layer = me.uv_layers.active.data

for poly in me.polygons:
    print("Polygon", poly.index)
    for li in poly.loop_indices:
        vi = me.loops[li].vertex_index
        uv = uv_layer[li].uv
        print("    Loop index %i (Vertex %i) - UV %f %f" % (li, vi, uv.x, uv.y))