(Blender Game Engine) How can I make scene/layer visible through a certain object without using python?

General idea of making a portal: you have a camera that sees what the portal should show. Then the output of the camera is rendered to the other portal as a texture.

Without python this is not possible though.

So here's a python way to do it (who would have thought? ;) ):

First we create the portal:

You can use whatever mesh you want but a plane mesh is probably the best. Name it something fitting, e.g. "portal". Make sure that when the object isn't rotated (=> rotation of 0,0,0) the object's normal(s) is/are facing towards the -Y-axis.

Next create a new image in the UV/image editor. Make sure that the aspect ratio of the image is the same as the one of your camera. E.g. if your resolution is 1920*1080 the image's resolution could also be 1920*1080.

Then select the portal, create a material and make it shadeless. Head over to the texture tab and create a texture. Assign the created image to it and unwrap the portal (U in edit mode). Set the texture's source to Generated and its mapping coordinates to UV. If the portal's dimensions aren't the same as the image's you should also move the UVs to the image's center.

Last thing left for the portal is the logic. Add an Always Sensor and a Python Controller. Activate the sensor's true level triggering. Now the controller: Choose Module instead of Script and type portal.main into the text field. Add a new text data block in the text editor and paste in the portal script from below. Name it portal.py. Then add two string game properties. Name one camera and the other one image. The value of the second one is the name of the image you created. We'll fill the other one later.

Now we take care of the camera. So just add one. Again, choose a name that makes sense like "portalCam". You can put this name in the camera property we created moments ago.

Now the logic. Create a new script and paste the camera script in it. Name it something meaningful like portalCam.py. Add an Always Sensor and a Python Controller and activate true level triggering. Instead of choosing a module just choose the script that was just added. Create three string game properties, the first named camera, the second named portal and the third named reference. Put the name of your player's camera in the first property, the name of the portal in the second one.

The third property's value is the name of a reference object. It's the object the camera is referring to when calculating its position, so it's like another portal. The portal we created will look from the point of view of this reference object. You can use whatever you want, a plane (=> another portal) or just an empty would be fine. Add it and put its name in the reference property of the portal camera. All that is left to do is positioning and rotating it. The object's local Y-axis is the direction the camera will be looking in. To check the local transformation just hit ⎇ AltSpace and select local.

And now you're done! The portal shows the output of the camera which moves relative to the player camera's movement.

Here's an example .blend:

Scripts:

Portal Script:

from bge import logic, texture

scene = logic.getCurrentScene()

cont = logic.getCurrentController()
own = cont.owner
portalCam = scene.objects[own["camera"]]

matID = texture.materialID(own, "IM" + own["image"])
map_png = texture.Texture(own, matID)

source = texture.ImageRender(scene, portalCam)
source.background = (scene.world.backgroundColor[0]*255,scene.world.backgroundColor[1]*255,scene.world.backgroundColor[2]*255, 255)

map_png.source = source

def main():

    map_png.refresh(True)

Camera Script:

from bge import logic
from mathutils import Vector, Euler, Matrix
from math import pi

#getting all the objects
own = logic.getCurrentController().owner
scene = logic.getCurrentScene()
cam = scene.objects[own["camera"]]
portal = scene.objects[own["portal"]]
empty = scene.objects[own["reference"]]

#calculating the position of the portal camera
rotmat = empty.worldOrientation*portal.worldOrientation.inverted()*Matrix.Scale(-1, 3, portal.worldOrientation*Vector((1, 0, 0)))
diff = cam.worldPosition-portal.worldPosition
diff = rotmat*diff
own.worldPosition = empty.worldPosition+diff
own.worldOrientation = empty.worldOrientation
own.localOrientation = [own.localOrientation.to_euler()[0] + pi/2, own.localOrientation.to_euler()[1], own.localOrientation.to_euler()[2]]


Renders Not Using Values in 'Sampling' Section of Scene Tab (2.80, Cycles)

You have likely enabled Square Samples which results in Cycles using the squared number of samples. Therefore the number viewport render samples are:
$$32^2=1024$$

For the final render the number of samples are:
$$128^2=16384$$


No, cycles doesn't have to spend time rendering those nodes:

  Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected.

Also if a node branch is not connected to output, that branch is skipped. So for example when you have a node group outputting multiple shaders, it calculates only the connected ones:

Or:

This way you don't have to use Mix node "0/1 switches" and you can keep your node group count low and organised.


Shortcut to switch between add and subtract in weight paint mode?

You could change the brush: There are Add and Subtract brushes (and more for all blend modes) which will set all options of the selected brush including the blend mode. So you can even configure more settings of the brushes and select them with one shortcut.

The number keys (not on the number pad) are used as shortcuts for the brushes. You can select the Add brush with 1 and the Subtract brush with 9. They are numbered from one to nine in the same ordering as they appear in the brush selection.


Can't zoom close to object with small unit

in the 3d view press N and go to view and make clip start smaller:


Add texture slots in blender 2.8 special cases

Here are some rough replacements for the functions you posted:
import bpy
from bpy_extras.image_utils import load_image
from bpy_extras.node_shader_utils import PrincipledBSDFWrapper

# Sets a base color map to be used by the material.
def set_base_color_map_filename(mat, filename):
    ma_wrap = PrincipledBSDFWrapper(mat, is_readonly=False)
    image = load_image(filename)
    if ma_wrap.base_color_texture:
        ma_wrap.base_color_texture.image = image

# Returns base color of the material.
def get_base_color(mat):
    ma_wrap = PrincipledBSDFWrapper(mat)
    return ma_wrap.base_color

# Sets base color of the material.
def set_base_color(mat, clr):
    ma_wrap = PrincipledBSDFWrapper(mat, is_readonly=False)
    ma_wrap.base_color = clr

# Finds a base color image for the material.
def find_base_color_image(mat):
    ma_wrap = PrincipledBSDFWrapper(mat)
    if ma_wrap.base_color_texture:
        return ma_wrap.base_color_texture.image

# Finds a material which uses the specified image; if not found, the function creates a new material
# So this function never fails.
def get_material_by_image(image):
    for mat in bpy.data.materials:
        ma_wrap = PrincipledBSDFWrapper(mat)
        if ma_wrap.base_color_texture:
            if ma_wrap.base_color_texture.image == image:
                return mat

    mat = bpy.data.materials.new(image.name)
    ma_wrap = PrincipledBSDFWrapper(mat, is_readonly=False)
    ma_wrap.base_color_texture.image = image
    return mat


So from this question I'm guessing you've already applied the subdivision surface modifier by accident. If it looks distorted when you are using the decimate modifier try doing Ctrl+A > All Transform then apply it again, it should work out properly.


Where are the settings for draw distance?

By draw distance, I'm guessing you mean viewport clipping distance. Settings can be found in 3D view > Properties region (N) > View > Clip:

That circle is called the 3D cursor. It's useful in many ways, once you get used to it ;) It is positioned by pressing LMB. To select and drag an object, use RMB.

See How do I select an object in the 3D viewport? for more details.


How to create a smooth surface onto a rectangle frame?

You could use the bevel modifier to create the rounded edges on the unscaled standard cube.

Add an edge loop Alt-R in the upper part and delete the bottom vertices.

Select the beveled part and scale it along the z-axis S,Z
Note that you shouldn't scale the object to align it to the original model because this would distort the edges. Use select and grab instead.


Weight painting in a fully established material

Consider a mix shader node in your shader nodes where you can change the contribution of each texture. A texture can determine the contribution pixel by pixel.  Two standard standard textures linked to Two BSDF shaders linked to a mixed shader.  The relative contributions are mixed in a ratio specified by a hand painted texture.  Image above.

Texture slot in Texture Paint. UV Map. You can paint the grayscale image in either area when set up correctly.  My machine is currently having problems. Final Render Seems accurate. You may need to save your image edits frequently.

A render. Checkerboard texture wrapped around torus and musgrave texture visible in areas determined by the manually paint grayscale image.

You can paint a gray scale image to hold the contribution from a texture information.  You can also paint with a stencil in texture painting.

Attempt to accomplish a simple case first ... base color first .. then the texture color ... the value connected for the contribution is a gray scaled painted with texture paint.  Make the texture and nodes first then your texture painting work will be realtime live ... assuming enough gpu cpu compute power.

Please inspect and improve.  Currently I cannot get interactive updates on my machine.  Perhaps someone will comment on that.


How to Make an Eye Target Bone Move Eye Bones? (Flat Eyes)

I assume that your "curves" are custom shapes for your bone rig. You can add a simple "damped track" bone constraint to the pupil's bone, pointing to the target; then you can animate the "influence" parameter to control the pupil either with the target bone (influence 1.0) or the pupil bone (influence 0.0).


Any way to disconnect animations after animating?

When you animate two separatedo objects (in example "sphere" and "cube"), two "actions" are created, named "SphereAction" and "CubeAction".
Turn a window into dopesheet and set the tiled menu from "dopesheet" to "Action editor": if you select an object you will see his action, wich can be copied, pasted, moved, muted, saved as "Fake" user, linked or appended in a new file, or even assigned to another object: it will work if all the names (of the bones) are the same.
Animation controls that search for a non existing object or bone are simply ignored.


How can I quickly select all faces surrounded by 4 vertices or 4 edges?

I should have just read the according Blender docs site:
https://docs.blender.org/manual/en/dev/modeling/meshes/selecting/advanced.html

Mode: Edit Mode –> Edge select mode
Menu: Select ‣ Select Loop Inner-Region

Does exactly what I want.


Why do some bones look like boxes and others like arrows?

Here are the different shapes for an armature. Also the different controls for changing it. It is for you to decide what you want to use.

The one exception to this is that if you create your vertex weight from envelopes, you can view what will be affected with the envelope option. You must go into edit mode to see all details. More about it here:

http://wiki.blender.org/index.php/Doc:2.6/Manual/Rigging/Armatures/Editing/Properties


Melt a complex mesh and then animate it using force fields

For the melting you have lots of options, for example:

A high quality fluid simulation with a high viscosity.
Shape keys + sculpting
Cast modifier (Apply as shape key)

The fluid simulation is probably the best for a good melting animation and being able to control it with force fields, but fluid simulations require tons of processing power to look good in my experience. I would probably go with casting it to a sphere with a < 1 factor and a control object located slightly below the object. I'd apply that as a shape key and sculpt it a bit, and then only do the fluid sim when the object is already melted (there's less detail to lose when it's already smooth, and you might get away with lower settings.)


Game engine's tic delay in python - how to do?

This is a bit more of a general programming question, than a Blender question, so you might have more luck over at StackOverflow, though they might also have trouble answering because you're in the Blender environment.

That being said, the general idea is that you want a check that will determine how much time has passed since the last "tic." You'll decide that a "tic" is 100 milliseconds, 10ms, 5ms; whatever length of time makes sense for your application (ticking too frequently is called "thrashing" the CPU, a term which might help you with future research). If enough time has passed, it executes a "tic." If not, it yields to some higher level process like an outer loop, the main program, or even the OS. You can yeild by having an if that just skips over some code if it's not time to tic yet, or you can use a function like sleep() that actually tells the CPU "I won't need any time on the processor for at least x seconds" and then the OS handles the wait time.

It's a common problem to which you should be able to find lots of solutions, some of which you'll be able to tailor to Blender.

More on sleep(): http://pythoncentral.io/pythons-time-sleep-pause-wait-sleep-stop-your-code/

Hope that helps!

EDIT: With @blackhole 's contribution above, you know that a python script will run every tic. Knowing that, you can just skip tics:

tics_skipped = 0
if tics_skipped > 5
    #reset the counter
    tics_skipped = 0
    #then do the other things that need to happen here
else
    #otherwise, skip this tic and increment the counter
    tics_skipped = tics_skipped + 1

That being said, there's no guarantee that BGE tics are consistent. In fact, I'll bet you they aren't. A "tic" is probably a single pass of the GE doing everything that it needs to do for one frame. That might take 0.001 seconds, or it might take 10 seconds, but that's one tic. Depending on what you're trying to move and how, there's probably a good, standard way to do it. I just don't know what that is ;-)

You might use this same idea to check the amount of time that's passed, but you're going to have to look into how to get sub-second resolution. It's possible, but it's not trivial.


Triangulate modifier doesn't work properly after combining faces

It might be because you still have one or two vertices that make that face triangulate twice?


The actual operator class is only accessible if it's defined in the same script, or imported from another file. It's not a standard Python class however, because it is derived from the Operator type:

import bpy

class PrimitiveManipulatorOperator(bpy.types.Operator):
    bl_idname = "object.primitive_manipulator"
    bl_label = "Primitive Manipulator"

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

type(PrimitiveManipulatorOperator) # returns <class 'bpy_types.OrderedMeta'>

Upon class registration of an operator class, it is made available as type as bpy.types.OBJECT_OT_primitive_manipulator (which is the bl_idname transformed from Python to C notation):

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

    # returns <class 'bpy_types.OrderedMeta'>
    print(type(bpy.types.OBJECT_OT_primitive_manipulator))

    # fails, the class name isn't used in case of operators
    print(type(bpy.types.PrimitiveManipulatorOperator))

The interface to call operators is via bpy.ops:

bpy.ops.object.primitive_manipulator()

# returns <class 'bpy.ops.BPyOpsSubModOp'>
type(bpy.ops.object.primitive_manipulator())

What can be confusing about bpy.ops (which is <class 'bpy.ops.BPyOps'>), is that hasattr() will always return True:

hasattr(bpy.ops, "object.primitive_manipulator") # True
hasattr(bpy.ops, "foobar") # also True

This is caused by the design of this module-like class and presumably necessary to make proper calls work.

The correct way to programmatically get a reference to the operator for a call is to getattr() twice, as you want to retrieve a property and its sub-property:

op = getattr(getattr(bpy.ops, "object"), "primitive_manipulator")
op() # equivalent to bpy.ops.object.primitive_manipulator()

getattr(bpy.ops, "object.primitive_manipulator") can't work because there is no property "object.primitive_manipulator", there's only "object", which in turn has the property "primitive_manipulator".

>>> type(getattr(bpy.ops, "object"))
<class 'bpy.ops.BPyOpsSubMod'>

>>> type(getattr(bpy.ops, "foo.bar"))
<class 'bpy.ops.BPyOpsSubMod'>

>>> type(getattr(getattr(bpy.ops, "object"), "primitive_manipulator"))
<class 'bpy.ops.BPyOpsSubModOp'>

You may want to resolve the operator name in a loop like this:

def get_operator(idname):
    op = bpy.ops
    for attr in idname.split("."):
        op = getattr(op, attr)
    return op

get_operator("object.primitive_operator")()

# if there's a poll() classmethod, you can also:
get_operator("object.primitive_operator.poll")()

# return a blank function to suppress AttributeErrors
# in case the operator idname does not exist
def get_operator_failsafe(idname):
    op = bpy.ops
    for attr in idname.split("."):
        if attr not in dir(op):
            return lambda: None
        op = getattr(op, attr)
    return op

get_operator_failsafe("foo.bar")()


Addon: how to make Blender run check()/redraw when option changed?

Set the filebrowser filename
The code for the ExportHelper mixin class is shown in this question Right way to stop export operator from saving with empty filename?
As demonstrated in question it appears only the FILE_PT_operator is live wired to update the parameters using check.
def update_ext(self, context):
    # if we wish to set filename_ext
    self.filename_ext = f".{self.extension.lower()}"
    #the filebrowser parameters
    params  = context.space_data.params
    # printed to console
    for k in dir(params):
        print(k, getattr(params, k))
    # set the file name
    params.filename = f"{Path(self.filepath).stem}.{self.extension.lower()}"

And use this as an update on the operator enum
extension: bpy.props.EnumProperty(
    name='Extension',
    items=(('FOO', '.foo', '.foo'), ('BAR', '.bar', '.bar')),
    default='FOO',
    update = update_ext,
)

If also using filename_ext make it a property and give it a default to match the enum, however can pretty much do without. The check_existing if set will deal with alerting re pre-existing. (Assume it does haven't checked)
So can pretty much replace the check method to redraw the file browser properties.


How to link animation of object A to object B while keeping A's original location?

One way to recycle motion without having the objects overlap is to use NLAs.  This is not exactly trivial.  You have to

place the action inside an action strip
put a location keyframe on the second object
change the action strip blending mode from Replace to Add

Another strategy would be to make the second object a child of an Empty or other object.  You can adjust the location of the parent to set the origin of the modified coordinate system.

In the following screenshot you can see the lower left window is the NLA editor illustrating that Cube.001 has one NlaTrack with the shared action, and its primary action is the offset keyframe.  The action strip has its Blending set to Add.

In the upper right outliner window you can see Cube.002 is parented to an Empty.


Rigging a humanoid problem: Parenting with automatic weights twists legs around

I found a solution:

BEFORE applying the armature to the mesh, I moved the leg bones so they wouldn't be completely straight and would have a slight bend in the direction the knee should move after being applied. After that, it was a matter of adjusting the pole angles.


I'm a beginner, yet I think I know your answer.

In the real world, your camera is an object that blocks the light. The Blender camera is more like transparent. Thus, the light is not blocked by it.

Try creating a black plane about the size of the camera, and place it just behind the camera.


Snapping one mesh to another while rotating

If you want, you can set a structure up to do this, although I think most people would consider it a workaround:
Create an empty at 1 ("e1") and an empty at 2 ("e2").  Give e1 a damped track constraint targeting e2.  Parent A to e1 with keep transform.  Turn on snapping and transform e2 (either rotating about a pivot point or just translating.)  As desired, unparent A with keep transform.


How to import an image sequence into Blenders video editor with each image playing for one second?

Yes you can!

Import the frames as a sequence of images like you normally would (which will make each image play for one frame). With the image sequence strip selected, click Strip > Separate Images (or tap the Y key), then you can set the frame length of each image in the sequence.


Model geometry messed up after applying limited dissolve

Tried "remove doubles"?
Go to the edit mode, select the whole mesh press W and select remove doubles.
If these vertices are making N-gon, try (Face split) an option in vertex dissolve.


Why is my baked image black? What have I done wrong?

Your normals are flipped inside (red on screenshot), the baking rays go in the bad direction and don't hit any surface, so go in Edit mode, select all and press Alt+N > Recalculate Normals:


This is how to do it using the Python API, see this answer for a reference:

add a viewer node and connect the Z ouput of the Render Layers to the Viewer node
get the pixel data of the viewer
perform the depth "clipping" in Python
copy back to a bpy.ops.image
save the image in OpenEXR format

Script:

import bpy
import numpy as np

# https://blender.stackexchange.com/questions/35191/how-to-get-color-and-z-depth-from-viewer-node/71264#71264
bpy.context.scene.render.use_compositing = True
bpy.context.scene.use_nodes = True
tree = bpy.context.scene.node_tree
links = tree.links

for n in tree.nodes:
    tree.nodes.remove(n)
rl = tree.nodes.new('CompositorNodeRLayers')

vl = tree.nodes.new('CompositorNodeViewer')
vl.use_alpha = True
links.new(rl.outputs[0], vl.inputs[0])  # link Render Image to Viewer Image
links.new(rl.outputs[2], vl.inputs[1])  # link Render Z to Viewer Alpha

#render
bpy.context.scene.render.resolution_percentage = 100 #make sure scene height and width are ok (edit)

step_count = 251
scene = bpy.context.scene
for step in range(1, step_count):
    # Set render frame
    scene.frame_set(step)

    # Render
    bpy.ops.render.render()

    #get the pixels and put them into a numpy array
    pixels = np.array(bpy.data.images['Viewer Node'].pixels)

    width = bpy.context.scene.render.resolution_x
    height = bpy.context.scene.render.resolution_y

    #reshaping into image array 4 channel (rgbz)
    image = pixels.reshape(height,width,4)

    #get only depth
    z = image[:,:,3]

    #simulate depth sensor fov / depth range
    def clip_depth(z, z_near, z_far, default_value=0):
        if z > z_far:
            return default_value
        elif z < z_near:
            return default_value
        else:
            return z

    clip_func = np.vectorize(clip_depth, otypes=[np.float])
    z_near = 1
    z_far = 8
    z_clip = clip_func(z, z_near, z_far)

    #save depth to OpenEXR format
    image_settings = bpy.context.scene.render.image_settings
    image_settings.file_format = "OPEN_EXR"
    image_settings.color_depth = '32'

    #create an HDR image with name 'img_z'
    image_name = 'img_z'
    bpy.ops.image.new(name=image_name, width=z_clip.shape[1], height=z_clip.shape[0], alpha=True, float=True)
    img_z_clip = bpy.data.images[image_name]

    z_clip_rgba = np.dstack((z_clip, z_clip, z_clip, z_clip))
    img_z_clip.pixels = z_clip_rgba.ravel()
    img_z_clip.save_render('/tmp/blender_z_depth_clip_%04d.exr' % step)


Clearing Transforms Doesn't Make Rest Pose (IK problem?)

As I told you, there's a difference between the Rest and Pose position of the bones because of the fact that the IK bones will stick to their controller as soon as you switch to Pose mode, and if the controller head is not placed exactly where the IK bone's tail is placed, it will make the IK jump. How to fix it?

First select the IK bone and make all the other ones invisible. Then select its tail and press ShiftS to put the 3D cursor on the same position.

Then unhide everything and this time make only the controller visible. As you see the controller's head is not at the exact same position as the 3D cursor:

So press ShiftS in order to put the selection on the 3D cursor:

Now when you'll switch from Rest to Pose they won't be any difference (actually there's still a bit difference because of the target position, you can fix that by making sure that the target is well aligned with the IK.

As a side note, always bend the elbows and the knees a bit so that Blender knows how to bend it when you switch to Pose mode:


How to access center of polygons after remesh

After applying the modifier, you can convert the object into a mesh:

How can curves be converted to meshes?

This will "flatten" the results you expected from the modifier into the mesh and you will see the transformed vertices and be able to select them in edit mode.


Texture Coordinate overlays another texture on my existing texture

What I would say from what I understand:

You need to plug the Texture Coordinate > Mapping chain into the Vector of the Image Texture of your Bump, exactly like what you've done for the Image Texture of your Diffuse, otherwise he doesn't know how to project this Bump information on your floor.

Now you say that you've added a Displace modifier. I'm not sure why, as your the Bump method is a way to fake relief within a low-poly mesh without any additional subdivision.

If you choose to use a Displace modifier you should not use a Bump node, just unwrap your mesh (for example in Top Ortho view make a Project From View unwrap), use UV as the output of your Texture Coordinate so that he knows that he must use the UV you've just created, and mix a Diffuse with a Glossy, with your Specularity image as the factor.


How to make an object fit in a unit cube?

You can use this kind of script (works with the active object) :

Alternative script, so that :

Rotation and scale are previously applied (avoid border effects when export)
Place all the vertices between 0 and 1 (previous script only matters about overall dimensions)

import bpy
from mathutils import Vector

obj = bpy.context.object

#Eventually apply transforms (comment if unwanted)
bpy.ops.object.transform_apply( rotation = True, scale = True )

minX = min( [vertex.co[0] for vertex in obj.data.vertices] )
minY = min( [vertex.co[1] for vertex in obj.data.vertices] )
minZ = min( [vertex.co[2] for vertex in obj.data.vertices] )

vMin = Vector( [minX, minY, minZ] )

maxDim = max(obj.dimensions)

if maxDim != 0:
    for v in obj.data.vertices:
        v.co -= vMin #Set all coordinates start from (0, 0, 0)
        v.co /= maxDim #Set all coordinates between 0 and 1
else:
    for v in obj.data.vertices:
        v.co -= vMin


How to fix outdated internal index table in an addon

This was added to speed up scripts. The Blender 2.73 release notes mention it and reference the commit that introduced it (in the Python API section)

A backwards compatible solution is the following addition before any code that accesses bm.verts / bm.edges / bm.faces indices explicitly. For clarity, that means if an addon has any code like this:

bm.verts[i]
bm.edges[i]
bm.faces[i]

Then preceding it must be a call to ensure_lookup_table. Often you'll only need to do one such call, and you'll want to stick it outside of any tight loops if possible.

if hasattr(bm.verts, "ensure_lookup_table"):
    bm.verts.ensure_lookup_table()
    # only if you need to:
    # bm.edges.ensure_lookup_table()
    # bm.faces.ensure_lookup_table()

If you add new verts / edges / faces to the bm, and then subsequently do an indexed lookup you might find that you need to call ensure_lookup_table again.


Transforming a paper-like model into a 3d model

Try to get front, back, top, bottom, left, and right reference images of things and making them background images with N panel N > Background Images. Make a 2D mesh for each reference and then try to combine them together to make a 3D mesh. I cannot tell you how exactly because it will vary with each model, but I can tell you that you can do CTRLJ to join the meshes and try to combine the appropriate vertices, and then fill in the faces.

I did this for a hawk's beak recently. What I did was that I made the side reference mesh, duplicated and made them 45 degrees apart (the front reference showed this), joined and connected them and made faces, applied a subsurf modifier, and it looked like an actual beak. So that tells you that this technique works. There are other methods, though!


How can I make an object visible, only where it intersects with other objects?

For this case, could you just use a UV Project modifier on the room, with the camera as its projector?

The room's mesh needs to be Simple-Subdivided sufficiently for the interpolation in the UV-mapping to approximate the geometry well.
The projection can be given its own UV Map, which we can call up in the room's material. The aspect ratio of the projection modifier has to be set to that of your camera.

Somewhere in your shader tree, you test the room's UV coordinate in the projected UV map, for both X and Y between 0 and 1.

Here, the shader just switches color, but you could mix that with the existing material of your room.
For more than one camera, duplicate the set-up, with a UV Project modifier for each camera.
You may have to go a bit further, if you want to exclude parts of the room behind the camera, or parts of the view occluded by intervening objects.. see here.. but I'm sure this case would be simpler than that one, if it needed elaboration.


You can animate the local Y-axis of the bones (SYY).


Make particles start their animations when they're emitted using Animation Nodes?

It has basically three steps:

1) Transform of the objects at the particle location.

2) Delay the shape key of individual objects based on the birth time i.e., shape key animation starts when the particle is born.

3) Then making objects visible only when they are alive.

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

Single Object:

Here is the complete note-tree:

Blend File:

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

Multiple Objects:

1) Here I have made a Group-Node which gives the instance amount per objects (say multiple ships) by keeping the total is equal to the total number of particles. We will use these amounts in the instancer node to generates the instances of the individual objects (or ships).

2) Here is the setup to instance individual objects (or ships),

3) Complete node-tree:

Blend File:

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

Multiple Objects with different materials:

For this, you need to install Animation Nodes + Extra Nodes which has the Material Instancer Node and Material Attribute Output node,

Blend File:

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

Multiple Objects with animated materials:

Blend File:


Help with applying the same texture to different shaped objects

There's a solution that doesn't even need any unwrap, but of course it only works if you don't care about not having UVs:
Use the Image Texture's Box option instead of Flat. This way the texture is projected on each side of the object. The Blend option allows you to have smooth transitions between the X, Y and Z projections. A good thing is probably to also use an empty as Object in the Texture Coordinate. Then use the Mapping values to correctly scale and place the texture.
To switch from a plank to another, move the first plank away and bring the second one to the exact same location with some ShiftS, or even simply AltG, or move the empty instead of the plank.


The subdivision surface setting on the mesh was different and view/render. the problem got solved by changing this.


How to get a displaced mesh to orient correctly when bending it spherically?

Flipping the strength of the displacement modifier did the trick, as pet Robin Betts' recommendation.


Hair doesn't render in viewport with eevee

The problem with the black lines was caused by an old graphics driver.
But the hair was still just displayed as colored lines after that.
This however was due to the render setting "Hair Shape Type" which was set to "Strand". Setting it to "Strip" as shown in the image below fixes that.


program lagging terribly despite using 1% of CPU and only 134m of ram, any assistance would be great

I had the same issue on my laptop until I installed the latest drivers for my GPU and set the Nvidia Control Panel to use the dedicated GPU for Blender.


rotate an object while it follows a path

One way to do this is with an empty following the orbit. This way you can parent an object to the empty and rotate it independently:

Add an empty and make it follow a path (e.g. with the Follow Path constraint). Clicking Animate Patch will automatically add an fcurve modifier which endlessly moves the empty along the path:

To control the orbit speed, set the total number of frames required for an orbit by adjusting the Frames value in Properties > Object data > Path Animation with the curve selected:

Parent your object to the empty (⎈ CtrlP):

Now the object's transforms will be relative to the empty. You can rotate the empty to tilt the object's axis of rotation if you like.
Make the planet object spin. To do this, insert a keyframe on the Z rotation of the object ( RMB > Insert single keyframe). You'll only need this one keyframe. You could use drivers instead, however that may cause issues if you plan on using a renderfarm such as sheepit.

In the graph editor, add a Generator fcurve modifier. Note that internally blender stores rotations as radians, so to make the planet rotate once every 26 frames, you'll want the X multiplier to be 6.28318531/26 (6.28318531 radians = 360°).

Result:


How can I use Python to select one (spline control) point of a NURBS curve?

IMO would join the dots.

I want to select and then move each point to a desired location.

If the idea is to take a set of points and  "join the dots" it is quite possibly a lot simpler to to create the spline.
Here is an example using NURBS answser from Create curve from Numpy Array using Python

Result displayed in EDIT mode, after running script in OBJECT mode
Set the coordinates as desired, run the script in object mode, creates a curve object with control points at the input coordinates.  Removes need to select points, mode toggle, and use operators.
Using numpy and in particular foreach_get(set) is going to be way quicker for a lot of points.
In this example have given each 4D NURB coordinate a weight w of 1.
import bpy
import numpy as np

def flatten(*args):
    c = np.empty(sum(arg.size for arg in args))
    l = len(args)
    for i, arg in enumerate(args):
        c[i::l] = arg
    return c

context = bpy.context

x, y, z = np.array(
    (
        (0, 0, 0),
        (1, 1, 1),
        (0, 1, 1),
        (0, 0, 1),
    )
).T

w = np.ones(len(x))
cu = bpy.data.curves.new(name="poly", type='CURVE')
cu.dimensions = '3D'

spline = cu.splines.new('NURBS') # poly type
# spline is created with one point add more to match data
spline.points.add(x.size - 1)
spline.points.foreach_set("co", flatten(x, y, z, w))

spline.use_endpoint_v = True
spline.use_endpoint_u = True
ob = bpy.data.objects.new("NURBS", cu)
context.collection.objects.link(ob)
context.view_layer.objects.active = ob
ob.select_set(True)

And for example sake,

running a loop and changing the weight assigned to the 4th coordinate
for j in range(1, 100, 10):
    w = np.ones(len(x))
    w[3] = j

Note.
If the desired result is to have the curve pass through the control points, it may be an idea to choose a curve type other than NURBS.


Applying texture to plane: Get rid of diagonal repeat pattern

Enable "Import Images as Planes add-on" that ships with Blender, and try importing the image directly already mapped that way - it helps avoid weird problems that occur. I use it even to do cutaways later.


Why is the wave texture not texturing these spheres?

The Rings mode of the Wave Texture node radiates from the object center in concentric shells. Because of that, the surfaces of your spheres are passing through a single shell, and therefore a single color. If you look at the edges of your images, where the distance from the center is a bit further, you can see that they are darkened:

To fix this, you can offset the location (or scale) with your mapping node:

Alternatively, if you wanted to make all the rings radiate from the same point, you could select an object in the bottom slot of the Texture Coordinate node (I chose the plane):

As a side note, the Icosphere looks pretty cool if it's scaled a bit differently:


How to keep the original shape when simulating cloth?

Try increasing Bending and Structural. To have an order of magnitude, you can check the Presets :

Silk : Bending 0.05 ; Structural 5.00
Rubber : Bending 25.00 ; Structural 15.00

Stiffness Scaling allows to control the stiffness of specific parts of the mesh. Create two vertex group (one for Struct, one for Bending), assign all your vertices to both groups, them weight-paint them.

Blue vertices will have the stiffness defined in Overall stiffness
Red vertices will have a stiffness of Overall + Max


How to set the newly added material to an object as "active" (or selected) material

To select the last appended material (which corresponds to a material slot in the UI), you can set active material index:

import bpy

ob = bpy.context.active_object
mat = bpy.data.materials.new(name="Example Material")
ob.data.materials.append(mat)

# As appended the new material slot index is len - 1
ob.active_material_index = len(ob.material_slots) - 1


Create a new object (plane), get into Edit mode, and use the Snap option (and Type > Face) so that the vertices of this new object stick to the other object behind. Also, enable the Project Individual Elements option (so that when you extrude, both the vertices stick to the other object).


I've made up this workaround:

import bpy

def find_material(material, list):
    for elem in list:
        if material.diffuse_color == elem.diffuse_color and \
           material.specular_color == elem.specular_color:
            return elem
    return False

# creates a list of unique materials
list_of_unique_materials = []
for material in bpy.data.materials:
    if material.users and not find_material(material, list_of_unique_materials):
        list_of_unique_materials.append(material)

# updates materials of each mesh
for obj in bpy.data.objects:
    for mat in obj.material_slots:
        mat.material = find_material(mat.material, list_of_unique_materials)

# removes unused materials
for material in bpy.data.materials:
    if not material.users:
        bpy.data.materials.remove(material)


Vary Color of Object Based on Object Dimensions (Size)

You're so close - you just need to swap one of your Math nodes for a Vector Math node, and the other for a MixRGB. Note the divide factor for the mix node is set to 1 (anything less covers less than the whole surface).  See below:

NOTE - The scale I had initially was too big, apparently, I had to scale all the objects down (except for the empty) to get it to look right, but I was working fast and carelessly. I'm sure it can look "right" at any scale, it may just have to be adjusted by adding a Map Range node between the MixRGB and the ColorRamp - Just connect the color output of the MixRGB to the value input of the Map Range.


Related:

reverse alembic
start alembic at specific frame

Once you imported an Alembic Cache, the object in Blender will have an Alembic Cache Constraint.

Check Override Frame.
In the frame property you can set keyframes. The following expression will loop through frame 1, 2, 3, 4. Directly enter the following in the Frame property:
#(frame - 1) % 4 + 1

The Values used in the Python Expression
#(frame - <starting_frame>) % <animation_duration> + <starting_frame>

frame               the actual frame played
starting_frame      the frame id where the animation begins
animation_duration  the number of frames the animation lasts

To customize the driver to your needs, replace starting_frame and animation_duration with your values:
The animation starts at frame 1 and lasts 4 frames: #(frame - 1) % 4 + 1


Transforming UV vertices using numeric values in Blender 2.7

if you hit N, you open a panel which has a field by which you can move vertices precisely.  Blender also allows you to perform mathematical equations in these fields.

As for rotating and scaling, there is no field to type into, but you are able to do it in another way.  After hitting "r" to rotate, you can simply type in the number of degrees to rotate it by.  This also works for scaling, and this can even be applied in the 3D view.
Also, if you open the tool panel (t), you will find two buttons for quickly rotating in 90 degrees, shown by arrows on the picture below.  You can also use the snapping tool, which is circled below.  You can turn it on and off by clicking the magnet button which I circled, or by holding down ctrl.  This will rotate it by 5 degree increments, or scale it by increments.  Blender even shows by how much you are moving/scaling/rotating in numbers where I have drawn the square below.  It only shows it while you are performing the action, however.

Hope this helps you.  Good luck!


Ctrl-Space for autocompletion in text editor for scripts doesn't work anymore?

Didn't look enough in preferences.

The new shotcut is Tab.


Turning Off Blender 2.82 VSE Cache Indicator

I'll facepalm myself here.  Of course it's in the menu system.  View|Cache|View Cache:

Turning off the checkbox removed it from the view.


Blender does not know the texture should be transparent on some parts.

If you're planning on using cycles, you can mix your shader with a transparent shader using a texture mask/alpha as the factor.


How to shift foward actions using python

While you can list the actions with bpy.data.actions, once they are in the NLA Editor you need to access them slightly differently.

Once in the NLA Editor they are classed as strips on nla_tracks which are stored in the animation_data for that object.

For example, in the case of the image you have shown you will use this to access an individual strip:

bpy.data.objects['sash_KIN_TYPE_S'].animation_data.nla_tracks['KIN_TYPE_SL'].strips['KIN_TYPE_SL_close']

From there you can access the frame_start and frame_end properties of the strip. Increasing both of these by the same amount will move the strip. For example:

strip.frame_start += 10
strip.frame_end += 10

To shift multiple strips you can loop over the strips collection in the same way you would loop over actions:

strips = bpy.data.objects['sash_KIN_TYPE_S'].animation_data.nla_tracks['KIN_TYPE_SL'].strips
for strip in strips:
    strip.frame_start += 10
    strip.frame_end += 10

I found all of this out by hovering my mouse over the properties in the NLA Editor and looking in the tooltip (because I enabled Python Tooltips in the User Preferences).


How can I make an object appear or emerge from a flat surface?

If both objects are manifold and don't have any self-intersections, the boolean method should work.
However, booleans are sometimes finicky for no reason, so here's another approach:

Move the object you want to appear to a empty layer (e.g. layer 2), keeping the rest of the scene on layer 1

Make a bounding cube as if you were going to use a boolean modifier, but instead give it a holdout material which is only visible to the camera (so that it doesn't cast a shadow):

Create a new renderlayer and set it to only layer 2. Also change the existing renderlayer to only layer 1:

Enable Transparent in Render settings > Film

Set up the composite nodes

Result:

The shadow is an obvious limitation, but I can't think of a good workaround aside from just removing the shadow completely..


You can press Numpad 5 shortcut for toggling Between Orthographic and Perspective.

You can click on the circled icon to toggle the view type as well.
You are looking for the icon to look like below:

If it still isn't automatic try the user preferences under Edit > Preferences

Make sure that this is set up as so.
You can then save your pref using the sandwich menu (the three lines in the bottom left corner)


How to fix peak/pinch in one vertex (after subdivision)

Try the following and report back:

Verify no duplicate verts
Verify Normals Outside & In
Verify Normals are not bugged by doing the "Set From Faces" Normals (use F3 to search)
Checked for Clear Edge (Sharp Edge)
Try smoothing Object
Loop cut and added additional loop for potential topology issue...

And as a final check, adjust your Auto Smooth Angle...

Edit I'm adding another check on the list. Sometimes Recalculating normals is not enough and you need to force all normals to be perpendicular (YES THEY WILL VISUALLY LOOK FINE)

Set From Faces in the Shading tab of the Tool Shelf.

What's happened is your normals have got bent out of shape in a weird way that the usual Ctrl + N make normals consistent doesn't see as a problem.


By the time I posted this question I'd already been fighting this problem for a day, but not being one to just sit around waiting for an answer, I kept looking around and trying things.

This has something to do with the scaling. My original model was very large -more than 20x the size of the default Blenrig armature. When I scaled the model down to a size pretty close to the default rig size it all came out fine.

Since extensive searches on multiple boards yielded zero answers I figured I'd answer my own question here in case anyone else has the problem. If anyone comes up with any details about the scaling issue or a way to bypass that problem please let us know!


Snap entire selection to the 3d cursor in edit mode

If you grab a recent build of Blender of r58453 or greater (2.7x up), you can use Shift + S > Selection to Cursor (Offset)

The official commit can be found here. I could not find any documentation but it's pretty intuitive.


Merging vertices at the center point when using a mirror modifier?

On the modifier properties there is a checkbox called Clipping (shown as 1 in the image bellow), it will merge the vertex as it touch the edge (prevent vertices from going through the mirror during transform).

Note: If you're not seeing the vertex because it's hidden by faces and you can't select it, you can turn off the modifier visualization (the eye icon button from 2 in the image bellow), there's also a button with the "triangle vertex" that allow you edit from the reflection too. Also, at the bottom of 3D view in the vertex selection options, there is a button with a "wire cube" that allow you to see and edit vertex though the faces.


Volumetric shader not showing up in render

You have a Solidify Modifier on your pawn(s) of -0.011 thickness that is set to take effect in the render, but not in the viewport. This is causing your pawns to be hollow inside during the final render, but not when seen in the viewport. This is also why your Material Preview looks much denser and darker than your final render. Since when rendered the material is paper-thin, there is not enough geometry for the volumetric properties to show. I think you either didn't mean to be using that modifier, or didn't mean to make it that thin.

General good advice:

always look at the Material Preview to see what Blender "thinks" your material is supposed to look like in its raw state.
Always consider what's happening in your Modifier stack.

Happy blending.


Sample line graph plot - what is the XY axis represent?

That plot you get is not an histogram. It is used for video analysis, it is called Waveform Monitor. And it is, as you correctly deduce, a plot of a spatial horizontal axis (pixel along the line), and a luminance vertical axis (brigthness for that pixel.

See the page as a reference: https://www.bhphotovideo.com/explora/video/tips-and-solutions/introduction-waveforms-scopes-and-exposure


Non-destructive design around a circle/cylinder

I don't know if you can do it with curves and full non-destructive, but here is a way to do it with mesh and destructive...  ;)

Create your wave profile.
Bend it 360° with the Simple Deform modifier / Bend mode.
Give your object a Solidify modifier.
Give it a Bevel modifier / Angle mode so that the angles will be sharp when you'll add the Subdivision Surface modifier. You might prefer a Bevel / Weight mode if you want to have a different bevel on top and bottom. Or add some edge loops instead of Bevel modifier.
Add a Subdivision Surface modifier to smooth your object, also, smooth it with Smooth shading option.
It looks like you can't avoid the seam where the 360° shape joins, so I guess you need to apply the Simple Deform modifier.
Once you've done it, remove the doubles so that it joins properly.
Link-duplicate the ring with altD.
Rotate this copy 180° on the Y axis.
Create the inner ring.


To get your simulation to work efficiently, you must first, save your .blend file, then bake the simulation. The bake settings are under the cache tab in the cloth settings. You will be able to scale it to whatever then.


Why does my Ellipse mask and FastGaussian nodes have no effect on my image?

You need to add a RGB input to the mask.

Also, to control the darkness of the vignette, use a Bright/Contrast node to the mix.


i assume you want:
the beach as background, the moon before that and the whirlwind before all.
So you have to make one image for each object. Your "whirlwind" and the beach are one object in your file. So you cannot have it before and behind the moon.


I can't seem to open your file, but from the pictures you've provided, I tried to recreate the problem and possibly solve it here:

https://youtu.be/S1x6OycmPD0

In the video you can see me going inside the mesh to check if there are any faces on the inside. Make sure to remove them if you see any on yours. Then I select all and clicked "Remove Doubles".

Let me know if the problem persists


It was the issue with the normal vectors. I fixed that by flipping normals on the problem faces. Shame on me, I should have figured that out myself. Thank you, I appreciate your assistance.


How to combine the Bevel shader with displacement and bump textures

You can use a Bump node to convert the texture into the required Normal to feed into the Bevel node - rather than using the Displacement socket :

The Bump node takes the height information and generates a Normal and the Bevel node can use this Normal instead of overriding the one generated by the Displacement.


Should I add a sun lamp when using an hdri environment?

Depends how your hdr looks like. If there is a bright light source, then you might increase contrast for the hdr.

Standard setup gives result like this:

If you increase a contrast:

You can multiply or perform any other mathematical operation to get the brightness and the contrast you like.

Also if you'd like to keep the background plate with the original colors, you could mix in original, unchanged background like this:


Effects of python script are not permanent

All I needed was to add two lines

prevk.handle_right_type = 'FREE'
k.handle_left_type = 'FREE'

The original / default handle types caused a recalculation with the consequences observed once the F-curve was "touched" in any way, and that is expected behaviour.


Is there something you're supposed to write in for blender scripts in BGE?

here's my code, it runs and does what I want it to... only after I've closed BGE which noone else seems to have run into.

Your code is Blender code rather than BGE code.

You basically tell Blender what to do. But you want running a BGE game session.

BGE behavior is setup via Logic Bricks (Logic Editor). You can create a custom Controller brick. It refers to a text block (script mode/module mode) or an external python file (module mode).

The code should not refer to Blender (do not import bpy). When you distribute your game Blender will not be available and running such code will result in errors.

More information can be found at Blenderartists.org. E.g. The BGE Guide to Python Coding

Just to let you know: The BGE does not support mesh creation. All objects and meshes must be loaded either at startup or via Python code while running the game. You can make copies of loaded objects as long as they are inactive (reside on an hidden layer).


How to make 3D model and UV map from picture

There isn't really a simple way to do that, and certainly not one that looks good. Here's what I do, using an example from one of my own projects. This is what it looks like without the finishing details, just the UV mapping/modeling done:

And here is the texture that is applied, which is where you want to get to:

First, I had to model the chair as a whole (which for what looks like you want should be much simpler, there are tutorials on basic shape creation and extrusion modeling all over the place). Then I looked for textures that looked close to what I wanted and applied them to the individual parts (see Adding UV mapping to mesh), giving me the result I asked about in this question: Possible to bake texture to new UV map?

You can then brush in details on the edges in something like Photoshop or GIMP.


Why copy rotation constraint does not register actual rotation?

of course not, because you just added a "track to" contraints to your cube, which tracks to your empty. So the cube rotates in that way, that it tracks to the empty.
And there is no copy rotation constraint at all...


What can I do to get rid of ugly triangles

After looking at your file the problem is very obvious.

You have a situation where your UV are laying on top of one another. For baking purposes you should never have your UVs position over one another. All islands must have their own space.

Imagine the renderer using those UV information you gave. First it renders A_island_uv portion of the mesh then render B_island_uv portion of the mesh over the previously rendered A_island_uv and no wonder it's a mess.

Check out the UVs after I corrected them the strange triangles are now gone.

FURTHER INSTRUCTIONS
All you need to do, for this scenario is to enter edit mode. Select a vertice on the UV island you want to move .. Hit L and that will select the whole island. Hit G to grab and move the island. Scale them up or down if need be and you are done.


How can I make a tube with a certain shape?

In object mode press Alt+C to convert from curve to mesh


How to replicate this effect (Parts of material more reflective than others)

The following is a way to handle displacement in a way that offers a lot of control and works very well for baking various types of maps including normals, height and ambient occlusion.

To start with, add a multi-res modifier to your model as shown in the following image.

Now make sure you are back in Object mode and increase the number of subdivisions for the modifier.

Now that the mesh is ready for geometry displacement you can add a Displace modifier as shown here.

Now once you've added displacement it could look something like the following

(For people that don't know this already, if you right-click on an image here on StackExchange, then choose 'View Image' you will be able to see the larger version so detail is more clear.)

For the nodes, I've used the same basic setup as username:GiantCowFilms with a brightness/contrast node added in to adjust the mix between Shiny and Diffuse.

The same image is being used for the Material and the Displace Modifier.


Seems it's not a issue with the way you're doing it. It also throws a error if you run it like this.

import bpy

bpy.ops.transform.translate(value=(29.2064, -10.7433, 26.947), constraint_matrix=(1, 0, 0, 0, 1, 0, 0, 0, 1))

or if you changed the numbers like this.

import bpy

bpy.ops.transform.translate(value=(29.2064, -10.7433, 26.947), constraint_matrix=(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0))

I reported as bug ,but it got closed. If you look at docs you can do something like this. https://docs.blender.org/api/blender2.8/bpy.ops.transform.html#bpy.ops.transform.translate

import bpy

exec("bpy.ops.transform.translate(value=(29.2064, -10.7433, 26.947), constraint_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)))")

Looks like it doesn't get everything printed in Info window and causes the error.


Save window layout instead of startup file?

The window layout(s) of the blender scenes are saved as part of the file. Any file you open will ordinarily open with the window layout with which it was saved, unless when you select a file to open in the file browser window, you make certain that the box beside "load UI" in the options pane (customarily to the left of the screen) is unchecked. If you are starting from your default custom startup window arrangement, and unchecked the "load UI" box, the file you load will be in your customized window arrangement. And once you save the file from this arrangement,  when you re-open the file, it will be in your desired window layout.


Newbie question about extrusion of hemispheres

bottom left:
Create a sphere and a cube.
Set a Boolean modifier on the cube.
Set the modifier's operation to "difference" and use the sphere for its object.

bottom right:
this is the result

top left:
Subdivide a plane or mesh 2 times
Inset the 4 center faces
Extrude
You could at this point select the extrusion and hit alt shift s to spherize the center. Otherwise, just try to make the shape I showed up there by hitting shift+z while scaling the center most verts.

top right:
this is a subdivide modifier applied to the top left mesh


Prevent auto-stretch IK in Rigify with Blender 2.8

OK so I guess I looked everywere exept were it was :/ Turns out it was under the Item tab.

However, setting IK_Strech to zero didn't fix the problem...

Any input appreciated.


Snap Tool isn't working at all in Blender 2.9

The cursor has to be near the vertex/edge of the object being moved, in order to snap to the nearest vertex/edge. This drove me nuts for the last hour.


It might be related to this issue
Limited Dissolve leaves unused Vertices
I find it easier to dissolve edges - as it will delete the vertices along with it
As a solution you can probably use the knife tool to make a new single edge and use dissolve edges on the other two edges to remove them.
the colouration is most likely from the amount of connections (6) to that vertex. as you have another edge pulling at it. wire mode help to visualise or showing all edges on mesh in object property settings


Same Video on each face, but with different time delay?

Each face will need a separate material and each of those materials will need its own texture.

The multiple textures can all refer to the same video asset, but will have different values for either Start or Offset (I can't remember which) near the bottom of the Texture/Image properties.

By request: here is a set of python code which can construct the needed materials.  In practice, python is a waste unless you are doing a lot more than 6 materials.

import bpy

def get_movie(movie_fname):

    for img in bpy.data.images:
        if img.filepath == movie_fname:
            return img

    return bpy.data.images.load(movie_fname, check_existing=True)

def mission1(obj, n_materials=6):

    movie_fname = "/var/tmp/blender/meow-gun.mp4"

    img = get_movie(movie_fname)

    textures = []

    for i in range(n_materials):
        tex = bpy.data.textures.new("movie", 'IMAGE')
        #tex.type = 'IMAGE'
        tex.image = img

        tex.image_user.frame_start = i*300
        tex.image_user.use_cyclic=True
        tex.image_user.frame_duration = img.frame_duration

        textures.append(tex)

    materials = []
    for i in range(n_materials):
        mat = bpy.data.materials.new("movie")
        if i>=len(mat.texture_slots) or mat.texture_slots[i] is None:
            tslot = mat.texture_slots.add()
        else:
            tslot = mat.texture_slots[i]
        tslot.texture = textures[i]

        #many other material customizations can go here
        mat.emit = 1
        tslot.texture_coords = 'UV'

        materials.append(mat)

    for i in range(n_materials):
        if i<len(obj.data.materials):
            obj.data.materials[i] = materials[i]
        else:
            obj.data.materials.append(materials[i])

    for j in range(len(obj.data.polygons)):
        obj.data.polygons[j].material_index = j%len(obj.data.materials)

obj = bpy.context.active_object
obj = bpy.data.objects["Cube"]
mission1(obj)


Rendered object color different from viewport color, set in Python

You are changing the viewport setting instead of node value.

NodeSocketColor

Use ob.material_slots[0].material.node_tree.nodes[1].inputs['Base Color'].default_value = (0,0,0,0)


Displacement map creates gaps on the corners of a wall

I can confirm that enabling "Auto-Smooth" fixes it.

Before:

After:


Can I change the wattage of a light in nodes?

The emission strength is a multiplier to the power in watts.
Example:

So, in theory we can change this:

into this:

and it appears to work perfectly.


It should be fairly easy to test whether the objects are sharing the texture or not since you are using GPU rendering and the number of available textures that can be used is fairly low.

On this Blender Wiki page, http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/GPU_Rendering , it lists how many textures you can use before failure should occur.

Now do a simple test by Linking a number of objects that is higher than the number of allowed textures.
If everything renders fine then you can be satisfied that the textures are shared.

Also, if you look at the area that is circled in the next image you will see a number '2'.  That indicates how many users of the texture there are.

I would not rely on software info to report this accurately for what you are doing.

Stress testing is really the only way to make sure the hardware can do what you expect from the software.

I tested both Link and Append using the following method.  I added a 4096x4096 texture to two simple models and then added them to a group.  I added a sphere with a hair particle system and added the 'crystal group'.  The number of instances was set to 150.

Next the Particle system modifier was Applied and the scene saved.

Now I shut down Blender to make sure everything was cleared out and used Append to load in all the separate objects, (including the two originals)

By clicking on several of them individually, I checked the Materials texture node for the number of users and also to verify that there was not a tex.001, tex.002, tex.003, etc.  There did not appear to be any redundant textures weirdness either in the nodes or the image editor drop-down.  Only 2 users were reported for the texture node which looked the same for every model.

I now shut down Blender and restarted using a blank scene and this time used Link to load in a the models.
The results were exactly the same, all the objects were sharing the texture and only 2 users were reported by the texture node.  The second user is presumably due to the original crystal models that were also loaded in.

I also watched the OS's memory usage utility to see how much the system memory climbed for both tests.  It was very reasonable so it's fairly certain that there were not 152 4096x4096 textures being loaded.  I'm sure that would have shown as a dramatic climb in memory usage.

The shared .png file is about 8.3MB on disk(compressed) and the total RAM usage for Blender was reported to be about 230MB.  When I started the Cycles Render it hovered around 400-500MB.
If the texture was being duplicated within Blender I'd expect the memory usage to be much higher.

I can't test using a CUDA enabled device since I don't own one but this looks promising for the use that you describe.  I suppose next you could test to see what happens when the objects all have separate materials.


My object is missing when i turn on alpha

According to your file, the problem is you are trying to use Cycles material node as BI material node, which cannot happen.

Solution:

Switch the Render engine from Blender Render to Cycles;
If you want to render it in Blender Render (BI), you have to either toggle off the Use Node button, or create a new material node readable for BI.

I assume the first one is your better option, since it seems you sort of mis-switched the engine at some point (or the material node is appended from anywhere else).


1 hour is not outrageously long for a 1080p frame, depending on your hardware (of course). With only a screenshot of your render settings, it's difficult to suggest too many optimizations. Here's the best I can do:

I notice you have 4 diffuse bounces, but only 2 glossy bounces. While your particular scene might be different, in most cases diffuse bounces are less important. In most scenes anything over 2 is a fairly subtle change. It's fairly noticeable if you compare renders with, say, 2 vs 4 diffuse bounces, but if you don't have that comparison the missing light from the extra bounces isn't obvious. Whereas with glossy bounces often larger numbers are needed to avoid black reflections. Again, I'm speaking generally here. I have not seen your render, and this may not be the case for your particular scene.
2500 samples (50^2, since you have square samples enabled) is a fairly large amount of samples. Your scene may not need that many.
Branched path tracing may be helpful, particularly if your scene has empty regions or tricky lighting. Branched PT is not always faster (such as with motion blur or DOF), and has more memory overhead on GPU so it's not always helpful, but it may be. See this answer for more info: What is branched path tracing and how is it useful?


This issue have been solved by cleaning the parent of the target bone, wich was the stretching bone itself. This chain of parenting is not the correct usage of armature bones and constraints.


Achieving both manifold and good sub-div: how is it done?

3d printing is an ideal application for boolean modeling, it works much better than trying to work with a single large subsurf model: Many objects with variable need for detail, the need for a manifold model, no need for texturing, and no need to bevel the edges after combining the objects (because of the resolution limit of printing). Be careful: Simply applying a subsurface modifier doesn't necessarily make the model look better. For example you actually want the rivets to have a sharp edge to the surface to look more realistic. And subsurf causes artifacts with n-gons, like the rides in your cylinder faces.
Here's what I would do for your model (I can't show pictures, I'm on my slow laptop and blender crashed when opening your file, likely because of the huge amount of vertices caused by your level 6 subdiv):

Turn down the subdiv on your model to make blender lag less (and put the "render" subdivs to zero (= as many as "view"), I'm not sure which of the 2 gets chosen on file export)
Enable the addon "bool tools" in preferences, it comes preinstalled with blender
Model your main subway hull with very little detail, something like 6 vertices across the whole width, and only a single face thick. This way you can easily adjust the shape later on. Add a subdiv modifier and a solidify (be careful that the curves aren't too sharp so the solidify doesn't create non-manifold geometry). You can use a mirror modifier, but you can also just work on one side and in the end delete the other and mirror destructively for perfect symmetry
Model the window, use less detail than in your model and let a subdivision surface modifier do the smoothing. It is best to model the window flat on the ground extrude vertically via modifier, and move it into place later, this makes placing the rivets easier and allows duplication of the window so you only have to model it once
Model a single rivet. Use a cylinder with much less vertices, e.g. 8, and let a subsurf do the smoothing. Extrude the central n-gon without moving and scale it smaller, so you don't get the ridge artifacts from the subsurf
Place rivets along the window. Duplicate your rivets instead of copying, so you can still easily make changes affecting every rivet. There are many ways to do this, if you wanna be fancy you can use an array and a curve modifier to automatically add them with a certain distance between, but you can also just manually alt-d duplicate a rivet, left click on a place on the window, and shift-s snap selected to cursor. If you do it that way be careful that the rivets intersect the window before you add the booleans
Boolean union the rivets to the window: Select all the rivets, and select the window as active object, then use the lower boolean-union button from the bool-tools addon in the left toolshelf, to add boolean modifiers for all rivet objects.
Place the window on the main model, intersecting it. Model a rough stencil object inside the window and going outside the main model on both sides, select it, then the main model and use the boolean difference from bool-tool. Then select the window object, then the main model, and use the union button from bool-tool.
Model the lights the same way, first a boolean difference with the main model, then a boolean union.
You can easily add more rivets anywhere on the main model with duplication and then boolean union.

When you model this way you can change the subdivision level depending on the needed detail: e.g. the main frame will need more subdivs than the little rivets. And the main problems of boolean modeling, restrictions on beveling and ugly geometry for unwrapping, texturing, and subsurfing, dont matter for your use case.


I figured out a solution and it's really simple. Since the big bone has the same movement as the bone labeled "crank", I really don't need it. I made a link object the length of both "crank" and the big bone and made that a child of "crank". Then I made the origin of the link object at the top of where the big bone was and I built the second armature (not shown) off that point. Then I made the connecting bone copy the location of the link object.


Generate Mesh Using Boolean Modifier Over Time

Array with end caps

Example using default cylinder and UV sphere. (matching loop vert count)

Add a UV sphere in edit mode select half and P separate by selection.

Add the default cylinder with no ends (None) Add an array modifier.  Use the two sphere halves as end caps.  Make the relative offset in z (arbitrary, chosen since it is  default alignment)

We now have our capsule shape... but not the ball.

Add a shapekey to the cylinder, and make this zero scale in Z. SZ0  Now whenever the influence of this shapekey is 1, the whole thing will be a ball, no matter what the count is on the array modifier.

Put together quickly from default primitives as a proof of concept.  Once the shapekey is < 1 the length of trail can be adjusted using array modifier, as well as shapekey, depends on the curliness of the path.

Re making a motion trail

Could script this to make a motion path based on the transform of the object.. Could be tricky re handling bounces etc.


Below are some uses of the 3d cursor in Blender with examples

Precise placement of new objects
Pivot for transformations, example - Transforms moving around the 3D cursor?
Pivot for modeling tools and modifiers (e.g. mirror, spin, screw...)
Moving the origin of objects (Ctrl-Alt-Shift-C), example - Change pivot or local origin of an object
A visual placeholder, for example to remember where something was previously in an animation.
Accurate relocation of objects/relocating objects to exactly the same place
Source location for the Clone Brush Tool (Ctrl+LMB to set).


Presumably the leaves will be part of a plant - in which case you'll want to set them to be Children of the parent plant. This way when you manipulate the Parent (eg, move, rotate, scale) the children will be similarly affected rather than being left behind. You can easily Parent objects by selecting all the children, holding Shift and selecting the Parent (so the parent is the last object selected) and then pressing Ctrl+P and select from the Parent menu. When you do this the outliner will show them as being within the parent object which can be collapsed to hide them (ie, the Parent effectively acts as a folder for its children).


Can Blender be programmed to visualize cash?

The question is whether Python, the programming language used in Blender, can get the data. If Python can get it, either through a text file or from online sources or manual input, then it's perfectly possible to change graphs and swap texts and change more or less anything on the screen according to the data.

import bpy
# changing a text
textName = 'Text' # name of the text object
value = 500.0 # value to be displayed
txt = bpy.data.objects[textName].data.body = str(value) # replacing the text in the text object

# changing the length of an object in order to make a graph
objName = 'Cube' # bar that is supposed to change length
value = 80 # which value does the bar have to represent
bpy.data.objects[objName].scale.z = value / 10 # setting the scale of the bar.

When a bar graph is done like in the script above, it's helpful to put the object origin at the bottom of the bars. That way the scale won't destroy the bottom alignment.

If you want to visualize money with coins and bills, that's possible, too. You can change the position and the visibility of any object:

import bpy

bpy.data.objects['Cube'].location = (1.0, 2.0, 3.0)
bpy.data.objects['Cube'].location.x = 3.0

bpy.data.objects['Cube'].hide = 1
bpy.data.objects['Cube'].hide_render = 1

It's simply a matter of hiding, revealing and arranging.


You could choose to use 1 thread, but that is a really bad idea. It will render slower and will not use the CPU to its full potential.

Try to optimize the tile size instead. Try small sizes like 16x16 as well. Don't worry about the GPU - GPU rendering is a lot more optimized for small tile sizes in 2.80.

See what uses the CPU most efficiently and renders fastest. You cannot use multiple CPU cores on one tile efficiently.


How do I make both sides of a plane/mesh visible?

In Blender you can turn on Backface Culling in the shading tab of the Properties sidebar of the 3D View.

In Unity you need a special shader that can do Backface Culling. This feature is not transferable. Or you simply double the geometry, and flip the normals for one of the meshes then.


How to project UVs from one object to another?

Here is more convenient way to do so:
You need UV mapped object as source and another object with the same texture but any mesh data with assigned UV map as target.
For target add DataTransfer modifier, select source object, enable Face Corner Data transfer as Nearest Face Interpolated and below click UVs as face corner data layers to transfer.

The result quality depends on target mesh density.


Not sure what you mean by "hard surface", but have some experience with boolean. So, you are trying to create pits by intersecting the cylinders with the phone bottom (IE: The cylinders are one mesh separate from the phone mesh and you are not using an array modifier)?

I notice that there are ALOT of modifiers on the phone, one of these may be causing the faliure.

Well, here's what I think you should try:

1, cancel the boolean modifier and join the two meshes (object mode, select cylinders, then phone, press Ctrl+J or find join in object menu).
2, enter edit mode and select the cylinders.
3, intersect (knife).
4, select all and merge by distance (at the default small distance).
5, If I remember right, select and delete the top half of the cylinder.
6, select and delete (only faces) the circles covering the holes.

Let me know if this works!


What is a more Pythonic way of setting the value of multiple attributes?

something like this

def swap(prop):
    s = bpy.context.scene
    v = not getattr(s, prop)

    attributes = 'meshes lights cameras nurbs lattices empties texts bones surfaces metaballs fields'.split(' ')
    for attribute in attributes:
        setattr(s, attribute, not v if prop == attribute else v)

but achieving pythonic code is a quest for a different stack exchange site, like stack overflow


Give this mesh a uniform thickness on all the tubes and unions

You can create similar results using a procedural volumetric material similar how you would render smoke but with a much higher density to simulate a solid diffuse surface.

To create this, start with a mesh to act as a 'domain' for the volumetrics (eg, a Cube) and create a 'standard' volumetric Absorbtion/Scatter material node set up with a high density.

To demonstrate generating a volumetric surface within the domain volume you could start by using the Dot Product of the Object coordinates to control the density based on the distance from the origin to produce a sphere. To improve the quality of the rendered surface you may need to reduce the Step Size in the Volume Sampling properties panel - smaller values will produce a smoother surface but will increase render times.

The volumetric material absorbs a proportion of the incident light resulting in a darker surface than you would expect with a Diffuse shader. To correct for this, inclulde a MixRGB node set to Divide to divide each channed by 0.2 to effectively "multiply up" the brightness of the surface by a factor of 5. This adjusts for the light lost by the Absorbtion/Scatter.

To create a cylinder, calculate the distance based on any two of the X,Y,Z channels - X and Y for a cylinder along the Z direction, Y and Z for a cylinder along the X direction, X and Z for a cylinder along the Y direction - using Pythagorus theorum a^2 + b^2 = c^2 .

For an array of cylinders use Modulo Maths nodes to generate distances from a series of centrelines. For example, for lines spaced at 1 unit apart the distance from any line (placed on each integer x coordinate) can be calculated as :

distx = abs(mod(x, 1)-0.5)

Apply this to the coordinates of the two dimensions used to generate the cylinder, repeat for each 'direction' of the grid and use Generated coordinated and a mapping node to allow the number of cylinders in the grid to be easily controlled via the Mapping 'Scale' :

Using additional Maths nodes to combine the three arrays of cylinders allow the intersections to be blended into each other by allowing each cylinder to influence the surface by proximity. Here they are combined using the reciprical of the square ("1/(dist^2)") so that the closest line has the greatest effect with the influence falling off as the distance to the neighbouring lines increases. Adjusting the factors for the Multiply, Divide, Greater Than varies the width of the branches and amount of 'blending' between the cylinders to get the desired result,

To add some variation we can use a Texture to affect the presence of each 'branch'. Care needs to be taken to calculate a 'coordinate' of each branch by 'truncating' each coordinate using Modulo functions (eg, to truncate x down to the nearest 1.0 use 'x - modulo(x,1.0) - this can then be passed to the texture so as to affect the entire length of that branch :

Finally, add some distortion by manipulating the original coordinates - in this case with a Noise texture (see full material below).

Bring it all together to create the following material :

Adjust the highlighted nodes to adjust the line thickness, pruning of branches, and distortion.

Blend file attached

Note : Care needs to be taken with the setting of the Volume Sampling settings (renamed to a 'Geometry' panel in newer versions of Blender). The Step Size indicates how far a ray should travel through a volume (in World coordinates) before being re-evaluated. Larger values will produce a faster render but sacrifice quality, while smaller values will produce more accurate results but will take considerably longer to render. The Max Steps parameter determines how many such 'steps' can be taken through a volume. For a 'see-through' volume (ie, where the branches are quite thin so light can travel right through the volume) you should set this to a value high enough so that the Step Size multiplied by the Max Steps is at least as large as the size of the Domain mesh - otherwise generated volumetric geometry may be clipped. If, however, the branches are thick enough to ensure there typically isn't a visible path through the domain, you may be able to set the Max Steps smaller without causing issues as rays would not be able to pass so far through the domain. The image at the top of the answer was rendered using Step Size of 0.002 with 1024 Max Steps.

Also note that Volumetrics are not normally affected by the 'World' illumination unless you enable Multiple Importance Sampling on the World - see Volumetric Scatter ignoring World lighting


Is there a way to save a material's preview?

Short answer: no.

This preview panel really isn't meant to give you an accurate preview. It's supposed to be an "as fast as possible" preview of your material in a neutral environment. Allowing you to see what you're editing on the fly with as less waiting as possible, or scroll through your material list.
It gets refreshed at every material setting change, as well as every new selection (because you change the object, the material window gets entirely refreshed, and so does its preview panel).

The only way it could remain still when changing the selection is if Blender had an hypershade-like editor. Which will let you edit any material you want, even several at the same time, regardless of your selection. But that's not planned for now.

But to be honest, if you're working with cycles and want to have a fair preview of your object which is independent of your selection, your best shot is the 3D viewport. Because the final look of your shader is highly driven by the model's volume, the lighting, the surrounding surfaces, and their own materials, ...
If you have performance issues, there are some work around, like using the render border, using your GPU (or better if you have several GPU, use the one not used for your screen), reducing the pixel size, ...


Can anyone help me rig a watch escapement?

Using bones and curve modifiers

The first bone has 100% influence on the spring.

The second one, its child and which is rotating, has a gradient influence on it.

To make this gradient, start with a simple plane and set the weight to 1 for a side (interior side), and to 0 for the second side (exterior side).

Once done, stretch it and loop cut it.

Now use a spiral curve (add curve extra object standard addon). And add a curve modifier on the spring.

You will need to weight paint a bit on the exterior part that may not move at all.


How to package my own CYCLES fork as an add-on for blender (as a .zip file)

Not easily, the way Cycles is integrated requires access to Blender APIs that are not available to addons. In principle it is possible to do all the same things through the Python API, but that would require rewriting a lot of the Blender to Cycles conversion code.

I got this answer here https://devtalk.blender.org/t/how-to-package-my-own-cycles-fork-as-an-add-on-for-blender-as-a-zip-file/1765


Rigid body physics only applied correctly in edit mode

Thanks @zippy for your answer. I checked the mesh again and have to admit that I missed to look on the scaling properties, although the dimensions were fine, it was scaled by factor 0.013;) Now everything collides fine in object mode, too.
Thus you shouldn't play around at 2 am I think;)
The observed behavior makes completely sense now, because the integration steps for the solver are too far away from each other because of the (actual) size.


Is there a way to make smooth interpolated motion with the graph editor?

Yes, you can do this with the graph editor:

If your goal is to exactly follow a particular path or route, then there are certainly better ways to go about it (such as using a follow path constraint, as mentioned by moonboots), but you can in fact make a perfect circle using the graph editor without any keyframes at all; using sine modifiers:

Here I've set a sine modifier on both the X and Y channels with Phase Offset on the X channel of $\frac{\pi}{2}$ (or 90°). The Amplitude and Phase Multiplier are only set in order to match the example from above.

The follow path constraint is easier to control when you are looking to.. well, follow a particular path (big surprise), but often you don't care too much about the exact path but more that each motion flows smoothly into the next. The graph editor gives you fine control over exactly how that happens.


Information about updating from v. 2.79 to v. 2.79b

Try path: %APPDATA%/Blender Foundation/Blender/ (Windows) there should be a folder called 2.79, this is shared between all 2.79 series of blender include 2.79b

This is the preference and start up and some script setting folder. You should manually backup these files before update to 2.79b if you are worry about it.

After install 2.79b, you can manually copy back your backup files(not recommend, only setting is lost or blender failed to import old preference)


The door will rotate around it's origin, so first move it's origin to the hinged edge.

In edit mode select the hinge edge of the door.
Snap Cursor to selected - ⇧ ShiftS->Cursor To Selected.
In object mode, set origin to geometry. ⎈ Ctrl⎇ Alt⇧ ShiftC->Origin to 3D Cursor.

Focusing on the door by itself, animate it so that it rotates on it's hinged side.

Align the hinged side of the door to the global Z-Axis.
Keyframe the door rotating on the Z-Axis.

Then parent the door to the empty and move the empty so that the doors rotation aligns with the wall.

Clear the rotation of the empty.
Align the empty to the bottom corner of the door.
Parent the door to the empty.
Move the empty so that the door aligns with the wall.


Script below, named "km.py" and registered, works as expected for me on blender 2.8. It circle selects with set radius on C pressed and finishes on release.

Assumed the missing import bpy in question script was a copy paste error, but it may be your issue.  Always check the system console for errors.

Script:

import bpy

def custom_keymaps():
    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon

    km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
    kmi = km.keymap_items.new("view3d.select_circle", "C", "PRESS")
    kmi.properties.radius = 10

    km = kc.keymaps.new(name='View3D Gesture Circle', space_type='VIEW_3D', region_type='WINDOW', modal=True)
    kmi = km.keymap_items.new_modal('CANCEL', 'C', 'RELEASE', any=True)

custom_keymaps()

Only aesthetic changes re setting kmi after creating a new item.  (otherwise kmi is set to the radius which is a little misleading) and calling the method directly rather than via register method. Script in question also works as expected with the import and calling register() at level 0.

Given a py extension and register checked

How to auto-run a simple script?

If you are executing this  in a registered script (sane text block name with  .py extension and the register script checkbox ticked on text editor header) then same as answer here https://blender.stackexchange.com/a/134416/15543 also applies.

__name__ will be the sane textblock name without the python extension. When imported on register. Prob simpler to put register() as the last line of script in this case.

Currently your unregister method is also registering, however loading script this way will probably not trigger any unregisster activity.

You can import these into the python console. Let's imagine your script is called "foo.py" in the text editor then

import foo
foo.register()

will register it similarly to an addon. Later you can call

foo.unregister()

to unregister while seeing any errors printed into the python console.

PS if this is the case could possibly mark this q as a dupe.


Mantaflow Simulation: Fire and Smoke not rendering in Eeevee

Seeing from your file it seems that your simulation domain does not have a shader, that's why.
At that point of the tutorial the dude creates the shaders.(below)

https://youtu.be/YCdQgREfVq8?t=420


Why does Blender crash when I select Skin for my 3D model?

I think you might not know the purpose of the Skin Modifier. With it, any vertex is kind of a tubular node connected to the other ones. It's for making quick base model like the image below:

Applied to a complex model, would take several minutes to process it. And the results are not pretty good though. Here you can see a cube and a Suzzane with the Skin Modifier. Suzzane completely freezed the aplication for 2 minutes.

The use of the Skin Modifier is covered in its wiki page.

At this point, I think this is not what you want to accomplish. As you have animation and rigging tags in your question, I think you need the Armature Modifier for make your character rig. Armature Modifier is named Skin in 3ds Max, maybe that's why you made this mistake (if you did).

It looks that I haven't clarify that enough: in this case, you need to create an Armature (a rig in Blender) and use the Armature Modifier (like Skin in 3ds Max) in your character's mesh.


The solution was the color management. Setting it to raw gave me what I expected.


Okay, figured it out. Thanks to batFINGER for the link to readfile.c

I thought I was deleting actions, but it turns out a few things in bpy_data shouldn't have been in there, and were causing errors that led to Actions NOT being deleted. Once I cut the bpy_data list down to what it is below, everything deleted properly and I am now left with about 10M of memory usage. Here is the working delete function:

def clearScene():
   for i in range(20):
       bpy.data.scenes['Scene'].layers[i] = True
   print("All layers selected")
   bpy.ops.object.select_all(action='SELECT')
   print("All objects selected")
   bpy_data = [bpy.data.actions,
         bpy.data.armatures,
         bpy.data.brushes,
         bpy.data.cameras,
         bpy.data.materials,
         bpy.data.meshes,
         bpy.data.objects,
         bpy.data.shape_keys,
         bpy.data.textures]

   for bpy_data_iter in bpy_data:
      for data in bpy_data_iter:
          bpy_data_iter.remove(data)

   bpy.ops.wm.save_mainfile()


I can't see faces on my model in all modes

Welcome @wiseman.

You must enable the draw type to texture.

See the image below:


Why has IK rotation constraint "envelope" stopped displaying?

In the N panel > Display, you need to activate the Relationship Lines option. In 2.8 it's in the Viewport Overlays panel:


What are these markings on my sculpting model?

Could be the order of the modifiers. Put the mirror modifier befor the subdiv modifier!
Also make sure to check the merge checkbox on the mirror modifier...


Loop Cut and Slide using Python not working

if you're still interested, I've found the solution to your problem.
I had more or less the same script for Blender 2.79 and run in the same issue in Blender 2.8x.
All you have to do is adding the variable "object_index" : 0 in MESH_OT_loopcut


How could I create this huge knotted blanket?

Looking up closely to such a blanket:

You can see a knot structure (duhhh):

using array modifier we can recreate the complete blanket from this.

add a path curve
select the 2nd and 5th vertex and move them x(quantity) along the y-axis
select the 3th vertex and move it x/2 along the y-axis

you now have this curve:

you can also scale it along the x-axis to get a wider knot.

add a mirror modifier, and select the proper axis

you will now notice a issue, the top of the knot is not rounded but sharp.
To solve this:
-select 1st and second vertex, and subdivide once

move the newly created vertex to the first vertex, and then move the newly created vertex along the y-axis until the top is smooth enough.

repeat this process for last to vertecises too

you should now have something like this:

I will move the 3th and 4th vertex up by one so the knots fit in each other when we array them:

add an array modifier with relative y 1, and increase the count.
add another array modifier with relative x, and play a little with the value until it looks good, I will use 0.3
go under object data properties to geometry, under bevel increase depth to give the curve thickness.

If you make them too THICK they will start drifting apart from each other, you can change the first array modifier from relative to constant to fix this, but you will have to play with the values.
if you want to use it for cloth simulation you will have to convert it to mesh, before you do that reduce the quality of the curve or you will get a few million vertices.
press F3 and search for convert to, and it convert to mesh.
Final result:

sofa from DimitraPe


Where is Ctrl-Alt-Shift-Mouse Wheel discrete rotation in 2.8

i have the same problem, changing to 2.7x layout dose fix it but i want to keep the rest 2.8.  also in 2.8 controls it is listed,  holding down control + shift also says dolly on the bottom of the screen in both 2.8 and 2.7 layouts in blender 2.8 release candidate.

i have found the python files responsible for the shortcuts
exporting blender layout makes a .py calling for a different .py
exporting 2.7x layout makes a lot of changes to the same py as listed before

 also first time posting on stack

[]


The volume of an audio strip can be changed in the sound properties panel which you can find in the sequencer's properties region - press N

To alter multiple strips, select them and adjust the volume then right click on the volume and select Copy To Selected


No, you can't re-order them. If the enums are defined in Python its possible to unregister the property and re-register a new enum, based on the old one but with a different ordering, however that seems like an awful lot of effort.

Basically, its not supported.


Cycles always renders RGB channels to the same values under sun lamp?

I figured out why. The reason is that my lamp size is too big, which leads to almost no shadow on the shadow catcher.

So my region of interest is actually illuminated by the white light source (instead of being illuminated by the diffuse reflections). With a grayscale diffuse map, the whole thing renders to grayscale.


One side of an object appears normal but the other side is transparent

2.49b:

Try adding some thickness to your mesh.

It seems to be currently a 2 dimensional plane, which will only have one side drawn unless double sided faces is enabled.

2.6x:

It seems that double sided faces was removed in 2.6x.
Backface culling can also cause this.
The Backface culling setting is located in 3D view > Properties panel > Display:


Using the Object Attribute Output node to drive the Orthographic Scale of the camera


Okay, solution founded. All I had to do is tick "Global undo" in the Editing tab.


How can I create a rig where each bone only affects its surrounding mesh?

You have 2 solutions:
Parent With Empty Group instead of With Automatic Weight, then in the Properties panel > Object Data > Vertex Groups, assign the selected vertices to the vertex groups they are supposed to be part of (the groups that have the name of the bones that are supposed to control them).
Or select your object, go in Edit mode, select all, separate your object in several different objects wit P > By Loose Parts, then back to Object mode, select a limb, shift select the armature, switch it to Pose mode, and parent to > Bone.


Understanding of nodes

Nodes are a visual expression of mathematical operations.

The concept of nodes should help users to solve complex tasks by providing "packs" that transform inputs into outputs. In general, complex operations are splitted up into basic nodes to give the most possible freedom to the user. It's a kind of interface, which is flexible to work with and combines the best of both worlds (programming and use).

It's just a visual programming language, so in Blender it's useful for complex purposes like:

Built-in

Creating shaders for objects, world and line styles (Freestyle)
Textures
Image Compositing

Add-ons

But the range of operations they are capable to do is it is not limited to the built-in nodetree types. There are add-ons that integrate other functions like:

Parametric Modeling via Sverchok

where you can use nodes to operate with vertex/edge/faces and also manage data lists (that gives you access ...to everything!).
Node based animation via Animation Nodes

Image from http://www.blendernation.com/2015/03/17/review-animation-nodes-addon/

Node-based compositing

You are referring to Composite Node tree type in your question. From Wikipedia:

  Node-based compositing represents an entire composite as a tree graph, linking media objects and effects in a procedural map, intuitively laying out the progression from source input to final output, and is in fact the way all compositing applications internally handle composites.

Between the starting inputs (usually Render layers) and the final output image you can add nodes to:

Tweak the brightness,
Overlay images with alpha,
Separate rgb channels,
apply filters,
etc.

Well, the list can be long and there are dozen of nodes, which can combined in infinite number of ways. The main advantage of image compositing in Blender is that it will automatically run through the node's operations after rendering the 3d image, so you'll not have to re-tweak the image manually (as Photoshop's Adjustment levels, they are operation done "after" the base image, in a non destructive way).