How to create a rotation in local space that is equivalent to the rotation in world space?

Transforms, as shown, are local transforms, not world transforms.  So yes, you can very easily have two orientations that have the same numbers, but different orientations.
The easiest way to copy a world-space orientation is to use a copy rotation constraint-- either a bone constraint or an object constraint, depending on what you want constrained-- in world->world space, obviously.  That way, Blender does the math for you.
Constraints won't show up in the transform channel; they use the transform channels as inputs that they modify.  If you want, you can make a constraint "real" by selecting the constrainted object and using the "apply visual transform" operation (from the ctrl a menu for me, in either object or pose mode depending on the type of constraint.)  After applying visual transform, you can delete the constraint, or leave it if you'd prefer.
If you're interested in the pure math associated with this, I would recommend reading (and understanding) https://en.wikipedia.org/wiki/Rotation_matrix .  https://en.wikipedia.org/wiki/Basis_(linear_algebra) may also be useful.


You can press Bake To Keyframes button in Rigid Body Tools panel.


Is the screenshot dialog part of a python script?

Set default settings in the shortcut.

As a workaround to editing scripts, set the properties in the shortcut. As long as the operator is invoked using the shortcut, the new settings will be used.

For screenshot the default shortcut is CtrlF3

Edit settings from  User Preferences > Input > Screen > Save Screenshot  Uncheck "Full Screen" setting on the keymap editor.

A "helper" operator

Alternatively, can write a simple helper operator with the settings you want already set.  For example having to type in the filename each time. Sample script below saves screenshot into a folder of your choosing and simply timestamps the filename.  Change screen.screenshot to screen.area_screeny in keyset above and not have to bother with invoking the file select dialog.  The script is based on scripting > templates > python > operator simple

import bpy

def main(context):
    from os import path
    from datetime import datetime
    directory = "/home/batfinger/Pictures/"
    filename = "Blender%s.png" % str(datetime.now())
    filepath = path.join(directory, filename)
    bpy.ops.screen.screenshot(filepath=filepath, full=False)

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "screen.area_screeny"
    bl_label = "Area Screeny"

    @classmethod
    def poll(cls, context):
        return True

    def execute(self, context):
        main(context)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.screen.area_screeny()

Note: edit the directory above to suit.


Is there any way to combine/simplify interpolation curves?

An fcurve that you see in the graph editor is able to animate only one value throughout an animation. As you follow the curve from left to right, it's x,y location gets translated to the frame and value for the property being animated.

For an object (or armature bone...) you can have one fcurve for the x-location, another for the y-location, one for x-scale and so on, meaning up to nine curves for the loc/rot/scale. You may also have extra fcurves for an object if you have other properties animated, like visibility, shape keys, modifiers, constraints...

While you need an fcurve for each value that you want to animate, you don't have to have an fcurve for every possible value, you only need an fcurve for each property you want to control during an animation. When you insert a keyframe using I->Location blender will create three fcurves for the location. You can also  RMB on the x-location display and choose Insert Single Keyframe to only create one fcurve. If you then use I->Available only the values with existing fcurves will get new keyframes.

If you have excess fcurves that you don't want, you can delete single fcurves in the graph editor. With the fcurve name selected and the mouse over the list press X to delete the entire fcurve.

When you have multiple fcurves, you can also simplify the graph editor display to make it easier to work with. For each fcurve and each group of curves, there is a small eye icon that can show/hide the fcurve or groups of fcurves. The cursor in the header allows only selected items to be listed in the graph editor, while the magnifying glass to it's right allows you to filter by name.


Key to switch between vertex, edge and face in Maya bindings

Ctrl+Tab is documented for default Blender layout; there it changes selection mode in Edit mode, in Object mode it activates Weight Paint.
In Maya bindings Ctrl+Tab switches to Weight Paint interaction mode both in Object and Edit modes.
It appears that select mode menu in this case will be on clicking RMB.

I suggest refering to User Preferences > Input window to check for the key bindings there.


Bone selection in edit mode is no longer working

Check in the inspector that you haven't deselected the mouse icon on the bone as this stops objects from being selected.

Hope it helps.


Issue connecting animation to character in Blender Game Engine

The documentation says:

  The Action actuator is only visible when an armature is selected,
  because actions are stored in the armature.

But this seems to be no longer true you can add the Action actuator to all objects this might cause the problem.

Try a setup like that (On your armature) with your start and end frame 1..25, Loop Stop (which actually means Loop Start -Play ipo continuously from start to end when a TRUE pulse is received.)


Scripted Copy of all Materials/Material slots from another Object

Copy only the active Material:

tgt.active_material = src.active_material

Clean copy of all Material Slots from src to tgt:

tgt.data.materials.clear() # ensure the target material slots are clean
for mat in src.data.materials:
    tgt.data.materials.append(mat)


How to delay execution of execute() function in an Addon?

Normally you can let Blender's layout system draw the properties, but when you want to have an action button on an Operator UI, you have to specify the whole interface. You might even consider writing a bit of Panel code instead of trying to do it all in the Operator.

But if you do want to stick with the Operator only you could augment your current Operator code with.

an unlocked property (boolean),
an explicit draw() function,
replace your current execute() function with something that checks if the unlocked property was set to True yet.

code:

unlocked = bpy.props.BoolProperty()

def draw(self, context):
    scn = context.scene
    l = self.layout
    col = l.column()

    col.prop(self, 'x_pos')
    col.prop(self, 'y_pos')
    col.prop(self, 'z_pos')
    col.prop(self, 'chosen_axis')
    col.operator('mesh.align_verts', text='Mesh Align').unlocked = True

def execute(self,context):
    print (self.chosen_axis)
    if self.unlocked:
        self.update_indiv_vert_pos(context)
        print ("Executed script")
    return {'FINISHED'}

I would not not use an Operator as a replacement for a proper UI panel.


Shortcut to add faces following the loop when re-topology

Yes, select only the yellow edge and press F and it will fill the whole face, and if you press F again it will go on with the following ones. It looks like you doesn't even need the F2 addon:

Or in Edge or Vertex Select mode, select the whole edge around and CtrlF > Grid Fill and it will fill the whole with a row of faces.


Pick a direction

The operation you are trying to perform is called "Loop cuts and slide": basically recognize on the mesh faces a certain flow of polygons (loop) and allow the user to subdivide the interested faces by adding a given amount of edges.

What the command need to run is just the direction of the path. Quad faces can in fact be subdivided in two different directions.

Till the cursor does't approach one of the edges, you'll not see the pink edges (the future loop cuts).


Comment echo: add better lighting. A flat grey background is a recipe for boredom. Try the HDR textures in blender’s own data files as environment textures.
As for the oil, try the clearcoat setting in the Principled shader. It was made for just such a purpose.
Also, nice burger


Alpha values range from 0-255.  Your image editing program is hiding pixels with very low values such as 1-3 into that background checkerboard pattern.  Blender is expecting 0 for complete transparency.

Open image in GIMP, use the magic wand tool to select transparent area, then click Delete key.

File >> Export As... and give it a new name, or Overwrite PNG if you are satisfied with results.


How to enable shadows on glossy surface with enviromental mapping?

Try to use another type of light source, like Area lights, preferably. Also, notice that you've got an old version of Blender. Maybe the Principled BSDF shader in Blender 2.8 could give you more flexibility.


You need a lamp in your scene. This can be done with ShiftA and click on lamp


Color MixRGB Shader Node

Looks like a Color > MixRGB  shader  node.  Has its blend type set to "Multiply" and has been renamed to "Color Factor".


What do you mean when you say that when you're in Weight Paint mode, nothing happens? You need to be in Object mode, select the armature, Shift select the object, switch to Weight Paint mode, and Ctrl left click on the bone you want and you should see the weight.
You have black color instead of blue because you have enabled the Zero Weight option in the Viewport Overlays panel. It allows you to see real zero weight, because a very low weight will be displayed blue.

If you move some bones it may not work because you've selected the Bone vertex group in the Armature modifier, remove it if you want all your bones to work:

The black dotted line indicates the parentage between the object and the armature, it goes from the origin of your object to the origin of your armature, but these 2 origins are not centered. So select the armature and go to the header menu > Object > Set Origin > Origin to Geometry, and select the object and right click > Set Origin > Origin to Geometry:


How to change an object's material or texture with python script in blender game and for it to be visible?

bpy is the main blender module, it is not available inside the game engine where you should start your scripts with import bge. In the game engine you use different data structures than the main part of blender. I don't think the bge let's you easily change materials, this page makes it sound like you need to loop over every poly to change the material.

There is a simple way to achieve what you want, using logic bricks to swap mesh objects. First step is to check you have the material linked to the data not the object, data is the default setting so may already be set.

Then duplicating the object and giving the second one the other material. Then you can use an Edit Object actuator to swap meshes.


How to access custom properties from python

You just need to remove the dot, so the correct invocation is:

bpy.data.objects["Cube"]["prop"]

Python's subscription syntax doesn't use dot character.

Note: In Python terminology this is known as getitem rather then getattr access.


child object moves when parent object's scale is changed

The issue you are facing is just how parenting works. Let me try to explain.

Take this example:

In these two images I have a monkey parented to a cube. Notice the location of the monkey. The only thing I change is the scale of the parent cube. (Fun fact if you cleared the parent on the monkey now, it would jump back to the top image.)

In this type of parenting the parent's scale is a multiplier for the child object's location and dimensions, its just how it works.

From your question it sounds like you want to be able to scale the parent, and have the child copy the scale, but stay in the same location. To do that you need to use a Child Of Constraint (also detailed in my parenting answer.)

On still using the same example as above, put a Child Of Constraint on the monkey. You want to uncheck all the Location and Rotation check boxes. Now only the scale will be changed.


About MB-lab addon. How can I fix the problem with red eyelids in characters?

Try decreasing SSS (Sunsurface scattering). It can be found under Skin Editor/ skin_sss


I also experienced this weird stuff and I was able to solve it.

Select the distorted object
Select Object Tab from Properties Window
Change Transform scale to 0.01
Change Transform X-axis to 90 degrees

Result:
https://www.dropbox.com/s/1yip15gm13dke1c/COnverted.blend?dl=0

Option 2: You may refer to this link if you don't want to do it manually. http://growlybearproductions.com/Blender/
Option 3: You may also change fbx import settings like this (Blender 2.76b)


How do I change fluid material in a simulation

(It's already mentioned in the comments but to give this question an answer...)
You need to check the Mesh checkbox which you can find in the Fluid settings of the domain object. Then you can assign a material to the domain object which represents the fluid.


You can rebuild the corner by bridging the edges.

Reposition corner edges and delete unwanted vertices
Select both edges and go Edge > Bridge Edge Loops
Adjust the parameters to fit your intended look.


Python Create Custom Armature without ops

Fairly sure that mesh data is the only one that offers from_pyData for others we need to manually position items as we create them, which we can do by reading the py data.

Armatures can get confusing, there are bones as well as edit bones that contain the basic armature structure and properties and then there are pose bones that stores constraints and animation data for all the action.

Different data paths are used to access different bone data -

obj = bpy.data.objects['Armature']
obj.data.edit_bones # adding, deleting, positioning bones
obj.data.bones # adjusting bone properties
obj.pose.bones # adding constraints, custom shapes...

An example of adding some bones and creating a custom mesh then setting it as the custom shape for one of the bones -

import bpy, bmesh

arm_obj = bpy.data.objects['Armature']
# must be in edit mode to add bones
bpy.context.scene.objects.active = arm_obj
bpy.ops.object.mode_set(mode='EDIT', toggle=False)
edit_bones = arm_obj.data.edit_bones

b = edit_bones.new('bone1')
# a new bone will have zero length and not be kept
# move the head/tail to keep the bone
b.head = (1.0, 1.0, 0.0)
b.tail = (1.0, 1.0, 1.0)

b = edit_bones.new('bone2')
b.head = (1.0, 2.0, 0.0)
b.tail = (1.0, 2.0, 1.0)

# exit edit mode to save bones so they can be used in pose mode
bpy.ops.object.mode_set(mode='OBJECT')

# make the custom bone shape
bm = bmesh.new()
bmesh.ops.create_circle(bm, cap_ends=False, diameter=0.2, segments=8)
me = bpy.data.meshes.new("Mesh")
bm.to_mesh(me)
bm.free()
b2_shape = bpy.data.objects.new("bone2_shape", me)
bpy.context.scene.objects.link(b2_shape)
b2_shape.layers = [False]*19+[True]

# use pose.bones for custom shape
arm_obj.pose.bones['bone2'].custom_shape = b2_shape
# use data.bones for show_wire
arm_obj.data.bones['bone2'].show_wire = True


Use alpha of one texture node to mask another texture node

I think I got it:

I used a mix RGB node and put my texture1 into the upper slot and a transparent color into the lower slot. Then I put the alpha of texture2 into the "fac" of the mix node.


Various data that is generated for things like simulations will use random numbers to get their results. In reality, we don't get true random numbers, we get pseudorandom numbers, which is a reproducible way of generating a sequence of numbers that resemble random numbers, with the random seed "defining" the sequence of numbers we get.

For simulations this is helpful as we can use the same random seed to always get the same sequence of numbers. This means every time we play the simulation we see the same result. When we don't like the result we can choose a different seed to get a different result.

The seed in the force field should not change when you alter the size. You should expect the seed to be different for every force field you add. If you don't like the way particles move with the force field you can try using a different seed.


Possible way to have a different background than the HDRI background?

If you want to use the HDRi to light the scene, but want a transparent background to be composited later with the background, or want to blur the HDR or maybe replace it all together, enable film transparent.

Then you can use alpha over to combine the scene with any other image.

If you enable the Environment output for the render layers, you can also make the HDRi background avalable to be used it as a different element in the compositor.

The Env socket contains the information from the background so that it can be manipulated any way you want.

  Update. To do this in Eevee in 2.8

Just enable Film>Alpha>Transparent.

Then on the compositor use Alpha over to mix over the background you want to use.

Alternatively you can use a background for the world that is only seen by the camera and not by other rays, therefore not contributing to the lights, reflectons,etc.

Set two different Environment background shaders and use the Is Camera Ray from a Light Path node to control the shader mix.


You can tab into edit mode, select one face where you don't want the image to be, then hit shift + G select co-planar, it will select all the faces with the same normal (the same orientation).
Then you can use the option of the threshold to allow faces with a pretty much similar orientation to be selected,
Then you can finally use the search bar to extend your selection if needed.
depending the orientation of the other faces of you mesh you will have some cleaning to do, but this method should make things easier and faster


Check the alpha blend method on the cheetah clip material settings. I recommend “hashed.” If that is correct, check that in the material the alpha of the image is connected to the shader’s alpha somehow (using a mix shader node with the alpha connected to the factor, and a transparent shader node on one input, works good).


Select your leaf on second layer and go to Edit mode.
Select bottom face and hit Shift + S > Cursor to Selected.

Go back to Object mode and hit CtrlShiftAlt + C > Origin to 3D cursor.

That's all.

If you want, you can select only two bottom vertices and do the rest same as above.

Or you can even manually position 3D cursor, it's up to you.


if u use the same picture on both materials its supposed to work like this:
and dont forget to set the uvs correctly :)


How to model this cylinder type shape with pattern

You can subdivide your result vertically and horizontally and then select four vertices and extrude them out. The basic extrusion principle would help you in your way.


If it only disappears in Edit Mode, you might have accidentally hit H to hide the selection while the complete mesh was selected.
Go to Edit Mode and press Alt+H to unhide everything.


You had the right idea with the Curve modifier and Bezier Curve. It looks to me like it's not working because the origin points of both objects are off in some arbitrary location. Set the origin point of your Curve to be at the start of the curve path. Set the origin point of your mesh object to be on the edge of your mesh. Then add the Curve modifier. You may need to fiddle with the axes depending on the rotation of your objects (it's easier if both the Curve and Mesh are oriented in the same direction from the start). Once the modifier is on, you can just grab the mesh along the applicable axis and it will slide along the curve. You may need to have a SubSurf modifier preceding your Curve modifier in your stack in order for it to have enough mesh density to deform well. I my screen shot note the position of the 3D cursor - this is also the origin point of both of my objects. Since I'm in Edit Mode you can see that the wireframe represents the original location of the mesh object, and the bent version is the position after the modifier is added.


how to set up background image for edge modelling a head?

Just add a background/refeence image.
You can then control its appearance in the properties panel.

Add > Image > Reference/Background

You can adjust the appearance, position, opacity


You need to tick the Animated checkbox under the Rigid Body tab:

If the object just sets there and doesn't roll, you should make sure your Friction levels are set properly for the involved collision objects:

Zero friction will result in no forward movement, make it higher and the "Stickiness" gets higher while lower settings make it more slippery.


Animation nodes: applying material to text instances

Now Blender 2.8 has Animation Nodes 2.0, as such there is more material handling available. I was able to use Animation Nodes to assign materials to text instances without deep copy. The text instances were created from a text block list making objects with unique names.

I used Object Material Output nodes (labeled 1,2) from a Get List Element node which you can iterate.

These materials were defined as Eevee types but it should work with Cycles as well. Note that the Get List Element is an integer index so you can't blend the materials this way.


How to find the highest end value of nla strips in a group of objects?

The first issue is that with myset = set([strip.frame_end]) you are creating a new set each time the loop runs and only ever adding one value. When you call max() is finds there is one value, which it then picks as the max (as there are no other values in myset to compare it to).

The second issue - the reason why it is printing out all the values instead of just one - is that aside from the previous issue, the print() statement is inside the main loop, which is why it prints each time.

So you need to:

Store myset outside the for loop and add values to it in the loop (instead of overwriting it).
Look for the max value once the loop has finished.

The new code:

import bpy
from random import choice

scene = bpy.context.scene
o = bpy.context.object
random_group = choice(o.users_group)
obs = random_group.objects[:]
myMaterials = bpy.data.materials

myset = []

for o in obs:
    myMaterials = o.data.materials
    for material in myMaterials:
        # Get all materials of currently selected object (if any)
        if o.type == 'CURVE' or o.type == 'MESH':
            if o.data.materials:
                if material.animation_data is not None:
                    track = material.animation_data.nla_tracks
                    if material.animation_data and material.animation_data.nla_tracks:
                        for track in material.animation_data.nla_tracks:
                            for strip in track.strips:
                                #myset = set([strip.frame_end])
                                #print (max(myset))
                                myset.append(strip.frame_end)

print(max(myset))

So, instead of making a set and immediately printing it, I append the strip.frame_end value into a list (as there doesn't seem to be a need for a set, though I have kept the name myset) and print the max of it at the end.


Glossy material rendering black, in a scene with environment and emission lighting

Deactivate autosmooth in data tab and it will be ok.


Blender 2.75 lmage texture painting. Painted image will not bake

You need to save the painted texture first and then load it into the material to be able to bake it onto the new texture.


Snap selection to x-y component of 3D Cursor

I don't know of a way to snap directly to the 3D cursor itself. Usually you're snapping to a vertex. In your case you can use the preexisting vertex at the 3D cursor's location. Failing that, you can always set your pivot point to 3D cursor, duplicate any existing vertex, and scale it to 0. This will move it to the 3D cursor.
In Blender you can constrain most transformations to either a single axis, or to a plane, including when snapping. If you hit G for move, and then hit Y, you will only be able to move along the y-axis.
In your case, you want to prevent movement along the y-axis, so you would hit G, then SHIFT+Y. This will constrain movement to the x-z plane.
As for the snap tool itself, I usually recommend using the active element setting. This way you have more precise control over what is snapping to the target (the highlighted white vertex, instead of whichever vertex is closer.
Here is how I would solve your problem without even needing the 3D cursor:

Select the vertex that you want to line up to your target edge. This will set it as the active element.

Select the rest of the mesh that you want to move. You can either hit A to select all, or L to select only the contiguous parts of the mesh.

Hit G for move, then SHIFT+Y to constrain movement to the x-z plane.

Move your cursor to the vertex you want to snap to, and click.


You cannot paint over a hole, so either insert eyeballs as separate objects so you can roll 'm, or fill the gap with topology.


How to nest a glowing cube inside a larger cube in and render using Cycles?

One object, one material solution

Overview

For this method to work you will need to use current Master branch of Blender 2.79 or 2.8. You can find them here: https://builder.blender.org/download/

This is because we will be using Bevel node for edge detection. Without it there are some workarounds in Blender 2.79b like for example using Bevel modifier and second material for bevels.

Nodes

Let's break it down to the most interesting parts.

Inner Cube

This is my dumb version of clipping vectors. What it does it basically using Color Ramps to clip axis vectors from left/right, top/bottom, and front/back to make smaller cube inside mesh. So two for X, Y and Z. You can tweak them in the same manner to get smaller or bigger cube. Those Color Ramps.

Volume Noise

It's noise. In Volume. Added to the Inner Cube. Nothing much here except that you will need to use grey color for one of the handles to make it darker than cube itself.

Edge Mask

This is why we need Master branch. We are using here Bevel node to detect edges and use it for mixing Glass with Emission.

Glass and Edge

Nothing fancy here. A bit optimized Glass shader and Emission for edges. Remember to use small Roughness value. I don't know if it's a bug or 'feature' but without it Master and 2.8 are going nuts with simple Glass.


Apply (Ctrl A) rotation and scale of your mesh, then reduce the radius in which the children are spread around the hair parent.


How do I extract 2D pictures from a 360 HDRI?

Add this equirectangular texture as world background texture as usual and render it.
By another words - go to Shader editor > World tab, add Environment texture node
(not an Image texture node) and choose directory to HDR image on your drive.

Tips:

since you need only get render of BG, a Camera location doesn't matter
(would be different story if you would like to reconstruct envi)
to easy set view direction (camera rotation) it's handy go to 3D view editor > Properties (N) side panel > View tab > View > View Lock > and enable Camera to View
Wrapping amount (distortion) of rendered image is equal to camera lens value. Range of view you can change in Properties editor > Camera > Lens > Focal Length
use the highest hdri resolution available, since final render use just a portion of the texture, it is possible it would not be enough for backplate in some cases anyway :)
since source texture is high dynamic range (HDR) image it's useful to keep Color Management > Filmic with some Look preset or adjust contrast later


Howto get the filepath of a rendered animation frame with python

The filepath is stored in:

bpy.context.scene.render.filepath

However there is a function to find the output filename for a frame (the same function blender users internally).

output = bpy.context.scene.render.frame_path(frame=10)

example use:

>>> bpy.context.scene.render.filepath = "/test/some_###_anim.png"
>>> bpy.context.scene.render.frame_path(frame=10)
'/test/some_010_anim.png'


Scale settings for exporting to STL (for 3d printing)

The STL exporter doesn't take Scene Scale into account. Import your STL back into Blender (it will have the same size) and drag Scene Scale up back to 1.0, and you'll see how the cube grows relative to the grid.

1 Blender unit equals 1m, but STL seems to assume 1 unit as 1cm.

If you want 1 unit to be 1mm, set Scale on STL export to 0.1 and Scene Scale to 0.001 to make it match the output scale in viewport.

Note that the STL will be 10x smaller if you re-import it into Blender!


Is it possible to use proportional editing without affecting or hiding nearby vertices

One possible solution that is relatively cumbersome:

Add a base shape key ("Basis"), then a modification shape key ("Key 1").
Switch to edit mode.
Select the area that you do want to modify and assign it to a new vertex group (Group).
Modify the mesh using proportional editing (accepting that the parts that should stay unaffected are modified for now).
Switch back to object mode.
Set the shape key to 1 and select your vertex group ("Group") under "Blend:" to mix in the "Basis" key for the parts that should stay unaffected.
Then follow the procedure outlined in How to apply shape keys? to apply the changes to the mesh.

There are easier ways to do something like this, with major limitations:

Select the area that you don't want to affect and press Y to split it apart. Then set the proportional editing mode to "connected", thereby excluding those vertices that were previously split from the other part of the mesh. Afterwards, join the displaced seam by hand.
Limitations:
You can only do this if the area that you do want to affect is connected and in one piece.
Re-joining the seam can be cumbersome, although the remove doubles tool helps with areas that weren't modified.
Turn the part that you don't want to affect into a separate object (P with selection). If necessary, enable Object > Display > Wire for this object. Then return to the first object and edit it freely. Afterwards, re-join the meshes with Ctrl + J. Join the displaced seam by hand.
Limitations:
As before, re-joining the seam can be cumbersome.


Some Object changing scale in Rendered mode

Please, check your "Midlevel" value on "Displacement" node in Donut material. You have "20.70". It is too high and this is the reason of your problem. Please change value to "0.0" or "0.5" and everything will be fine ;)


Cycles GPU Render button is looking passive

From the manual:

  To enable GPU rendering, go into the User Preferences, and under the
  System tab, select the Compute Device(s) to use. Next, for each scene,
  you can configure to use CPU or GPU rendering in the Render
  properties.

  OpenCL

  OpenCL is supported for GPU rendering with AMD graphics cards. (We
  only support graphics cards with GCN architecture 2.0 and above).

  If your video card is supported, download the latest drivers.


Script to render one object from different angles

Could you take an approach something like this?

Create a mesh whose vertices are the desired viewpoint positions, around your body scan. (It's the sphere, in the illustration, named 'Viewpoints')
Create one camera, and assign it a 'Track To' constraint ('To': -Z, 'Up': Y) with the body scan as target

Run a script which keyframes the camera to each of the vertex locations in successive frames

import bpy

vp_obj = bpy.data.objects['Viewpoints']
cam_obj = bpy.data.objects['Camera']
vp_vs = vp_obj.data.vertices

bpy.context.scene.frame_start=1
bpy.context.scene.frame_end=len(vp_vs)

for (f,v) in enumerate(vp_vs,1):
    cam_obj.location = vp_obj.matrix_world * v.co
    cam_obj.keyframe_insert(data_path="location", frame=f)

.. and render the animation?


Ok i found the answer that solved my problem. I followed the answer in this post:

How to make a curtain


I see many people having issue with viewport performances. try to switch 2.8, 2.81- or 2.79 stable version if that does anything good. For me 2.8 is better to sculpt- but for some its the other way around.


Can't duplicate a proxy armature with mesh

I Believe this is a limitation from the current linking implementation. The workaround I currently use is to create a copy of the file (or a file link if the os supports that) with a different name and link the second character from that.


Try to cleanup your tracks with different error threshold from high to low. You have too many unnecessary tracking points. You need at least 8 good trackers, but having way too many might make the process less accurate. See:
How can I get better results when doing camera motion tracking?

Then if Keyframe checked option won't work correctly, try to set the best key range!


Why cannot I override the context for bpy.ops.object.origin_set()

from the blender bug tracker https://developer.blender.org/T57572

  operator origin_set relies on selected_editable_objects afaict, so adding override["selected_editable_objects"] = [bpy.data.objects["Cube"]] should do the trick:


How to change Texture properties via python?

Recast the type
For objects that can have their types changed can recast the types using type_recast
>>> tex.type_recast(
type_recast()
.. method:: type_recast()
Return a new instance, this is needed because types
such as textures can be changed at runtime.
:return: a new instance of this object with the type initialized again.
:rtype: subclass of :class:`bpy.types.bpy_struct`

try it out in console.
>>> tex = D.textures.new("Tex", 'STUCCI')
>>> tex.name
'Tex'

>>> tex.type
'STUCCI'

>>> tex.image
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'StucciTexture' object has no attribute 'image'

>>> tex.type = 'IMAGE'
>>> foo = tex.type_recast()
>>> foo.image is None
True

>>> foo.name
'Tex'

>>> foo
bpy.data.textures['Tex']

Notice too the two instances keep there type
>>> str(tex)
'<bpy_struct, StucciTexture("Tex") at 0x7f89ff16b448>'

>>> str(foo)
'<bpy_struct, ImageTexture("Tex") at 0x7f89ff16b448>'

btw, if while checking this out in console the properties area is open on same screen, it is being done automatically for us.


Procedurally generated objects of paintings

I'm not sure if I understand the requirement correctly. But here is one way... The following code will create an extruded planes per image from the given directory. One of the faces of the plane will have the image texture (you can randomize the array of image files using random.shuffle).

This is rather quick and dirty :), so maybe buggy and quite slow.  To improve the performance, (and if the functionality broadly corresponds to your requirement) you'd need to replace the ops calls with the low level equivalents. Also, the space between the planes may be required to be properly worked out.

import bpy
import os
import glob

def getOverride():
    for area in bpy.context.window.screen.areas:
        if area.type == 'VIEW_3D':
            v3d = area.spaces[0]
            rv3d = v3d.region_3d
            for region in area.regions:
                if region.type == 'WINDOW':
                    override = {
                        'scene'  : bpy.context.scene,
                        'region' : region,
                        'area'   : area,
                        'space'  : v3d
                    }
                    #~ return region, rv3d, v3d, area
                    return override
    return None

types = ["*.png", "*.jpg"]
srcDir = '/tmp/'
imageToCanvasRatio = .8
canvasThickness = .08
canvasColor = [.120,.109,0.02,1]
canvasWidth = 1
canvasOffset = .2
image_files = [os.path.basename(x) for t in types for x in glob.glob(srcDir + t)]
maxImgs = 15
maxHeight = 0
imgsPerRow = 5
cumulHeight = 0

bpy.context.scene.render.engine = 'CYCLES'

defaultMat = bpy.data.materials.new('Background')
defaultMat.use_nodes = True
node_tree = defaultMat.node_tree
node_tree.nodes.get("Diffuse BSDF").inputs["Color"].default_value = canvasColor
for i in range(0, len(image_files), imgsPerRow):
    imgs = [bpy.data.images.load(srcDir + image_files[i + k]) for k in range(0, imgsPerRow) if (i + k) < len(image_files)]
    maxHeight = max(canvasWidth * img.size[1] / img.size[0] for img in imgs)
    for j, img in enumerate(imgs):
        print(i, j, maxImgs)
        if(i + j >= maxImgs):
            break

        canvasHeight = canvasWidth * img.size[1] / img.size[0]

        bpy.ops.mesh.primitive_plane_add(location=(2 * j * (canvasWidth + canvasOffset), cumulHeight + maxHeight/2, 0))

        obj = bpy.context.object
        obj.dimensions[0] = canvasWidth
        obj.dimensions[1] = canvasHeight

        bpy.ops.object.mode_set(mode='EDIT')
        bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False}, TRANSFORM_OT_translate={"value":(0, 0, canvasThickness), "constraint_axis":(False, False, True)})

        bpy.ops.mesh.loopcut_slide(getOverride(), MESH_OT_loopcut={"number_cuts":1, "edge_index":5}, TRANSFORM_OT_edge_slide={"value":imageToCanvasRatio})
        bpy.ops.mesh.loopcut_slide(getOverride(), MESH_OT_loopcut={"number_cuts":1, "edge_index":5}, TRANSFORM_OT_edge_slide={"value":-imageToCanvasRatio})
        bpy.ops.mesh.loopcut_slide(getOverride(), MESH_OT_loopcut={"number_cuts":1, "edge_index":4}, TRANSFORM_OT_edge_slide={"value":-imageToCanvasRatio})
        bpy.ops.mesh.loopcut_slide(getOverride(), MESH_OT_loopcut={"number_cuts":1, "edge_index":6}, TRANSFORM_OT_edge_slide={"value":-imageToCanvasRatio})
        bpy.ops.object.mode_set(mode='OBJECT')

        obj.data.materials.append(defaultMat)

        for faceIdx in range(0, len(obj.data.polygons)) :
            if(faceIdx != 24):
                obj.data.polygons[faceIdx].material_index = 0

        mat = bpy.data.materials.new('mat')
        mat.use_nodes = True
        node_tree = mat.node_tree
        node_texture = node_tree.nodes.new("ShaderNodeTexImage")
        node_texture.image = img
        links = mat.node_tree.links
        links.new(node_texture.outputs['Color'], node_tree.nodes.get("Diffuse BSDF").inputs['Color'])
        obj.data.materials.append(mat)
        obj.data.polygons[24].material_index=1
        bpy.ops.object.mode_set(mode='EDIT')
        bpy.ops.mesh.select_all(action='SELECT')
        obj.data.uv_textures.new()
        bpy.ops.object.mode_set(mode='OBJECT')
    if(i + j >= maxImgs):
        break
    cumulHeight += (maxHeight)+ canvasOffset


I would advise against it. In the case that you need to adjust your UV map, you would have to start from scratch. If it is distracting you, you can toggle the visibility of seams.


How would you create grooves in wood objects like this?


Why does my rig pose change when i render?

Look for keyframe registrations.  If a pose has been keyframed, rendering will set it to the appropriate, keyframed pose.

Following the render, hit ⎈ Ctrl+z to return to your unregistered, unrendered pose, then try advancing a frame (with mouse over the timeline, hit right arrow.)  Does the pose change?  Then you have registered keyframes.  Register your new pose before rendering, or delete existing keyframes.


How to properly set VERTEX_PAINT mode from a python script?

If you used bpy.ops.screen.screenshot(ctx, filepath=destination, full=False) in the correct context it would save a screenshot of what you see in the viewport, but render.render() isn't the same as doing a screenshot.

I think you're getting something like this?

You need to set up a material to pipe the Vertex Color Layer to the material diffuse colour. Right now you are rendering the object with the default material, which doesn't know anything about the Vertex Color layer. The .ply importer doesn't assign a material to your object.

Blender Internal materials.

# assuming there is a material assigned to the object.
obj.data.materials[0].use_vertex_color_paint = True

else it's something like

obj = bpy.data.objects['a']
mat = bpy.data.materials.new('material_1')
obj.active_material = mat
mat.use_vertex_color_paint = True

maybe stick some ambient occlusion on it:

bpy.data.worlds["World"].light_settings.use_ambient_occlusion = True

For cycles materials

via the UI it's pretty easy

Which makes a node setup like this:

If you wanted to script that, that's another matter.

Your script adjusted (expects Blender Internal)

import os
import bpy
import sys
from math import pi

# filename = 'web.ply'
# in_dir = os.path.join('J:\\', 'aa')
filename = 'a.ply'
in_dir = "/home/zeffii/Desktop"
item = os.path.join(in_dir, filename)
out_dir = os.path.join(in_dir, 'out')
os.makedirs(out_dir, exist_ok=True)

bpy.ops.object.delete()
bpy.ops.import_mesh.ply(filepath=item)
bpy.ops.object.lamp_add(
    type='SUN', radius=100,
    view_align=False, location=(0, 0, 0),
    layers=tuple(i == 0 for i in range(20))
)
bpy.ops.object.select_all(action='DESELECT')

for ob in bpy.data.objects:
    print(ob.type, ob.name)
    if ob.type == 'MESH':
        bpy.context.scene.objects.active = ob
        ob.select = True
        mat = bpy.data.materials.new('material_1')
        ob.active_material = mat
        mat.use_vertex_color_paint = True
    elif ob.type == 'CAMERA':
        ob.data.clip_end = 1000000
        ob.data.clip_start = 0.01
        ob.select = False
    else:
        ob.select = False

bpy.ops.transform.rotate(value=pi / 2, axis=(True, False, False))
scn = bpy.context.scene
scn.render.resolution_x = 692
scn.render.resolution_y = 900
scn.render.alpha_mode = 'TRANSPARENT'
bpy.data.worlds["World"].light_settings.use_ambient_occlusion = True

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        ctx = bpy.context.copy()
        ctx['area'] = area
        ctx['region'] = area.regions[-1]
        bpy.ops.view3d.view_selected(ctx)
        bpy.ops.view3d.camera_to_view_selected(ctx)

scn.render.image_settings.file_format = 'PNG'
scn.render.image_settings.quality = 100
scn.render.filepath = os.path.join(out_dir, filename + '-preview.jpg')
bpy.ops.render.render(write_still=True)

outputs this:


Mesh inside soft body - Mesh Deform not working

The problem is with the Mesh Deform modifier. The Mesh Deform only acts on those vertices that are within the Container mesh. In your case you have applied a subdivision surface modifier and this has resulted in some vertices that are outside the container mesh. This means that those vertices are not deformed to follow the softbody simulation and so they are left behind.

To resolve the issue, identify the vertices that are outside and move them within the container and re-bind the Mesh Deform modifier.


Blender 2.73 textures in solid view mode

Texture Solid is in the 'Shading panel', which is below the 'Display' panel:


Rigging a skeleton hand with separated bones

Make them all the same object, as you have done.  then, make an armature, select the object, then the armature, and press Ctrl - P and select with empty groups  you will notice that the armature still has no effect on the mesh.  then, figure out the name of one of the bones, then select the mesh and on the vertex groups property panel, find the vertex group with that bones name.  now, select that vertex group, enter edit mode, and select the part of the mesh you want the bone to control, (a good tip is to move your cursor over the section, and press L which will select the loose part the mouse cursor is over)  then, in the vertex group panel, with the bone group still selected press, assign(.  do this for all your bones and you will be good.  If you mess up on one of them, you can use the remove button.

Hope this helps!  It doesn't take as long as the text makes it look.


How can I Make a Cycles material with gradual gradient fill?

You are right that using pointiness will do what you want. Take a look at the following node setup. Changing the subsurf modifier divisions changes the amount of blending (as well as adjusting the color ramp)

In short, pointiness is connected to the factor of a color ramp and that to the diffuse shader's color.


How to give a variable rotation, scale or location offset to dupligroups objects?

Yes, this is called a driver.
You can evaluate a python expressions by pre-pending your input with a #. There are a number of modules pre imported for convenience, use noise.random() to get a random floating-point number, e.g. #noise.random() * 5


How to show the vertices or edges of the mesh when using subdivision surface?

Try selecting this option:

It will make the effects if the modifier visible in edit mode. the down side is that your edges will be curved.

Selecting limit selection to visible will also make your it visible. The only issue with this is that it can be hard to select the right vertex since all of them, even the ones behind the object are visible.


Why does weight painting this skeleton with reverse kinematics rotate the vertex around the bone

Go into the armature pose mode, select every thing with A then press Ctrl + A and "apply pose at rest pose".

Your bone constraints moved the bones in pose mode a little so you need to apply  their new transforms as the official "rest pose"


It is not. The most common file format used for 3D printing is .stl, which doesn't even support quads, meaning that it will convert everything back to triangles anyway. Basically, you only want quads when working with the geometry, some operations work much better with quads than triangles, take for example the subsurface modifier. Quads are, however, not desired when you want detailed information about the geometry, which is the case when printing. Take a look at the object below, which is an extreme case of a quad with the vertices not in the same plane.

The edges are defined, but the face itself is not. This means that programs have to guess what the face should look like.

Blender chooses to regard it as if they were two seperate faces, with an edge connecting the top vertices. Other programs might regard it differently, like you can see below.

This is why you actually want triangles, because another program might interpret the geometry in a different way than wanted.

Note that in general the quads are very small and almost in the same plane meaning that different interpretations of the same face won't even lead to visible differences when printing. In other words, hit 'export as stl' and don't worry about quads or triangles.

Edit: I just had a minor printing mistake because of the problem described above. There was one rather big quad that did not have every vertex in the same plane, as can be seen below.

This resulted in the following:

Note how the part is asymetrical because both quads are defined in a different way.
This could have been prevented by adding an extra edge.

In this case it is only a cosmetic difference and doesn't affect the functionallity of the part, but that could have been different.


In the Video Sequence Editor, add both audio clips.

On the left audio strip, set the Pan property to -1 under the Strip settings > Sound. On the right audio strip, set the pan property to 1.

Keyframe the Volume property (hover over it and press I to set a key) from 0 to 1 to make the audio fade from mute to 100% audible.

While this may work for some cases, I'd advise you to use a audio editing software (like the freeware audacity).


Best way to have text change during an animation?

I don't know exactly how to do it, but if you are looking into scripting methods of doing this, check out animation nodes. This sort of thing is pretty much what it was made for. You can use nodes as well as custom python script to get what you're looking for.


Why is moving a vertex messing up my mesh?

When I did the tutorial I had the same problem. I think I solved it by rotating it along one axis.
See if that makes a difference.


How do I add colour to this set of nodes?

If you replace your Math nodes with Vector Math you can use a color ramp to color the result.

I'm not exactly sure what the end result should look like or why you chose the particular mathematical operations, so the end result is just to show that it contains color set by the color ramp.


You probably need to add more geometry. Say for example you are trying to sculpt on the default cube. Select the cube, and press tab to enter edit mode. Notice how the cube is composed of just the eight corners. This means that the sculpting tools only have the 8 corners of the cube to play around with to simulate the brushes, which obviously isn't enough.

Now try adding and applying a Subdivision Surface modifier to the cube. Ignoring how it changes into a sphere, the sculpt tools now work since they can edit the existing geometry.

You can try enabling "Dyntopo" meaning Dynamic Topology in the top right-hand corner. This will add more geometry as you sculpt, but be careful as if it starts adding too much, your computer will lag.

Alternatively...You've turned the brush strength down to zero.


I have a model with many, many spikes on it and they need to be rigged. Any possible way to do this?

First I would try using snap to volume, this can make rigging fingers easy. Snap one end of a bone to the base of a spike and the other to the tip. Subdivide the bone and then snap the new joints at points along the spike.

If volume snapping doesn't work very well, you can use the 3d cursor for snapping, a bit long and tedious for this many items. Select verts around base of a spike, ⎇ Alt click if you have a clean edge ring around each, otherwise you can select two, three or four verts that surround a centre point and snap the cursor to that, go into the rig and add a bone in that position (a new bone will be created at the 3d cursor), then select the tip of the spike and snap the cursor to that, then select and snap the opposite end of the bone to the tip. The same thing can be done at mid points to align multiple bones along the spike.


Your material uses the Ray Length. The thicker the object is, the more green and dark it gets.

The left object has very little thickness, because you added a Solidify modifier to it. Add more thickness to it, by disabling the solidy modifier to see a similiar color as in the right object.


How do I "look around" in a scene? Also, what's up with zooming?

I'm not sure about the zooming, but a cool way to view your model from the inside is to use "Walk Navigation". You can do this by going to "View > Navigation > Walk Navigation", or just press shift-tilda. This allows you to view your scene like a first person shooter game, and it doesn't pan around it. You can also walk around in your scene with WASD, and if you want to be on the ground, you can press Tab to toggle gravity. To exit walk navigation mode, you can either right click to reset the view to what it was, or left click to set that view. This can also be good for deciding a good camera position.
I hope I didn't get too off-topic, these are just tips that might be useful. Hope this helps!


How to display the "animate property" diamond keyframe insert button (2.8x)

UILayout.use_property_split and UILayout.use_property_decorate

Setting UILayout.use_property_split  in conjunction with  UILayout.use_property_decorate  to True, marks down the animation button. (Currently not over-documented)  My understanding is the split makes room for it, and the decorate draws it.

With developer extras on, right click > view source. Found this in bl_ui.properties_space.py giving a big hint

    layout.use_property_decorate = False  # No animation.

Quick demo with object location, using the Text Editor > Templates > Python > UI Simple Panel template

import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        layout.use_property_split = True
        layout.use_property_decorate = True
        obj = context.object

        col = layout.column()
        col.prop(obj, "location")

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

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

if __name__ == "__main__":
    register()


This seems to work, in edit mode (for the simplicity of example)

import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

face = [bm.faces.active]

bmesh.ops.inset_region(bm, faces=face, thickness=0.4)
bmesh.ops.inset_region(bm, faces=face, thickness=0, depth=-0.5)

bmesh.update_edit_mesh(me, True)

Regarding bmesh.ops.scale(), it takes a space argument which is a matrix to base the operation on. If you are comfortable generating matrices then that's probably enough, but if not then see this snippet.

Template can be found at TextEditor->Templates->Python->Bmesh Simple

import bpy
import bmesh
from mathutils import Vector, Matrix

# Get the active mesh
me = bpy.context.object.data
bm = bmesh.new()   # create an empty BMesh
bm.from_mesh(me)   # fill it in from a Mesh

bm.edges.ensure_lookup_table()
bm.verts.ensure_lookup_table()

e = bm.edges[0]

mid_invert = (e.verts[0].co + e.verts[1].co) * -0.5
edge_matrix = Matrix()
edge_matrix[0][3] = mid_invert[0]
edge_matrix[1][3] = mid_invert[1]
edge_matrix[2][3] = mid_invert[2]

factor = (0.5, 0.5, 0.5)
bmesh.ops.scale(bm, vec=factor, space=edge_matrix, verts=e.verts)

# Finish up, write the bmesh back to the mesh
bm.to_mesh(me)
bm.free()  # free and prevent further access

I'm almost positive that there is an easier way to construct the space matrix, given a simple 3-vector, rather than my verbose approach.


You just need 1 material.
In the shader editor use this node setup and you get what you want:

UPDATE:
setup with two images:
important: the "upper" image must have pixels with alpha < 1 inside of the png (in my case here the "toppng")


If i understood the question you need to curve the edges

Select the side verts and Press Ctrl+Shift+B to bevel

Select the edge and subdivide both edges

Select the face and press Shift+S and select cursor to selected

Select the single vert and press Shift+S selection to cursor

Repeat to other side also.

Select both the verts and Press Ctrl+Shift+B to bevel and with the scroll wheel increase the verts

Select the face and delete or extrude it.


It mostly depends on the kind of variations you want to achieve.

If it is related to wall general shape, such as L T predefined parts, you may use "custom objects" (mesh based closed volumes) as walls, this is a feature of 1.3.8+ 1.4_dev free versions for blender 2.79, available on github repository.  https://github.com/s-leger/archipack/archive/140_dev.zip

In archipack 2.0 Pro version for blender 2.8, presets parameters exclude any "segments" one, as they are meant to quickly change wall's aspect (width / height / finishings, materials..) without changing the general shape.

Adding new kind of parametric objects to archipack is not an easy task as the archipack's framework require some time to getting started.


Ok first try to think what you really want to do. You are trying to select some object based on its name, however you are looking at the selected objects.
So what you really want to do, is unselect everything else (because the object(s) you do want is already selected).

Here is a loop that goes through every selected object bpy.context.selected_objects:, and if the search term does not match the current object name it deselects it. Which leaves you with only the matching objects selected.

import bpy
searchTerm = "cube"
for obj in bpy.context.selected_objects:
    if searchTerm.lower() not in obj.name.lower():
        obj.select = False

The .lower() part converts everything to lower case, which makes the search case insensitive (if you did not "c" would not match "Cube").

Now one way you could search for more then one search term at a time, is to add in a or into the if statement.
Which would look like this:

if "a" not in obj.name.lower() or " " not in obj.name.lower():

Note the second condition " ", that is searching for a space in the object name.

Here is a slightly more useful version that looks through all the objects,  selects the matching objects and deselects any that do not match.

import bpy

for obj in bpy.data.objects:
    if "s" in obj.name.lower():
        obj.select = True
    else:
        obj.select = False


If I'm modelling a circle to an exact size, how do I account for change in size with subsurf?

Use object dimensions.
Can use the object dimensions.  Eg add a plane or circle and set subsurf. Set the subsurf of view to render.
For example sake added default plane
In the python console
>>> # level 0 subsurf
>>> C.object.dimensions
Vector((2.0, 2.0, 0.0))

>>> # level 1
>>> C.object.dimensions
Vector((1.8333334922790527, 1.8333334922790527, 0.0))

>>> # level 2
>>> C.object.dimensions
Vector((1.8333334922790527, 1.8333334922790527, 0.0))

Now set to desired radius
>>> C.object.dimensions = (2, 2, 0)
>>>

Setting dimensions is altering the scale accordingly, values will be around 2 / 1.83333
>>> C.object.scale
Vector((1.0909090042114258, 1.0909090042114258, 1.0))

Apply scale if need be, in which case the object with unit scale will be approx a 2 diameter circle when subsurf is 2.


Rigging issue - The bottom of the torso is moving, where I only want the top to for this bone

Select the center edge loop in weigh paint mode (use vert mode button in top panel to be able to do that or do it edit mode by going to the vertex group panel and remove the vertex from the vertex group) and set the weight to 0 in the weight slider, and press Shift+K to assign weights (but in this case removing)...


I don't have any keymap for "view selected"

I believe that "View Selected" in the keymap has been renamed to "Frame Selected."


Obtaining a smooth result after modelling

You might have flipped normals on some of the faces.
Select all faces and hit CTRL+N to make the normals consistent.

Also, make sure to check the mesh for disconnected geometry; select the object in Edit mode and click Mesh > Clean up > Merge by Distance. Find a value where the geometry of your model isn't affected negatively. If any vertices are removed you'll see this in the viewport toolbar.


Soft shadows are obtained by means of sampling. To eliminate the banding, set Render > Sampling to a higher value


There is a operator accessible from the 3D view header Object > Make Local > All  (or L) that will make the linked objects local copies.  *Do note that this is not undoable.*

The difference between the options is not stated in the manual.

Selected objects Only make the object local, you can move, scale and add modifiers, but all the mesh data, materials, etc stays linked to the source file. (you can not enter edit mode.)
All copies everything and there are no links for any objects. All linked objects are now editable.


change your material in this way

result (if you decrease alpha to 0.6):

UPDATE:
i am sorry, i didn't get that you wanted that drag and drop functionality.
I just tried again - and it worked. You can check my video here:
https://youtu.be/U2dKeZhib60
but...please be a little bit patient, because my internet upload is blazingly fa....slow :(
Can you show us a movie/gif so we can see what you are doing (wrong)?


How to randomly pick an object from a collection?

Use this code:

import bpy
from random import random

#select your collection by name (in this case the collection named "Collection")
col = bpy.data.collections["Collection"]

objNum = len(col.objects)

#Generate random number
randomIndex = round(random()*(objNum-1))
#use the random number to call a random object in the collection
obj = col.objects[randomIndex]

#creat a copy of the object and link it to the collection
newObj = obj.copy()
col.objects.link(newObj)


Is there any way to bring smooth corrective modifier effect to unity?

You can apply the modifier to make its effects part of the mesh data.


Group splines by height using animation nodes

Finally a script did the job.
splines = ["S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10"]
heights = [3, 7, 3, 15, 15, 7,]
uniques_heights = list({ h for h in heights})
print(sorted(uniques_heights))
splines_per_heights = []
for h in sorted(uniques_heights):
    spline_h = []
    for i in range(len(heights)):
        if heights[i] == h:
            spline_h.append(splines[i])
    splines_per_heights.append(spline_h)
print(splines_per_heights)

The script basically takes two lists, one filled with splines and one with the heights for each spline. First creates a dictionary representing each unique height. Then identifies all splines sharing same height and appends them into a list resulting in a list of splines for each height, and lastly it creates a final list including all the lists per height.
Here the result once inside the nodetree.


How do I scale without loosing my animation?

I recommend using python. (mainly based on How to get keyframes and related information?)

for ob in bpy.context.scene.objects :
    if ob.type in ['MESH','ARMATURE'] and ob.animation_data:
        for fc in ob.animation_data.action.fcurves :
            for key in fc.keyframe_points :
                bpy.context.scene.frame_set(key.co[0])
                if ob.scale[0] < 0:
                    ob.scale *= -1
                    ob.keyframe_insert(data_path = 'scale')

The flow of this code is something like;

look for an object
get the frame number with keyframes
rescale it if the scale is minus
overwrite keyframe

I've tried this with an animated .blend file in blender2.79 and it worked.


Yes. It works exactly the same, just press the "Assign" button with the desired vertex-groups/faces selected. Unassigned geometry uses the default (first) material slot.


Easy Ways Of Finding Both Front And Side Profiles for Character Modelling

It is probably simply a question of finding a suitable keyword combination. I tried both on Google Images and on Pinterest with "face front side" and found a lot of examples, both male and female. Furthermore, once found a good image, you can use the function to show similar ones, and you will have plenty of examples to practice.


A file would be nice, so that we could be sure we were giving proper advice.  But what it sounds like is that you have geometry that acts connected between instanced objects, but the normals are discontinuous between the geometry.
Let's look at a cylinder.  When you split the cylinder in half, into two different half-cylinders, it's just like marking the midline edges as sharp.  In the full cylinder, these edges' vertices compute their normals from faces wrapping around the entire cylinder, but in the half cylinder, these vertices aren't using the same faces to compute their normals-- they only know about half the faces.  We can see the dividing line when comparing our whole cylinder to our two half-cylinders below:

So how can we can get the edge vertices to act as if they're part of an entire cylinder?  By giving them custom normals, copied from a whole version, with a data transfer modifier.
Because of the method (nearest corner of nearest face) we need to use the data transfer when the meshes are all in the same place, which is hard to show in a single picture.  When the normals are correct, we should apply the modifier; after that, we can delete the target mesh.  Custom normals require autosmooth to be enabled (but it will ignore the autosmooth angle once the geometry has custom normals.)


Creating addon for rotating fbx model in python

This sounds like a task that should be performed by the import FBX addon. The addon does include some options for rotation.

The first set of options allow you to define which axis is up and which is forward, if those two don't resolve the placement you may also need to try turning off the last option Use Pre/Post Rotation


Bright pixels appear on my model in material preview with Cycles on Blender 2.82

So I opened your file on my machine and have to inform you that the glitches only occur on your end.

The doughnut looks just fine in my Viewport:

And renders beautifully (this render was done with only 8 samples in about 7 seconds):

Since you are using a laptop I suspect the switch between IntelHD-Graphics and your dedicated chip my be the cause of this problem. Since I'm not a Windows user I can only give you limited advice on this issue:

Make sure all your hardware drivers are up to date.
Start Blender with your GTX enabled (right-click on the application, then choose something like "run with NVIDIA")
If that doesn't solve your issues and you're positive that neither your OS nor your hardware are at fault here, try filing a Blender bug-report.


How to Create an Sci Fi "Plasma/Energetic/Force Field" Material in Cycles?

You could try a setup like this:

If you animate some of the mapping nodes, you can get an effect like this:

The essentially part of the rather largish setup above is in the screenshot below.
The only difference between the nodes below and the largish shader is that the latter has a texture controlling the intensity/color of the emission shader.

These nodes mix an emission shader with a transparent shader based on the angle of the surface to the camera (details here). It also makes backfaces (faces facing away from the camera) transparent.

The large setup has a mixture of procedural textures controlling multiple emission shaders which are added together in place of the single emission shader in the setup above.
Of course, you can use any texture setup you want, even image textures.

Making a hexagonal procedural texture will probably be tricky with the current selection of procedural textures available in cycles, so you are probably best off either making the object's topology in the shape of hexagons, or using an image texture.

Note that if you have a more complex object in place of a sphere, skipping backfaces might not be enough to avoid rendering faces not directly visible to the camera.

By using the setup from my answer here, this can be made to work on more complex objects:

  To get rid of the geometry behind the rest of the model, you can use
  the Transparent depth output of the lightpath node (note that this
  output is only available in the latest development versions of
  blender, but it will be
  in 2.71)

  This value goes up based on the number of "transparent bounces" (a
  transparent bounce refers to the sampling ray passing through a
  transparent layer/surface of the mesh). Since we only want to see the
  top layer, we can use a Less than math node and a mix shader node
  to make every bounce past the first bounce (bounce 0) will use only
  the completely transparent shader (Transparent Depth is never
  negative, so this is basically testing if it's equal to 0).

For comparison here is a gif demonstrating the difference between only hiding backfaces and hiding all faces invisible to the camera:


Using Vertex Slide:

Select the point and press ShiftV or GG. Then move it to the desired point on the line with the mouse and click to set it. Hold Alt to slide it past the end of the edge.

Alternatively, this can be reached through the Edit Mode toolbar menus: Vertex -> Slide Vertices:

Or through the right-click context menu:


How to create a video with audio comment?

Blender has no audio recording functions. You could simply play your animation and record with Audacity to MP3.

The recordings can be arranged in Video Sequence Editor (VSE) to synchronize them with the video , it might be helpful to record a each few sentences to a separate files.

Image of the VSE while moving around audio tracks:


The light is being lost at the point where you multiply in the Ambient Occlusion as that pass doesn't include the 'light' since it's purely emissive. One solution would be to activate the Emission pass in the Render Layer properties and then Add it in as shown (Emit connected to an Add Color node) :


To answer my own question...when selecting the parent instead of "With Empty Groups" or "With Automatic Weights", Set Parent To "Object (Keep Transform)". Then in Pose Mode under the Bone Properties (little green bone) at the top you can see what the new bones are called. When weight painting you'll just have to add your own vertex groups named what each of the new bones are called. Then do manual weight painting. Kinda tedious but it gets the job done :)


Rigify rig can't move my mesh only rotate 2.79a

Your rig has two way of moving arms and legs: IK and FK; you can choose the behaviour using the IK/FK slider on the N properties panel.

In your case Ik is selected and you are trying to move the arm with the FK controllers, which are disabled.


Help: Timeline has turned red - how can I get back to default?

The header color can be changed in
Preferences > Themes > DopeSheet > ThemeSpace > Header


Motion Tracking + MatchMoving -- What am I doing wrong?

If the camera is static you need a different kind of solver then the default. Use tripod solver for the camera, and exclude the trackers for the object in the camera solution.
Then track again the object only, and solve the object separately.


How to append parent object from an external file including all the children?

I asked around and a user JA12 on #blender irc channel suggested me the following:

Open up the source scene, select the parent object in the Outliner with Ctrl+Left Click, that will select all levels of children as well
Use Ctrl+C (Copy) while those objects are selected, that will copy the selection to the buffer
Close the source scene and open up the destination scene
Press Ctrl+V (Paste)

Note: Copy Attributes Add-on prevents default copy action.


MSGBUS drops subscriptions on new or reload blend file

The bpy.msgbus.subscribe_rna() is not persistent and will be removed when loading a new file. A persistent application handler, can be used to subscribe to the message bus when a new file is loaded. The example code below demonstrates this by appending a persistent handler load_handler to bpy.app.handlers.load_post.

This answer also contains a more detailed example of msgbus in an add-on.

import bpy
from bpy.app.handlers import persistent

# For more information see source/blender/python/intern/bpy_msgbus.c
# and https://developer.blender.org/P563

# Object that will store the handle to the msgbus subscription
subscription_owner = object()

def notification_handler(*args):
    print(f"Object: {bpy.context.object.name}, Location: {bpy.context.object.location}, Args: {args}")

def subscribe_to_active_obj():
    # What the subscription is for, in this example the active object.
    # Note that for properties it may be necessary to use `path_resolve`
    # as shown in https://developer.blender.org/P563
    subscribe_to = bpy.types.LayerObjects, "active"

    # Subscribe to the msgbus to call the handler when the key is modified.
    # Please note that not every UI interaction will publish an update,
    # despite modifying the key you've subscribed to. For instance, when
    # subscribed to `bpy.types.Object, "location"`, changing the location of
    # an object through the move tool won't call the handler automatically,
    # while updating the location property in the "Tranform" panel in the
    # sidebar will. The publishing of an update can be forced through
    # `bpy.msgbus.publish_rna()`.
    # The "PERSISTENT" option ensures that the subscriber remains registered
    # when remapping ID data, it does not mean that the subscription remains
    # persistent when loading a different file. This can be accomplished with
    # a persistent application handler that is called on file load.
    bpy.msgbus.subscribe_rna(
        key=subscribe_to,
        owner=subscription_owner,
        args=("a", "b", "c"),
        notify=notification_handler,
        options={"PERSISTENT",}
    )

@persistent
def load_handler(dummy):
    subscribe_to_active_obj()

# Register the handler, ensures that the subscription will happen when a new
# file is loaded.
bpy.app.handlers.load_post.append(load_handler)

# Subscribe to the active object for the current file.
subscribe_to_active_obj()

## Explicitly notify subscribers of changes to this property
# bpy.msgbus.publish_rna(key=subscribe_to)

## Clear all subscribers by this owner
# bpy.msgbus.clear_by_owner(subscription_owner)


Have you Unwrapped That Plane again because as i think this happens only when Plane is not Uv Unwrapped just go to top view and in the edit mode just hit 'U' and then hit 'Project from View'
come back to object mode
and also connect the texture coordinate and mapping node to the image texture
This Should Work For You


Make bezier cuves follow/face/parallel to the mesh to make hair

You can do this by controlling the Tilt property on a per vertex basis.

It may be tedious will require some manual work if it is a lot of hair.

In edit mode just select a single vertex or a whole spline at once (you can do this easily from a single selected vertex by pressing Ctrl+L) and then controlling tilt with Ctrl+T.

You may optionally turn on Proportional Edit mode and set an adequate radius to control a bunch of hair at once.


OK I achieved a more or less satisfactory result by using multiple Shrinkwrap modifiers, and a hidden duplicate of the motorway geometry that the bottom vertices of the top parts of the supports are shrinkwrapping to. The middle parts of the supports are snapping to the top parts, etc...


How to replace an orphaned external file by an existing one? (all instances)

You can set the filepath attribute on your sequences with python:

import bpy
for seq in bpy.data.scenes['Scene'].sequence_editor.sequences_all:
    if 'image_a' in seq.elements[0].filename:
        seq.elements[0].filename = "image_b.png"

You can optionally change the files location setting seq.directory if needed.


The Cycles Material converter addon is part of Blender Add-ons Contrib. The contrib addons are not part of the official blender releases, they are normally included with daily builds and some of the custom builds available at Graphicall.org. The contrib addons are considered still under development or not suitable to be accepted into the official addons for some reason. New addons will normally be found here for some time while being tested before they are included in the official addons.

If you want to install the cycles material converter by itself you can download the single script from blender's git repository by going to this page and clicking view raw file, then download file. Once it has been saved to your computer you can use the install from file... button in the preferences.

You can also download the entire contrib repository using git, by following the instructions on this page, or you can download a snapshot from here. Once this has downloaded (and extracted if you get a snapshot) you should place the contents into a folder called addons_contrib next to the addons folder installed with blender. While you can add them to the addons folder with the other addons, it can be easier to update them if you keep them separate as well as making it easy to identify which addons are official and which belong to contrib.

Also note that the contrib addons are listed under the testing category so you need to select that to see any contrib addons in the addons list.


The back portion of model is not visible while rotation

That's backface culling on the N panel, on the right side of the viewport, under Shading -> "Backface Culling", this only draws faces which have their normal pointing at the camera, if you deactivate it you turn every polygon "double sided" in the viewport.

For rendering purposes this has no effect, but it might help viewport performance or visibility.


BGE: Orbit script seems to work, but motion is not applied

Ah, found it. Apparently, one have to add:

cont.activate(moveH)
cont.activate(moveV)

to actually apply the motion


Materials from Blender to Three.JS: Colors seem to be different

Okay, I found the solution by myself.

The reason, why the colors are different in webgl is: the exporter makes use of the rgb values that blender provides. After a lot of research I found out, the rgb values in blender are not gamma corrected. The Hex values are gamma corrected.

Thats why the colors were correct, after I applied the corrected hex-code to the materials.

Since that is a very crappy workflow, I talked to a developer from my team and he did some research on the WebGLRenderer.

He found out that you can enable a property called "gammaOutput". If you do that, all colors get gamma corrected by the renderer.

SOLUTION

renderer.gammaOutput = true;

compared to the first image in my question you can see the webgl version isn't that dark and oversaturated anymore. The small difference you can still notice comes form the environment lightning in blender.


Why does Blender 2.70 not stay in Orthographic view when rotating from, say, Front Ortho view?

In blender 2.70 Auto Perspective is turned on be default in the user preferences. This will cause you to go from perspective to orthographic when changing from the User View a view like the side view. The same is true visa versa.

To change this behaviour you can edit the user preferences.

Open the user preferences, Ctrl Alt U
In the Interface tab disable Auto Perpective
To make this change permanent Save User Preferences


You may add a custom transform orientation based on your object's current orientation. In your case select the object in Object Mode, press Ctrl+Alt+Spacebar (or click a '+' button in a Transform Orientations panel of the Properties Shelf (N). It'll add a new orientation according to your object's position.

If you have more complicated object with the normals facing in different directions you may select the face/faces with desired angle/angles in Edit Mode and then press the buttons mentioned above. It'll orient the 3d gizmo according to the faces' position.

The newly added orientations (you may add as many as you like) are available in the Transform Orientation tab at the bottom bar of the 3D window.


Why does my volumetric light disappear when I disable camera visibility?

Disabling camera ray visibility prevents an object or shader from being evaluated until after a ray has bounced for the first time. Directly visible volumetric light comes from striking the volume on the first hit. By disabling camera ray visibility, you prevent this interaction since there is no first hit on the volume.

What exactly are you trying to accomplish? I'm not seeing anything wrong with your first image.

Btw, you may get somewhat improved performance by using an emission texture on your light itself instead of enclosing it in a sphere with holes. The texture will prevent sampling around the solid areas of the sphere. Use the texture coordinate > normal output to mapping on a point light.


Why does voronoi texture switch use intensity coloring when ramped?

The ramp color dominates the Voronoi [position] as we have witnessed.

Design or Defect? Why? Perhaps the Blender Foundation can be asked.

The Blender Render texture settings can desaturate the position Voronoi colors to gray.
Once a gray is achieved the Blender Render can change colors based on a mapping space such as UV with a ramp.

The texture settings ramp can NOT change a color randomly based on a previous color, that information is not present.  That is a feature of the node systems.

The visual similarity of the color ramp in the Cycles Material Nodes and the Blender internal material/texture ramp is deceiving.  The Cycles node color ramp produces a color based on an input.  The Blender internal Material/Node color ramp specifies a color in a texture coordinate space which can be used to blend.

You wrote

[ I want something like if I put a cells Voronoi texture through a color ramp in the cycles node editor].  The texture settings of the material/texture without nodes cannot do this.

Perhaps we are using Cycles nodes so much we forget the old lesser capabilities of Blender Internal Material Textures.

It appears we are looking for a feature in the wrong place.

The node system of Blender Render can recolor a Voronoi texture based purely on color.

The node system of Cycles Render can recolor a Voronoi texture based purely on color.

Of course stating the some feature is not present in some area of Blender is a dangerous act.


Where is the sqeeze value node in Cycles?

Thanks for all the help everyone, i found the solution, it wasn't working because i had the camera in orthographic mode, here i'll post a picture of the node setup that works.

Note the title of the question is now misleading, so the answer to that question was that cycles does not have a squeeze node, but the answer to how to blend between two shaders based on distance from the camera is here.


Once I made and parented a rig, can I still add more bones? (forgot the tail)

Yes. An armature can be adjusted multiple times.

Armatures typically are parented with a default weight paint for organic creatures.  Next weight paint is used to refine your weights of bones.  Vertex groups are the typical mechanism for control.

So you have two options.

Preferred. Reuse. Use  the vertex groups you have and paint new vertex groups for the tail bones.  Expect some adjustments for previous bones near the tail bones.
More work if you choose to start from beginning. Delete the old armature modifier and all vertex groups and parent again to the armature.  Weight paint again.

Armature and their weights can come and go just like any other Blender Feature.  The first one can be challenging.  The works gets easier each new attempt at armature and weight painting.  You can archive your file for extra peace of mind.


Single slider for transparency in Material Preview/Rendered display

If you don't mind not being able to directly tweak the shader's alpha in the shader editor, you can set a driver between the viewport display alpha and the shader alpha. Note that you can also set it the other way around, drive the viewport alpha with the shader alpha.
import bpy

obj = bpy.context.object

mat = obj.active_material
# Make sure the material has a principled BSDF (replace with appropriate node name)
if mat and mat.use_nodes and mat.node_tree.nodes["Principled BSDF"]:
    alpha_input = mat.node_tree.nodes["Principled BSDF"].inputs["Alpha"]  # Store access to the alpha input
    driver = alpha_input.driver_add("default_value").driver  # Create a new driver and store it
    [driver.variables.remove(value) for value in reversed(driver.variables.values())]  # Clear the driver
    var = driver.variables.new()  # Add a new variable

    target = var.targets[0]  # Access the first driver variable and set appropriate paths...
    target.id_type = 'MATERIAL'
    target.id = mat
    target.data_path = "diffuse_color[3]"
    driver.expression = "var"

Result :

As an addendum, if you want to drive the principled BSDF's color with the viewport display color, you have to add a driver to each of the color property's dimensions. Here's how to do it. Add these lines at the end of the previous code :
color_input = mat.node_tree.nodes["Principled BSDF"].inputs["Base Color"]
for channel in range(3):
    driver = color_input.driver_add("default_value", channel).driver
    [driver.variables.remove(value) for value in reversed(driver.variables.values())]
    var = driver.variables.new()

    target = var.targets[0]
    target.id_type = 'MATERIAL'
    target.id = mat
    target.data_path = f"diffuse_color[{channel}]"
    driver.expression = "var"

Result:

As a side note, you don't have to clear the driver variables, but it does not automatically get removed when accessing this particular field's driver (I think), and if you try adding new variables to a driver without checking first if it already has some, it will simply add more and more. That could lead to some serious bloat if you accidentally run this operation multiple times.


Cycles bake inverts a polygon on a normal map. A strange shadows with the normal map

After recalculating normal on the lowpoly mesh (Ctrl+N), and shading it smooth rather than flat, I found only one small error remained, and it was caused by the light, not the map. so here is the re-baked normal map, but if you see a really sharp contrasting shadow, it's a different problem.


Limited set of output codecs in Fedora Linux. How can I enable others?

Fedora ships blender with ffmpeg disabled for stupid legal reasons.

You can rebuild blender from the fedora source rpm with -DWITH_CODEC_FFMPEG:BOOL=ON as root as follows:

# cd /var/tmp
# dnf download blender --source
# rpmbuild --rebuild blender-*.src.rpm

The latter will most likely fail which is fine because that would be the one you already have. Install the BuildRequires:

# awk '/BuildRequires:/{print$2}' ~/rpmbuild/SPECS/blender.spec \
    | xargs -r dnf -y install

Enable ffmpeg, rebuild and install:

# perl -pi~ -e 's/WITH_CODEC_FFMPEG:BOOL=OFF/WITH_CODEC_FFMPEG:BOOL=ON/' \
    ~/rpmbuild/SPECS/blender.spec
# rpmbuild -bb ~/rpmbuild/SPECS/blender.spec
# dnf reinstall ~/rpmbuild/RPMS/x86_64/blender-[0-9]*.x86_64.rpm

Now you have blender with matroska, h264 etc :)

Optionally versionlock your version:

# dnf install python-dnf-plugins-extras-versionlock
# dnf versionlock blender

Pål


One solution is to bend a flat font/mesh with a Curve modifier. After the modifier has been applied, the outer edges can be extruded down and scaled to a zero depth - in my case that is the Z direction.


Keep only new faces from Blender Solidify modifier

From what you said i have a feeling that you didn't apply the modifier

NOTE that you can't apply the modifier if you are in edit mode or the object is linked with another object


You´re on the right track. After you do what you show on your picture, you need to go to the COMPOSITOR, and add a GLOW node, to help you boost the look you´re going for.
Also if you want "in scene" glows, you need to create a cube, set it to wireframe visual override, use the cube with a VOLUME material, set density to 0.02 and and there will be a soft "mist" on your scene which now the light can bounce and absorbe from the lights.
When you take your render into the compositor, you can adjust brightness and contrast to intensify the look of the lights.
You can also set a general volume pass for the world.
Thank you if you vote my answer.

BFCT_Schiller


Blender is not rendering the camera view

Check also if you have a video in the Video Sequence Editor (VSE) that may block rendering the 3D view. You can swtich what to render (Compositor and/or Sequencer):

go to Properties Panel > Render
than Section “Post Processing”:
if you have checked [x] Sequencer and have clips or media in the VSE, than the 3D view will not render but the VSE instead, i.e. the “Sequencer”. So in that case un-check it for the Sequencer


Cycles normal shader with colors similar to baked normals

Here is node setup to generate normal map shader in cycles without using matcap:

I tested it in Substance designer and it seems to work great.


Solution is simple:

You go in edit mode and select desired face.
Click W, than select Subdivide.
Either repeat previous step multiple times or on the bottom left part of screen you will see a value Number of Cuts that you can adjust to your needs.
Select the subdividen faces and in Mesh tab add a new vertex grop and assign those objects to it.
Add displacement modifier, select the verex group under it's setting, select texture and adjust values.

Done! ;)


Blender still using CPU even when I have CUDA chosen in preferences?

Head over to the Scenes tab, and select GPU Compute.

PS: you can paste/upload images directly into your post.


Can an emitter receive shadows from another emitter in Blender Render?

Yes.  Go to World > Indirect Lighting, and check that.  Then go down a little to Gather, and click Approximate


You are experiencing normal Blender behavior. Objects are not permanently parametric. You lose the object's parametric status when you do any of the following:

manually rotate, translate or scale the object (for instance with shortcut keys G, R, S)
go into Edit Mode for the object
click on any other object


Why is bpy.ops.ptcache.bake is not executing bake to external cache when bake_all() working?

make sure use_disk_cache is enabled or enable it before baking the cache :

object.modifiers['Smoke'].domain_settings.point_cache.use_disk_cache = True


Thanks to the Blender dev forum, I figured it out.

The Cycles camera is a pinhole model that "uses the distance between a given point and the pinhole as its Z depth".
So we cannot apply the depth to points on the camera plane, but rather points that lie on the unit sphere, hence normalized.

Here is the correct formula to unproject a camera pixel into a 3D point :

    import math

    # coordinates on camera plane
    x = (0.5 - float(u) / float(img.shape[1])) * camdata.sensor_width / camdata.lens;
    y = (0.5 - float(v) / float(img.shape[0])) * sensor_height / camdata.lens;
    z = 1.0;

    norm = math.sqrt(x*x + y*y + z*z)

    # normalize = project point on unit sphere, then apply depth
    x = d * x / norm
    y = d * y / norm
    z = d * z / norm

The relevant code is in kernel_camera.h


How do I get an Overlay image to follow elements that move in a video?

The Transformation Tools add-on will simplify the process;:
https://github.com/tin2tin/VSE_Transform_Tools
As described in this tutorial: https://youtu.be/SWLRmTEX2tc


Is it possible to change an object's color depending on its distance?

Animation Nodes can be used here. I shall show two methods for computing the distance between the objects and the camera.

Passing Camera Location To Cycles

The easiest and most efficient method is to use Animation Nodes to pass the camera location to cycles and compute the distance there through the Object Info Node. This is done as follows:

Notice that the distance between two points $A, B$ is equal to $\vert\vert\vec{AB}\vert\vert = \vert\vert\vec{B}-\vec{A}\vert\vert$. But for some vector $\vec{V}$, $\vec{V}\cdot \vec{V} = \vert\vert\vec{V}\vert\vert^2$ and it follows that $\vert\vert\vec{V}\vert\vert = \sqrt{\vec{V}\cdot \vec{V}}$ which is what we used to compute the distance above.

Using Vertex Colors

If more advanced computations are required, then you can compute the distance in Animation Nodes and pass it to cycles in the form of Vertex Colors. I compute the distance between the object and active camera, remap it by subtraction and division, though you can use the Remap Value Node if you are more comfortable with it, compute a color in whatever way you want, set the vertex color of the object to that color.

Why don't we use the distance a a Hue for the color?

Why don't we use the scale of the object as the saturation for the color?

I showed how to do that for a single object, however, you can do that for any number of objects using a simple loop:


The angle of coverage of a lens is determined by the size of the sensor and the focal length.

Blender is designed to deal with variation of all of these parameters as they would happen in real life in a real camera.

When you change the sensor size, the Angle of Coverage of a lens will be affected.

As an example. A 35mm lens in a full sensor 35mm camera with a sensor that is 36mm wide would be considered a "normal" lens (close to that of the human vision) with an angle of coverage of 54.432 degrees.

The same 50mm lens on a sensor that is 8.8mm Horizontally would be a very long telephoto with a field of view of barely 14.331 degrees.

The same lens on a large form at camera with a sensor with of 6.5cm would be a wide angle lens with a field of view of 89 degrees


Need workflow to render color-corrected video

You can do it before outputting. Add a "Rotate" node (from "Distort -> Rotate") and change the degree by 90 degrees.

After that go to your render settings and swap the X and Y values.


To make Proportional Editing work on the mesh you need to change pivot point from Individual Origin to Median Point.


Recheck the samples and if they are 500 samples then you can enable denoising after going to 2 sphere icon which is second icon.


That is odd. It looks like the Rigify rig is set to IK. You have to select one of the bones for the arms in pose mode and set the IK-FK (hand.L) value to 1.00. See picture

You can adjust this for every limb and is one of the useful options of Rigify.Hope this helps!


How can I erase part of a mesh using another mesh?

This can be accomplished with a boolean modifier.

Add it on the large mesh and set the type to difference, then set the smaller mesh as it's target.

once you apply the modifier, you will have a hole in the large mesh, you may delete the small mesh


You need more vertices to be able to crease the edge. When you make a crease, you are creasing a seam not a boundary. I have included an animated demonstration:


Self Collision - Blender Cloth Sim shrinks mesh

Most likely your cloth vertices are self-colliding with their neighbours due to the Self Collision Distance being too large.
Firstly, when running a simulation always ensure the meshes are created at 'real world' scales - eg, for a bedsheet you might assume 2 metres a side (or 2 Blender Units). Ensure you Ctrl+A and 'Apply Scale' following any changes to scale - to ensure the simulation is using the correct scale.
Secondly, reduce the Self Collisions 'Distance' property. At Blender 2.83.2 this defaults to 0.015 metres (1.5cm). If your vertices are closer together you may want to reduce that value.


BMesh script.

"Spam tin" created with script below, in edit mode. Note has ngon top and bottom.
The bmesh equivalent of example linked in question using bpy.ops.mesh.bevel(...)

which is pretty much the bmesh.ops.bevel equivalent.
Select the four vertical edges How to select with python code only vertical edges from cube? and pass into operator.
Test script, run in OBJECT mode.
import bpy
import bmesh
from mathutils import Vector
context = bpy.context

corner_radius = 0.2 # 0.5 > cylinder
corner_segments = 5
width, depth, height = (1.5, 1, 2)

bpy.ops.mesh.primitive_cube_add()
ob = context.object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)

bm.edges.ensure_lookup_table()
# scale first to keep corners round
bmesh.ops.scale(
        bm,
        verts=bm.verts,
        vec=(width, depth, height),
        )
bmesh.ops.bevel(
        bm,
        geom=[bm.edges[i] for i in (1, 3, 6, 9)],
        loop_slide=True,
        affect='EDGES',
        profile=0.5, # round
        offset=corner_radius * 2,
        segments=corner_segments,
        )

bm.to_mesh(me)


How to make changes to my vertex groups with python

Ultimately what was missing here was another look at the core issue. Only toggling a suffix on and off was not the answer. My groups had names that differed by one character to their counterpart and regardless of having the correct .L/.R suffix, meant they could not link with the mirror modifier. I did not need to delete the vertex groups relevant to the mesh side I had deleted as previously thought.

That being said, this is the code you're after if you need to achieve something similar.

In my case, remove the prefix that caused the group names to no longer be linked to their counterparts [4:]. Add the correct suffixes. Revert both of these changes when the script is run again for import back to game.

import bpy
active_object = bpy.context.active_object

vertex_groups = active_object.vertex_groups[:]

for vertex_group in vertex_groups:
    if vertex_group.name.endswith('.L'):
        vertex_group.name = 'b__L' + vertex_group.name.replace('.L', '')
        continue
    if vertex_group.name.endswith('.R'):
        vertex_group.name = 'b__R' + vertex_group.name.replace('.R', '')
        continue
    if (vertex_group.name.startswith('b__L') | vertex_group.name.startswith('b__R')):
        suffix = '.L' if vertex_group.name.startswith('b__L') else '.R'
        vertex_group.name = vertex_group.name[4:] + suffix

Thanks to my lovely sister for this script. Hope it can help someone else out there!


Particle Info Node with several Particle systems

I found the answer myself:
In my case The Particle Info Node attaches to a material setup for the instanced mesh object used in one of the Particle systems. Therefore the Particle Info Node can only be relevant for that particular particle system.


How can i optimize the polycount of hard surface game assets?

Here is a method to optimize hard surface models with a lot of flat surfaces for round shapes a decimation is preferable:

You can combine muliple tools or modifiers to remove the edges that doesn't affect the silhouette automatically.
The modifier has the advantage that you can keep modeling/retopologizing while your game asset will be automatically optimized, but you will need to apply the modifiers and unfold the UVs for a correct result.

Shortcuts

With the shortcuts go in Edit Mode (it's for the low poly to look good with a smooth shading, so it's purely optionnal), select everything and press x then Limited Dissolve, this will remove by default every vertices at an angle of less than 5 degrees, you can change this value in the "t" menu. Blender will keep one (bad) edge on some faces it depends of their shape. Then do Ctrl + t to add triangle.

Redo a limited dissolve then Ctrl + t to remove the bad edges that were created.

Modifiers

With modifier add an edge split modifier then a decimation modifier in Planar mode Sharp. Change the angle of the split modifier until you get the result you want.
Then add a triangulate modifier.

Like for the shortcut version you must redo the decimation and triangulate to remove the first edges that weren't placed correctly.


How to add glossy texture to Principled Shader?

I'm am so new here I hesitate to even chime in, but I have been (and this may not be the right way) adding the mix shader to the output of the principled shader and connecting emission shades to the other mix input with success.  I think it shoukd work with a glossy shader as well, but again I am super new here and this is my Virgin answer so I hope it helps.