Getting a closest point to 3d cursor gives a wrong result

Global coords, and calculate the distance.
Firstly mesh coordinates are local and the scene cursor location is global. Either convert scene cursor to local
scene_cursor_local = ob.matrix_world.inverted() @ scene.cursor.location

and then the result back to global when adding the empty.
ob.matrix_world @ good_pos

This would require only 2 matrix multiplications.
or convert the mesh coordinates to global (have done this below)
bm.transform(ob.matrix_world)

since we are not writing back to the bmesh so it will not be reflected permanently.
What closest point on line does.
>>> geometry.intersect_point_line(
intersect_point_line(pt, line_p1, line_p2)
.. function:: intersect_point_line(pt, line_p1, line_p2)
Takes a point and a line and returns a tuple with the closest point on the line and its distance from the first point of the line as a percentage of the length of the line.
:arg pt: Point
:type pt: :class:`mathutils.Vector`
:arg line_p1: First point of the line
:type line_p1: :class:`mathutils.Vector`
:arg line_p1: Second point of the line
:type line_p1: :class:`mathutils.Vector`
:rtype: (:class:`mathutils.Vector`, float)

Test runs.
>>> geometry.intersect_point_line((0, 0, 1), (0, 0, 0), (0, 0, 2))
(Vector((0.0, 0.0, 1.0)), 0.5)

>>> geometry.intersect_point_line((0, 1, 1), (0, 0, 0), (0, 0, 2))
(Vector((0.0, 0.0, 1.0)), 0.5)

>>>

It finds returns the point on the line closest to the point, and what percentage this is from the start point, ie 0 is the start point, 1 the other end.  It does not go outside the line.
In example above notice both have the same result, whereas one is right in the middle of the line, the other is not.  Also evident in question image, result is least ratio from corner aka edge vert 0. Flipping the normals will change the vertex order will again shift that result, if it is 10% from corner (as is) will be 90% way with verts wound the other way.
Instead calculate the distance by subtracting the hit from the cursor location.
Test code:
Have changed up code to add empty at closes point of all edges, rather than only that of zeroth face.
import bpy
import bmesh
from mathutils.geometry import intersect_point_line as ipl

def main(scene, ob):
    me = ob.data
    bm = bmesh.new()
    bm.from_mesh(me)
    bm.transform(ob.matrix_world) # put in global coords
    cursor_pos = scene.cursor.location.copy()

    print("start")
    print("cursor_location: ", cursor_pos)

    dist = 1000000
    good_res = None

    for edge in bm.edges:
        hit, pc = ipl(cursor_pos, edge.verts[0].co, edge.verts[1].co)
        d = (cursor_pos - hit).length
        if d < dist:
            dist = d
            good_res = hit

    bpy.ops.object.empty_add(
        type='PLAIN_AXES',
        align='WORLD',
        location=good_res,
        )

main(bpy.context.scene, bpy.context.object)

Other constructs for min / max
Instead of the set a super high value as max and test during each iteration, there are other ways to find a minimum and maximum (numpy is extremely good at this)
Another is to make a list comprehension of all the hits and sort them.  The zeroth will be the closest, the last the furthest away.
    hits = sorted(
        [ipl(cursor_pos, edge.verts[0].co, edge.verts[1].co)[0]
        for edge in bm.edges],
        key = lambda p : (p - cursor_pos).length
        )

    bpy.ops.object.empty_add(
        type='PLAIN_AXES',
        align='WORLD',
        location=hits[0],
        )


How to display the vertices while in object mode?

Parent a colored little icosphere under the object and turn on Duplication - Verts:

This lets you see even vertices on straight edges of ngons, something wire edges don't show.


Exactly like any other object, just press "s" and scale it. Then you can press "ctrl+a" to apply scale


For timing adjust use the dopesheet instead: if you select some keyframes, you can grab them and scale them (time cursor is the pivot point).

Put the timeline in a point: if you right click an the left you will select all keyframes before the timeline, if you right click on the right you will select all keyframes after.

Try also select a group of keyframes and press Shift T and move the mouse, for easing in and out.

Another great way to control the timing is to use the breakdowner in the T panel, pose tools tab (but you have to start with less keyframes).


Animation with cloth modifier renders as a static element

Select your flag object and fix the modifiers order by moving the cloth modifier to the top. Then you go to the Physics tab, press "Free All Bakes" and "Bake All Dynamics" (at Cloth Cache section). After the baking finishes you should be able to render the animation.

From Blender documentation (emphasis mine):

  Once the object is designated as Cloth, a Cloth modifier will be added
  to the object’s modifier stack automatically. As a modifier then, it
  can interact with other modifiers, such as Armature and Smooth. In
  these cases, the ultimate shape of the mesh is computed in accordance
  with the order of the modifier stack. For example, you should smooth
  the cloth after the modifier computes the shape of the cloth.


How to make the file manager default to sorting by modification date?

This is an addon for overriding the default display settings of the File Browser.

Currently you can:

Override the 'Sort Method', the 'Display Type' and the 'Display Size'
'Enable' or 'Disable' the overriding directly in the Panel (so you don't need to disable the Add-on each time)
Set the 'Sort Method' of the File Browser for 'All Operators' or a 'certain operator' like Open Blend,  Open Image, Recover Blend etc.
'Customize' and 'Reset' the override settings via Add-on Preferences

Click to enlarge

Once the Add-on is installed and enabled, the default 'sorting method' is set to Modification Date, the 'display type' is Thumbnail and the 'display size' is set to Tiny, but you can change that and save the User Preferences to keep your settings for other sessions.

filebrowser-display-override.py

# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

bl_info = {
    "name" : "File Browser Display Override",
    "author" : "chebhou, poor",
    "version" : (1, 1, 0),
    "blender" : (2, 78, 0),
    "location" : "File Browser",
    "description" : "Override File Browser Display Settings",
    "warning" : "",
    "wiki_url" : "",
    "tracker_url" : "",
    "category" : "User Interface"
}

import bpy
from bpy.props import (BoolProperty,
                       EnumProperty,
                       PointerProperty,
                       )
from bpy.types import (Panel,
                       Operator,
                       AddonPreferences,
                       PropertyGroup,
                       )

class OverrideFileBrowserSettingsPreferences(AddonPreferences):
    """Add-on Preferences"""

    bl_idname = __name__

    enable_panel = EnumProperty(
        name="Enable Panel per Operator",
        description="Enable Override Panel for certain Operators",
        items=(('ALL', "All Operators", "Always override the Settings", "RESTRICT_SELECT_OFF", 0),
               ('IMAGE_OT_open', "Open Image Operator", "When Opening an Image (Image Editor)", "IMAGE_DATA", 1),
               ('WM_OT_open_mainfile', "Open Blend Operator", "When Opening a Blend", "FILE_FOLDER", 2),
               ('WM_OT_recover_auto_save', "Recover Operator", "When Recovering a Blend", "RECOVER_LAST", 3),
               ('WM_OT_link', "Link Operator", "When Linking a Blend", "LINK_BLEND", 4),
               ('WM_OT_append', "Append Operator", "When Appending a Blend", "APPEND_BLEND", 5)),
        default='ALL'
        )

    enable_sort = BoolProperty(
        name="Sort Method",
        description="Enable Sort Method Override",
        default=True
        )

    enable_type = BoolProperty(
        name="Display Type",
        description="Enable Display Type Override",
        default=True
        )

    enable_size = BoolProperty(
        name="Display Size",
        description="Enable Display Size Override",
        default=True
        )

    def draw(self, context):
        layout = self.layout
        row = layout.row(align=True)
        row.prop(self, "enable_panel")
        row = layout.row(align=True)
        row.prop(self, "enable_sort", toggle=True)
        row.prop(self, "enable_type", toggle=True)
        row.prop(self, "enable_size", toggle=True)
        layout.operator("filebrowser_display_override.reset_preferences",
            icon='FILE_REFRESH')

class ResetOverrideFileBrowserSettings(Operator):
    """Reset Add-on Preferences"""

    bl_idname = "filebrowser_display_override.reset_preferences"
    bl_label = "Reset Preferences"
    bl_options = {"INTERNAL"}

    def execute(self, context):
        scn = context.scene
        prefs = context.user_preferences.addons[__name__].preferences
        prefs.property_unset("enable_panel")
        prefs.property_unset("enable_sort")
        prefs.property_unset("enable_type")
        prefs.property_unset("enable_size")
        bpy.ops.wm.save_userpref() # Save
        return {'FINISHED'}

class OverrideFileBrowserSettingsProperties(PropertyGroup):
    """Add-on Properties"""

    override = bpy.props.BoolProperty(
        name="Override Display Settings",
        default=True
        )

    display_type = bpy.props.EnumProperty(
        name="Display Mode",
        items=(('LIST_SHORT', 'Short List', 'Display Short List', 'SHORTDISPLAY', 0),
               ('LIST_LONG', 'Long List', 'Display Short List', 'LONGDISPLAY', 1),
               ('THUMBNAIL', 'Thumbnails', 'Display Thumbnails', 'IMGDISPLAY', 2)),
        default='THUMBNAIL'
        )

    sort_method = bpy.props.EnumProperty(
        name="Sort Method",
        items=(('FILE_SORT_ALPHA', "Name", 'Sort by Name', 'SORTALPHA', 0),
               ('FILE_SORT_EXTENSION', "Extension", 'Sort by Name Extension', 'SORTBYEXT', 1),
               ('FILE_SORT_TIME', "Date", 'Sort by Date', 'SORTTIME', 2),
               ('FILE_SORT_SIZE', "Size", 'Sort by Size', 'SORTSIZE', 3)),
        default='FILE_SORT_TIME'
        )

    display_size = bpy.props.EnumProperty(
        name="Display Size",
        items=(('TINY', "Tiny", 'Tiny Items', 0),
               ('SMALL', "Small", 'Small Items', 1),
               ('NORMAL', "Normal", 'Normal Items', 2),
               ('LARGE', "Large", 'Large Items', 3)),
        default='TINY'
        )

class OverrideFileBrowserSettingsPanel(Panel):
    """Add-on Panel"""

    bl_idname = "FILEBROWSER_PT_settings_override"
    bl_label = "File Browser Display Settings"
    bl_space_type = "FILE_BROWSER"
    bl_region_type = 'TOOL_PROPS'

    @classmethod
    def poll(cls, context):
        prefs = context.user_preferences.addons[__name__].preferences
        if context.space_data.active_operator is not None:
            return context.space_data.active_operator.bl_idname == prefs.enable_panel or \
                prefs.enable_panel == 'ALL'
        else:
            return context.area.type == 'FILE_BROWSER'

    def draw(self, context):
            scn = context.scene
            browser = context.space_data
            props = scn.filebrowser_display_override
            prefs = context.user_preferences.addons[__name__].preferences

            layout = self.layout
            row = layout.row()
            row.prop(props, "override")

            if prefs.enable_sort:
                layout.row().prop(props, "sort_method", text="Sort by")
                if props.override:
                    if browser.params.sort_method != props.sort_method:
                        context.space_data.params.sort_method = props.sort_method

            if prefs.enable_type:
                layout.row().prop(props, "display_type", text="Display")
                if props.override:
                    if browser.params.display_type != props.display_type:
                        context.space_data.params.display_type = props.display_type

            if prefs.enable_size:
                layout.row().prop(props, "display_size", text="Size")
                if props.override:
                    if browser.params.display_size != props.display_size:
                        context.space_data.params.display_size = props.display_size

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.filebrowser_display_override = PointerProperty(
        type=OverrideFileBrowserSettingsProperties)

def unregister():
    del bpy.types.Scene.filebrowser_display_override
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

Gist: https://gist.github.com/p2or/59b2795f011f2f024f5e781d1a33a5da


In many cases you should have at least some basic grids included to render a decent result. (Here I'm using a vdb I have on my system as an example, you should be able to follow along just fine)

Firstly, check what grids you have available here:

Second check the step size setting in the render section of the volume object. As it appears to currently be too coarse, try to lower it some. Perhaps it will help.
See the documention on the Volume Object

Using the grids we have available, you can now build a nice material like this(based on your comments, this particular vdb has more grids available, so could have a more complex material if desired):

click to enlarge

In this example, the render looks like this:


Here you go just search for keypress and the letter " i " in the search box.
You will find it under mesh category.


How can I straighten a bunch of vertices into a straight line? (Odd angle)

This might work for you. Enable LoopTools in preferences then select the faces concerned rather than the vertices. Press W, choose "LoopTools", choose "Flatten".


Looping Through Frames of Physics Simulation and Getting Object Info with Blender Python

You don't need to call bpy.ops.ptcache.bake_all() for every frame, as it runs the simulation for every frame.

Just move the call to bake_all() above your loop, just after setting frame_current to frame_end :

def analyze_scene():
    scene = bpy.data.scenes['Scene']
    object = bpy.data.objects[object]
    frameInfo = []
    scene.frame_current = scene.frame_end
    bpy.ops.ptcache.bake_all(bake=False)

    for frame in range(1, scene.frame_end):
        scene.frame_current = frame
        frameInfo.append({"name": object.name, "frame": frame,
            "translation": object.matrix_world.translation})

    return frameInfo

This should run many times faster, with the code you've given, you were running a simulation of all frames for each frame between 1 and frame_end.

EDIT : If you just want to iterate through the frames, you don't need to bake anything, just change the current frame with scene.frame_set(frame) instead of scene.frame_current = frame. As long as you do this with an incrementing frame, Blender will compute the keypoints for each frame. For example :

def analyze_scene():
    scene = bpy.data.scenes['Scene']
    object = bpy.data.objects[object]
    frameInfo = []

    for frame in range(scene.frame_start,
                       scene.frame_end,
                       scene.frame_step):
        scene.frame_set(frame)
        frameInfo.append({
            "name": object.name, "frame": frame,
            "translation": object.matrix_world.translation
        })

    return frameInfo

NOTE : You also had written scene = bpy.data.scenes['Scene'].frame_end in your code, I corrected it with scene = bpy.data.scenes['Scene'], I guess that is what you meant.


How do I get these animated obstacles to work right with fluid physics and prevent freak outs like this?

Select your obstacle object, go to physics in the properties pane, under fluid obstacle settings there's a checkbox called Export Animated Mesh. Use it :-)


There are a number of things that could cause this problem. It could be an old video driver. It could be a corrupt download.

The first thing I'd try is browse to C:\Users[user]\AppData\Roaming and delete the folder called "Blender Foundation." This is where Blender keeps all kinds of caches, settings, configurations, etc. Deleting this folder is like resetting Blender to the factory default configuration.

If that doesn't help, post your problem on BlenderArtists.org with a bit more detail about what "flashing" means, what GPU you have, when you last updated your drivers, and whether you're on a laptop or desktop.

Hope that helps!


I have tried to import EXR files to Davinci Resolve with the LUT's

Question:

How to match an EXR (linear scene-referred information) to a PNG (in display referred values with sRGB "gamma" curves) of the same image in resolve?

The issue:

Even though both images are generated from the same render layer in blender, they are going through different pipelines and the values don't match: The PNG is encoded with a gamma curve (sRGB, 2.2) and the information has been scaled to fit within the 0-1 values of display referred, while the EXR is still in Scene-Referred values that exceed what the display is capable of representing on the screen. All values past 1 are displayed as "clipped" or "pure white".

A graphic to illustrate. Both images loaded in blender:

On the vectorscope you can see how the image brightess values for each channel are represented. The bottom of the scale is 0 (black) and the top 1 (or 100%, meaning white).

The image on the left is the EXR. Notice how values over 1 are ignored and "hard clipped". There is a flat line at the very top. All values higher than one or 100% are ignored.

If sampled, some of the values in this EXR exceed a value of 24 on the red channel, way over what the display can deal with.

On the right of the image is the PNG, the vectorscope shows how the highlights are scaled down to a displayable values (thanks to the color transforms called "filmic"). Note how they curve at the top, and some (in the green and blue channel) don't reach 100 percent, giving the flame a "yellowish" tone.

Bringing the files to resolve shows the same difference.

The EXR file:

The PNG one:

One solution:

To match the images, as cleverly pointed out by @Gez, both images would need to undergo the same color transforms.

Open fusion tab, load the EXR file and add a Ocio Color Space node, load the OCIO config file (config.ocio) from your blender folder and set the Source Space to Linear and output to Filmic Log Encoding. Since the Looks don't work in Resolve you have to add them manually using another node.

Add an OCIO File Transform node and look for the necessary LUT in the Looks sub-folder of the color management folder in Blender (in this example the lut is Filmic_to_0-60_1-04.spi1d for Medium Low Contrast). Set the direction to forward and the interpolation to linear.

The resulting image should be what you are looking for (on the left the PNG, on the Right, the EXR processed through OCIO nodes).

Note that Resolve is particularly tricky, using confusing (and sometimes wrong) terms, and has many settings that need to be correct for solution to work:
The EXR file should use the correct color space (in this case sRGB) and it has to be interpreted as LINEAR ("Gamma space":None), "Remove Curve" should be checked.

On the media tab, the Alpha channel on the EXR has to be set to "premultipy".

Here's the final image and scope readings:

Other Solution.

Install the filmic LUTs from "Filmic Resolve ( https://github.com/sobotka/filmic-resolve) on your system.

Set the Input and Timeline color spaces for the project to Rec709(Scene) but do not set any lookup tables.

Import the EXR normally and do not assign any LUTs or other pre-processing to it in the media section.

On the color section use two nodes to get the filmic look:

The first node uses a LUT-3D LUT-Filmic-Filmic Resolve-Scene Linear to Base Encoding.

The second node uses a LUT-3D LUT-Filmif-Filmic Resolve-Medium Low Contrast.


Why does auto weight paint do a poor job?

Thank you to @moonboots for the fix. My normals were flipped which was causing the weight paint algorithm to act funny. It was a quick fix to fix all the normals. All I had to do was select the normals that were facing the wrong direction and recalculate them using "shift + N". After fixing the normals I reparented the armature and it did a much better job of assigning weights.


You have most likely made the object, that are your feet, not visible in the render. See if your little icon looks like this when you select the affected object. If it is, then press that icon and it should make the object visible again.


Background music doesn't play after restarting game

I don't seem to be experiencing the same issues as you are. Maybe try putting the logic onto the camera or another object. Alternatively, you can enable early execution of the controller to make sure it's activating before it gets interrupted.

*woops! I forgot to embed my obnoxious screeching sound I was using instead of music in the blend file. You'll have to attach your own to the logic brick located on tha camera.


I don't think an automatic way currely exists. I'm afraid you have to code something to find the target pixel directly.

However, after playing this for quite a bit time, I find a tricky way to get the same result. As shown in the image below. Though it seems not quite effective on performance, but quite acceptable after my testing on a sort of 6000 x 6000 px image, so far.

Furthermore, suppose you want to target the brightest pixel, just add an Invert node right before the Nomalize node. Hope that helps.

Version 2:

I think this way is even better. FYI

OR:


Why don't I see light reflected off a mirror in Cycles?

Lights are only visible in Cycles when they are mesh lights. If you want a light source to be reflected you need to make it from geometry and create an emission shader for it.

If you wish light to be reflected and illuminate other objects, you need to enable reflective caustics:

These calculations take a lot of time in Cycles and are inefficient, because of the way tehy are calculated. For better caustics one would need to use a render engine that supports bidirectional pathtracing. I think LuxCoreRender can do a better job with this.


Everything has disappeared in the viewport

The scale of the armature is too small. Also the rotation was modified.

Select the armature in Outliner. Then press alts, altr.
Also clear the location If you need.


You can use the bridge in the loop tools addon with a negative value in the cubic interpolation.


Ensure GPU Support

Currently cycles supports CUDA (Nvidia) devices and has experimental support for OpenCL devices as of 2.75 (added in B7f447). If you are using an AMD/ATI graphics card, see the OpenCL section below. If you are running an older NVIDIA card, ie the Geforce series, support is extremely limited and these are not officially supported, see How to enable GPU rendering on older Nvidia GPUs?

CUDA/NVIDIA

Cycles only supports CUDA GPUs with a CUDA compute ability of 3.0 or higher. To use CUDA, check to make sure your GPU is on this list of CUDA capable GPUs and has a ranking of at least 3.0.

Install Latest Drivers

If your GPU has a CUDA compute ability greater than or equal to 3.0 and you still don't have the option to enable GPU rendering, you can check a couple more things:

Ensure you are using the proprietary drivers distributed by Nvidia and that your GPU drivers are up to date.
If you are compiling Blender from source, ensure you have the CUDA development toolkit installed.

Below are instructions for various operating systems. If you are still having issues after trying all the steps listed in this post, try asking for support on BlenderArtists.
This site is not well suited to localized troubleshooting discussions often needed to untangle unusual hardware/driver issues.

Linux

Run as root
Due to an issue with some versions of the nvidia drivers, you must run blender (or any other program which uses cuda) as root before you can use any cuda features as a normal user. See this thread for more detail.

Ubuntu-based Distributions

Open your driver manager and select the recommended driver and Apply Changes.

You can also use the terminal to install the latest stable driver.

$ sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
    $ sudo apt-get update
$ sudo apt-get install nvidia-current

For linux Mint, Ubuntu and Debian variants (and maybe other distributions) you will need to install the package nvidia-modprobe which will detect your nvidia CUDA device and make it available for blender. Read this answer for further instructions

Debian Jesse

Please note that these instructions were put together in June 2015 on Debian Jesse. Although Debian is a very stable distribution, it isn't unlikely that this will be out of date on Debian Stretch. If you have more up to date information, please feel free to edit this.

Before we can install the drivers, we will need to install the kernel headers from the contrib nonfree repository. If this repository hasn't been added already, open /etc/apt/sources.list with nano:

$ sudo nano /etc/apt/sources.list

And add:

deb http://http.debian.net/debian/ jessie main contrib non-free

For Debian to recognize the repository, we will need to refresh the package list:

$ sudo apt-get update

Once this is done, the headers can be installed:

$ sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms

With some sed magic, this will install the correct headers for your version of the kernel.

Now we need to blacklist (disable) the open source nouveau driver. To do this, we will create an Xorg configuration file:

$ sudo mkdir /etc/X11/xorg.conf.d
$ sudo echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf

And reboot the computer.

$ reboot

All that is required afterwards, is to install cuda:

$ sudo apt-get install nvidia-cuda-toolkit

For more in depth information, please see https://wiki.debian.org/NvidiaGraphicsDrivers (only covers the drivers, not cuda). If you are running a GTX 970 or 980 you will need a special build of cuda available here.

Arch Linux

Identifying your GPU:

From the Arch wiki:

  If you don't know what GPU you have, you can find out by running:

$ lspci -k | grep -A 2 -i "VGA"

Drivers and CUDA:

For Arch Linux, installing proprietary Nvidia drivers for your GPU can be as simple as installing the nvidia package and then rebooting:

# pacman -S nvidia
# systemctl reboot

If you are compiling Blender from source, you will also need the CUDA toolkit. You can get it by installing the cuda package:

# pacman -S cuda

Windows 7

Find out what GPU you have in the Device Manager. Go to Start -> Control Panel -> System and Security -> System -> Device Manager), then open the Display adapters tree.

To find out the architecture of your Windows installation, open a command prompt (search for cmd in the start menu) and run wmic os get osarchitecture.

Alternatively, you can get this information from a GUI by going to Start -> Control Panel -> System and Security -> System or by using the keyboard shortcut Windows KeyPause.

Go to the Nvidia Website and select your driver.

Finally, download and install the proper driver for your architecture. I am assuming you know how to use installers.

Nvidia Optimus:
If you're running Blender on a notebook with Nvidia Optimus, make sure it uses the dedicated GPU. Either configure Blender to always use the dedicated over the integrated GPU in the Nvidia Control Panel, or right-click Blender.exe (or a shortcut to Blender) and select the Nvidia GPU in the the Run with graphics processor menu:

OS X

Install the latest Nvidia Driver for you graphics card. You can download them from the Nvidia website.

Open the CUDADriver.pkg file by double clicking it.

Go through the installer.

If it installed correctly, there should be a new CUDA option in the System Preferences (the only time you need to go here is to install updates):

Finally after you have installed your drivers:

Restart your computer
Start Blender.
There should now be an option in the Blender's settings allowing you to select CUDA and your GPU:

Then select the GPU in Render settings > Render > Device:

OpenCL

As of blender 2.75, AMD HD 7xxx+ GPUs are officially supported.
Other OpenCL devices may work, and can be tested by force-enabling OpenCL with an environment variable:

CYCLES_OPENCL_SPLIT_KERNEL_TEST=1

Also see Is it possible to do OpenCL rendering on Intel processors?

Ubuntu/Debian

On Ubuntu/debian you may need to install  ocl-icd-opencl-dev package

ArchLinux

Nvidia OpenCL
To get OpenCL working for nvidia GPUs, ensure that the opencl-nvidia package is installed:

# pacman -S opencl-nvidia

Then run blender with the environment variable set to 1:

CYCLES_OPENCL_SPLIT_KERNEL_TEST=1 blender

In the User Preferences > System there should now be an OpenCL option:

If it's selected, rendering on the GPU will now use opencl.
Note that the first time you try to render, blender will have to first compile the necessary kernels which may some time.


bone/armature movements during game play

I am not sure if you have tried this,

Connect a always sensor to a and controller to a Run armature brick,

if this is not your issue, just add a empty for each bone you want to manipulate,

have the bone use copy rotation on the empty,

Rotate the empty.

Now you can move bones in the bge (I do it all the time for heads tracking cursors etc)


Go to edit > preferences.
on interface tab find and enable "developer extras"
now go to experimental tab and enable undo legacy

your undoes will become slower but more accurate.
consider sending a bug report.
Here is how:
https://wiki.blender.org/wiki/Process/Bug_Reports


Engines fire animation for mobile app created in Unity

There is no way (as far as I know) to bring a Blender particle system into Unity. If you want to use your Blender fire, render out transparent png sequences from all the sides that will be seen in game. Then use planes with with the images in Unity. However, given your knowledge of Unity and Blender, I would recommend you import Unity's free ParticleSystem pack and go from there.


How to get back to scene view after opening python console?

In Blender 2.79, you close Areas by dragging them by their split widget towards the area you want to close.

By pressing Shift+F-Key (F1-F12), you switch the Area to a different Editor. You can also do this by clicking on the area's pop-up menu button and select a different area from there.


How to model a spoon with using edge loop only with no mirror modifier

A possibility is to use solidify and subdivision surface modifiers, starting from a plane.

Create a plane
Adjust its size
Subdivide it twice
Adjust the center part depth
Adjust the extremities

Now add the modifiers
Refine the geometry as you want
Set the shading to smooth


This happens, because Gizmo doesn't take modifiers into account.

According to this developer thread and this developer thread it's a current limitation, and no way around that.


Why won't the boolean modifier work properly?

It will be rather hard using Boolean in this case because there are a lot of self-intersecting parts in the mesh and modifier won't give expected results just after it's added; additional complexity is provided by form of the mesh.
It's possible to cut through it without using Boolean modifier, however form of the cup which should be cut out won't be taken into account.

Knife Project

To cut through this mesh use Knife Project tool. For details see How would you cut a shape out of an object using another object

Enter Edit mode of the cup's design, select its bottom, and separate it by selection (P > By Selection). The bottom part shouldn't be cut through. If skipping this step the hole will be all through the mesh.

Enter Edit mode for cylinder and delete everything but the top face.
In Object mode select ex-cylinder (now that Ngon), then select design of the cup, press Numpad 7 to enter Top View.

Enter Edit mode of the highpoly cup and on the Toolshelf panel (T in 3D View) find Knife Project. After executing in the operator's options check Cut Through. This is done to make tool to cut through all mesh, not just what is seen from the current view.

If the inner part of the mesh shouldn't be filled with loops, then it's ready (you can recreate the cylinder and join it to "hide" the inner geometry). If this open geometry is undesired then you should manually select parts of loops and use Bridge Edge Loops, like this:

Boolean

It is possible to cut the cylinder out using modifier, though it's much more complex. It didn't work before because of self-intersections in the mesh; thus you should get rid of them.

To do that, in Edit mode select all and press Ctrl+F > Intersect. Make sure in operator's options check Self-Intersect. It's a kind of Boolean but in Edit mode.

It made all intersected parts to be cut by each other. The only (easy one) thing left is to delete those parts which were cut.
Example of such selecting these "self-intersecting" parts is shown below:

Note that this is not the only part you should select in order to make Boolean work right afterwards. This is quite time-consuming process so prepare to use some selecting tools like Loop Select, Select Loop-Inner Region and so on.
Once these parts are deleted select all and access Mesh > Clean-Up > Delete Loose, and (there too) Degenerate Dissolve.
Note:  removing doubles will delete supporting vertices around intersecting parts, so shading and form of mesh can be corrupted.

Still the resulting mesh seems to cause Blender not responding sometimes, so it may be unnecessary complex and heavy. It's worth using 1-st way, leave some parts of geometry and hide them with cylinder of the cup itself.
You can take a look at the file if it meets your needs.


Empirical answer

Simple deform modifier is far from simple in my opinion and there is always to learn about it. Here the subject is the bend mode.

In a basic mode with no empty, we can note that when an axis is chosen the modifier work if the object as an elongation against the two other axis.

For instance, with here 45°:

A subdivided grid elongated in X and Y (flat in Z), will produce a result if the modifier axis is Z, but nothing if it is X or Y (because for X or Y, there is no Z elongation):

Secondly, the way this elongation is considered for Z axis here, is to Y. What I mean is the elongation is projected around a center on Y:

And for a 1 by 1 unit grid, this center is along Y at 1 / angle

Left here, the grid, center 45° (pi/4), right, 360° (2pi):

OK, I think all the main rules are there:

Depending on the axis, the mesh need to have an elongation in the other axis
The bend is calculated around a center on Y which is at 1 / angle (if the elongation is 1)

Now still considering the axis from the object itself, we have below two grids, both set on X axis with a 360° angle.

On left, the mesh is rotated a bit, on right it is rotated to 90° (so that the elongation on Z is maximum and we obtain a circle).

The circle was expected as the angle is 360°.

But why this spiral with another angle?

What is happening is that each side of the grid (as its origin point is centered) is participating to the bending. But as the several vertices are not placed equally to the Y axis which leads the center point of the bending, each of these vertices as its own projected center point on Y.

The circle is finally obtained if we rotate the mesh so that (again) the elongation is maximum.

Now, what if we use an empty as origin?

We can see we have nearly the same thing:

In edit mode, previously, the Y axis was still the one of the mesh.

Here, the modifier considers to project the center on the Y axis of the empty.

Summary

Consider the Y axis (of the object itself or the one of the empty) to locate the center.

Consider the axis used/defined in the modifier panel (of the object itself or the one of the empty) to know around what the bending will operate.


Never mind, I had the plane/object too close to the spot light. That's why it didn't work. It needed to be further away from the spot light. Thank you everyone who helped


why does menu_func() in this example reference a self when it is declared outside of a class

The answer lies in what happens in the register function, below the menu_func:

def register():
    bpy.utils.register_class(AddBox)
    bpy.types.INFO_MT_mesh_add.append(menu_func) # <<< This is the interesting bit

As you can see here, the menu_func is appended to the INFO_MT_mesh_add type as a new method. INFO_MT_mesh_add is the Add Mesh Menu in the blender UI.

This is the class where you will be adding the menu_func to, not the add_box operator.

This function is added to the Add Mesh Menu, and when you call it from the blender UI, it will be executed like any method. That means that it will get the class instance as the function's first parameter, "self".

The word "self" has no real meaning by itself, and is merely the first parameter this function receives. It is a convention in python (and some other languages) to call it "self", but you could call it "james" and it would work just fine.

When the function is a method in a class, it automatically gets the instance of the class as the first parameter when called from the instance (or the class itself if its a @classmethod, in which case we usually call the first parameter cls instead of self).

class someClass:
    def myMethod( self ):
        print( "I get the class instance as my first param 'self'" )
        print( self )

clsInstance = someClass()
clsInstance.myMethod() # myMethod will get clsInstance as the first parameter

We could write it this way though, and it would work just the same:

def to_be_method( self ):
    print( "I get the class instance as my first param 'self'" )
    print( self )

class someClass:
    # Reference to_be_method as our class' own myMethod
    myMethod = to_be_method

clsInstance = someClass()
clsInstance.myMethod() # myMethod will get clsInstance as the first parameter

So as you can see in the example above, we define a function outside the class and used the "self" parameter, and then referenced this function inside the class.

Appending the menu_func into the INFO_MT_mesh_add class does something similar, which is why it's fine and works well.

I hope this explains the situation rather than confuse you even more! :)


smoke comes out in bursts from moving object

You need to use your flow object's sampling subframes.
Select the object, go in the physics Properties tab and change the Sampling Subframes value.

It can be animated but you need to know this : more subframes = more processing time


Python: Calculate angle between vertices

You can get two selected vertices via bm.select_history and calculate a direction vector, then measure the angle between this angle and the up vector (0, 0, 1) in radians and convert it to degrees (below script prints the smaller angle):

import bpy
import bmesh
from math import degrees, pi
from mathutils import Vector

ob = bpy.context.object
assert ob.type == 'MESH'
me = ob.data

bm = bmesh.from_edit_mesh(me)
verts_sel = [el for el in bm.select_history if isinstance(el, bmesh.types.BMVert)]
assert len(verts_sel) == 2

v1 = verts_sel[1].co - verts_sel[0].co
v2 = Vector((0, 0, 1))

a1 = v1.angle(v2)
if a1 > pi * 0.5:
    a1 = pi - a1
print("{:.2f} degrees".format(degrees(a1)))


No cycles hair rendering options in 2.78?

They are now located in the geometry panel under render settings:

These settings are not actually per particle system as the location in the particle panel would imply, they're actually per scene. So not only are you not able to adjust them per system, what settings you have will be ignored when the model is linked into another file. Where you would then need some other object with hair particles to be able to set them up locally!

By placing them under render settings, the above issues and confusion are solved.


render has doesn't have a good quality as preview

is there a way that motion blur will affect one object?

Yes. Disable Motion Blur in Properties > Object:

Now that object will not be affected:


Perhaps you changed where that HDRI file was, reloading it may solve the problem, either that or you disconected a node somewhere.


How can I bake vertex animation into keyframes, but make sure that there aren't any duplicate keyframes

Here is the improved script without duplicate shapekeys:

import bpy
import sys

def update_progress(job_title, progress):
    block = int(round(20*progress))
    msg = "\r{0}: [{1}] {2}%".format(job_title,
                                     "#"*block + "-"*(20-block),
                                     round(progress*100, 2))
    if progress >= 1: msg += " DONE\r\n"
    sys.stdout.write(msg)
    sys.stdout.flush()

obj = bpy.context.active_object
start = bpy.context.scene.frame_start
end = bpy.context.scene.frame_end

# generate unique meshes from animation
meshes_at_frames = []
for f in range(start, end+1):
    update_progress("Generating unique meshes from animation", (f-start)/(end-start+1))
    bpy.context.scene.frame_set(f)
    curr_mesh = obj.to_mesh(scene=bpy.context.scene,
                            apply_modifiers=True,
                            settings='PREVIEW')
    if meshes_at_frames:
        prev_mesh = meshes_at_frames[-1][0]
        new_mesh = False
        for curr_vert, prev_vert in zip(curr_mesh.vertices, prev_mesh.vertices):
            if curr_vert.co != prev_vert.co:
                meshes_at_frames.append((curr_mesh,f))
                new_mesh = True
                break
        # cleanup
        if not new_mesh:
            bpy.data.meshes.remove(curr_mesh)
    else:
        meshes_at_frames.append((curr_mesh,f))
update_progress("Generating unique meshes from animation", 1)

# add unique keyframed shape keys to reconstruct animation
obj.shape_key_add(name="Basis", from_mix=False)
prev_skey = None
for mesh, f in meshes_at_frames:
    update_progress("Adding shapekeys", f/(end+1))
    curr_skey = obj.shape_key_add(name=str(f), from_mix=False)
    for vert_id in range(len(obj.data.vertices)):
        curr_skey.data[vert_id].co = mesh.vertices[vert_id].co

    # cleanup
    bpy.data.meshes.remove(mesh)

    # keyframe start of current
    curr_skey.keyframe_insert("value", frame=f-1)
    curr_skey.value = 1.0
    curr_skey.keyframe_insert("value", frame=f)

    # keyframe end of previous
    if prev_skey:
        prev_skey.keyframe_insert("value", frame=f-1)
        prev_skey.value = 0.0
        prev_skey.keyframe_insert("value", frame=f)
    prev_skey = curr_skey
update_progress("Adding shapekeys", 1)

Same as with previous version: deform modifiers after running script need to be turned off or deleted.

It performs slower than previous one due to comparing mesh vertices if they differ. Worst case is when the mesh is the same across many frames, best case is when mesh changes every frame on first vertex (or every vertex).

For 1M poly meshes and hundreds of frames this comparing can take couple of minutes, so I also added a progress reporting to the system console.


How can I move an object on a separate layer behind another in the compositor?

ID Mask:

Expanding on Gunslinger's answer, this can be done on two render layers, using an ID Mask node:

With the foreground object selected, set the Pass index to 1 in Object properties > Relations:

Enable the Object index pass in Render Layers > Passes:

Add an ID Mask node and set the Index to 1.
Plug the IndexOB output from the Renderlayer node into the ID Mask node. This will provide a mask for the foreground object:

Mix:

Gunslinger's setup is better as it preserves the sky:

Result:

Note that you can also use ID masks on a material basis.
Enable Material index in Render layers > Passes, and set the pass index for the material:

Use Materials > Settings > Pass index to set the pass index of the material in Cycles:

Or in Blender internal use Materials > Options > Pass index:


How to attach new object around a round surface

There are several ways to do it, one simple would be to duplicate the head mesh area where the beard is supposed to grow, draw the lines of the beard shapes with the knife tool (here it's a roughly try) then extrude twice, give it a Subdivision Surface, rework with additional edges, etc...


A couple of things to look at.... 1) is the tongue an object on it's own?   Or a part of another object and it "appears" to be it's own separate object.   2)  I just helped someone else out with this next question/suggestion.   Are the normals pointing in the correct direction or is the tongue drawn inside-out?   Check the normals on the faces.


Advice on what shaders to use for stylised reptile skin?

For simple procedural recreation of this material you can use Principled BSDF shader with some simple textures:

As a color I've used only Noise texture with Color Ramp to give a little variation for it. In your example texture is indeed hand painted.

The reflective part is Clearcoat and Roughness dropped to .3

Green border marks bumps created from Voronoi textures. I've used them as Normal and Clearcoat Normal.

The light rim is made by using two big Area Lamps placed behind model:


Since the engravings are just very fine and only on a straight plane, I would suggest to use a normal map which simulates the engravings. So you can keep your mesh simple, while the engravings are always visible, depending on the light.


Armature bone rotation values not changing when using inverse kinematics

So let's look at one driven bone:

Here, Spine01 is getting a Y quaternion driver based on the Z quaternion component of Core_IK.  I've rotated Core_IK a bit, and showed Spine01's transform in the sidebar, so that you can see that, yes, the driver is actually working-- that Y rotation field is non-zero, and since Core_IK's Z component is -0.082, it's doing what you told it to.
But unfortunately, doing what you told it to do, is doing nothing.  Why?  The short answer is that the Y component is the only component you're changing.  With quaternions, increasing the Y component alone is not the same thing as rotating in the local Y axis.
Quaternions are kind of weird.  Even though Blender lets you deal with their components individually, they're not really four separate numbers; quaternions are normalized, four-dimensional vectors.  If you want Spine01 to rotate, you need to also change at least the W component as well as the Y.  How much?  Well, (w^2 + Y^2)^0.5 = 1.  So, that's why they taught you algebra way back when, for this moment.
Other driven bones in the armature have similar issues.
What should you do?  You should change the rotation mode of the bones that you want driven to be Euler bones.  You can specify the rotation mode in properties/bone/transform/mode.  If you do that, your individual channels will represent rotation in a particular axis.  In the case of Spine01, which looks like you're only ever going to use drivers to control its roll, there's no advantage to quaternions over Eulers anyways.  The advantages to quaternion interpolation are only ever apparent when a bone rotates in more than one Euler axis.
Is there anything else you should change?  Yes.  Just as the Y quat component of Spine01 doesn't rotate anything, the Z quat component of Core_IK is not a very useful input to drive this rotation.  Here, you don't need to change the rotation mode of anything, you just need to change how Blender reads whatever transform you give it, by changing the mode in the "rot" variable for your driver.  You can leave Core_IK as a quaternion bone and still read its orientation as an Euler for purposes of rotating Spine01.


Final result:
You can use Array modifiers along with simple Sculpt to achieve similar result. It's a bit more of manual work but it's pretty simple and rewarding at the end.

Mesh:
You will need something similar to mesh from the screenshot. The goal is to have brick-like array. Top part is duplicate of the bottom part, cut in a half and manually placed.

Modifiers:
Here you will need at least two Array modifiers (width and height) or three if you want to have some multiple rows.
One of them (width, in this case X axis) should have checked Merge to connect top part of the mesh.

Sculpt:
When you make the wall with desired size it's time to duplicate it to another layer. To have some backup.
After it, apply modifiers from top to bottom. It's good idea to go to Edit Mode, Select All and Remove Doubles just in case.
You can add Mulitresolution modifier (I've added it with Subdivision 1) but it can stay low poly.
Go to Sculpt Mode, turn off Symmetry Lock X, choose Grab Brush and start tweaking the mesh. Remember to change Brush size/strength once in a while to give it more detailed look.
You can do this with mouse, no need for tablet to do this.

Blend file:
First layer contain mesh with Array modifiers, second one is the final mesh.


Trace visualisation in 3D - how to wrap curves onto a 3D mesh

The General Curl

The Theory

The image you posted above is trace visualization for what is known as a divergence free vector field. To understand what that means, consider particles that move along the lines you see above (the field represents their instantaneous velocity), if the field is indeed divergence free, those particles will never collide. That's what gives those visualizations their beauty, the lines never intersect.

Mathematically, a vector field $F$ is divergence free if $\nabla \cdot F = 0$. It is hard to compute a random vector field that is divergence free proceduraly, so we use some math to aid us. In vector calculus, the Curl of any vector field is divergence free. The curl is an operator that operates on a vector field and returns another vector field that represents the infinitesimal (microscopic) rotation of the input vector field. The infinitesimal rotation of a vector field can be understood using this intuitive interpretation from Wikipedia1:

  Suppose the vector field describes the velocity field of a fluid flow (such as a large tank of liquid or gas) and a small ball is located within the fluid or gas (the center of the ball being fixed at a certain point). If the ball has a rough surface, the fluid flowing past it will make it rotate. The rotation axis (oriented according to the right hand rule) points in the direction of the curl of the field at the center of the ball, and the angular speed of the rotation is half the magnitude of the curl at this point.

We are not interested in what the curl represents, we are only interested in the fact that the curl of any vector field is divergence free. For our artistic use, the input of the curl operator $F$ can be a simplex or perlin noise-based vector field, that is, $F = (F_x, F_y, F_z)$ where $F_x, F_y, F_z$ are different perlin or simplex noise functions.

Let us now look into the curl operator that will take $F$ as an input and returns a divergence free vector field, the curl of $F$ denoted by $\nabla \times F$ is equal to:

$$
\nabla \times F =
\left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right)\mathbf{i} +
\left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right)\mathbf{j} +
\left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right)\mathbf{k}
$$

Where $\mathbf{i}$,$\mathbf{j}$ and $\mathbf{k}$ are the fundamental vectors of the rectangular space. Don't worry if you don't understand those equations, we shall understand them soon. The notation $\frac{\partial F_z}{\partial y}$ represents the partial derivative of $F_z$ with respect to the $y$ axis, similarly, $\frac{\partial F_y}{\partial z}$ represents the partial derivative of $F_y$ with respect to the $z$ axis, and so on. A partial derivative measures how much a function changes along an axis. Take a brief look at derivatives before we continue, you don't have to study it, just recognize what it represents. To compute the partial derivative, we use what is known as the central finite difference method or Symmetric Derivative which states that the partial derivative is equal to:

$$
\frac{f(x+h) - f(x-h)}{2h}
$$

Where $h$ is some arbitrary small number and $f$ is the function in question. The same equation applies for the $y$ and $z$ axis. For instance to compute $\frac{\partial F_z}{\partial y}$, we add $h$ (a small number) to the $y$ component of the the vector, evaluate the $F_z$ noise at that vector, subtract $h$ from the $y$ component of the vector, evaluate the noise and take the difference between the two evaluated noise values, and finally divide them by $2h$.

To understand how the central finite difference method work, consider this intuitive interpretation:

  Suppose one is standing on a mountain blindfolded, one was asked to report the steepness (slope, partial derivative) of the point one is standing at, one might move a step to the right and identify whether one ascended or descended and how much did one ascend or descend by, another might move a step to the left and identify whether one ascended or descended and how much did one ascend or descend by. Now consider the situation where one is at the very top of the mountain, at that point, the slope is zero, one is not ascending or descending, but both persons will report that they are descending, because if one move to the left or the right one will be descending. We conclude that to get an accurate result, we have to move a step to the right, observe, move a step to the left, observe and then determine if you are ascending or descending. In our case, if one move both to the left and to the right, one will understand that one is at an even surface (at the top). So when we say $f(x+h)$ we simply mean that we observe after we move a step $h$ to the right and $f(x-h)$ means to the left.

Once we compute the curl of the vector field, we can do what is known as advection using Euler's integration. When treating the curl vector field as the instantaneous velocity of some particles in space, Euler's integration approximates the location of the particles after one second by adding the curl vector field to the original particles location. So to get the whole trace of a particle, we evaluate the curl, add it to the location of the particle, evaluate the curl at the new location, add it to the new location, and so on.

Implementation

Simple Curl Implementation

The first step is to make a group that generates the vector field by initializing its components with different simplex noises $(F_x, F_y, F_z)$:

The next step is to compute the partial derivatives. This can be done using the formula for the symmetric derivative:

Take your time to understand this node tree. It can be hard to grasp at first. Having all the partial derivatives, we can now compute the curl easily using the equation above:

And by advecting some initial vectors along the curl vector field using Euler's integration and creating splines from the output points:

We get something like this:

Optimized Curl Implementation

While the previous implementation works, it is very slow because it requires a lot of noise evaluations and noise is expensive to compute. Thankfully, the noise functions in Animation Nodes v2.1 is implemented using SIMD instructions, which means it can somewhat be executed in parallel for CPUs that support Advanced Vector Extensions (AVX) which is pretty much every modern CPU. This result in a speed up of up to 600x the original implementation. SIMD requires the input data to occupy a contiguous memory block. So to utilize SIMD instructions and optimize this setup, we should combine all our data into a single big vector list, evaluate the noise at it, segment the output, and process it. The following implementation is hard to understand, so it is better to do it on your own, my implementation looks like this:

Euler's integration loop stays the same:

However, notice that we are appending a list of vectors and not a vector, so the output will be of length $n \cdot m$, where $n$ is the number of iterations and $m$ is the number of input initial vectors. We have to do another segmentation before creating splines from those points, so the spline loop will include segmentation and spline creation:

And what we get is a fully functional, fast, curl trace generator:

Blend file for study and practice:

Surface Curl

Now that we have an understanding of what the curl is, we can go ahead and finally answer your question.

Theory

Let us define the problem as follows:

  We want the output vector field of the curl operator to always be tangent to the surface of our meshes, that is, the curl should always be perpendicular to the vector field that represents our mesh surface normals.

If our initial points were on the surface of the mesh and the above condition is satisfied, then we will get the result we are looking for. The above condition is satisfied only if $(\nabla \times F) \cdot \vec{N} = 0$, where $(\nabla \times F)$ is the curl and $\vec{N}$ is our normals vector field. The problem is now to compute a vector field $F$ so that the dot product between its curl and the normals vector field is equal to zero.

By some analysis we get, $F$ is equal to $\vec{N} \cdot p(x,y,z)$ where $p$ is a perlin or simplex noise function just like we used in the general case, the curl in that case becomes:

$$
\begin{aligned}
F &= p(x,y,z) \begin{bmatrix} N_x \\ N_y \\ N_z \end{bmatrix}\\
(\nabla \times F) &=
\left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z},
\frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x},
\frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right)\\
&= \left( N_z \frac{\partial p}{\partial y} - N_y \frac{\partial p}{\partial z},
N_x \frac{\partial p}{\partial z} - N_z \frac{\partial p}{\partial x},
N_y \frac{\partial p}{\partial x} - N_x \frac{\partial p}{\partial y} \right)
\end{aligned}
$$

And the proof:

$$
\begin{aligned}
(\nabla \times F) \cdot \vec{N} =
&N_z N_x \frac{\partial p}{\partial y} - N_y N_x \frac{\partial p}{\partial z} +\\
&N_x N_y \frac{\partial p}{\partial z} - N_z N_y \frac{\partial p}{\partial x} +\\
&N_y N_z \frac{\partial p}{\partial x} - N_x N_z \frac{\partial p}{\partial y} = 0
\end{aligned}
$$

Notice that if the normal is $\vec{N}=(0,0,1)$, you only end up with the equation that Robert Bridson proposed in his paper "Curl-Noise for Procedural Fluid Flow", which is:

$$
\frac{\partial p}{\partial y}\mathbf{i} -\frac{\partial p}{\partial x}\mathbf{j}
$$

So now you know where my other answer came from. Since the curl have zero z component, we shall call this special case the 2D Case.

Implementation

The implementation is much easier because we only have to differentiate a single function. You should by now know how to implement that. Here is the non-trivial implementation of the surface curl; notice how there is an extra input called normals now:

Lets consider the simple example in which we use a sphere as our mesh, the normal of the sphere at any point on its surface is equal to that point normalized, so the normal is simply the point locations normalized. After the curl is computed and the the points advected, we can project the output onto the surface to make sure the splines always lie on the surface of the sphere since we are merely performing a finite approximation. We won't need this step for sufficiently small step sizes for Euler's integration which is in our case decided by the magnitude of the normal vector field or the amplitude of the noise function. To project any point onto the surface of a sphere of radius $r$ we normalize the vector and multiply by the radius, so the advection loop looks like this now:

The result are those magnificent and beautiful splines:

Blend file for study and practice:

Since the 2D case have two zero normal components, let's implement the 2D case using an optimized setup. We simply remove anything that got multiplied by zero to get:

This gives:

Blend file:

Ok, I have given you an example where the mesh is defined implicitly, but how do we use an actual mesh? Well, we can use a BVH tree:

We approximate the normal field by the Nearest Surface Point node Normal output, and we change the generator to be the location of the nearest surface point. Why? Because this is the projection of the point on the surface, which is a step we have to do to make sure we get accurate results as we discussed before. Make sure to reduce the step size, because BVH trees are not as accurate as the implicit definition of our sphere.

It should be noted that constructing BVH trees from objects directly won't apply modifiers, so such node tree can be used:

And finally, here is the result of both setups:

Inviscid Boundary Condition

An inviscid boundary condition required the dot product between the curl and the surface normals around the boundaries of objects to be zero, in other words, it requires the curl to be orthogonal to the normals of the object around its boundaries. Ensuring this condition in the surface curl case is easy, while it is somewhat challenging for the general 3D case, so I shall only introduce the surface curl.

Looking back at the equation for the 2D case:

$$
\frac{\partial p}{\partial y}\mathbf{i} -\frac{\partial p}{\partial x}\mathbf{j}
$$

We notice that the curl is actually orthogonal to the Gradient, the gradient vector being, in simple terms, a vector pointing in the direction of the greatest change. The gradient is computed by:

$$
\frac{\partial p}{\partial x}\mathbf{i} +\frac{\partial p}{\partial y}\mathbf{j}
$$

Can you see the similarities? So we can implement the boundary condition by making sure the noise field have a gradient tangent to the normals of the object around its boundaries, in other words, the noise field should increase the most when moving in the direction of the surface normals. We actually know a field that satisfied this condition everywhere, that is, its gradient is tangent to the surface normals. This field is the Signed Distance Field (SDF). An SDF is, for every point, the distance to the closest surface point, having a negative sign if it is inside the surface and positive if outside (However, the sign is redundant in this particular application). So the condition can be implemented by modulating the noise field based on the SDF of the surface using a ramp. As Robert implemented it, the noise field should be multiplied by the ramp:

$$
\begin{cases}
      1 & r > 1 \\
      \frac{15}{8}r - \frac{10}{8}r^3 + \frac{3}{8}r^5 & -1 \leq r \leq 1 \\
      -1 & r < -1
\end{cases}
$$

Where $r$ is the SDF divided by a scalar defining the modulation width. Which we can implement as follows:

What we did is replace the noise node with the above subprogram and add a BVH tree as an input.

Using Older Animation Nodes Versions

The only node used in this answer and does not exist prior to Animation Nodes v2.1 is the Vector Noise node which provides us with the perlin or simplex noise functions.

To make the node tree work for older versions, you simply have to replace the Vector Noise node with the built-in blender noise functions that exists in the mathutils python module. To do so, we can use the expression node:

With this code:

[mathutils.noise.noise(x) for x in vectors]

Aside from noise.noise, there are other functions that give you more control, which you can find in the API.

File for study:


How can I edit greyed out Keyframes again?

You have Locked your keyframes. Press the padlock icon next to the object name to unlock them again:


How to manipulate a smoke simulation to look like a realistic candle flame

You can control the shape of the flames quite well by shaping the flow object. Here I've used a transparent cone as the flow object. I added some loop cuts to its sides to be able to make it slightly rounded, but I don't think this shape is exactly what you want. You will have to model the shape to fit your needs.

The flow object's material:

The domain material:

The flame texture:

The colour ramp is simply the default one from Quick Smoke, with just changed alpha levels.

The domain settings:

The flow object settings:

And the result:

If you use high transparency on the flames, the flow object may become visible although it's fully transparent. This is because you see where the flames are emitted from. To get around this, simply hide the flow object inside the lighter and make the lighter a collision object, to prevent the flames from seeping through its faces. Depending on whether you want to move the lighter around or not, you will need to change the Collision type. Animated = manual animation, Rigid = automatic animation by rigid body physics, Static = not moving.

And an example .blend file

As I said, you will probably need to model the shape further, and also tweak the settings to your liking. This is simply meant to be a pointer in the right direction.

Furthermore, you have your flames rising far to fast, and they reach the upper boundary of the domain object before they come together into a singular point. If I were you, I'd delete the entire sim, keeping only the lighter object and start over with the flow and domain objects.


How can I keyframe multiple (like 300) objects' show/hide property?

Create an Empty, keyframe its Visibility property, select all the objects you'd like to hide/show, select the newly created Empty, press CtrlL to open up Make Links menu and select Animation Data.

Credit for the idea goes to @p2or, see: How to copy animation attributes to multiple objects?


Is it possible to make Blender a Y-up world?

This is unique to Blender and as far as I know, cannot be changed. .

  Blender uses the right hand coordinate system with the Z axis pointing
  upwards. This is common with the coordinate systems used by most
  common 3D CAD packages.

Another reasoning for this is that a common convention for real world applications for engineering and science is that X and Y axes define a flat ground plane while the Z axis defines up and down

However, if you work between these software that you mention above, one way you could maintain consistency is to export the object(s) as a .obj or .fbx (or any other similar format, most if not all exporters in Blender have this option) to the other application with the 'up' axis being Z etc.


Well, first try using an  environment  texture instead of a  image texture and then go into the  Ray Visibility panel and turn off the channels you don't want the map to show up in.
Next, make sure you have a glossy or reflection shader mixed in to your eyeball material so that it can pick up the environment.


How do you stretch an object from multiple vertices using a python script?

It'll be something like this, assuming Icosphere at origin.
Note: you have to start in Edit mode for some reason, otherwise it throws an error.

import bpy
import bmesh

obj  = bpy.data.objects['Icosphere'] ## set name
mesh  = bpy.data.meshes['Icosphere']

bpy.ops.object.mode_set(mode = 'EDIT')
bm  = bmesh.from_edit_mesh( mesh )

minX  = 0
corners  = obj.bound_box
trans  = bpy.ops.transform

for corner in range(len(corners)):
  x = corners[corner][0]
  if x < minX:
    minX  = x

for v in range(len(bm.verts)):
  vert = bm.verts[v]
  if vert.co.x == minX:
    vert.select_set(1)
  else:
    vert.select_set(0)

trans.translate( value = (-5, 0, 0),
                 constraint_axis = (False, False, False),
                 constraint_orientation = 'GLOBAL',
                 mirror = False,
                 proportional = 'ENABLED',
                 proportional_edit_falloff = 'SMOOTH',
                 proportional_size = 2 )

trans.resize(value = (0.3, 0.3, 0.3),
             constraint_axis = (False, False, False),
             constraint_orientation = 'GLOBAL',
             mirror = False,
             proportional = 'ENABLED',
             proportional_edit_falloff = 'SMOOTH',
             proportional_size = 2 )


Set shortcut to use 3DConnexion SpaceMouse button?

Try editing the keymap in ⎈ Ctrl⎇ AltU> User preferences > Input.

To change a shortcut, click the button with the current shortcut and press the new shortcut. Pressing a mouse button works for me:


Displaying each Asian characters in their own fonts?

I accidentally discovered this but, I could get the result I wanted by just checking the "Translation" checkbox in Interface in the Preference dialogue. Blender's version is 2.81a.

Even though "Translation" is checked, it did not change the UI language from English. I wonder why this option is turned on by default. Maybe there is some side effects like slow UI or something? I will add here if I later discover some problems with this, but so far, it seems working.

Update

There seems to be a big problem. When it is checked, Blender seems to be using "international fonts". But that makes zooming on the Shade Editor very slow. It is not unusably slow, but makes it unpleasant to use Blender. I tried to report it as a bug, but found an existing entry for this. The entry was closed because it is an "old known TODO", meaning the developers are currently do not have the time to fix this and will not fix this.

Blender is probably written in OpenGL, and I don't know why zooming of a few lines of texts should be this slow just because "international fonts" are used, because web browsers like Chrome zooms fine with Asian fonts, but anyway, I think I will only check the "Translation" when I have to open someone else's file that used Asian texts for the names of objects.


How to do multiple plane tracks from one video

To create a plane track you select a minimum of four tracking points and then click Create Plane Track, which is available in the solve tab of the tools sidebar T in the Clip Editor.

I don't know if there are any limits, blender just lets you create as many plane tracks as you want for the current movie, I just created 40 as a test.

There is a plane track deform node that you can use in the compositor that will distort an image to match the plane track you choose.


Can't join objects with different materials

So...
When you want to join multiple objects, be sure that they have UV maps with identical names.
It was not obvious for me.


How do i texture a long cylinder without so much stretch?

I find that if you're UV-unwrapping the mesh, you need to make sure to apply the scale on the mesh before unwrapping. Do this by selecting the mesh and pressing CTRL+A, then click "Scale" on the popup menu that appears. When that's done, re-unwrap the mesh:

Note: you can also apply the Rotation and Location if needed, and it's generally a good idea to apply Location, Rotation, and Scale on  your mesh before doing things like UV unwrapping, texturing in general, physics effects, particles, etc.


How would you render backface culling with Eevee engine?

It seems like you have to do it on a material level, using nodes. There is no way to activate backface culling on final render.


Is there a way to force pixellate the viewport render?

You can change your viewport resolution.

Render Tab > Performance > Viewport > Pixel Size


Blender 2.8 which rendering + engine will give me what I want

The Workbench engine isn't meant for lighting so this isn't suitable. For Cycles and Eevee you have to create a material. You can do that in the Shading workspace.


Check Use Nodes at the bottom of the Node Editor.


make Tab the autocomplete shortcut in the Python Console

An intelligent Tab key appears to be the default in 2.8x.
When used it creates Tabs in the white-space at the start of a line, otherwise it Autocompletes when used after text characters.


Make a wind forcefield.
Make a particle system that isnt effected by gravity, has no starting velocity, and has some brownian motion.

I think you are asking how to have the particles only come from the top of the torch with no particles coming from the bottom? Just weight paint it and remove/re-enable it in the particle system so that it updates


Why do still renders look sharper than animations?

Make sure the resolution for the final render is set at 100%.

If you are going to do further compositing/postproduction/color correction in other software, render to an image sequence in a lossless format using a higher bit depht like 16bit per channel.


As posted on BlenderArtists, here's the solution as provided below:

I simply added a limit rotation constraint to a duplicate of the main object, which I shrunk down (not necessary) and added a "limit rotation constraint" which I set to limit the X axis rotation to -30 degrees.

Then, I added a driver (right-click the desired value in the sidebar to the right in the 3D view and select "Add Driver") to the X axis for the "Axe_motor" (the main object) and set the driver's expression be "var * 6.26" in my case.

So, I multiplied -30 degrees by 6.26 times. this resulted in a perfect arc from the axe's resting position (0 degrees) to -188 degrees in X.


How to make rope wrapping around spheres?

Here's one way you could do it (or at least get a good starting base mesh).
Start by adding a UV sphere, but make sure to reduce the number of segments and rings by half before you do anything else.

From here, add a Decimate modifier, set to "un-subdivide", with 1 iterations. This will make the base of the "webbing".

From here, add 2 more modifiers. First, add a wireframe modifier - this will give it some thickness. I increased the thickness from 0.02 to 0.04 because I thought it looks more like rope - adjust to your taste. Next, add a bevel modifier. The reason for the bevel is that I plan to add a Subdivision Surface Modifier in the next step, and the bevel modifier makes it keep it's shape properly.

Next, add the Subdivision Surface Modifier to the (already existing) stack of modifiers. This is also a time to add a new UV sphere (in object mode) in the same spot as you added the first sphere. This will act as your "light ball". Make sure to subdivide and smooth shade the UV sphere appropriately so it looks like a proper sphere.

I gave the light some color (just to see it better), and then applied all the modifiers to the "rope" object from top to bottom on the list. From here, select the rope object, enter edit mode and select a vertex at the very top. Press O to turn on Proportional Editing, and select "sharp" from the edit list.

Now, grab the vertex (G) and move it up along the z-axis. Use the mouse wheel to control the size of the edit circle until the shape looks right. Use your light "ball" as a size reference.

Last, all there is to do is give your rope a texture - I used a simple procedural one made out of noise, but you can use whatever you want.

Then just give a better shader to your light and adjust your world lighting (also to taste). Final result looks something like this:

Obviously you can play with the values at any point to further customize it to your liking. I hope this just gives a good base starting idea you can use.


How do you assign a logic brick onto an indivual bone?

Blender's logic bricks are attached to an object. An armature is one object that can contain several bones, a simple motion actuator will move the entire armature as one solid object.

To move a single bone you need to create an action, then play the action using an action actuator.


Is it possible to set all texture nodes in a node tree to a specific vector?

Add a Reroute node with the desired value and select it. Then, you can use this script.

# First, define some stuff
# mat: the material; tree: the node tree; nodes: the node list
mat = bpy.data.materials['Material Name'] # or index
tree = mat.node_tree
nodes = tree.nodes

# We'll find the source node and store it in src
src_socket = None
if nodes.active:
  if len(nodes.active.outputs) == 1:
    src_socket = nodes.active.outputs[0]

if src_socket is not None:                       # only work if node found
  for node in nodes:                             # check each node
    if node.type.startswith('TEX'):              # only operate on textures
      for input in node.inputs:                  # check each input
        if input.type == 'VECTOR':               # only operate on vectors
          tree.links.new(src_socket, input)      # set up the link
          break                                  # only do the first vector
else:                                            # fail if no valid select
  print('No single-output node selected')

Tested on Blender v2.69 r60995.


In your example you can create  a "ruler": select the 5 vertices of the corner, Shift+D to duplicate them, move over on the Z axis, rotate them 90 degrees on X axis with pivot point on the first vertex, create 4 loop cuts, select the first with Alt left click, move it on Y axis with vertex snap On, pointing at the second vertex of the ruler. Do the same for the others loopcuts. Repeat until done.


How to change the handle_type of a keyframe I've just inserted?

I figured out a way to do it but in my opinion it's not ideal:

keyframe = sp.id_data.animation_data.action.fcurves[-1].keyframe_points[-1]
keyframe.handle_left_type = 'VECTOR'
keyframe.handle_right_type = 'VECTOR'

It's not ideal because the action might have other fcurves but it solves my case because I know it doesn't for my particular problem.


How to use unwrapped mesh on different images at different locations?

Okay, so moonboots told me I can create a separate UV map, in Object data panel, and insert Input>UV map node to the shader editor, to specify the UV map.

Thank you so much!


Try something like this. All I did was separate the Z value of the object's vector, and run it through a Wave texture (scaled really small so it's a single band), and then control it's size even further with a ColorRamp, and it's position with a Mapping Node.
To change the position of the ring (in realtime), I used a Value Node with the value set to #frame (just type it in the box) - this makes the value change with the frame number when you animate. To control the up/down motion of the ring, I used a Math Node set to sine, as it will return a value that cycles between -1 and 1 as the input (frame number) increases. I connected this to the location input of the mapping node (which only affects the Z axis, due to the separation of axes beforehand).
The other math nodes that are there are to slow down the speed of the up down motion (Divide), and to change it's up and down range (Multiply) - you may need to adjust these values based on your preference and/or the size of your object.
Lastly I used this "moving ring" as a mask between my normal material and an Emission Shader:


How to create a seamless low poly terrain with displace and multiple planes?

A solution can be using two additional modifiers:

Shrinkwrap to fill the gap between the two images
Data transfer to align the normal continuously

The vertex group used to that is the following:

You can also use "extend" option on the textures mapping:

Edit

Applying the data transfer modifier won't work if 'auto smooth' is not set, as Blender will recalculate the normals.
So use auto smooth (180°) and apply the modifier:


How to change the top radius of a truncated cone with Python?

Cylinder to Cone via shape key.
Here is a take on this using shape keys, Can't use 0 as the radius on the cone tip as it will not be able to be joined as shapes.
import bpy
context = bpy.context
scene = context.scene
# no active object
scene.objects.active = None
R1 = 4
R2 = 4
L = 10
# create cone
bpy.ops.mesh.primitive_cone_add(vertices=16,
                                radius1=R1,
                                radius2=R2,
                                depth=L)
cone1 = scene.objects.active
# create opposite cone
bpy.ops.mesh.primitive_cone_add(vertices=16,
                                radius1=0.001, # can't use 0
                                radius2=R2,
                                depth=L)
cone1.select = True
# join as shapes
bpy.ops.object.join_shapes()
# remove cone1
scene.objects.unlink(cone1)
bpy.data.objects.remove(cone1)

Change the R1, R2 for the second cone to suit your needs.  Altering the shapekey value will give cone at 0.0, and cylinder at 1.0
context.object.data.shape_keys.key_blocks['Cone.001'].value = 1.0


Trying to Bake Texture, but it's saying that it's a uninitialized image?

Create a new blank image with transparency (choose your size, maybe 2K resolution). In the current shader tree, include a texture image connected to a diffuse shader.

Your procedural shader network should be mixed with the image node->Diffuse with a Mix shader node. Lastly that node should connect to material output.

Your viewport should still be showing your procedural shader only.
Now go to the render properties, scroll down to bake, and choose (diffuse). Press bake.

If you make a screen capture, of your setup that would help as well.


Your have a context issue because you might be running your script from text editor while shrink_fatten.poll method checks if you're in the 3D view.
Overriding context can be painful especially in edit mode, so you should avoid using ops whenever you can.
About the shrink_fatten ops, i noticed that it simply change the pressure value of each point. So i would try :
#set frame as the current active frame
frame = bpy.context.object.data.layers.active.active_frame

#set amount of pressure to add or remove
amount = 0.3

#apply this to selected points
for stroke in frame.strokes :
    for point in stroke.points :
        if point.select :
            point.pressure += amount


how do I get the 'tool' back to my selection?

Hit , (Comma), it will set it back to the center

Circled in green are the options that will return your manipulator widget to the correct location. The one in red is where you have it set now, which is why it is at the 3d cursor.

You can also change it at the bottom of the 3d view.


Update child coordinates relative to parent

Insert a bounding box as parent.
Does a child object inherit the matrix from the parent?
Can slip in a new parent

Copy the object, clear modifiers, constraints and animation data
Make the copy the parent
Set the copy matrix local to identity, in this case with basis and parent_inverse both identity.  As shown in link above when calculating the world matrix by chaining the matrices up the parents, an identity local matrix does not contribute to the result.
All local transforms that were on input mesh are now transferred to the bbox parent.

Test script, select a mesh object, run script.
import bpy
from mathutils import Matrix, Vector

def bbox2mesh(ob):
    bbox = ob.copy()
    bbox.constraints.clear()
    bbox.modifiers.clear()
    bbox.animation_data_clear()
    faces = ((0, 1, 2, 3),
             (4, 7, 6, 5),
             (0, 4, 5, 1),
             (1, 5, 6, 2),
             (2, 6, 7, 3),
             (4, 0, 3, 7),
            )
    me = bpy.data.meshes.new("BBox")
    me.from_pydata([Vector(b) for b in ob.bound_box], [], faces)
    bbox.display_type = 'WIRE'
    bbox.data = me
    return bbox

context = bpy.context
ob = context.object
coll = context.collection
bbox = bbox2mesh(ob) # make a copy
ob.parent = bbox
ob.matrix_basis = ob.matrix_parent_inverse = Matrix()
coll.objects.link(bbox)
context.view_layer.objects.active = bbox


Why are straight lines sloping in render?

The lens shift controls on the camera exist in Blender precisely to solve this problem. Photographers use tilt-shift lenses to do the same thing.

Rather than rotating the camera upwards to the building, you can keep it pointing straight ahead, and increase the camera Y shift. This will preserve straight vertical lines.

A good visualization of that is here:
http://digitized-life.blogspot.com.es/2013/02/blender-26.html


How to properly sharpen concave angle without affecting topology?

It seems you are using modifiers: Solidify and Subsurf.

The problem here, is that you don't have any real edge to apply crease.

First you should apply the Solidify Modifier, then you could get the edge in the red circle you drawn.

The crease amount will influence the shape, from completly smooth to completly sharp.

Alternatively, you could select the edge and apply a Bevel.

Select the edge, W, Bevel

Set the amount and the other properties in the panel (T)


Edge effects on almost completely transparent objects

Turns out the problem goes away if I switched the transparency of the outer block from raytraced to z-transparency.


How to distribute light equally on a surface?

Use a sun lamp pointing directly downwards, and set a non-glossy material for your wooden plane, e.g. a simple diffuse one:


How to disable in render just one object and not the entire collection in blender 2.8?

In the outliner there is a filter option which allows you to enable the Restriction Toggles that aren't displayed by default which includes Disable in Renders (camera icon). Once you have it enabled you can disable any object or collection from being rendered by clicking on the camera icon behind it in the outliner.


Grease Pencil in 2.8 can you link or reuse mouth shapes

maybe you've already found the way, but just in case: If I understood it well, yes. You have to create the phonemes as a grease pencil object whit all shapes as a frames in a separate blend file. Link the mouth object via "file> link>object" in the destination file. place your instance and edit frame phoneme order as you want. Go back to the original file whenever you want to edit one of the phonemes. Save and the edited shapes would update.


what is the hotkey to change noise distortion types in the displace modifier?

Hold Ctrl + Scrolling over the button will do what you want.


How to extrude a circular shape out of an object

Add a circle, use Knife Project tool and extrude the result. I always do and it works well every time. Or, if you insist on using Shrink Wrap, add a circle and right after select filling, e.g. N-gon, in the Add Circle panel to the left


How to Add driver to modifier SimpleDeform-angle by scipt python in blender 2.8

Consult docs or other questions on how to add a driver

Here is your "noob" code edited to add a driver. Select a mesh object and run script.

It so happens that the current context.scene.frame_current is known to the driver namespace as frame so no driver variable need be created.

import bpy
ob = bpy.context.object
bend = ob.modifiers.new(name="bend", type='SIMPLE_DEFORM')
bend.deform_method = 'BEND'

fcurve = bend.driver_add("angle")
driver = fcurve.driver
driver.expression = "sin(frame/20)"

Also remember that angles when scripting are natively in radians.  2 pi radians = 360 degrees.  So at frame 20 the angle of bend will be sine of 1 radian (or around 57 degrees.)  Use sin(radians(frame) / 20) if frame is expected as degrees.


manipulator missing from project but visible in new ones

ok seems like its a bug in the program and the only solution for it is to append all the objects to a new project (thats blender support team response)


Make sure you set your normal map textures color mode to non-color data.

You have to do this in the texture settings AND in the properties panel of the cycles material node graph panel


Issue with bridge between two edge loops

I think that's not possible, looping requires exact amount of edges in both sides, what you could do is merging all those edges until there is exact amount of edges, or bridging edge by edge manually. BTW what kind of mesh do you want to achieve? Maybe there is another way to do it...


So, I went into "simplify" in "scene properties" and added 1 AO bounce. I went from 15 minutes a frame to 47 seconds with NO grain! The catch?

An AO bounce, takes light from the world background (I think) and adds this into the scene (interior or not) It also, removes all reflections from glossy or metallic surfaces and replaces them with the world background probe/map.

This Didn't help, considering my whole animation was based around a showcase for a product that you use on a MIRROR.

The fix?

Go into the "world Properties" enable "AO" and increase the Distance until these reflections disappear. Then back to scene and increase the light bounces for AO, until your scene looks right.

You will find your scene is a lot more exposed, however, if you use the "filmic" colour management, and set it to one of the higher contrasts, and then render in a HDR format, you can reduce the exposure and keep the correct contrast ratio.

Now, I didn't stay at 47 second render time per frame, however I did cut if from 15 minutes, to 4 minutes. Which, is a massive difference!

I hope this helps anyone with a similar issue. Please remember, this is only useful for indoor scenes! an outdoor scene won't have the same noise issues, and fiddling with the AO, will massively increase the world background becoming oversaturated.

If you couple this hint with the Denoising feature, you will get a really good looking render, for a third of the time.


Mantaflow - creating smoke out of fluid particles

Because the secondary particles are actually particle systems, it is possible to set them to render as an object. The object it renders are would be a smoke inflow object. I haven't tried this yet, so let me know if this works if you end up trying this.


Add objects with Industry Compatible Keymap

In Blender 2.83 go to Edit -> Preferences -> Keymap
On top, instead of Industry Compatible, temporarily change it to Blender.
Go to 3D View -> Object Mode -> Object Mode (Global) -> Add
Copy  wm.call_menu  and  VIEW3D_MT_add
On top change back to Industry Compatible
again go to 3D View -> Object Mode -> Object Mode (Global) but now push Add New at the bottom.
After, click on none change none for wm.call_menu.
Active the key Shift and in the Name field enter VIEW3D_MT_add
Next time you will know how to do it for any key


How to add gradient map to Blender area light?


When filling a gap with a new face edges do not seem to subdivide correctly

The most likely explanation is that the new faces normals are flipped.

In the image below, i created a cube, added a subdivision surface, and then flipped the normals on the top face. As you can see, the top face becomes sharp, but it is hard to see why. However, if you select it and do the "flip normals" command, it returns to normal.

This may not be your issue, but try selecting the affected faces and using either Flip Normals or Make Normals Consistent, and it will most likely fix your issue.


Image texture not showing, but diffuse does

You need to add a Shader node between the Image Texture and the Mix node - in your case probably a Diffuse Shader - alternatively use a MixRGB Color node to mix the colors before feeding into the existing Diffuse shader. As a general rule you should normally connect sockets to only the same color - in your case you have a yellow (Color) connected to green (Shader) and this is the cause of your problem since green sockets should only ever connect to green (anything else is completely incompatible).

Note that there are some situations where you can mix some node types - eg, the Color of a Texture to a Factor of a Mix node. However, this does result in some conversion between the types which can produce unexpected results. There is no such conversion to or from green sockets.


I may have an explanation. I was doing some motion tracking, and when I rendered each frame was rendering twice in two identical "layers". This doubled render time, as you explained.
The thing that fixed it was going into Layer Properties in the Properties panel on the right. Then go into View Layer and check Render Single Layer. This solved the problem for me.
I hope this helps!


To make composite nodes up and running, check two things:

Ensure the Compositing option under Post processing in the Render tab is checked.
Ensure the Compositing nodes are enabled. In the Node Editor, Compositing Nodes tab check Use Nodes:


How can I set and get the vertex color property?

I would like to get and set color values numerically (ie. not painting),

There may be add-ons that cater to this, but at present (March 2016)

Blender doesn't have a (non-Python) way to set the Vertex Colors per selected vertex/vertices. Per face is however, as stated below, not a problem.

There is no built-in interface (yet) to get the rgb value of a selected Vertex. Each vertex can be shared by a number of faces, therefore a vertex doesn't necessarily have one color associated with it.  Behind the scenes the Vertex Colors are not stored in the data per vertex but in a Vertex Color layer, which stores vertex colors for each face of the mesh.
Possibly this explains that a bit more clear. There are 9 verts in this subdivided plane, and the middle vertex is used in 4 faces and therefore has 4 different colors associated.

Vertex Color Map
You can set a collection of faces to one colour in vertex paint mode, by selecting them and setting the colour from the colour picker, then shift+K will fill the selection with that colour. You can  enter numericals into the Blender colour picker.
You can pick faces with face selection masking
If you want to do it by script:
import bpy
import random

# start in object mode
obj = bpy.data.objects["Cube"]
mesh = obj.data

if not mesh.vertex_colors:
    mesh.vertex_colors.new()

"""
let us assume for sake of brevity that there is now
a vertex color map called  'Col'
"""

color_layer = mesh.vertex_colors["Col"]

# or you could avoid using the color_layer name
# color_layer = mesh.vertex_colors.active

i = 0
for poly in mesh.polygons:
    for idx in poly.loop_indices:
        r, g, b = [random.random() for i in range(3)]
        color_layer.data[i].color = (r, g, b, 1.0)
        i += 1

# set to vertex paint mode to see the result
bpy.ops.object.mode_set(mode='VERTEX_PAINT')

Also a small blogpost about vertex colours here and here, if you are so inclined.
For Weight Painting, i'm not sure -- i'll let someone more familiar with that give an answer


Select an edge you want to move along, then expand Transform Orientations combo-box and click on a + sign to add a new orientation. Now select the vertices you want to move and move them along green Y axis (G, then Y shortcuts)


Don't... download the entire repository.

Download the latest fspy binary from here: github.com/stuffmatic/fSpy/releases
And the latest add-on for blender from here: github.com/stuffmatic/fSpy-Blender/releases.

For Linux (AppImage): Right-click (RMB) the Binary > Permissions > Allow executing file, which should work for all distros.
Further reading: How to download and install an add-on hosted on github properly?


Make Particles follow a Black and White image texture

In the image above on the middle see a particle system with an indication at the bottom that a texture is attached.  On the right side you see the location to change the texture and to specify its influence as density.  You press + New to create the texture reference you need. You can ignore the filler on the left side.  This writing is not a tutorial.  Please supplement this with a tutorial as specified above.  This is to show the primary panels to start your process.  You will replace the abstract texture with your texture.  Then if you prefer/need you can invert your texture in the texture panel or invert it before.  So you can flip the colors from black to white and white to black very easily. You can look at the headers of the panels and icons to navigate to the correct place.


How do you keep another object's outline visible at all times while working on another object's mesh that is directly above the other objects mesh?

go in the filter at the top of the window and create a selection restriction and then restrict the object you don't want to select and then you can see the outlines of both the objects but you can select only the objects that have the selection unrestricted |
the filter option -