Cutting centered hole in mirrored object with subsurf

A quad won't give you a real circle anyway. If you look at your example, the outer holes are still bulging a little in the corners. That's due to the algorithm and can't be helped. Six or 8 sides are much more precise. So, since you have 4 (6 with mirroring) verts in the middle, turn it into a hexagon or use 8 to have a nice clean result. Depending on what you want to do with the hole, an additional facering around the holes can be helpful as well as makeing a nice and undistorted bevel later.


how to make the separated vertex is the active object after separation with python?

Maybe this will lead you to the solution:

so = bpy.context.scene.objects
so.active = o2
for obj in so:
    obj.select = (obj==o2)


Fluid simulation wont happen in a small pipe?

Most likely your pipe/inflow is too narrow/small for your simulation resolution - it must be at least comparable to the size of the “cells” of your simulation.

You can determine the size of the “cells” by taking the longest dimension of your fluid domain and dividing it by the fluid domain’s Resolution - your pipe should typically be at least three times the size of the cells, otherwise the flow of fluid can be blocked - especially on diagonal sections and curves; much higher resolution is preferable.

However, the overhead of the simulation will increase significantly with higher resolution, with an increase relative to the cube of the increase in resolution - so doubling the resolution will allow for pipes that are half as narrow but will take 8 times (ie, 2x2x2) the overhead (memory and CPU comutation time) to compute.


How to build a street gradient with a curve (Avoiding rotation)

You can twist the curve points using Ctrl+T :

Or you can use the Z up curve option :


What is the best way to procedurally texture an object without the hard edged seams I am getting?

For your textures, if the Image Texture Blend option doesn't fix the problem, I don't think there's any easy way to hide the visible seams. You could try to fix it in Texture Painting mode with the Stencil or the Clone brush, but it will really depend on the texture I guess.
So I probably misunderstood your question, but for the specific texture you're showing, a kind of grid, you could use your current topology:

Duplicate your object, hide the original. As suggested by Lemon, if you want a more dense and uniform net, use the Remesh tool/ Voxel option in the Properties panel > Object Data > Remesh:

If you want the topology to be rotated 45°, select all and CtrlE > Unsubdivide with an Iteration of 1 (Operator box), like that:

Go in Edit mode, switch to Face Select, select all, press i twice to inset the faces. Keep these faces selected, give them a material (here orange). Ctrli to invert the selection, give the strokes another material (here red):

Unhide the original torso, it must overlap its copy, go in Edit mode, select all, unwrap (Smart UV Project mode), in the UV Editor create a new image (size 2048 x 2048 for example), in the Shader Editor create an Image Texture node, don't plug it for the moment, load the image you've created. Make sure you're in Cycles, select the copy, shift select the original, go in the Properties panel > Render > Bake, choose Bake Type > Diffuse, disable Influence > Direct and Indirect, enable Selected to Active, give a bit of Extrusion value, click on Bake:

Once the map as been created, plug the Image Texture node into the Principled BSDF (or Diffuse), the map is now displayed on the surface of the original torso. If you use a Subdivision Surface modifier You may need to give some corrections in Texture Painting mode:


Look under Render Options for the Shading settings. Alpha is set to "Sky" by default, which will remove transparency from your rendered image by filling it with the sky gradient colors (by default a simple dark gray color). That Alpha Over node needs this transparency. Set Shading > Alpha to "Transparent" to make the rendered image transparent.


The developer that makes a tool to fix bad video will become a millionaire. That developer hasn't come yet. Out of focus is probably one of the worst problems at that. In short, you're not going to get good results.


https://blenderartists.org/forum/showthread.php?157112-Texture-baking-reflections-both-light-and-objects
Providing you are speaking about re-creating this image, here is an idea that is relevant to your use of Glare - relevant part is:

Baking reflections and specular highlights is a bad idea if you want to move the camera, the object or any of the lights. The position and content of the reflections and highlights depend on their relative positions
You should bake the base colours, apply it as a colour map and let Blender calculate the specular highlights dynamically. It shouldn't slow things down too much.

One more piece of reference is this post from the Blender Stack Exchange that asks about baking glass:

Baking is generally used to simulate effects like shadows, lighting, small details like bumps or roughness through displacement maps, bump
maps, normal maps, etc., the kind of thing that is either too complex
or too expensive, or somehow unwanted or not needed to calculate in
real time.
Baking means it will be pre-calculated and become static, so it wont
react when you change the viewpoint. So if you bake things like
transparency or refraction or reflections they will become static, and
seem to be "printed" or "painted" onto the surface of the object and
that is generally not desired.
See here What does "Baking" mean?

If you are using this image as a texture, like a diffuse image on a plane for instance and you want the lighting to dynamically light your scene while the glass would be a glossy color, I would suggest it probably won't matter significantly to have an incredibly high level of detail between objects, you aren't getting that close to buildings. If you are recreating it, then try to avoid baking the gloss if you are doing a moving camera and let Blender do it automatically. If you are just creating a still frame with this image as reference, go for it.
If you are using this direct image as like a background to reflect on something, you would want to enable the Import Images as Planes add-on that comes with blender, choose this file and then you'd have the image already set perfectly on a plane mesh that you can manipulate and use for whatever you need.
As for how to draw different textures to different pieces of the building, either you would create the windows as separate meshes, and apply the glass texture or something I just found this post about using Vertex Paint to draw different textures. Either Vertex or Texture Paint would allow you the control of the emission or glossiness you are looking for, and it will mix all nice with certain settings to make your image more realistic reflectively.
Good luck! If you can clarify what your project is a little more, I'll try and help more!


Gradient in a Checker Texture's individual cells

I think this is a good start :

Make sure to match the Mapping node scale to the checker texture scale. You'll need to adapt the mapping nodes as well as the Modulos plugs depending on the orientation and the face you need to display on.


Exporting a Wet map image in Blender 2.8

With my 2.8 blender built Dynamic Paint only works in the viewport wth the render display mode and the surface canvas. Then I can export it as well and use the resultung images in an image node as a sequence to plug into my material's shader node. It does not work in eevee or in workbench or in the Look Dev mode in Cycles. It really only works in Rendered mode in Cycles with a surface Canvas. Wish I would have gotten that memo. I mean it's supposed to be a major release not a beta. Yeah I'm grumpy about this.


How can I break apart a mountain in Blender?

You could try out the Fracture Modifier Build

from here... http://df-vfx.de/fracturemodifier/

or here http://graphicall.org/1148

which is a separate blender build.

I closed the bottom of the landscape with a face, then I prefractured this with a helper object and Voronoi + Boolean. After that i set up some easily breakable constraints and triggering, and added a ground plane.

Simulation looks like this:

If you have further questions, please post either here on stackexchange or here :

https://blenderartists.org/forum/showthread.php?343637-Custom-Build-Blender-Fracture-Modifier

The Blend link: (will only work with the Fracture Modifier Build)


This happens because couple of the vertices has very small weighting to the bones. So avoid this you need to select your mesh, then enter edit mode then select these vertices and set the weighting to 0 for the two bones as shown below:

This will fix the problem as shown below:

Updated .blend file can be found here:


I figured it out. The initial mesh cannot be subdivided more than the number of bone ribs. Each vertex should be mapped to a bone. Watching this tutorial on rigging an umbrella in 3ds Max gave me the answer.

I had basically overcomplicated the problem by subdivisions assigned with weights in between the two ribs.

In other words, I have 6 ribs for the umbrella, with 4 bones along the umbrella mesh. Each bone gets mapped to a vertex.


Image Plane with Alpha Transparency, I want to remove lighting effects

Mix your Image texture (through a shader - emission is possible) with a Transparent Shader, using your images' alpha as a mix factor. As you can see in the image bleow, there are no lights in the scene. It works in both cycles and EEVEE, but keep in mind, in Cycles it will actually emit light without further modification to the shader. If using EEVEE, remember to switch the material's blend mode to something other than opaque:


Preventing axis being messed up by adding new objects to the scene in Front Perspective View

No, you either get it aligned to your current view, including the object's local orientation, or globally oriented.

Apply object rotation

Go to Object Mode and press Ctrl+A, 2 (Apply Rotation) and your object orientation is applied, meaning that the mesh stays exactly the same but all 3 axes are parallel to the global ones afterwards.

Concerning default behaviour

You can't make blender apply the rotation of your object all the time or always when you add an object.

I guess it would be possible to write a python addon/macro to always realign the axes for you after adding an object, but someone else would have to help you with that.

Other workaround

You can add any object first from top view (Numpad 7), delete the mesh (X) and re-add the mesh you want from the perspective you want (e.g. front with Numpad 1, Shift+A). This will only add the mesh within the already correctly aligned object. Which is not really a lot faster than the method mentioned above, sadly.

Third (probably best) workaround

Go to top view (Numpad 7), add the object, go to front view (Numpad 1), press F6, (disable and)* re-enable "align to view", this re-aligns the mesh to the current view without altering the object orientation.

only if align to view is enabled by default


Geometry generated from a modifier is not directly accessible until after the modifier is applied. Otherwise, we would be able to control each UV vertex of an object with a subsurf modifier before committing to it.

Please explain why you must keep the modifiers, so that we can help you find a change in workflow to answer your question.

For now, the answer is that it is not possible to apply UV mapping to geometry made from a modifier that hasn't been applied.

Here is an example of a possible work around that may meet the behavior of your 3ds Max reference. First, I'm making these assumptions about your workflow:

You are using a repeating texture that doesn't rely on precise UV
positioning.
You are creating assets for rendering purposes.
You are using Blender Render instead of Cycles (May work, I'm not
experienced with it.)

Instead of using a UV-map to determine the texture positioning , Assign a material and texture to the object and use its texture properties to map an image to generated coordinates using a cube projection.

The results will not be reflected in the view-port (You must use view-port shading set to material to see it), but creating a render will show the texture projected on all sides.


You can try Liero's addon Viewport to SVG:

Download, install and enable add-on.
Add-on appears in properties panel of 3D View window (N).
Setup output directory
Check Bezier Overlay option
Select curve objects you want to export and hit "Export SVG"

The final shape is determined by point of view (perspective/orthogonal).
Addon exports all selected curve objects (3D curves as well).

Note: Bezier curve is exported with strange looking poly line version.
In Inkscape - click on this path and delete. In Illustrator – first Ungroup once (Cmd/Ctrl + Shift + G), than select and delete.

There is another add-on called Export SVG Format, which exports only active object. Shape of curve is determined by "Local Z" axis in Orthogonal view.
Addon is a bit messed up with naming – downloaded script is called "exporter.py", in blender's user preferences appears as "Export SVG Format" and in blender's File menu under Export you will find it as "Inkscape SVG".

Both addons exports only paths (no fills).


Wait. Nobody reply I Just answered myself. I Won't delete for if people still want to know how to do this. All i had to do was Go into the Object (The mask's) Edit mode Select the bone and delete it. Then i selected the Object and i hit the bone i wanted to connect it to, Then i hit Crtl P And hit Bone. Then it worked!


How can I stop my rigid body scene with intersecting objects from exploding?

you can animate the "dynamic" attribute of an active rigid body to control during your timeline when an object become "physically active".
Objects will explode if they overlap.
Check these settings:


Why is this happening in my UV Unwrapping?

You do not have seams on the eye spheres, so either add seams, or try unwrapping with Smart UV Project or Sphere Projection.

What you are seeing is Blender unwrapping every individual face on top of each other.

I would highly recommend that you read the Blender manual section on unwrapping before continuing.

Also, see this question if you want details on unwrapping spheres in particular:

What is the best way to unwrap a sphere?


I don't think it's possible to directly drive the brick texture Offset from an input socket but you can formulate nodes to adjust the input Vector to achieve the same effect using the following nodes :

Note the two Value nodes on the left hand side - these can be used to adjust the Scale and Offset (the actual Brick Texture's Offset can be left at Zero). Adjusting the Scale or Offset should produce a similar effect to that of the actual Brick texture node.

This works by using the Scale and Y coordinate to calculate (using a Modulo node) where each alternate row of bricks starts and ends, and then calculating the offset (again, based on the Scale) and adding this into the X coordinate to offset those rows of bricks.

Note that this is only currently capable of adjusting the Scale and Offset - additional work will be required on the Maths nodes to allow for adjusting some of the other brick values (such as the Row Height).

Blend file included


I too am curious about the proper use of bone envelope in Blender too. The falloff appears to not be functioning correctly. This may be a bug. As you say it used to work, so something may have changed that stopped the falloff from working as desired.
I just double checked and what we are calling falloff is called 'distance'. I don't know if this name changed. I submit a bug report and see what happens.

Update: I have submitted a bug report and referenced this post, provided Blender files I used to test this too. It is definitely a bug, as the blender manual states the following: "The outside area, materialized by the lighter part around the bone, and controlled by the Distance setting. Inside this zone, the geometry is less and less affected by the bone as it goes away by following a quadratic decay." The quadratic decay appears to be what has failed.
https://www.blender.org/manual/rigging/armatures/skinning/obdata.html#bone-deform-options

Bug report: https://developer.blender.org/T50392


How to model an equilateral triangular pyramid?

Add a cone: 3D View header > Add > Cone

Change Vertices to 3

For Depth enter sqrt(2) and hit return


How do I import an advanced auto-generated rig to Unity?

1) Metarig (Rigify, actually) is a good efficient rig, AutoRig Pro is fast and fancy, but it's not very "solid", it has some limitations and some techincal troubles that I personally find quite annoying, and Blenrig is more cartoony squash and stretch oriented.

2) Rigify is the simplest, but you can perform edits on every rig, as soon as you understand their structure

3) Only Auto Rig Pro (out of thoose 3) has a built in retargeting panel, but there are many other ways to retarget an animation on a new rig (addons, manually, ...)

4) the usual workflow is: perform the animation, select in pose mode only deform bones (in Rigify they are all on the 30th Bone Layer), go to Pose_Animation_Bake Action to bake their action into a new action (Only selected, visual keying, remove constraints), and export that action along with a rig composed by deforming bones only (as Fbx works quite well).

Note: Blenrig uses lots of Blender tricks (Lattices, Shape keys, ...) that make it hard to export, if you don't want any headache try to use animations bone made only.

So short answer is: Rigify is the best for your tasks, unless you want to use the Auto Rig Pro retargeting features.

Use T pose as rest pose for best results.


What is the backwards compatibility of blender?

The mesh format has changed. 2.6+ uses BMesh and allows for N-gons (i.e. polygons with more than 4 vertices). 2.49 has only quads.
If you don't save with Save Legacy option, you will get only edges, no polygons!
N-gons will be deleted in 2.49.

The whole API, interface and the major version of Python have changed. No scripts are compatible between 2.5+ and 2.49. (Still, I'm suprised how many 2.x concepts in the API were considered good and made its way further to 2.5+ )

Linked libraries between 2.6+ files actually work in 2.49! You can append and link things from 2.6+ files :)

Many new modifiers were introduced in 2.6+.
If used, you won't get any 'Unknown' warning in 2.49. No, they will be anihillated instead. The same is (sadly) true about new types of nodes...

Names (of objects, materials) in 2.49 have length limits: 16 characters plus the .001 suffix. Also, no international characters are allowed. If you leave a long name in a 2.6+ file, it will end with [] symbol in 2.49. Editing such name in UI and pressing Enter will 'normalize' it.

2.6+ has no options per polygon (mostly game-related, but not only: like Collision, Invisible, alpha blending mode). In 2.6+ you need to set them per material and use "Blender Game" as the rendering engine.
2.49 will not recognize these settings. Also, 2.6+ will break the per-face mode (a bit field). You have to reset the bit field first:

polygon.mode = 5

to be able to use bitwise operations again, like:

polygon.mode &= ~(Mesh.FaceModes.INVISIBLE)

You will need these operations to recover per-polygon flags with Python.

2.6+ names new UV channels "UVMap" by default, while 2.49 uses "UVTex".
It's not an actual compatibility issue, but remember to name the two objects' channels identically before you join them (Ctrl+J). Otherwise, you will lose UV mapping on one of the objects!

The compatibility is quite good IMO :) taking into consideration how much has changed since 2.49.


You may talk about blender 2.79b which can find in blender.org. There is no 2.97. Newest blender version is 2.80 beta.


Solidify modifier isn’t working as intended - it scales outwards instead of applying thickness

Modifiers act on the ‘base’ mesh and I believe it is acting on the mesh as expected but the problem is that you cannot see the effect of the solidify due to the scale of the mesh in one dimension.
In your example you are seeing the effect of thr modifier in the X and Y dimensions but not in Z -as you have scaled it to a size of zero in that direction to make it flat. This means that the solidify is also squashed flat so you see no effect.
You should select the mesh, press Ctrl+A and choose Apply Scale. This will reset the scaling of the mesh back to 1,1,1 and your Solidify should again behave as expected.


How to rotate source video in Movie Clip Editor - Blender 2.68

You could add a transformation strip (effect) in the VSE and set the rotation. See the documentation for further details on available settings.


Setting/overriding context for rigid body bake

bpy.ops.ptcache.bake(bake=False) for Rigid Body doesn't work, because it needs the point cache and scene as a context, so:

override = {'scene': bpy.context.scene,
            'point_cache': bpy.context.scene.rigidbody_world.point_cache}
# bake to current frame
bpy.ops.ptcache.bake(override, bake=False)


The Frameserver option was removed in Blender 2.8 https://developer.blender.org/T57423
The comment from Susu    Frameserve to external ffmpeg?  gives a good alternative options


You can't set tangential distortion ($p1$,$p2$) through the interface. Only radial ($k1$,$k2$,$k3$)

To set camera intrinsics load a video file or image generated with the known camera and lens in the Movie Clip editor

Int the Track tab you will find the camera and lens settings. Set Lens size in mm or pixels, Image center, sensor size and distortion coefficients.

Then use the compositor use a Distort-> movie distortion node. Set it to use the distortion information from the clip loaded in the movie clip editor.

There are two modes on the movie distortion node: distort or undistort.
So you can choose to undistort the video or images from the camera, or distort the images generated on blender's camera to match those of the real camera.

Note that there is also a lens distortion node in the compositor, but that is meant more for "artistic" purpose and has no way to set precise camera intrinsics.

I'm not aware of any built in  way to distort the camera directly in the 3D environment and the viewport, only the rendered pixels of the image can be distorted as far as I know.

Note also that a lot of 2D software that deals with lens distortion uses the maximum dimension of the image to convert pixel coordinates to normalized ones, and blender uses normalized image coordinates (aka measured in -1 .. 1 space, not in pixel space)


How can I make a chocolate material similar to this one?

To achieve the transparency you need to combine volumetric scatter into the material - in place of the usual 'diffuse' shader.

The key to the transparency is to model the "chocolate" to that it has very thin layers over the "nuts".

I started by modelling the nuts :

Then added the chocolate (just a cube, rescaled), subdivided and used Sculpt mode to build up the chocolate around the nuts.

The material to include surface properties (the bumpiness and glossiness) along with the translucency is as follows :

Adjust the Density (the Value node) to vary the opaqueness of the chocolate. This is essentially just the same as a volumetric shader that you would use for a liquid - just with a higher density to make it appear more solid.

For best results, take care over the sculpting of the chocolate over the embedded nuts - you need consistently thin layers to get smooth transitions.

Blend file included


cloth animation not working after adding loop cuts on the edges

Another way to sharpen edges would be the "mean bevel crease". maybe try this.

btw: I added a file to the question you commented on. Not sure, whether you'd get notified of that. :)
Cloth is colliding with some objects but not all


An N-Gon is simply a face with more than 4 vertices.

Notice how there aren't any edges going across it, it's all one face.

To add one, just select more than four vertices, and press F. An N-Gon is just another type of face.

Now, an N-Gon might seem great, but let's look at what happens if we pull of of the virtices from the last image up in z space a bit.

It might look okay, but notice how you don't see any shading from the raised vertex. Now let's look from another angle.

It might seem okay, but notice how the shading is the same all around. There's no change in color throughout it. To amplify the issues even more, let's run this through cycles.

3D view (for a point of reference) The selected Vertex is the raised one.

Notice how odd the shading is when it's rendered, especially when you compare to how it's rendered in the 3D view.

To understand what's happening here, we'll have to take a quick look at how faces are rendered, or prepared for rendering.

Tris are the only thing that the GPU can render, so that means that every face you make, has to be split up into a Triangle. What's happening here, is that the Blender is having issues splitting up the face, because it has no way of knowing how to split it up effectively. This is where the real downfall of N-Gons are.

But there couldn't be an explanation of N-Gons without mentioning their issues with subsurf.

Take a look at this example of a cylinder that is capped with an n-gon.

Normal

Subsurf

As you can see, there are lots of distortions.

Pro's and Cons of N-Gons?

Pros

They allow you to connect more than 4 vertices to a face.

Cons

They are extremely unpredictable when it comes to shading
They cause lots of distortion when deformed or subserfed.


handle vertex property changes with msgbus.subscribe_rna

An alternative using bmesh and a draw callback

As mentioned in comments, here is an alternative using a draw callback on the 3d view.

Simply prints the active element.

import bpy
import blf
import bmesh

bmeshes = {}
#from gi.repository import Gdk
class DrawingClass:
    def __init__(self, context, prop):
        self.prop = prop
        self.handle = bpy.types.SpaceView3D.draw_handler_add(
                   self.draw_text_callback,(context,),
                   'WINDOW', 'POST_PIXEL')

    def draw_text_callback(self, context):
        font_id = 0  # XXX, need to find out how best to get this.
        # draw some text
        blf.position(font_id, 15, 50, 20)
        blf.size(font_id, 20, 72)

        ob = context.object
        meshes = set(o.data for o in context.selected_objects if o.mode == 'EDIT')
        if context.mode == 'EDIT_MESH':
            for m in meshes:
                bmeshes.setdefault(m.name, bmesh.from_edit_mesh(m))
        else:
            bmeshes.clear()
            return
        me = ob.data
        blf.draw(font_id, f"{bmeshes[me.name].select_history.active}")

    def remove_handle(self):
         bpy.types.SpaceView3D.draw_handler_remove(self.handle, 'WINDOW')

if __name__ == "__main__":
    # test call
    dc = DrawingClass(bpy.context, "Auto Layer Running......")
    dns = bpy.app.driver_namespace
    dns["dc"] = dc


Cloth simulation - simulate 2 unlinked meshes together as one

Let's assume the stitches or other details can be represented by some cubes close to the flag geometry.

Duplicate the Flag mesh. The FlagDupe should also do the same simulation as the original. We will create a cage from it for the extras.

Add a displace modifier, and a solidify modifier. The value of the second modifier should be twice the value of the first modifier.

Select the stitched extra object, add a MeshCage Modifier to them and bind the object to the FlagDupe by clicking on the bind button.

The bound object will follow the FlageDupe object.


How do I stop myself from creating light? I'm trying to change the lighting but I create my own light and I shine all over everything

In 'Solid' view mode, Blender automatically lights surfaces based on their angle to the viewport. In order to see the effect of your lighting you need to switch to 'Rendered' mode which you can do by simply clicking the relevant Viewport Shading icon :


How do I get the 'Fracture' panel to appear in the Toolshelf?

No, this addon is bundled with the Fracture Modifier Build, it should be inside the "fracture_extra" folder within the zip file which contains the build. ("fracture_helper.py") Alternatively you can separately download it here:

http://blenderphysics.com/fracturemodifier/

(Helper Addon)

The addon might also be updated separately from the build from time to time.


Camera projection without generating UV's?

The answer to Projecting Texture onto surface from point produced a material that would project an image from an arbitraty point in the scene through a second point and onto the surface. The same principle can be used to project from the camera by simply constraining the 'origin' point in that example to the location of the camera by way of a Copy Location constraint.

This can produce the following result :

The bottom-right window shows the setup of the scene with Empty representing the 'source' of the projection - constrained to the origin of the camera. Empty.001 is the location of the centre of the 'image plane' to be projected.

The top-right shows the view from the camera - with the projected image showing no distortion (and edges highlighted using Freestyle), while the left-hand windows show the scene from other viewpoints so you can visualise the projection.

Blend file included

EDIT

You can use the following script to automatically position the empty (Empty.001) used to position the projection image plane centred onto the plane of the camera, taking into account the focal length and sensor size. The empty is also scaled based on the aspect ratio of the render image dimensions.

import bpy
import mathutils

def setup_empty(cam, obj, obj2):

    camobj = bpy.data.objects[cam]
    camera = bpy.data.cameras[cam]
    object = bpy.data.objects[obj]
    object2 = bpy.data.objects[obj2]

    render_width = bpy.context.scene.render.resolution_x
    render_height = bpy.context.scene.render.resolution_y

    if render_width > render_height:
        camera_size = camera.sensor_width
        camera_horiz_scale = 1.0
        camera_vert_scale = render_height / render_width
    else:
        camera_size = camera.sensor_width
        camera_vert_scale = 1.0
        camera_horiz_scale = render_width / render_height

    object.matrix_world = camobj.matrix_world * mathutils.Matrix.Translation((0,0,-camera.lens/camera_size))
    object2.matrix_world = camobj.matrix_world * mathutils.Matrix.Translation((0,1,0))

    object.scale = (camera_horiz_scale, camera_vert_scale, 1.0)

setup_empty('Camera', 'Empty.001', 'Empty.002')

The last line of the script calls the function (setup_empty), passing the names of the Camera, the object to use for the centre of the projection and the object to use to indicate the orientation of the projection. The script will move the two objects into suitable positions around the camera - you can then Parent them to the camera to keep them in place as the camera moves and rotates.

Note that the actual camera dimensions are too complicated to include in the above calculations (I don't know enough about the intricacies of the camera or how to interpret those details in Python) - there are many factors that are included (such as Aspect Ratio, Shift, etc.) - but this script should cope with most 'standard' setups. See also Is there a way to get the dimensions of the camera?

Note also that if you change any significant camera properties (such as Focal Length or Sensor Size) you'll need to re-run the script.

A minor change to the material will allow the scale to affect the image texture by way of two drivers :

The Combine XYZ node takes the X and Y scale of the empty and scales the vector (via the Divide node) to adjust the aspect ratio of the image to match the camera. The X and Y values are populated via drivers to simply capture the X and Y scale properties of Empty.001.

In addition, the other empty (Empty.002) is used to determine the orientation of the camera plane - this is important to correctly orientate the plane of the image so as to align it precisely to the camera. Again, this is fed into the material via a Combine XYZ node and associated drivers for the XYZ coordinates - to calculate the vector from the camera to Empty.002 :

Amended Blend file included

Assuming you've parented the empty to the camera, moving/rotating the camera should automatically update the projection into the scene.

Taking this a little bit further, you can filter out the 'backfacing' faces (those that are facing away from the camera) by combining the vector from the camera to the surface (we already calculate this) with the surface Normal using the Dot Product. The Dot Product will produce a positive output if the two rays are in the same direction and a negative output if the two vectors are in the opposite direction. Adding the following (selected) nodes will therefore mute the emission for those faces that are facing away from the camera :

This produces the following result :

Note : This is not a raytracing solution and therefore objects will not cast 'shadows' in the projection - neither cast onto other meshes or cast onto themselves. Also, meshes must be manifold with correct orientation of surface normals.

In order to obscure the projection we need to be able to trace rays back to the camera from the surface point - just like a shadow ray. Normal nodes are not capable of doing this but OSL can (but using OSL means your shader will be CPU only (no GPU rendering). For this you'll need to enable Open Shader Language in the render settings, then paste the following into a Text Editor block :

shader probe(
    vector Point = P,
    vector Direction = N,
    output float HitDistance = 99999999.99
    )
{
    if (trace(Point, normalize(Direction)))
    {
        getmessage("trace", "hitdist", HitDistance);
    }
}

Name it something like 'probe.osl' and you can now add a Script node to your shader and select your new 'probe.osl' text block. If all goes well, Blender will compile your OSL and give you a new node that can be used to probe out surrounding geometry as follows :

The vector from the camera to the surface point is first negated using the Subtract RGB node (so it points the correct direction) and is also passed into a Dot Product node followed by a Power(0.5) node to determine its length (the distance from the point to the camera). The Script node executes the OSL to trace a ray from the point towards the camera, returning the distance to the nearest surface along that ray. If the 'hit distance' is greater than the distance to the camera then there is nothing obscuring that ray, otherwise it is blocked by intervening geometry - this is used to control the emission of the projected image to create the 'shadow'.

Here's the result - note how the objects now project shadows into the projection :

Blend file included


If you are looking for some kind of thumb rule you can generally say: In default mode with the option Dissolve Vertices enabled, it works like this: if the edge you would like to dissolve leaves one or more vertices with each only connected to two different edges, than these vertices (and the connected edges) will be dissolved as well and the bounding vertices will be connected with a new edge.
Example 1:

Example 2:


How to select all objects from different Collections or Hierarchies?

I think this is the method so far if there is not many Collections or Hierarchies to select.
Here are the steps:

Turn on "Extend Mode" for select grouped, shortcut F9

2.Select one Parent, Shift+G, select children.

3.Hold Shift, select another Parent, Shift+G for Children selection...
so on..

If there are 50 Hierarchies....
But I think it is not hard to make a Python script for this kind of selection.

Select all parents.
Run Python, Loop for all these selected parents, Each loop for children selection extended.

Hope easier life for using outliner...


This is probably because you are using the "loc" tab on the actuator (red). You should use the Linear Velocity tab instead (purple).

The loc section works by teleporting the object a certain distance per frame whereas the Linear Velocity tab actually takes time into account.


Material that shows up as alpha channel on render, but shows up in reflections

Cycles Render

All you have to do is to add a Holdout node to the material output on the masking object.

Blender Render

Enable Transparency on the material of the masking object, set transparency method to Mask and change Alpha to 0


Packaging external libraries in the game engine 'Create Runtime'

The limitations of the Make Runtime Function is that it can only work on the Blend file that's currently open. If your game has external assets (unpacked textures, unpacked sound, other blender file as libs, external Python modules), these will not be packaged automatically.
But it's definitely possible to make a stand-alone package with all the Python modules. It's just a matter of knowing where everything goes.
Python Module Basics

Understand where Python looks for modules (hint: local modules override system modules)
Because the current path of the Blend file is always the first place Blender will look for Python modules, you can just place any module right next to the Blend file. Alternatively, I'd like to keep all my non-standard modules in one folder. So if you have a myModule, I would place it in a directory called externs.
You can access modules you've placed under externs by import externs.myModule

Packaging
For packaging a runtime to include all the external libraries, you just need to keep everything in place relative to the Blend file, since the blend file is always going to be your starting point. This applies to Python scripts/modules as well as unpacked asset such as textures and sound.
Pure Python modules are easier to deal with because you don't have to worry about them not working on different OSes. For dynamically linked libs (dlls/so's), just make sure you have a working version for each of the platform you are releasing for.
Folder Structure
Unfortunately, the structure of a packed runtime is slightly different for each OS. So you'd have to know where the Blend file is in order to copy the py modules to the right place.
On the mac, a runtime is pretty much the original blenderplayer.app with a game.blend file stored under the blenderplayer.app/Content/MacOS/Resources/ directory. So typically all your external asset that's not packed by make runtime need to go in the myGame.app/Content/MacOS/Resources/ folder.
On Windows, a single .exe is created that contains the blend file. So, any external asset go relative to the .exe file.
I believe Linux is the similar to Windows, external asset go relative to the binary blob.
Hope that helps!


OSX Eevee performance with multiple materials in OSX

This is a reported bug: https://developer.blender.org/T66231

I can't think of any way other than downgrading to a previous version without this issue :-P


Problem: Armature deforms mesh when after parenting

I've managed to solve my own question :D

Turns out I found a useful tutorial which suggested that I first bend the bones slightly in edit mode before parenting the armature to the mesh.

It works now!


Scripting with Python

As you mentioned, Smart Unwrap in object mode takes all the objects as a whole. It's more useful to create a texture atlas, rather than individual UV maps.

Like in most scenarios where a tedius task must be done several times, you can try to automate the process with python code.
You can write a script that iterates through all the selected object of the scene, enter edit mode for each object, select all the elements of the object an run the smart_project() function.

Here's what a possible script could look like:

import bpy

if bpy.context.selected_objects != []:
    for obj in bpy.context.selected_objects: #loop through all the selected objects
        if obj.type == 'MESH':
            bpy.context.scene.objects.active = obj
            bpy.ops.object.editmode_toggle() #entering edit mode
            bpy.ops.mesh.select_all(action='SELECT') #select all objects elements
            bpy.ops.uv.smart_project() #the actual unwrapping operation
            bpy.ops.object.editmode_toggle() #exiting edit mode


GPU along with CPU rendering performance

I have tested this by rendering BMW scene at 256*240 (with tile size 128*180). So:
 1. It is true that during the beginning of render, GPU renders 1 tile and CPU cores render 3 tiles according to MSI Afterburner, which shows 99% GPU usage.
 2. Near the end of render, GPU usage becomes 0% while CPU cores render remaining 3 tiles slowly.


How to use the 'MESH_OT_extrude_verts_indiv' parameter?

Use bmesh

Strongly recommend using bmesh instead of bpy.ops.mesh whenever you can.

Here is my understanding of the script needed.  Extrudes the individual selected vertices randomly a number of repeats.

The operators return dictionary has the newly created vertices and edges.

import bpy
import bmesh
from mathutils import Vector
from random import uniform

context = bpy.context
ob = context.edit_object # edit mode!
me = ob.data
bm = bmesh.from_edit_mesh(me)
verts = [v for v in bm.verts if v.select]
for repeats in range(5):
    ret = bmesh.ops.extrude_vert_indiv(bm,
            verts=verts)
    for v in ret["verts"]:
        v.co += Vector([uniform(-1, 1) for a in "xyz"])
    verts = ret["verts"]

bmesh.update_edit_mesh(me)

If the idea is to extrude from the same vert  repeat times, then remove the line

verts = ret["verts"}


You have to turn on Texture Atlas addon in Addons tab.
It's a workaround, but there's noting better at the moment. Waiting for 2.8!
https://www.youtube.com/watch?v=cIok7SCQ3SA


How do I increase the max number of frames?

This limit cannot be changed. You cannot alter builtin properties deriving from bpy.types.Property. Every attribute in api docs is marked as readonly.
The scene's frame_end property hard and soft maximum is just set to 500,000*.

If you need to render longer video than that you will have to do that in another software.

Using negative frames or messing with time-remapping does not help.

*As of 2nd March 2016 the maximum is 500,000 (previously 300,000):
https://developer.blender.org/rBf7062b2407c65dcf85904242281a13339d47a20a


It's there - You have to click on the icon and hold down the mouse button before you can select it. See below:


How to paint "Noise Texture" with Alpha Transparency? (Image Editor)

Your brush mix mode shouldn't be overlay, the color mix mode of the texture you are painting onto should be overlay. The overlay mix mode of the brush only affects pixels present in the image texture you are painting, causing new pixels to 'overlay' the pixels in the image. Overlay mix mode of the image texture to the next below will affect all the pixels of those underneath in that next image slot, which might be what you are looking for. Another way to do this is to use a Brush Mask texture with color ramp turned on and squeezed for desired contrast, and then pick the color you want to paint through to the image texture.


There are addons available to do this. Such as the one available here: http://blenderartists.org/forum/showthread.php?218403. But the functionality is not available by default.


Accidentally enabled wireframe display, can't disable it

The Wireframe option can be deactivated in the Viewport Overlay settings.


Anisotropic shader not working with new file

Sorry for the confusion, it looks like new file now (Blender 2.9) sets the new file render engine to Eevee and eevee doesn't seem to do anisotropic. 2h of life-time I'm never going to get back


After Merging Duplicate Vertices, Sculpt Mode Model Drastically Effected

Welcome to Blender Stack Exchange!

See the edits below for an answer to this specific problem. Note that the eventual solution may not apply to all cases of this issue.

I have some bad news. This is a known issue with the Multiresolution modifier, and one that I have encountered many times. I think the next version of Blender is going to have a fix, but the test build I tried still has the problem.

The Multires modifier works (I think) by storing information about how the vertices it adds should be positioned relative to the ones that exist. When you change the ones that exist, it gets confused, and doesn't know where to put the vertices it generates, thus sending them off into infinity like you see. For this reason, it's best to not change the mesh once you've added a Multires Modifier. Specifically, merging and adding vertices that changes the flow of the mesh causes the most problems.

For your file, I tried deleting some sections and rebuilding them so that the modifier recalculates where the generated vertices should be placed, but couldn't get it perfect. In your case, it looks like restarting may be the best option. However, Blender has various backup files that may get you to a point before you changed the mesh. You can recover your last session, try an autosave, or check out the .blend1 or .blend2 backup files. There's questions about those on this site.

Going forward, it's best to not change the mesh when using the Multires modifier. If you have to, use the Apply Base button on the modifier before changing anything. This makes the mesh match the sculpt better, and reduces the chances of things going crazy. In your file, it was too late to try this, and that button made it go much worse. However, at least for right now, the Multires modifier limits your ability to change the mesh. Merging vertices or removing edges like you have will almost always mess it up.

For this specific instance:

For this specific case, there is a possible solution that avoids restarting. You can easily retopologize this model and clean everything up. It's a bit of work, but not bad at all.

Let's start by looking at the model in the file provided. I've circled areas where I immediately see problems.

Entering edit mode and removing doubles finds a bunch of duplicates, but causes the problems you're seeing. The top of the right leg also has a face inside the mesh that is causing issues.

So the original mesh is probably not salvageable while keeping the Multires, at least not easily.

What we can do is copy the mesh, get rid of the Multires, fix it up, and then Shrinkwrap it onto the sculpted one. This will give us proper geometry and fix all the issues.

To start, I copied the object, hid the original with H, deleted the Multires on the copy, and headed to edit mode. The first thing I did was delete half of the mesh, and add a mirror modifier with clipping enabled. I prefer this way over using the edit mode X-mirror option. This also allowed me to get rid of the face inside his right leg, as I removed the right side of the object. Then I removed doubles, and fixed any faces that weren't four sided faces (quads).

Which looks like this now:

Good geometry is important when modelling and sculpting, but takes some practice. It's always best to avoid triangles and ngons (faces with more than 4 vertices) as they do not subdivide well.

Next step is to show the original with Alt+H and delete the face inside the top of his right leg. This doesn't affect the Multires at all, but causes problems later on otherwise.

Back on the copied mesh, I added a Shrinkwrap modifier and set the original as the target. Make sure it's below the mirror modifier.

This will now stick the copied mesh onto the original. However, since the original is sculpted, the copied mesh doesn't follow the original very closely. This causes some issues with the Shrinkwrap, as it tries to find the closest point on mesh to snap to.

It's especially obvious on the feet, as it sticks to the top of the feet instead of the sides.

So back to edit mode on the copied mesh. Using proportional editing, enabled with O and using the scroll wheel to adjust the size, I moved the mesh around to follow the sculpt better. It doesn't have to be perfect.

Now the copied mesh looks like this:

At this point I also checked the mesh to look for any other issues. I did this by adding a Subdivision Surface modifier with the view set to 2. Any points with issues will show up as pinching or sharp points. I found an issue at the wrist, where there were some extra edges inside, so I deleted those. Then I got rid of the SubSurf modifier.

At this point, the mesh is clean. If the goal is only to fix the basemesh, you're done. Apply the modifiers, and make sure that the object is truly symmetrical, as the shrinkwrap often makes things asymmetric. I did this by just deleting half the mesh, setting the cursor at the center of the world and, setting it as the pivot point. Then I selected everything that should be in the exact center of the character and scaled it on the x axis to 0. Then I added and applied a mirror modifier to get the whole character again.

The modified .blend file with the fixed basemesh:

EDIT 2: Saving more detail:

Continuing with the edited basemesh created above, even more detail can be saved based on what you're next steps will be.

In order to keep this symmetrical, I'm going to start by deleting half the character again. This way I only have one half to worry about, and I can just mirror it again later.

I'll start by adding a SubSurf modifier again, and setting the view level to 3 like what you had before. Then I can add a Shrinkwrap again, with the original sculpt as the target.

Looking good.

It's not quite perfect, as the target for the shrinkwrap wasn't quite perfect, but it's nothing we can't handle.

From here, we can apply both the Subsurf and the Shrinkwrap, in that order. This will make all the vertices that the Subsurf generates real, and thus will make the mesh a lot denser in edit mode. This isn't ideal, but it could be worse. I would highly recommend making sure that your geometry is exactly like you want it to be before applying this modifier. Maybe even watch ahead in the video you're following to make sure you won't have to make any changes later on.

Once you're happy with the geometry and have applied the modifiers, we can get the whole character back. In edit mode, with the cursor at the world origin and set as the pivot point, Alt click the edge loop on the edge of the character and scale it to 0 on the x axis to snap everything in line with the exact center of the character.

Then we can add one final mirror modifier, and enable clipping again. There's a few issues in the mesh where it didn't snap properly, or where the original mesh was messed up to begin with. A few strokes with the smooth brush and a bit of repositioning with the Grab brush and it's looking good again.

You can apply the mirror modifier now, or keep it. If you're eventually going to use a Multires again you should apply it.

And that's it! Here's the final result:

The final file is included at the bottom of this answer as well. Feel free to use it, inspect it, or do with it as you please. From everything I've seen you should be good to go with the course!


How to create procedural surface defects with Cycles?

The simplest way is with a bump map. You can use a mixture of various procedural noise textures and a Bump node to create one quickly:

It's up to you to make come up with a texture that you like. I recommend this talk for some tips on generating realistic patterns with procedural textures.

This probably isn't necessary in your case, but if you want the bump mapping to affect the actual geometry you can use the Displacement output with Experimental Features enabled. See What is the difference between the displace socket and a bump map?


Apply armature's object rotation to animation data

The answer lies in the MakeHuman Blender tools. There are a few steps you need to get right, though:

Load a BVH with the "Load BVH" button in the "Misc" tab. This will cause the BVH to be loaded incorrectly, as it'll be scaled down. Unfortunately you can only change this behaviour after you loaded the BVH. We'll fix this, and then re-load the BVH correctly.
Open the "MakeWalk: Options" panel.
Deselect the "Auto Scale" checkbox and/or set the scale to 1.00.
Scroll down to the "MakeWalk: Utilities" panel and click "Save defaults".
Remove the armature from the scene, and load your BVH again.
Open "MakeWalk: Edit Actions" and enable "Global Edit".

Now you can go to Pose Mode, move the armature around, and click on the "Shift Animation" button. Contrary to its name, this also applies rotations. It then applies your translation & rotation to the entire animation.


How to paint through all mesh during vertex painting?

The only workaround I found is to use the Weights to Vertex Colors addon . It's not a real solution, just a workaround, but since you can paint through the mesh in weight paint mode by unchecking "Limit Selection to Visible" , you can paint there and then convert your weights into vertex colors. But of course it converts it in greyscale (although there's an option to use the rainbow ramp from the weight painting but that's not usable for most textures).

But I think a "Limit to Visible" option in Vertex Paint should definitely be added in Blender.


Ok, so there seems to be a few things going on here. Firstly, and I don't know if this is intentional, but your single mesh object is comprised of 2 different pieces sitting on top of one another:

As you can see from the image, both of the pieces seem to have some parts that don't belong. I separated the pieces only for this example image, you don't have to do it yourself, unless you want to delete a piece or something. If you need to separate them, select a face and press L. This will select everything that is part of the same "piece". You can then move it away, or whatever.
You can get rid of the stuff that doesn't belong (pieces separated or not) by pressing M (Merge) and selecting "By Distance". This removes duplicated or overlapping vertices. Doing this to yours removed 24 vertices - you can see the count in the bottom right corner when you perform the operation.

Lastly the bevel is still a bit off as the result of non-uniform scale (result of scaling in object mode). To fix this, in object mode, select your object, Press Ctrl + A and select "Scale".


Can't copy and paste keyframes from another action

I'm not 100% sure, but mostly it works if I select all bones that have keyframes to copy, both dopesheet and 3d view.

However sometimes it's not working even do that, so that's why I said 100% sure.

I still facing this issue sometimes, but mostly works fine and some how it works after do something try to fix, but don't know what exactly fix this.


Why is Blender not letting me move an object that has been keyframed?

This is a very odd issue which seems to be caused by the 'Import Images as Planes' add-on. Disable the add-on in the Preferences (and re-enable it if you still want to use it) and the issue should be gone.

That add-on has some code that runs when an object moves, and somehow it's got into a broken state and is trying to update the object positions when you're trying to move them. The problem seems to keep occurring in different versions of blender because the properties that are related to the broken state are stored in your file. Disabling the add-on removes these properties and if it is re-enabled it will set them up afresh in a working state. At least, that's what seems to be happening.

By the way, while that does solve that issue, there are still some other issues in your file, related to the drivers you have set up in the compositor in each of your scenes (which may have been set up by the add-on?). The System Console (Window> Toggle System Console for Windows users) prints out a lot of errors when you change scenes and a lot of the drivers seem to have missing references to objects.


How do i add weights to bones that i added after i parented the armature to the mesh?

Find out the names of the newly-added bones

It's listed in your Properties Panel, under Item.

Create Vertex Groups on your Mesh with those names

Bones look for vertex groups with corresponding names to deform.

Paint on some weight

You can do this from Weight Paint Mode, or alternatively use the Weight slider to specify a weight before clicking Assign. Always pay attention to which vertex group you have selected when weight painting.


Is there a good tutorial to understand how the different material windows work?

You need to open edit mode, then select faces you want to paint and with the right material selected press Assign. I hope it helps.


You had your frame step set to zero. Meaning after it finishes a frame it is done.
Make sure it is set to 1.

Also make sure your file output actually exist and it is not trying to save to a folder that doesnt exist.


getting objects to properly face towards normals

Matrix centric approach
Code to place a lamp object at center of each selected face of a mesh, with light local -Z axis pointing in direction of face normal.
Find the global direction of a face normal by premultiplying with the objects global rotation matrix. (No scale).
import bpy
import bmesh
context = bpy.context

ob = context.edit_object
mw = ob.matrix_world
me = ob.data
bm = bmesh.from_edit_mesh(me)

faces = [f for f in bm.faces if f.select]

while faces:
    f = faces.pop()
    light = bpy.data.lights.new(
            f"Face{f.index}",
            type='AREA',
            )
    light.size = 1
    light_ob = bpy.data.objects.new(
            f"Face{f.index}",
            light,
            )
    M = mw.normalized() @ f.normal.to_track_quat('-Z', 'Y').to_matrix().to_4x4()
    M.translation = mw @ f.calc_center_median()
    light_ob.matrix_world = M
    context.collection.objects.link(light_ob)

Local with parenting.
The above code adds the lights in the scene at the global orientation of the face. If the mesh is moved the lights do not go along with it.
Another option would be to use only local coordinates and make each light a child of the mesh.
Scaling to fit the face.
It appears you are also scaling the area light to fit the face. To do this when not axis aligned is a bit more in depth than finding axes minima / maxima.  IMO quite possibly warrants another question
Some examples that use another vector to align.  The face has some calc tangent methods, based on longest edge, edges. Can adjust by rotating light about its local z axis (the face normal) to match the tangent. This way have one known axis aligned with an edge and can scale to match.
https://blender.stackexchange.com/a/94047/15543
Align a face normal to Z axis.
https://blender.stackexchange.com/a/121227/15543
similarly in this one the poly interior angles maps the corner verts to 2d. Similarly here if the face normal is aligned to an axis the coords can be mapped to 2d.
https://blender.stackexchange.com/a/203355/15543
If the coords are in 2d there are some helper methods (primarily for UV) that fit rectangles.
Using mathutils.geometry.box_fit_2d


Write cycles material node output to image file

The File Output node is a compositor node, not a Cycles material node - so it will only output the results of the actual render, not that particular material.

To output the shader results to an image you need to look into unwrapping your mesh and baking the material to an image.


AMD RX 460 GPU multiple layers incorrect render

AMD has a long history of issues with blender.

Try updating the drivers for your card.

There has been a lot of work lately to get AMD to play nice with blender, try using one of the latest builds: https://builder.blender.org/download/

Otherwise it looks like a bug. Please read the following link: Best place to put bug reports?


Filling space between two identical curves/mesh

You are looking for the "Bridge Edge Loops" command.


Bake multiple Armature animations within one file with IK

So, I did some more research and I found out that the blender collada exporter isn't able to export multiple animations within one file.

To fix my IK problem, I simply duplicated my armature several times. Than I used 1 armature/ animation to bake every animation. After that I was able to use my main armature connected to my mesh to select all the baked animations. That works pretty good, but nevertheless it's too bad collada doesnt support multiple animations.

For now I am going with JSON.


How can I select 2 specific edges all around this gear?

You can use Checker Deselect for this.

Select all the edges around using Select > Edge Rings
Deselect one of the edges (Shift + LMB) to break the loop
Use Select > Checker Deselect (play with the values, and adjust offset if needed)
Add that one edge to selection (again using Shift + LMB)


Vortex with particle system without tornado effect for snowstorm scene

Assuming you want the snow be blown in one direction and the same time to show some whirl, you could add an additional wind force and animate the vortexes force.

It is easier to verify the effect when you don't bake, instead manipulate the settings while the simulation is running.


How to assign colors to Point Density based on data values?

The following script will generate a vertex color layer and assign a color for each vertex coordinate. Since you have a data structure with a color assigned to each vertex, and the vertex's coordinate, you can it to assign colors to each vertex.

The code is not straightforward, since the vertex color layer does not assign a single color to each vertex, but rather a color for each mesh loop. A single vertex can be a part of several loops, and thus have several colors. In a cube, for instance, each of the 8 vertices has 3 vertex colors.

This is why the find_loops_by_vert_co function takes in an object and a vertex coordinate, and returns the list of all loop indices that include a vertex with the same coordinate.

When iterating over the vertex coordinates, this function is called and assigns the desired color to each of the relevant loops. I'm using a specific data structure to include coordinate and color data. You'll have to adapt this script to match your own data structure.

import bpy

def find_loops_by_vert_co( o, co ):
    verts = o.data.vertices
    loopsInCo = []
    for poly in o.data.polygons:
        for i in poly.loop_indices:
            vCo = verts[ o.data.loops[ i ].vertex_index ].co[:]
            compare = [ round( e1, 3 ) == round( e2, 3 ) for e1, e2 in zip( vCo, co ) ]
            count   = len( [ e for e in compare if e ] ) == 3
            if count: loopsInCo.append( i )

    return loopsInCo

o = bpy.context.object

# Create a new vertex color layer
o.data.vertex_colors.new('Heat')
heat = o.data.vertex_colors['Heat']

coos2colors = [
    { 'co' : (1.0, 0.9999999403953552, -1.0),                  'color' : ( 0.5, 0.25, 0.25 ) },
    { 'co' : (1.0, -1.0, -1.0),                                'color' : ( 0.1, 0.6,  0.3  ) },
    { 'co' : (-1.0000001192092896, -0.9999998211860657, -1.0), 'color' : ( 0.9, 0.1,  0.2  ) },
    { 'co' : (-0.9999996423721313, 1.0000003576278687, -1.0),  'color' : ( 0.5, 0.8,  0.0  ) },
    { 'co' : (1.0000004768371582, 0.999999463558197, 1.0),     'color' : ( 0.4, 0.4,  0.9  ) },
    { 'co' : (0.9999993443489075, -1.0000005960464478, 1.0),   'color' : ( 0.1, 0.1,  0.6  ) },
    { 'co' : (-1.0000003576278687, -0.9999996423721313, 1.0),  'color' : ( 0.5, 0.5,  0.0  ) },
    { 'co' : (-0.9999999403953552, 1.0, 1.0),                  'color' : ( 0.5, 0.25, 0.25 ) }
]

for d in coos2colors:
    co, color = d['co'], d['color']

    vIndices = find_loops_by_vert_co( o, co )
    for vi in vIndices:
        heat.data[ vi ].color = color

You can use the vertex color layer in Cycles by using the Input --> Attribute node and plugging it into an Emission shader's color input.


How to emit light from base color of a wave texture node?

If you want the red part to emit light, use the black and white component from your Wave Texture as the Mix Factor Between a red Emission Shader and whatever you want the rest to be (I left it as a default principled BSDF with a black BaseColor, but you can use whatever you want.)


Is there a way to scale by an absolute distance, rather than a percentage?

Think I discovered what I was looking for here. Push/Pull from the Mesh->Transform menu seems to work exactly like scaling, except that it moves all the vertices by a specific amount. You can restrict the axes and change the pivot point to the cursor, median point, etc.


Nurb Interface Tool question - lost my way

In Edit Mode enable Normals Viewing on the side panel:

This works for all curves: Bézier and nurbs.


In the materials tab of your mesh, add a new material if there is not one already. Then, scroll down until you find the transparency tab. Enable transparency, and you will see a slider that allows you to change the opacity (or transparency) of the material, and thus, the mesh. I would use z-transparency as it is the most realistic.

With the opacity set to full, choose the frame when you want to begin the fade, put your mouse over the opacity slider I. Then, move to the frame when you want the mesh to be transparent, slide the opacity slider to 0 and hit I (with your mouse over the slider) again.

This technique is for blender internal


Problem when moving and changing object pose at the same time

From what I understand, here is what I'd say:

First, maybe enable the "Only Include Channels Relating to Selected Objects and Data" option (arrow icon in the Dopesheet). It will only display, in the Dopesheet, the keyframes of the object(s) you've selected in the 3D view, and it will make the things simpler to understand.
Select the object itself (not the armature). If you go in the Dopesheet window, you can see that there's a track called Cube > CubeAction, and that 2 keyframes have been created for the cube object. I think it's useless and even may create some problems because in your case you've actually created an armature and parented your object to it, so from now on it's the armature that is supposed to move your object! So select these keyframes and delete them.
Select the armature. If you go in the Dopesheet, you can see the Armature > ArmatureAction track, it has 2 keyframes. Nice, it's probably what you want, the armature is the parent of the cube and to move the cube you need to move the armature. Keep these keyframes.
Keep in mind that until now you've just animated the armature in Object mode, you haven't moved any bone in Pose mode. So until now the armature works like a basic parent, for example like an empty would.
Now you want to move some bones within the armature. Keep your armature selected and go in Pose mode. Rotate the bone you want and press i to insert a keyframe. In the Dopesheet, if you unfold the Armature > ArmatureAction track, you'll see that a Bone track has been created. But before that, no keyframe was created on this track, so if you want your bone to have another position before the one you've created, put your cursor one frame before, press altR to reset the bone position, and press i to insert a keyframe. Now you have 2 keyframes and the bone will have its basic position at the start of the animation.
You could also have chosen to create the whole movement of your armature (on the X and Y axis) in Pose mode, moving the bones from position to position B, instead of creating an object animation, it's a choice that depends on the situation.
To automatically record a keyframe (i.e. avoid the i command) you need to press the "Automatic Keyframe Insertion" button in the Timeline (red circle icon).


Making a six-part mould- Cutting by planes

The question is simple but the answer is a bit complex.

How does boolean modifier work

The boolean modifier can do 3 boolean operations between 2 solid objects.
They are simple and fully described here.
The point I want to focus to is that they both need to be solid. They cannot be a cube and a plane, because the operations (union, difference and intersection) operate on volumes, not on faces/edges/vertices.

In my example the situation is simple, because I'm going to use only one plane. To do it in your case you will need to repeat this instructions recursively for every cut.

Extruding planes to give them a volume and using the Boolean modifier

This image shows a cube and a plane.

I want to use the plane as a "blade" to cut the cube in two parts.
So I select the plane and go to edit-mode:

I extrude it to have a volume that completely covers one of the two parts of the cube:

I go back to object-mode, hide (presing H) the extruded plane, I select the cube and add a boolean modifier to it.
In the modifier settings i choose the extruded plane as the "Object" I want to use to do the boolean.

As "Operation" I can choose "Difference" to obtain one of the two parts:

...or the "Intersection" to obtain the other part:

To have them both I need to duplicate the cube and apply the "Difference" boolean modifier to the first and the "Intersection" to the other.

You'll need to do this steps with the first part to divide the first object in two, and then to repeat them recursively on the pieces you obtained to divide them again, until you have all the pieces.

I know it's a struggle, but I don't know other ways to do this.


Grid subdivision

You can avoid progressive subdivision of the grid by setting the Subdivision parameter to 1. The scale of the grid is in the Scale field: it's a multiplier for your current unit.

You can find the parameters in the Display panel of the Properties panel of the 3D view:

I never heard of a plugin capable of printing the coordinates of the grid. it would probably not be very easy to work with, but there are around lots of plugin/tools that can help you in measuring distances, such as:

Mesh Display Info (edge length, angle...)
Transform panel (for the global/local coordinates),
Ruler/Protractor tool
Measure-it add-on
and many other...

See for example:  How to get selected edges length?


bmesh version
If choosing answers from that question would recommend editing the answer of @CoDEmanX
Test script, removes all faces which have all vertices with an x coordinate less than zero.
import bpy
import bmesh

ob = bpy.context.object
assert ob.type == "MESH"
mat = ob.matrix_world
me = ob.data

if me.is_editmode:
    bm = bmesh.from_edit_mesh(me)
else:
    bm = bmesh.new()
    bm.from_mesh(me)

bmesh.ops.delete(
        bm,
        geom=[f for f in bm.faces if all(
                v.co.x < 1e-6 for v in f.verts)
            ],
        context='FACES'
        )

if bm.is_wrapped:
    bmesh.update_edit_mesh(me)
else:
    bm.to_mesh(me)
    me.update()

To remove faces with a normal pointing in the -X direction
bmesh.ops.delete(
        bm,
        geom=[f for f in bm.faces if f.normal.angle((-1, 0, 0)) < 1e-6
            ],
        context='FACES'
        )


Not able to add node sockets to an existing node using python scripting

Found out from here that instead of adding sockets to these node using the node.inputs collection, the node.file_slots or node.layer_slots collections should be used. Both of them work, they just provide slightly different properties for use with simple files or multi-layer EXR.


No change in Texture Paint Brush Sensitivity on changing Pressure Curves

In Blender2.79 ,Texture Paint has an "Accumulate" Option[Texture Paint Mode->Tools->texDraw brush-->Accumulate] which allows the TexDraw brush to daub strokes on top of the previous daub.This makes the brush daub thicker and hence visible.

However,this option is "OFF" by default. By toggling it "ON" the Accumulate featured is turned "On" and a visible brush stroke is rendered (also pressure sensitivity is supported) .


You need to change the movement type for the transform manipulators to "local" instead of  "Global". This changes the movement to correspond to the object's position/rotation. once you have done that and put the menipulator wigit to "rotation" it should be easy to rotate the faucet handles like you want.


How to flip the face of a closed 2D curve (similar to normal flip for mesh)?

You can swap the normal of the face by flipping the directions of the curve.

Select the curve
In edit mode go to Curve -> Segments -> Switch Direction. You can also do this via the space menu be searching for "switch direction"


How to easily build concentric curved tubes to make layered tubes?

I say you try this as a solution:
Add a cylinder. Delete the top and bottom faces of it. Give it a solidify modifier. Duplicate it and scale it down by locking the Z axis until it's boundaries fit in the inner boundaries of the biger cylinder.
Once you are happy with the thickness and scale apply the solidify modifier. And then hit Ctrl+A to apply scale on both the objects. Then select both of them and hit Ctrl+J to join. Then rotate them along the X axis by 90 degrees. Then go to Object>Set Origin>Origin to Geometry. Then apply the rotation. Then add in an array modifier. Set the X and Z offset to 0 and the Y offset to 1. The count on the Array Modifier will change the lenght of your object. Then add in a path.
Rotate the curve on the Z axis by -270 degrees. Then add in a curve modifier on your object and select that path. Then scale that path to be as long as your object. Now if you go into edit mode on your path you can play with the verticies of your path and your mesh will be deformed.


How to define the rest position in a BVH file (converted from an FBX)?

I spent two days trying to find the solution and ended up finding it an hour after posting the question here.

The solution is to run a script provided by batFINGER in this thread: Create pose from existing armature

I'll copy the script here just keep things in one place, but I don't claim to have written it. All credits to batFINGER.

import bpy
from bpy import context

remove_constraints = True
scene = context.scene
scene.frame_set(1) # TPOSE frame
rig1 = context.object
# copy the rig and armature
rig2 = rig1.copy()
rig2.data = rig2.data.copy()
scene.objects.link(rig2)
scene.objects.active = rig2
bpy.ops.object.mode_set(mode='POSE')
# apply the pose in frame 1
bpy.ops.pose.armature_apply()
if not rig2.animation_data:
    rig2.animation_data_create()
# remove animation from dupe
rig2.animation_data.action = None
# add copy transform constraint to each bone
for pb in rig2.pose.bones:
    ct = pb.constraints.get(pb.name)
    if ct is not None:
        ct.influence = 1
        continue
    ct = pb.constraints.new('COPY_TRANSFORMS')
    ct.name = pb.name
    ct.target = rig1
    ct.subtarget = pb.name

action = rig1.animation_data.action
f = action.frame_range.x
# add a keyframe to each frame of new rig
while f < action.frame_range.y:
    scene.frame_set(f)
    for pb in rig2.pose.bones:
        #pb2 = rig1.pose.bones.get(pb.name)
        m = rig2.convert_space(pb, pb.matrix, to_space='LOCAL')
        if pb.rotation_mode == 'QUATERNION':
            pb.rotation_quaternion = m.to_quaternion()
            pb.keyframe_insert("rotation_quaternion", frame=f)
        else:

        # add rot mode checking
            pb.rotation_euler = m.to_euler(pb.rotation_mode)
            pb.keyframe_insert("rotation_euler", frame=f)
        pb.location = m.to_translation()

        pb.keyframe_insert("location", frame=f)
    f += 1

# set constraints to zero or remove entirely.
for pb in rig2.pose.bones:
    ct = pb.constraints.get(pb.name)
    if ct is not None:
        if remove_constraints:
            pb.constraints.remove(ct)
        else:
            ct.influence = 0


I was able to solve it by enabling "Merge" and increasing the Merge Limit to ~.34. I tested using the dimensions of the default cube.


Can't find any tutorials on Body Edgeloops

I will compile comments to other questions.
Click on the images to enlarge them.

Should I restart my character mesh?

  There is no need to reinvent anything topology-wise, it has been done many times before by experienced artists. A simple search shows many examples. Just research and copy if you are not as experienced.

  lightwave base mesh
  upper back and shoulders

From Are self intersecting edge loops legal

  You want to have the edge loops perpendicular or aligned with the direction of movement/the alignment of the muscles. The ring muscles should be supported with multiple loops. Self intersecting loops probably are not the best solution, spirals most definitely not.

The Blender Foundation's Blenderella Training course, also focuses on the lower body.


You need to have Autosmooth activated. Then you can select a few faces, and with a click at the tool the normals of the involved vertices will be calculated in direction of the normals of the selected faces. Where two faces meets each other the normal will be middled.


As has been said, Cycles isn't capable of this.  Luxrender, however, is.  You can read about it on this forum and elsewhere.  However, I'll say here that it integrates into Blender (previewing is even possible with the experimental API enabled as demonstrated below), and it handles refractive and reflective caustics very well.  It is a bit slower but the versatility is worth it for much more accurate physics than Cycles.

I have reproduced your scene by creating a Projector Spot Lamp (using your image) and a Mirror material on the reflector.  The reflector mesh has Subsurf and has Smooth Shading enabled.  The "screen" has the default Matte material:

Here I am morphing the plane from flat, to convex, to concave:

You must install Luxrender before opening the .blend:


This behavior might be caused by having the property JAW_ROTATION of the mouth_ctrl bone set to zero. Setting it to it to 60 should solve your problem.

You can find it in the CUSTOM PROPERTIES panel at the Blenrig 5 tab (like in the image above), the Properties panel at the Properties shelf or the Custom Properties panel at the Bone tab in the Properties window.


No, you can't preserve bone indices, outside of edit-mode, bones are order by their hierarchy.

Its best to reference bones by name rather then index, (Or at least get their index once, outside of edit-mode)


1000 Stamen is quite a lot, are you sure you need that many in Unity to make it look good?
There are some solutions:
Ignore the 35MB, let Unity optimize it. That would be np if there are no other objects in the scene
make sure the stems have as few vertices as possible and reduce their number.
If the stem source object(s) have modifiers on them either remove or apply them, that way Blender should create instanced meshes, which Unity understands
If you are fine with coding, export one stamen and replicate it in Unity. FBX is usually the best format to exchange 3D models, it can handle instances, carefully check the export settings (choose export and where you are supposed to state the file location, press n). You don't need any import settings to support instances, but also go through the options of the fbx import in Unity, there's often stuff you can customize to fit your specific situation.


Where is the Node Editor in Blender 2.8?

That small drop down option next to object and choose the node editor you need such as Shader Editor.

Or by hitting Shift + F3

As @prubini87 mentioned, if there are no nodes created the area will be empty.


Oh, you need to enable the self collisions for each one.
You can see where it is:


Mass removal of materials with active F option

You can remove fake user in Outliner in Orphan Data mode:

For complite remove materials if they haven't users, press Purge All button


blend file opens with default cube instead of file's objects

First of all you should look at File menu > Recovery > Auto Save

By default it located in path like \AppData\Local\Temp\

Seems like you have overridden you project with default scene..


You can use  the Mirror Modifier with an Empty.

Just align the Empty where you want to mirror your Object.
Example:

Add a the Mirror Modifier to your Cube and use the Empty as the Mirror Object:

Enable all Axis

Now your Object is mirrored in every Axis:


Interior Vertexes and Faces Post Boolean

Answer: Stop trying to use booleans so much...

I moved away from using the boolean operators for the heavy lifting and instead used a curve with a screw modifier as the base and then began to manually build the rest of the object by hand.  I was careful to check for non-manifold elements along the way.  The hex head top was added with a boolean however.

I think it came out quite nice.

That being said, there are a few things that look as though they could be improved.

I have attached the final blend file for those who are curious.


The Grid Mesh Generator has changed its outputs, how do I turn its mesh output to vertices and indices?

I guess the docs were not updated.

What you're looking for is "Mesh Info", it breaks down the information necessary from a Mesh Input


If you can't see the menu try resetting blender to its default layout by pressing  Space  then typing "Load Factory Settings". Select the displayed option and the interface should go back to default.


Default value for bpy.props.CollectionProperty

The idea is to use application handlers to set the default value for bpy.props.CollectionProperty:

bpy.app.handlers.scene_update_post to set the default value right
after the addon registration via register() and then remove the
handler
bpy.app.handlers.load_post with @persistent decorator to set the
default value after any of the following events:

opening Blender
reloading the start-up file via the keys Ctrl N
opening any Blender file.

Here is the code:

import bpy
from bpy.app.handlers import persistent

class MyCollectionItem(bpy.types.PropertyGroup):
    name = bpy.props.StringProperty(name="Name", default="Unknown")
    value = bpy.props.StringProperty(name="Value", default="Unknown")

def setDefaultCollectionValue():
    myCollection = bpy.context.scene.myCollection
    # set default value if <myCollection> is empty
    if not myCollection:
        collectionItem = myCollection.add()
        collectionItem.name = "Name 1"
        collectionItem.value = "Value 1"
        collectionItem = myCollection.add()
        collectionItem.name = "Name 2"
        collectionItem.value = "Value 2"

# This handler is needed to set the default value for <bpy.context.scene.myCollection>
# right after the addon registration via register()
def onRegister(scene):
    setDefaultCollectionValue()
    # the handler isn't needed anymore, so remove it
    bpy.app.handlers.scene_update_post.remove(onRegister)

# This handler is needed to set the default value for <bpy.context.scene.myCollection>
# after any of the following events:
# - opening Blender
# - reloading the start-up file via the keys Ctrl N
# - opening any Blender file
@persistent
def onFileLoaded(scene):
    addDefaultLevels()

def register():
    bpy.utils.register_class(MyCollectionItem)
    bpy.types.Scene.myCollection = bpy.props.CollectionProperty(type=MyCollectionItem)
    # adding handlers defined above in the code
    bpy.app.handlers.scene_update_post.append(onRegister)
    bpy.app.handlers.load_post.append(onFileLoaded)

def unregister():
    bpy.utils.unregister_class(MyCollectionItem)
    del bpy.types.Scene.myCollection
    bpy.app.handlers.load_post.remove(onFileLoaded)

if __name__ == "__main__":
    register()


ok, i'm very stupid ... i didn't add the chain length. For all those who don't understand I mean the length that the movement has to influence: this right here


This answer can only give you the starting points for further research and learning. Google the terms I mention and read up on them, much has been written and there are many tutorials out there if you look for these key words.

For most cases you would be better off cutting it down to maybe 200 vertices or less, assuming you're not right in front of the grenade the whole time.

Generally you will want to take your high-poly version as a reference and build a retopology mesh from it, then transfer the fine details onto the low-resolution model by baking them into a normal map.

The decimate modifier will usually not yield good topology alone, but it is useful for a fast LevelOfDetail generation.


Python, How to Convert Rotations of T-pose Pose Bones in Armature 1 to Pose Bones in Armature 2? Finding Rotational difference

The primary problem is that blender doesn't update matrices automatically after setting by code and the secondary problem is setting correct matrices. check the same kind of problem which I have answered here:
How can I copy the location and rotation of multiple bones of a skeleton and paste them to an identical skeleton?


When I move a vertex, it seems like I'm "breaking through" the mesh

I think the issue is with your mirror modifier. You're using the Mirror Modifier to mirror the car's left side to the right side (or vice versa), but since you've dragged some of the edges/vertices across that mirror line, the mirror modifier is duplicating that, creating overlapping surfaces.

Disable the Mirror modifier visibility to see exactly what it's replicating. You'd want to drag all the vertices that cross over the mirror line back. Another way to avoid this type of issue is to enable Clipping in the modifier settings (bottom right of your screenshots). This prevents you from dragging any points across the mirror axis, and will clip any points to that axis.


I approached this by creating a custom texture. First I Marked three seams in the base mesh CTRL + E > Mark Seam.

Then unwrapped it. By selecting all of the vertices and pressing U > Unwrap. I scaled the UV Map larger because I was only interested in the area I applied the custom resin texture to.

Then exported the UV layout and in an image editor created a custom texture. Of course turned off the UV Layout before saving the finished texture.


Is it possible to make Blender prompt to save on exit?

Yes, (But only on MS-Windows) open User Preferences and look under Interface, you should see a checkbox with Prompt Quit beside it.

Additionally, or preferably you can use CtrlAlt + U to save it and make it load with your other defaults.

About Macs:

Closing the app with CmdQ invokes the save prompt. Quitting with CmdW doesn't. (possible bug?)
The only indication that you haven't saved is the 'dot' in the red, close-window  button, top left of the window.


Suddenly can not move bones after making some shape key

I can't open your blend in my release, but if you created the shape by applying the armature as a shape key, then you just need to add another armature modifier to your mesh and select it in the resulting Object field. If that's the issue then don't forget to select all bones in pose mode and ALT+r then ALT+g to reset the pose to default.


texture paint : how to switch between texture stencil and solid color paint

You can make as many brush presets as you want.


You are in cycles render engine. The texture panel, and material panel are different in cycles than in Blender internal.

What you want, is the texture panel from Blender internal.

I'm sorry, but there's not way to get the Blender internal panel in cycles, and it would not be practical, as the renderers work in different ways. You could switch to Blender Internal, but Cycles has many superiorities, so if I were you, I would just use the new design, and get used to the way it works.

Keep in mind: You can switch which texture you are editing in Cycles, by clicking where it says "environment texture", and selecting another texture.


How can an accurate height map be created in Blender?

I've just looked into your way of making a height map, which seems a bit snappier than a Mist pass for something like this - I'd never thought of doing it this way...

So long as you keep the color-space linear all the way through, it works fine, as far as I can see.

In the Render > Color Management panel, set the View Transform to 'Raw'... Using EEVEE, here, but Cycles would work, too.. image saved as 16-bit RGB PNG. When used as a texture in a Displacement modifier, the Color Space in the texture must be set to 'Linear', too.

I didn't make a fuss about smoothing and subdivision, but the results seem accurate. Original on the left, displacement with EEVEE image & displacement with Cycles image on the right, with the Displacement modifier set to a Strength of the Z dimension of the original object.


Blender script import model and render it

Here's an outline with obj import, creates one camera in a new scene, loops thru a model list, makes a new scene with links to cam in created scene, loops thru the cams in the new scene (add more) and renders.  You will need to edit the paths to suit your needs:

import bpy
import os
from math import radians

context = bpy.context

models_path = "//"
render_path = "//"

models = ["bretling.obj", "bretling.obj"]

#create a scene
scene = bpy.data.scenes.new("Scene")
camera_data = bpy.data.cameras.new("Camera")

camera = bpy.data.objects.new("Camera", camera_data)
camera.location = (-2.0, 3.0, 3.0)
camera.rotation_euler = ([radians(a) for a in (422.0, 0.0, 149)])
scene.objects.link(camera)

# do the same for lights etc
scene.update()

for model_path in models:
    scene.camera = camera
    path = os.path.join(models_path, model_path)
    # make a new scene with cam and lights linked
    context.screen.scene = scene
    bpy.ops.scene.new(type='LINK_OBJECTS')
    context.scene.name = model_path
    cams = [c for c in context.scene.objects if c.type == 'CAMERA']
    #import model
    bpy.ops.import_scene.obj(filepath=path, axis_forward='-Z', axis_up='Y', filter_glob="*.obj;*.mtl")
    for c in cams:
        context.scene.camera = c
        print("Render ", model_path, context.scene.name, c.name)
        context.scene.render.filepath = "somepathmadeupfrommodelname"
        bpy.ops.render.render(write_still=True)

The import operator code can be gleaned from the Python Console by typing in bpy.ops.import and Ctrl+Space which will auto complete, for FBX:

>>> bpy.ops.import_scene.fbx(
fbx()
bpy.ops.import_scene.fbx(filepath="", axis_forward='-Z', axis_up='Y', directory="", filter_glob="*.fbx", ui_tab='MAIN', use_manual_orientation=False, global_scale=1, bake_space_transform=False, use_custom_normals=True, use_image_search=True, use_alpha_decals=False, decal_offset=0, use_anim=True, anim_offset=1, use_custom_props=True, use_custom_props_enum_as_string=True, ignore_leaf_bones=False, force_connect_children=False, automatic_bone_orientation=False, primary_bone_axis='Y', secondary_bone_axis='X', use_prepost_rot=True)

As you mention you are o fay with python, this should be well enough to make you dangerous.

Ideally I would probably set this up as an import operator with multi file select from a folder.


How to create a Boolean Vector property that is "single selection"?

I managed to create a "single selection" boolean vector. It use getter and setters. An auxiliary variable is used to store the value of the property, otherwise setting the property inside the setter would recursively call setter which calls setter which calls setter...

AXIS_VALUE = [0,0,1]

class Foo(bpy.types.Operator):
    #...
    #...

    def getter(self):
        return AXIS_VALUE

    def setter(self, value):
        for i in range(3):
            AXIS_VALUE[i] = {
                (False, False) : False,
                (False, True) : True,
                (True, True) : False,
                (True, False) : False,
            }[AXIS_VALUE[i], value[i]]

    axis = BoolVectorProperty(
                subtype="XYZ",
                default=(0,0,1),
                get = getter,
                set = setter
            )
    #...
    #...


Why do original legs have orange dots, but mirrored ones do not?

The orange dots are the object origins of the selected objects. It looks like you have created multiple armature objects, one for each leg.

You only want one armature object for the spider, then add multiple bones to the armature while in edit mode. This allows you to move the entire spider as one while moving individual parts in pose mode as needed.

You can select multiple armature objects and merge them into one by pressing ⎈ CtrlJ


What you need to do is apply the mirror modifier.  Then you can re-parent the bones to the mesh with automatic weights with no problem.
Hope this is the answer you needed.


This method will be pretty hard for your hardware, but it's the only reasonable way (I can think of) to make it look good from any angle.

Any other method I've tried like using gradient to change Roughness, Transmission, mixing with other shader is looking similar from the side but they will not work looking from above.

It's really simple setup.

First of all you will need to use Separate XYZ to be able to create gradual transition between dirt and clear water.

Next you can use this separation to create water color change (not necessary) and use Principled or Glass shader for water itself.

Lastly add Volume Scatter and Absorption to make "dirt" inside your water. Multiply node will help with Density - higher value = denser dirt.

Don't forget to crank up Light Paths > Volume to something higher than 0. I've used 2 in this example.


Move camera depth of field from background to magnifier on the foreground

This is actually as expected - the 'image' through the magnifying will not be focussed at the distance of the magnifying glass but will actually be focussed at a distance dependent on the distance to the magnifying glass and the focal length of the lens - and this wont correspond with the actual distance of the distant object.

Since the focal distance of the image doesn't correspond to any "physical" object in the scene you will need to manually adjust the Depth of Field distance to find the required focal depth - simply adjust it until you get a sharp image. Note that you may need to adjust it well beyond the distance to the object, making the magnifying glass itself even more out of focus!


You are asking for a tutorial. Instead of giving you the tutorial (this is not a place to demonstrate a whole tutorial) I am going to show you a workflow. Now you can google each of these topics.

Import movie into blender.
Render out as separate images (for convenience).
Place a grey plane in front of the camera.
Shine a spotlight on it where the object you want to glow is.
Insert keyframes and move the light. The light will get animated. Seeing the images from the video in the background helps.
Use the compositor in blender to render out a new movie. The grey plane should be multiplied with the images you rendered out earlier.


My object appears jagged with shape keys and subsurf

Ok, so I figured out what the problem is;
So you know the list with all the modifiers on it?

Well, the subdivision has to be on the BOTTOM of the list, I moved it up to be able to access it quickly, but that made it so that it subdivided before the hook modifiers, making it appear jagged!


Context Problem in Blender 2.80 python module

Some things to check and look out for.

Expect context.window, context.screen etc to be None in headless
mode.
If an operator works in the python console in blender then chances
are it needs no special window, screen or region for context.  AFAIK
the edit mode toggle operator only needs an editable object active.
Check the bpy module works in your python shell

Recommend using myObj = context.object A new cube may not always have
the name "Cube" eg Cube in another language
The space member of context is context.space_data or from the area as area.spaces.active.

And the answer was, as supplied by the OP

  ...It seems, that the precise location where i do the import bpy is
  very important. My error was that I put import bpy at the top of my
  .py (prior to some Django getUserInput function). Therefore i strongly
  recommend to others working in Django or other python environments to
  always use import bpy DIRECTLY before your blender scripting. I have
  now also tried to run a more advanced script and it works!


Why does geometry deform in unexpected ways when using IK?

This is a common occurrence when I set-up IK, I often set the pole angle to 90 degrees (sometimes 180 degrees) to fix the direction the knee points. I suspect it has to do with the orientation of the joints that are pointing to the pole in relation to the orientation of the pole itself.

However, because you can simply apply a correction to the constraint, I don't see much need to think over it further than that. There shouldn't be any problems with animation or posing due to requiring an offset to the pole angle in the constraint. So no need to worry about it ^_^

Edit: I just saw your edit. You should check that your skeleton is symmetrical on both sides. I've had angle issues like this before when the pole OR the leg joints were off by even a fraction of a unit. You need to make sure that your extruded pole joint is directly in front of (ie: same x-location) your knee joint.


2.77a - Keep foot on the ground with anchor OR do not allow any vertex below certain world Z

well, you can place a bone(anchor) in the desired location on the floor, then add a copy location and copy rotation constraints to the feet targetint the bone(anchor). then when the influence of the constraints is 1.0 the foot will be stick to the floor(the anchor bone position/rotation). you will have to keyframe the influence value that can be easy adding a driver for it.


This is because the vector pass can't "see" through transparent (glass) objects; in this case all it sees is the lens object, which is remaining motionless relative to the camera.

To render with motion blur in this situation, you'll have to use Cycles' built in motion blur. Enable it in Properties > Render settings > Motion Blur:

And remove the vector blur node in the compositor.


Get number of frames in scene from the command line?

This information is stored in the blend files header, so you can find out without having to load Blender at all.

This has the advantage you can scan a directory of 100's (or 1000's) of blend files in a very short time (a few seconds even if the files are large).

Blender comes with a script in scripts/modules/blend_render_info.py which can extract this data from a blend file (you don't even need Blender to be installed just a copy of this file and Python is enough).

You can load the script as a module or execute it directly.

command line example:

# python blend_render_info.py /path/to/my_test.blend
1 250 Scene

python example:
This can run inside blender,
otherwise blend_render_info.py will have to be in Python's sys.path

import blend_render_info

filepath = "/path/to/my_test.blend"
frame_start, frame_end, scene = blend_render_info.read_blend_rend_chunk(filepath)

print("total frames:", (frame_end - frame_start) + 1)

As you can see the frame range and active scene is stored, if you want more info you'll have to use a script and load the file into Blender.