Script/API - Snap selection to grid, but only one axis by script I can do a snap-to-grid of the selected vertices:

bpy.context.space_data.grid_scale = 0.125
bpy.ops.view3d.snap_selected_to_grid()

But I need to restrain it to one axis ... but how?

Many thanks for any hints.

Ditch the operator

IMO far simpler to ditch the operator and round the desired axis component to the nearest gradation.

Test script, Run in edit mode, moves all selected verts local z coordinate to nearest multiple of 0.125

import bpy
import bmesh

context = bpy.context

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

grid_spacing = 0.125

sel_verts = [v for v in bm.verts if v.select]

for v in sel_verts:
    v.co.z = round(v.co.z / grid_spacing) * grid_spacing

bmesh.update_edit_mesh(me)

Considering the grid to be a global system, will convert the vert coordinate to global mw @ v.co find the nearest gradation point, then convert back to local mwi @ v.co

Please Note script written for and tested on 2.8. For prior replace  @ with *

import bpy
import bmesh

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

grid_spacing = 0.125

sel_verts = [v for v in bm.verts if v.select]

for v in sel_verts:
    g = mw @ v.co # use * prior 2.8
    g.z = round(g.z / grid_spacing) * grid_spacing
    v.co = mwi @ g

bmesh.update_edit_mesh(me)


Is it possible to export a 3D object made in Illustrator to Blender as a mesh? I've got a logo I'm making in Blender and Illustrator. I am currently arranging the logo in Illustrator and then I save it as an SVG and import that to Blender where I extrude it.

But the process of converting it from Curve to Mesh in Blender makes it have a messy overly complicated mesh.

When I take the same text and extrude it as a 3D object in Illustrator it looks much much better. I grab it, and I can see a wireframe of some kind. So is it not possible to just export this mesh created by Illustrator, and skip the step of converting to SVG and importing it into Blender and then converting it to Mesh? It seems like it would result in a much cleaner mesh if that were possible.

I'm guessing that what you see is something like this.

I don't know what Illustrator is capable of, because I do not have it, and I have never used it. However, Blender can clean it up, by use of the Remesh modifier.

It has three modes, Sharp, Smooth, and Blocks. They work a bit differently, and which one you use, depends on what you want the resulting mesh to look like.

The Octree Depth setting sets the resolution. The Scale setting twaeks the resolution on a more fine-grained level. Smooth Shading should be self explanatory. Remove Disconnected Pieces removes small pieces of geometry that are not connected to the main mesh, and the Threshold value controls how small/big pieces get removed.
The Sharp mode also has a Sharpness setting; lowering it makes the mesh smoother and increasing it makes it sharper.

N.B. If your SVG has several unconnected parts, do not join them into a single object until after remeshing, or you will lose individual materials. Moreover, vertex groups and UV maps are not retained by the remesh.


Missing Detect Features properties in Blender 2.8x? According to Blender Manual (2.8)
https://docs.blender.org/manual/en/2.82/movie_clip/tracking/clip/editing/track.html,
Detect Features should have properties like Placement, Margin, etc... which I can not find.

Am I missing something or this is expected behaviour in 2.8x?

Thanks

Okay. I found it!

Once clicked on Detect Features they appear as shown on image below (red circle).


Motion tracking: object in my scene bonces around For whatever reason when ever i insert an object into my scene, it bounces around. The markers I have placed, work perfectly, 0.183 solve error, but the object just bounces and moves when I render the video. The object it's self isn't moving, but for some reason the camera sees it that way or something like that. I don't really get it, I'm new to this whole motion tracking thing.

My two cents:

The "dots" on the scene are way to large, and you are using very few of them. With large trackers with no sharp edges (or clearly distinct features) is very likely that you are getting false positives and inaccurate tracking.

Also, the trackers are very close together, to get a proper 3D reconstruction you want the trackers to describe the space, so put them further apart and make them of a color that is clearly different than the background:

Keep in mind that to successfully reconstruct a scene blender needs some parallax information. Your camera hardly moves. You'll get a better solution if you walk a bit around the scene. Shifting perspective is the best way to estimate 3D space out of a video shot. In other words blender needs that the tracker points move at different rates to be able to estimate what is closer and what is further away.

Please take some time and go through the suggestions listed on this post. Hopefully they will help you achieve accurate motion tracking.


Getting an imported object's name I am trying to create a list from a directory and import each item with a for loop:

file_list = sorted(os.listdir(path_to_3ds))
autodesk_list = [item for item in file_list if item.endswith('.fbx')]

for item in autodesk_list:
    path_to_files = os.path.join(path_to_3ds, item)
    bpy.ops.import_scene.fbx(filepath = path_to_files)

How can I get the object name of the imported item and export it as object name + ' export'?

You can use Python set operations.

Make a set from all objects in the scene before the import
Perform the import
Make another set from all objects and subtract the set you made earlier

The only objects left in the set are the ones that were imported.

old_objs = set(context.scene.objects)
bpy.ops.import_scene.fbx(filepath="/home/simon/untitled.fbx")
imported_objs = set(context.scene.objects) - old_objs

print("Imported:", imported_objs)


Where is this “power” node? I am trying to replicate a material with these nodes and they use a power node and it’s not on blender. i’m using 2.92

Math Power Node

This is the equivalent of the math function, eg
y = math.pow(x, 2)

for y equals x squared.  In the context of the node x is the value, 2 is the exponent.
See this answer re expanding the math node types in the UI https://blender.stackexchange.com/a/197449/15543


How do I slant adjoining edges? If I have a cylinder that is 1 inch tall, how can I slope the top from the front to the back down to, say, a quarter inch evenly? If I select all the edges or all the vertices, they just move down together. Not sure if that makes sense.

You can Shear the top of the cylinder by using Shift+Ctrl+Alt+S, then hit Y to shear Vertically or X Horizontally and adjust the amount of Shearing with the mouse or input a value, then hit Enter to apply.

Note that the mesh is Sheared relative to the view angle.


Rotate bone using python I'm struggling with a rather straight forward operation - rotating a bone.  There are tons of examples but can't seem to get it working.
I need to rotate the bone in edit mode (if it's mode specific please share the method too).
I think my selection isn't working. Below is my code:
bpy.context.object.data.bones.active = bpy.context.object.pose.bones["lowerarm_l"].bone
bpy.context.object.pose.bones["lowerarm_l"].bone.select=True
bpy.data.objects['Armature'].pose.bones["lowerarm_l"].bone.select=True
print(bpy.data.objects['Armature'].pose.bones["lowerarm_l"].bone.select)
bpy.ops.transform.rotate(value=1.72994)
bpy.context.object.data.bones.active.hide = True

Rotate an edit bone
To define a rotation require the angle to rotate, the axis to rotate around and a point that the axis goes thru.  To code transforms in 3D the sooner we get our heads around linear algebra, ie vectors and matrices the easier it becomes.
Following test script rotates the edit bone (in edit mode) named "Bone" 30 degrees around the bones local X axis, using its head as the pivot point.
One translation matrix moves such that the head is (0, 0, 0) our pivot point. Rotate this with rotation matrix. Move back with negated transform matrix.
import bpy
from mathutils import Matrix
from math import radians

context = bpy.context

bone_name = "Bone" # change to suit

ob = context.edit_object
arm = ob.data

#bone = context.active_bone
bone = arm.edit_bones.get(bone_name)

if bone:
    # local axes of the bone
    x, y, z = bone.matrix.to_3x3().col
    # rotation matrix 30 degrees around local x axis thru head
    R = (Matrix.Translation(bone.head) @
         Matrix.Rotation(radians(30), 4, x) @
         Matrix.Translation(-bone.head)
        )
    #bone.matrix = R @ bone.matrix
    bone.transform(R)

adjust the angle, the axis, the pivot point  to demo how it works. Using y for axis should "roll" the bone.


RTX Quadro 4000 vs RTX 2080 I`m from Russia so sorry for my English.

I have to plan to start learn blender (sculpting and making short cartoons 5 min max)
Now I have 8700K + 32 RAM + RTX 2080

Do be better to change GPU to RTX Quadro 4000 or Blender more prefer gaming GPU for viewport, real time rotation and fast final render.

Maybe be better change CPU to AMD like 2600X?

Go to https://opendata.blender.org/

  Blender Benchmark platform collect and display the results of hardware and software performance tests

You can search by gpu/cpu names in this site and view the results: https://opendata.blender.org/benchmarks/query/


Render in less than 24 fps I'm trying to render a very heavy scene in Cycles. The scene should have around 10 seconds long. If I render the 240 frames (if it's done in 24 fps) is going to take to much time so I was wondering if I could render it in less than 24 fps and still have a fluid sensation of motion... 12 fps maybe? I don't want to have a stop motion felling.

12 would be your lowest choice but it depends on your animation content. If it has some fast movements they will become jerky at 12fps. For animations; a safe area to start from is 16-20 frames per second. An example is Silent movies which were filmed with a frame rate around this range .


Are Displacement maps used to create normal maps? I know displacement maps actually change geometry.  However, I find them quite useless for my mesh because in order for it to work, you need a high poly count.  I apply displacement maps before I run create normal map.
Am I using them wrong?  What's the point if it only works on your high poly?  If you're talking about VERY basic stuff like floor tiles, I guess they're useful...  On more complex models like landscaping, it it pointless?  You can't export the high poly anyway without creating a normal map.

One point to true displacement is that some people use higher poly counts than you do.  All the way to adaptive subdivision, which might make a vertex for every screen pixel.
Even at low poly counts, they're useful for low-resolution displacement.  You don't need ten million vertices to turn a height map into low-poly terrain.
That doesn't mean they're useful to you.  Blender has all sorts of tools that are only useful to some people.  In years, I've never bothered to learn how to do camera tracking, for example.
Yes, you can use a displacement map to make a normal map.  Simply use your displacement as the input to a displacement node in your material, then bake your normals.  This is not the only way to make a normal map, nor is it the only thing one can do with a displacement map.
Displacement maps are useful as bump maps without baking as well, because they deform fine without relying on UV tangents, which allows you to use them on deforming meshes with arbitrary meshes and UV maps-- even without any UV maps at all.


How do I fix this Traceback error for Massive Material Nodes? I'm trying to convert my material from Blender Render so it can be used in Cycles Render, but I get this error when trying to use the addon for this. Can this be fixed or is there a different addon I could use?

The script you are trying to use was written to work with blender 2.66 or earlier, in 2.67 the python api changed in regards to creating new nodes.

Where the script has shader = TreeNodes.nodes.new('BSDF_DIFFUSE') it should be changed to shader = TreeNodes.nodes.new('ShaderNodeBsdfDiffuse'). There will be other similar changes needed. A list of old and new node names can be found here. Chances are there are also other changes that will also need to be done to get the script working.

As the cycles material converter is still in the contrib addons, chances are that one still works. Try the tips I gave in your other question about that script before trying to update this older script.


Donut Tutorial Coffee Cup has holes in it I have another question about this donut tutorial. I just finished modeling the coffee cup, but it has holes in it where the handle meets the cup. How can I fix this?

The first thing I noticed is that you just have some extra geometry in there that you definitely don't need. You can select contiguous bits of mesh by hovering over them with the cursor and hitting L. Delete the excess:

Next you need to delete the interior faces of the handle. I've temporarily disabled the subdivision modifier here so I can better see what I'm doing:

In face select mode, I first hold down ALT (to select loop) and click to select one face loop, then SHIFT + ALT (to select loop and keep previous selection) to select the other, and delete these faces.

I used L to select the now disconnected geometry that comprised the inside of the handle, and deleted that too.

In Edge select mode, I hold SHIFT + ALT to select the edge loops surrounding the now open holes in the mesh, and press F to fill them. The last step is removing the creases and reenabling the subdivision surface.


How to a make a sphere out of spheres I know how to make a cube out of cubes or a pyramid out of pyramids, but how do I make a sphere out of spheres?

Add a sphere and an empty at the center
Add an Array Modifier to the sphere, scale the empty and modify the arrays count.

Add another sphere and parent it to the first added sphere Ctrl-P
Enable duplication in the objetcs properties:

Result:


How can I keep vertex color accurate on a voxel model thats been converted to a lower poly model? I'm importing voxel models into Blender from Qubicle, and then turning them into low poly models.  I'm using vertex paint, and want to keep each face one solid color.  After finishing my model and vertex paint, I create a lower poly model and try to bake the vertex paint to the low poly model, however the colors get all splotchy.  The other alternative I've seen is baking the vertex color data to a texture, but when I apply the material after UV unwrapping to the low poly model there are slight errors, creating seams, similar to mip mapping without padding.

Unwrapping the model manually would be a huge pain because it's made up of tons of tiny cubes and triangles.  It is however important to use the high poly model in order to keep the color per face image, even if that face no longer exists.  Basically pixel art textures on 3D models, but painted directly on the model.

Is there a way to avoid UV unwrapping considering that the vertex paint data is already there?  can I convert the vertex paint data to a material, or texture paint while keeping everything pixel perfect?  Qubicle UV unwraps perfectly while exporting lower poly models and keeps the texture color perfectly, which would be great if I didn't have to actually edit the model, however I do, so that isn't much help to me.

The answer it seems is to bake your vertex colors to a texture after smart unwrapping and then select your UVs in the viewer, hit shift + s and snap selected to pixels.  it locks exactly to where your vertexes were.  this is probably because I was using exact increments.  you can then convert your model to a lower poly model (i used limited dissolve) and your UVs will be the same as your high poly model, and you will keep your vertex paint (now converted to a texture) precise.


How can I make a running text strip at the bottom of my video, please help How can I make a running ( horizontal) text strip at the bottom of my video. I have used text strip and currently using blender 2.79.
Request you to please help or if any video is available please let me know , will be of great help.
Thanks

I think the easiest way would be to do the animation manually if you don't have too much text. just specify a keyframe with the position of your text outside of the camera output, then move that as you need and specify that with a new keyframe.

And i recorded a video how to do it https://youtu.be/PE0jZ1-nzlQ


Accidentally made 3D viewport take up entire screen http://imgur.com/YJ7fjaI

I hit a button, I'm not sure which one, and everything except the 3D view window disappeared completely. I assume they're just hidden, but outside of the HOTKEY I DON'T KNOW, there's no way to get the menus back and I'm kind of freaking out right now so please, if you know a fix, can you post it?
There's NO menu bar, there's NO timeline, what you see in the screenshot is everything I can access outside of the tools and transform menus with the n and t hotkeys.

Thank god, I figured it out. All I had to do was control leftArrow or rightArrow to switch to a different workspace preset and it eventually brought me back to the preset I was on when I messed it up.


Particles not rendering on sheepit render farm I uploaded a blender file with particle animation on sheepit. However none of the particles actually appear. Rather, the particles just stay at the source(i.e the emitter).
On searching, I realized we had to bake the animation. So I did that, and zipped all the baked '.bphys' files along with the '.blend' file and uploaded it again on sheepit. But I'm getting the same results.

The solution here seems to be to leave the baked data in the file instead of baking to disk this way avoiding problems with reading the files on the render farm. Baked data is saved with the file if Disk Cache is disabled under Cache in the Particle tab of the Properties Editor:


Menus without background and user pref have parts missing In blender version 2.69 and 2.70 and 2.70a the menus have no background and I can't find out why.

This is most likely system-problem; not a direct Blender3D issue because this error happened when I updated to Linux Mint 16.

I assume that some library (python?) version causes this error.

I have been searching for two days without any hint regarding this error so a little help/hint is appreciated.

Image examples:

Check your blender user preferences. Under the Themes tab in the user preferences go to the User Interface settings. Then scroll down to the item that says Menu Back:, check if the Inner: color has any alpha. If that is at 0 then that is your problem.

Also If you scroll all the way down on that same page you will come to a item called Menu shadow: Check if that is above 0, and that the size is above 0px.

If these two did not help then it is a bug with your system.


I got so many .blend files in my C:/tmp folder....is it safe to delete some of them? I just discovered  C:/tmp folder that blender creates...but i see many .blend files from other scenes i've worked/working on.

is it safe to delete some of these ? they take a lot of space.

Most files in temp folder are either autosaves, temporary backups, clipboard items (when using copy-paste through Ctrl + C > Ctrl + V) or expendable cache files.

Unless you recently lost any work and some file needs recovery, you worked on some unsaved projects, or Blender crashed or unexpectedly closed and you didn't save your work before, non of those files should be important, and can be safely removed without issues.

Blender doesn't normally store important files in unsafe locations, so unless you specifically told it to (either explicitly or by omission) files in temp locations should be unimportant and discardable.

Be sure that all your files are correctly saved in some "projects" folder in a safe spot in your hard drive. If in doubt use your system's safe deletion system (Recycle Bin for Windows) when deleting so that if something goes wrong you can restore it.


Make light visible once it passed through a transparent object I am looking for a better solution to make light in Cycles only visible, once it passed through a transparent object.
Example which is actually pretty close but has a few flaws, see below

A doorframe seems to have an invisible lit room behind it.
Important:

the cone in front of the door, so the light source needs to be a bit further back than the door itself
the floor that is visible through the door should be lit too

what i did:
I created something like a corridor to block the light to the sides but still light the floor inside the doorframe.
I took advantage of the isometric perspective to get away with a kind of wonky shape.
The backside (opposite of the door) is just an emissive material.

The material for the corridor:

This method works, as long as there are no other light sources in the scene, which I need.

Problem:
The corridor blocks the light from the right and casts a shadow.
Method 2:
No corridor this time, just a transparent door guiding the light.

Red is a transparent material, the yellowish meterial is my light source:

The problem is the missing cone in front of the door.
Any ideas on how I could improve my methods?

(This answer revised thanks to @lemon pointing out what should have been obvious..)
If you're prepared to use OSL, (and therefore the CPU for rendering,) this  script might be a tool to add to your box. By tracing back down the incoming ray to a light, it returns information about the object being lit. It's not all used in this example, but might be useful if you go for a different effect.
#include "stdosl.h"

shader LitObjectIDX(
        output float    ObjectIdx = 0.0,
        output float    MaterialIdx = 0.0,
        output vector   LitP = 0.0,
        output vector   LitN = 0.0
)
{

    if (trace(P,I)){
        getmessage("trace", "object:index", ObjectIdx);
        getmessage("trace", "material:index", MaterialIdx);
        getmessage("trace", "P", LitP);
        getmessage("trace", "N", LitN);
    }
}

ObjectIdx and MaterialIdx are the Pass Index settings for the object and material being lit. LitP and LitN are the location and the normal of the lit point, in World space.
Make a 'Portal' plane, of ordinary fully transparent material, occupying the doorway. For this tree, give it a Pass Index of 20 in its Object > Relations panel. You could use other indices, for other portals.
This node set-up for the yellow through-light restricts the lighting to the portal itself, and areas seen through the portal, contrasting those seen from behind and those seen from in front. Since writing, you've told me that the camera doesn't need to move, so the second restriction, (most of the bottom branch) is not required. Just use the Transparent Depth on its own. My effect looks a bit odd, anyway.

The attached .blend is a bit more complex than needed just to illustrate this method.. you would probably just want to use the script, one way or another, to suit your particular purposes.


How do I put my 3D view back to normal, how it is by default? How do I fix it back to when you first downloaded Blender?

You have enabled the Quad View. To get back to the 3D view press Ctrl+Alt+Q.


Black lines on object in solid mode Black lines are on object in solid mode. In rendered mode they stay as well. How can i get rid of them?

Maybe try to check your model in wireframe mode, there is a possibility, that some edges are copied and then the result can be like that. Also, you can press '2' button on your keyboard and try to delete these edges. Now I see that you have used a mirror moddifier - so it is very possible that two edges are at the same place and then the result is like that :)


How to make my water look Murky? Blender noob here again! I'm working on making a Swamp scene and I'm curious how I can make my water look murky/smokey. Would I need a smoke simulator in the system too? Or is it a materials thing? Any suggestions?

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

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

It's really simple setup.

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

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

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

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


Is there a better way to make paths? Working on a string for longbow Hello I have a question about paths. I'm working on string for my longbow but this method that I'm using seems wrong. Is there a better way to do this or should I keep doing in like this?

Curretly using: "Bezier Curve", "Circle" with modifier "Curve"

I will redo string because I've done mistakes but if there is a different easier way please can you share it?

Thanks.

Longbow - a rudimentary example:

The bow and string are both initially shaped using a straight Nurbs Path bevelled with their respective curve circle.

That Bow only is then converted to mesh with ALT-C.  This leaves the bow as a hard meshed cylinder with plenty of cross section subdivisions with which to flex it when the string is drawn back.

The string is left as a straight Nurbs path with an even number of control points each side of it's center one.  These are used to keep the string straight as the center is drawn back.
The outside two are used to stretch and relocate the ends to match them with the bow's ends.

Animation -

When the string is formed initially,

Give it as many control-point pairs as felt necessary. These are placed equidistant and outwards from the center.   This example was given 6. (3 pairs plus the single one at the center)

Hook-empties are added to control each pair of control points (location only) back along it's length
Another Hook is added to control the center one.

NOTE - Hooks are only moved along the axis perpendicular to the string.

At frame 1, keyframe the LOCATION ONLY for all hooks.  The outer Hook needs a keyframe for it's scale also.

Move the timeline cursor to frame 15 (?).

Pull the center Hook back so the center of the string is where it's required at the full drawn-back location.

Pull the other Hooks back to shape the string as a straight Vee.

The outer pair Hook is drawn back also and to where the Bow's ends are to be flexed. Scale it along the string's axis to stretch them as necessary. (all can be fine tuned later)

Keyframe all 4 Hooks.

Run the animation, see that it looks ok.

-================-

With the string animated, (more or less) it's time to take the timeline back to frame 1 and rig the Bow mesh.

Bones are placed along the Bow's length as shown, rigged so we can flex it's ends by rotating the end bones. (the inner bones too if felt necessary)

Go to frame 15 and position the bow's ends and the string's outer Hook to bring them together.

Keyframe the string's Outer Hook again, (location and scaling) then keyframe the bone rig - rotation only.  Don't keyframe it's location.  If you do, delete those in the Dopesheet.

Play the animation, readjust as necessary.

When all is ok, the launch sequence keyframes can be added...

Move the timeline forward enough frames from the draw-back to hold that pose for about a second or less,
keyframe everything again.  (duplicate the draw-back frames in the dope-sheet (SH-D) and slide them forward to the timeline cursor)

At  2 or 3 frames on from there, duplicate the bow's and string's frame 1 keyframes, drag those to the timeline cursor.

Try it out, see if it looks right, albeit a little mechanical.

To make the string appear normal, it should oscillate forward and back a couple of times after it reaches the at-rest frame.  Add these keyframes after the launch.

An arrow can be added at frame 1, and keyframed to follow the string's center as it's drawn back and again to follow the string during the launch. Another is added (with linear interpolation) to continue it on it's way at the same speed.

-===================-

To enable the entire thing to be used elsewhere -

Parent the Arrow, Hooks, Bow, and String, to the Main Bone.

Move/Rotate/Scale the assembly by the Main Bone only.

When appending to a new scene, all individual components will need to be included. (reinstate their selection arrows in the Outliner if necessary)

-================-

The bow and animation can be appended into any scene, relocated etc. It's animation keyframes will go with it and these can be slid forward in the dopesheet to be launched at any frame and as often as required by duplication, again in the Dopesheet.

HINT - At the bottom of the Dopesheet window, click on the ghost icon and the arrow icon next to it.  This will limit the keyframe display to only those objects selected in the 3D window.


How to merge external images together in script? I'm trying to merge set of images together with script in Blender 2.8. At the moment there is no library like PIL available in Blender, but there is imbuf which one I can use to read the images from disk to list. There is not much documentation about this imbuf... Anyway I want to do this merge process with blender own libraries, so users not need to get PIL or similar library...

How I can merge multiple image files from disk together with Python in Blender? Is there pythonic way to do this without libraries, or can I do it with imbuf, or using imbuf and numpy, or how to do this in blender script?

I'm lost how can I make this, so If someone knows how to do this in Blender 2.8, please show me.

import imbuf

def merge_image_parts(image_paths):

    images = []

    # Load images to list with imbuf
    for img in image_paths:
        img_path = os.path.realpath(bpy.path.abspath(img))
        images.append(imbuf.load(filepath))

    # MERGE TO NEW IMAGE BUT HOW?

Finally, I managed to combine image parts together with looping nested arrays. Although the script itself is not the most beautiful... I mark this answer to correct now, but if somebody is doing better that works in this context, I'll change it.

So here is "monster" that I've used in this case:

# First I need to order rendered part names correctly
rendered_images_ordered = []
for y in range(parts_count, 0, -1):
    for x in range(parts_count):
        rendered_images_ordered.append(rendered_images[(y-1)+(x*parts_count)])

# Then I grab pixel data from all parts
part_pixels = []
for image in rendered_images_ordered:
    filepath = os.path.join(scene.render_settings.render_folder, image)
    filepath = os.path.realpath(bpy.path.abspath(filepath))
    loaded_pixels = list(bpy.data.images.load(filepath, check_existing=False).pixels)
    part_pixels.append([loaded_pixels[ipx:ipx+4] for ipx in range(0, len(loaded_pixels), 4)])

# And finally loop all pixels together to final image
final_image_pixels = []
for i in range(parts_count, 0, -1):
    for row in range(part_height):
        part_switch = -1
        px_counter = -1
        for col in range(final_image_width):
            if col % part_width == 0:
                part_switch += 1
                px_counter = 0
            if i-1 == 0:
                px_arr = i-1 + part_switch
            else:
                px_arr = ((i-1) * parts_count) + part_switch
            target_pixel = row * part_width + px_counter
            final_image_pixels.append(part_pixels[px_arr][target_pixel])
            px_counter += 1

# And then save output image
output_image = bpy.data.images.new(final_image_name, alpha=True, width=final_image_width, height=final_image_height)
output_image.alpha_mode = 'STRAIGHT'
output_image.pixels = final_image_pixels
output_image.filepath_raw = final_image_filepath
output_image.file_format = scene.render.image_settings.file_format
output_image.save()

Result:

If you want to investigate more about where I use this loop check here. This is part of RenderFart blender addon. I hope my answer or addon is helpful for someone...


How to get Color and Z-Depth from Viewer Node? I read some article how to get the z-Depth values from the Viewer Node. So i created a scene with a camera and a Plane with distance z=2. Then i tried to get RGB values and also z-Depth with compositing Nodes.

Code from my Plugin:

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')
viewer = tree.nodes.new('CompositorNodeViewer')
viewer.use_alpha = False
links.new(rl.outputs[0], viewer.inputs[0])  # link Image output to Viewer input

# render and get result
bpy.ops.render.render()
links.new(rl.outputs[0], viewer.inputs[0])  # link Image output to Viewer input
pixels = bpy.data.images['Viewer Node'].pixels
print(pixels[0])
arr = np.array(pixels[:])
arr = np.delete(arr, np.arange(3, arr.size, 4)) # delete alpha
arr = arr.reshape((height,width,3))

# save z-depth
links.new(rl.outputs[2], viewer.inputs[0])  # link Image output to Viewer input
bpy.ops.image.reload()
pixelsZ = bpy.data.images['Viewer Node'].pixels
print(pixelsZ[0])
arrZ = np.array(pixels[:])[::4] # every 4th px

Both pixel arrays are the same. I tried this also manually and there it works perfectly. I thought about refreshing the image (in the image editor it refreshs the Viewer Node automatically when i change the node links), but even this didn't work.

Have anybody an idea how to fix this or what i'm doing wrong?

edit: I think i got the problem: I have to render again, after changing the nodes. is there an option to change and read the information without rerendering?

I am trying to do something similar. I (think) I made it by connecting the Render Image to Viewer Image and by connecting Render Z to Viewer Alpha. I used your code as a starting point.

import bpy
import numpy as np

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 Renger 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)
bpy.ops.render.render()

#get the pixels and put them into a numpy array
pixels = np.array(bpy.data.images['Viewer Node'].pixels)
print(len(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)

#depth analysis...
z = image[:,:,3]
zf = z[z<1000] #
print(np.min(zf),np.max(zf))

I wouldn't use Viewer Depth channel since Image pixels (RGBA) are floats whereas depth are ints.


What is the fastest way to create an array of objects through a script? What is the fastest way to create an array of objects through a script? I want to create a cube made from 10x10 rows of smaller cubes. So far my methods have been too long.

Add a cube, then apply an array modifier in each dimension, and finally separate each part.

import bpy

bpy.ops.mesh.primitive_cube_add(enter_editmode=False, location=(0, 0, 0))
cube = bpy.context.selected_objects[0]
dimensions = [10, 10, 10]  # Rows, Columns, Levels

for i in range(3):
    mod = cube.modifiers.new('Array', 'ARRAY')
    mod.relative_offset_displace[0] = 0
    mod.relative_offset_displace[i] = 1.1
    mod.count = dimensions[i]
    bpy.ops.object.modifier_apply(modifier='Array')
bpy.ops.mesh.separate(type='LOOSE')  # Remove this line to keep all cubes in one object


I made animated wind but doesn't seem to be working with the particle system do I have to set which objects will be influenced by the wind force?
I made animated wind but  doesn't seem to be working.  (The fighters have 2 meshes- one is Hair Particle and Particle Emitter. Hair keeps the particles on the surface and defines the fighters bodies, while Emitter - makes particle flow along the characters move).

Just move the wind near to your particle system and set the strength to e.g. 100. Then you will see a result.


How do I attach floating vertices to the mesh? I am trying to make a turbine with cuts in the sides. I did this with the knife tool and copied the vertices made with the knife tool to the areas marked on the picture. At the place where I used the knife tool I could remove the faces and create the cut shown on the picture. However, the vertices I copied are just floating in space and are not connected to the mesh. This is why the edges (see 'to here') look like they are attached but they are not. Because of this, I cannot remove the faces as I did with the original cut.

The selected area is only 1 face, I want to select the triangle in the selected area

How do I fix this? Can I attach them to the mesh? Or is there another workflow that works better?

To join the floating vertices to the rest of the mesh, you would need to delete the faces sitting in the area, select adjacent vertices then press F. This will fill in edges between the vertices, and once you've gotten all the lines, you can fill in the faces by selecting edges and pressing F.

There are a couple of ways you could have gone about doing this differently though. The first way would be using the Cut Through option for the knife tool. You'd use it by first pressing 3 on the Numpad to enter the side orthographic view, pressing K to enable the knife tool, than Z to toggle cutting through. What this will do is create the cuts on all parts of the meshes that your cutting lines project onto, including the far side of the turbine.

A better way to have gone about modelling it would be deleting half of the turbine and applying a Mirror modifier to reflect the object across its origin, thereby cutting the modelling time in half.


Cant select/move multiple keyframes even with B select? Ok, it is very inconvenient in the dopesheet trying to move multiple keyframes but only able to move 1 - even when a batch has been highlighted orange.

Per other answers Ie used the B key to select multiple:

But then when I try to move them with left mousekey, only 1 moves at a time. Is there a way around this?

The dopesheet behaves similiar to the 3D view.

The right mouse is used for selecting objects or keys. Incidentically, the RMB followed by a movement before releasing the mousebutton selects an object/key and immediately enters the translation operation.

But since you only want to do a translation, you have to initiate it with a shortcut as intended. The correct way is to do a box selection and then...

make sure the cursor is hovering in the dopesheet (so it will receive the keys pressed and not some other window; Blender is context sensitive)
press G (grab) to enter a translation operation (G key down and up)
move the mouse, (moving the keys)
press the left mouse button to confirm the operation and exit the translation.

OR

4a. press the right mouse button to escape the operation. The keys will snap back into place.


Is there a way to set the radius of the new circle select tool by python script I know a little bit of Javascript but don't have a lot of experience scripting in blender or Python. I've tried to set the Radius of the new Circle Select tool by code as it's not possible to use a scroll wheel my Wacom pen naturally, also the new radius if set by the mouse wheel does not persist as it does with the old modal circle select by using f + scroll wheel and that tool is bad as you can't move around in the viewport while it's active. My plan is to hook the script up to some keyboard shortcut etc.

I've tried to change it by something like this

import bpy

#switch context
previous_context = bpy.context.area.type
bpy.context.area.type = 'VIEW_3D'

#bpy.op.VIEW3D_OT_select_circle.radius = 30
bpy.ops.view3d.select_circle(x=300, y=150, radius=300, gesture_mode = 3)
#restore previous context
bpy.context.area.type = previous_context

or

VIEW3D_OT_circle_select.radius = 90

But I can't get it to work. What am I doing wrong, is the circle select radius property simply not possible to set from Python?

What you are trying to do is change the current context. Instead, you should just be overriding the context.

First step for that would be finding the context that you want to use, that would be our VIEW3D REGION for this case, so we can just cycle through all the context screens available till we find VIEW_3D

for area in bpy.context.screen.areas:
    if area.type == "VIEW_3D":
        #Do stuff

Now just the area itself is not enough as there are different regions inside an area. For our use case we will be needing the window region.

for region in area.regions:
            if region.type == "WINDOW":
                #Do stuff

Now we the required components to define a new context.
What we can do is clone our current context and replace its area and region with the ones we just found.

for area in bpy.context.screen.areas:        #Cycle through all the avaliable areas
    if area.type == "VIEW_3D":               #if area is called VIEW_3D
        for region in area.regions:          #Cycle through all the regions in that area
            if region.type == "WINDOW":      #if the region is WINDOW
                view3dArea = area            #save the area and region in variables
                view3dRegion = region
                break                        #exit the loops

override = bpy.context.copy()                #Make a copy of current context
override['area'] = view3dArea                #Change area to the one we just found
override['region'] = view3dRegion            #Same with the region

Now that we have the right context we just need to pass it into the function.
Simply done by passing it as the first argument as its positional argument.

bpy.ops.view3d.select_circle(override, Other stuff)

You can make a simple function out of this so you can call it whenever you want.

import bpy
def select(x,y,rad):
    for area in bpy.context.screen.areas:
    if area.type == "VIEW_3D":
        for region in area.regions:
            if region.type == "WINDOW":
                view3dArea = area
                view3dRegion = region
                break
    override = bpy.context.copy()
    override['area'] = view3dArea
    override['region'] = view3dRegion
    bpy.ops.view3d.select_circle(override,x=x, y=x, radius=rad, mode='SET')

Simply call that function with the desired radius and coordinates.

select (300,200,50)

Or you can change the radius and get a bigger selection

select (300,200,100)


How can I color a Banana? Ok, so, as a complete beginner with Blender, I've been trying to create a banana.

Here is the basic model :

I ,then, applied a basic yellow color to the mesh :

And now I am trying to add some sort of gradient "yellow to green" effect on the extremities of the mesh (as shown in this reference photo) :

But I have no idea on how I can do that. I've tried to play with the node editor, using a Gradient texture node, followed by a Color Ramp node, but the best thing I could get was that :

As you can see, It is applying only to one side of the mesh, and It is not even rotated properly to fit the shape of the object.

Am I on the right way to solve the problem ? Or should I perhaps simply try to UV Unwrap and apply a texture to it ?

Thank you for your answers

Your approach is conceptually correct, you are only missing texture coordinates.

You can even skip the gradient texture and use raw UVs.

The most accurate method is to unwrap you mesh and make a proper UV map, but if you want to skip it, since the banana is an elongated almost-linear shape you can approximate it by using basic Generated texture coordinates.

They won't be as accurate as a proper manual UV mapping, but may do a passable job with less work.

Just use a Converter > Separate XYZ node to get the Y component of your Generated texture coordinates, then run those through the color ramp.


Accessing illumination of face/polygon in python API Is anyone aware of a way to access the illumination of a face of a given object?

As in, given this scene with a light source and a mesh; how much light hits any one face of that mesh.

I realize this might be an over-simplified question, but I just can't find anything related to this in the docs.

I don't expect an exact answer, just the correct terminology, or a hint on where in the docs I should be looking.

Some Context

I'm not using this to render an image; I'm building a generative algorithm, and I want to make this algorithm manipulate positions of faces based on the amount of light they "receive".

It seems to me that what I asked is not easily done. As suggested by @maddin45 you can use baking. This looks complicated to script and I discarded this idea. The other suggestion of using Radiosity Rendering is out because Radiosity Rendering does not seem to be available in the newer releases of Blender.

My solution is to use ray casts. By casting a ray from every face towards my light source(s) I can see if the light source can be "seen" from that face, or if it is blocked by the structure I'm manipulation. This is a very simplistic approach to figure out something about how much light hits the face. The approximation can be improved by calculating the area of the face and taking the difference between the face normal and the vector pointing from the face centroid towards the light source into account. For my use this seems to be working quite well. Which is to say that it seems to be fast enough and accurate enough for my use.

I welcome any other suggestions for doing this.


Applying materials on mesh models present in different blend files using python script I am using python script to read the mesh data present in one .blend file and apply materials to it which is present in another .blend file. The output is exported as a .png.

I have written the below script to achieve this.

If I skip applying material to the mesh object, the mesh object is rendered as is in the .png. However, if I apply material to the mesh object, I am getting an empty .png file. Nothing gets rendered.
Expected: The materials should get applied to the mesh model and get rendered.

Not sure what I am missing. Tried quite a few ways, no luck. Appreciate it, if you could let me know where I am going wrong.

import bpy
FILE_PATH = "/home/vandy/startUpProjects/tailorMade/pythonScripts/"

def render_different_materials_on_mesh_object():
    filepath = FILE_PATH + "remote.blend"
    mesh_ob = get_mesh_object(filepath)
    material_name = append_material()
    apply_material_to_mesh_object(material_name, mesh_ob)
    render_as_png()

def get_mesh_object(filepath):
    bpy.ops.wm.open_mainfile(filepath=filepath)
    scene = bpy.context.scene
    for ob in scene.objects:
        if ob.type == 'MESH':
            bpy.context.scene.objects.active = ob
            break
    return bpy.context.object

def append_material():
    filename = "mainMaterial"
    section = "\\Action\\"
    directory = FILE_PATH
    filepath = FILE_PATH + "material1.blend/Material/mainMaterial"
    bpy.ops.wm.append(
    filepath="//material1.blend\\Material\\",
    directory=FILE_PATH + "material1.blend\\Material\\",
    filename=filename,
    link = False)
    return filename

def apply_material_to_mesh_object(material_name, mesh_ob):
    # Get material
    mat = bpy.data.materials.get(material_name)
    if mat is None:
        # create material
        mat = bpy.data.materials.new(name="Material")
    # Assign it to object
    if mesh_ob.data.materials:
        # assign to 1st material slot
        mesh_ob.data.materials[0] = mat
    else:
        # no slots
        mesh_ob.data.materials.append(mat)

def render_as_png():
    bpy.data.scenes['Scene'].render.filepath = FILE_PATH + 'test.png'
    bpy.ops.render.render(write_still=True)

render_different_materials_on_mesh_object()

My first suggestion would be to avoid using bpy.ops and instead use code like http://web.purplefrog.com/~thoth/blender/python-cookbook/link-external-data-blocks.html which I have excerpted here:

import bpy

def library_get(name, data_blocks, libpath=None):
    """ Since it is possible for a .blend file to have several objects
with the same name linked from different files, this routine lets us
hunt down the right one. """
    for x in data_blocks:
        if x.name == name and x.library is not None:
            if libpath is None or libpath == x.library.filepath:
                return x
    return None

def addGroupToScene(grp, scn):
    for obj in grp.objects:
        scn.objects.link(obj)

#
#

fname = "//cube.blend"

print(fname)
with bpy.data.libraries.load(fname, link=True) as (src, dst):
    # src has many properties, each of which is a list of name strings.
    # dst is how we specify what we want to link from the library file.

    # let's link the "dazed" scene
    dst.scenes = ["dazed"]
    # and the "omnitile" object
    dst.objects = ["omnitile"]
    # and an object group
    dst.groups = ["frog"]

    # and just to be fancy, let's count up how many linkable things there are
    for dbt in dir(src):
        name_list = getattr(src, dbt)
        print("%s[%d]" % (dbt, len(name_list)))

# just because we linked an object doesn't mean that object is in any of our scenes.
omnitile = library_get("omnitile", bpy.data.objects)

scn = bpy.context.scene
try:
    scn.objects.link(omnitile)
    # now it is.
except:
    pass

# link all the objects from group "frogs" to the current scene
addGroupToScene(library_get("frogs", bpy.data.groups), scn)

Your version would probably have dst.materials = ["mainMaterial"]
and mat = library_get("mainMaterial", bpy.data.materials)


Weight paint different from Unreal Engine Making character in Blender with Rigify. Imported as usual... In animations i noticed on my tail is bending so bad... i assuming this is problem in weight paint. I think in blender and unreal engine they are applying weight paint differently, in UE weight paint applying little harder... probably.
And i noticed, my tail is going through neck a little bit, in blender perfectly fine. What is happening?
Some info:
My rig named: rig (i tried name it Armature, but some weird stuff was happening)
I enabled export only deform bones.
Units in blender Metric 1 Meters, i think its not the problem.

It could be a normalization problem: in Blender if  a vertex has a sum of weights different than 1.0, an automatic normalization gets applied, while probably UE uses another algorithm. Try to normalize your weights before exporting (in weight paint mode, weights menu, "Normalize All", then enable the "Auto normalize" option during weights adjustments).


How to create a torus with divided cuts that correspond to the direction of the torus I have a question about the mesh and geometry of a torus and how to achieve a certain physical effect.

This is what I am talking about. I need to have a divided cut that is perpendicular to the direction of the faces of the torus.

Here is a picture of what I want to acheive:

Notice how the torus-es/curves each have dividing segments that lie inbetween the faces of the torus?
I'd like to achieve this effect, but I am not sure how to. Any help would be appreciated.

Create the basic shape you want for your rings.

Add an array modifier to it.

Add a curve>Circle to the scene.

On you object add a curve modifier after the array and select the circle as object.

Depending select the correct axis for the curve modifier so that your array becomes an indented tours-like object.
Then adjust the settings for the array and the sizing of the object and the circle to your needs.


Physics Fluid Simulation Not Working I've downloaded Blender for the first time, version 2.90.0.
I've watched multiple videos on how to create a fluid simulation.
I've replicated the steps and for some reason, it doesn't simulate when I press play.
I've tried the rigid body simulator and it works just fine.
Am I missing a setting or something? In the videos they were using blender 2.8, which had a "bake" feature. I couldn't find that option in 2.9. Could it be my computer isn't fast enough to create the simulation, so nothing appears?
Steps and result: https://drive.google.com/file/d/19VfqVp6HtgplkoIHXLBo2EMv6jsafQCu/view?usp=sharing
Rigid body working: https://drive.google.com/file/d/10j57Pcr2y-wMr6OdAaD0X8Oaie6lmp3S/view?usp=sharing

Changed Cache > Type to All, and Bake options appeared.
Baked, then ran the simulation without a problem.


Strategies for walls Not sure why I can't find any info on this.
When trying to model the inside of a house, I find it difficult to figure out how to both have a workflow that allows for both having more advanced features like walls with different thickness, slanted walls, varying height and using bevels. In the attached image, I have tried 2 methods.
I find the upper one a lot easier to work with. I basically model some "lego" bricks, and piece them together. The big drawback is I cannot figure out how to do stuff like bevel the edges. On the image I used the bevel modifier to show the "problem". But even bevelling single edges gives me issues, for example around the windows. Because there are multiple island bordering each other.
The method used in the lower example otoh I find very difficult to use when I have irregular walls (varying thickness, slanted). It requires adding a lot of geometry as well, whenever there's a feature (like a window).

Most helpful video I've found so far on this is:
https://www.youtube.com/watch?v=Cunh57XjRv4
But still. All his example are rather simple.
Can someone explain or point me to a tutorial on how to achieve the kind of simpleness the "upper" method has, but still allowing for stuff like bevels?

Ok, I found this video from the same guy:
https://www.youtube.com/watch?v=kZD8sSX7NtU
It uses booleans to cut out doors and windows. Seems to work for the above. Haven't tried it yet for slanted walls, but here's hoping it will do.
I was reluctant to use booleans first because they seemed so buggy. May not be buggy, just very hard to use whenever something is a little off. In my case, turned out one of my normals was pointing inwards and that was confusing everything.


How to know which layer is active in a certain 3d view I have couple of 3d views in my file, where all of them has layer 0 as the active layer and only one of them has layer 1 as the active layer. I wonder how I can check which layer is active in a 3d view, like in my case I want to know which 3dview has layer 1 active in it.

This is what I did so far:

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        if area.spaces.active.layers_used[1] == True: # <-- not working if other 3d views has layer 1 even if it's not active in this 3dview

            #do something

like the one shown below:

You should use the SpaceView3D.layers attribute.

layers_used is for the layers that have content (as shown by the dots)


Why adding transparent shaders don't result in transparency? As far as I know, in Cycles, when you use an Add Shader node, it simply adds shaders. I'm getting different effects of those I get with other software.

For instance, adding nothing to nothing should result into nothing, right?

Not quite so:

It's making it really difficult to recreate the behavior of a standard real-time PMA shader.

This all comes down to what the Transparent shader and the Add shader actually do. Think about it another way and the behaviour you are seeing makes more sense.

Instinctively, the Transparent shader is nothing, however, it is not. The shader defines what happens when a ray interacts with the surface - in the case of Transparent, the incoming ray hits the surface and the result is that the resultant ray leaves the surface travelling in the same direction and, if the surface is 100% white, is the same intensity as the incoming ray - ie, no change.

The Add shader takes multiple shaders and combines the result. So, adding two Transparent shaders we start with the incoming ray and each Transparent shader produces its own (unaffected) resultant ray. The Add shader combines these two rays and the result is a combined ray with twice the intensity of the original - ie, it actually amplifies the light.

If you look at your result you’ll see that this corresponds with what you see - where the environment light passes through a surface it becomes brighter, and the more surfaces it passes though the brighter ot becomes.


Missing dynamic transform snapping in 2.8? I have downloaded the Blender 2.8 Alpha2 from the 21 September 2018.

There I tried to snap my object to the current visible grid.
This was supported in 2.79. Also the documentation of 2.79
confirms the behaviour.

All the GIFS were made with factory settings. I hold CTRL for snapping while moving the Object. I made no changes to the settings or else.

So this is how it looks in 2.79

And this is 2.80 alpha 2

So, does anyone know if this will be part of 2.80 later?
Or is this change intentional?

Update 3 Oct 2018: the behaviour is going to change

«Yes! This has been reported and it will be worked on soon»
— Pablo Vazquez (a Blender developer) in the comments to this video

Well, technically also in 2.8 the snap uses the grid being displayed. It's just that the grid no longer changes its refinement when changing zoom level: the smaller grid lines only get dimmer and dimmer but are still there.

(no matter how much I zoom out, there is always a grid refinement level as fine as my cubes)
Anyway, I agree with you that when the "centimeters" have gotten too dim to be useful to all intent and purposes, the "decimeters" should become the "main" snapping increment and so on.


Can't increase density on a small object This is a newbie question but I've searched all over and can't find a solution.

I'm following this tutorial to create procedural clouds and it works perfectly
https://www.youtube.com/watch?v=GhMQN4vVMIU

But I'd like to add these clouds to a small scene, which has been created using BlenderGIS and then scaled right down. I've scaled it down so that camera depth of field can give the scene a 'model village' type of look. At full size, depth of field has no effect because the scale is massive.

When I scale the clouds down, they become almost completely transparent, seemingly no matter how high I set density.

This image is a copy from the YouTube link showing the shader (the missing bits to the left are texture coordinate and random noise).

It's the principled volume step that causes the cloud to go almost completely transparent when small. Without that it works, but the cloud doesn't have a nice density effect.

Is there a way to make a cloud like this very small and maintain the density? I found references to 'Density Scale' in the user manual prior to 2.8 but not sure if that's what I want and I can't find references to it anywhere in 2.8.

Thanks!

Don't forget to bump up the sample count in Render > Volumetrics > Samples.
They're set pretty low by default.


Q:How can i Combine a fluid simulation with an ocean plane? I want to create a boat that floats across an ocean for an animation something like this in Moana: https://gyazo.com/b6bae882baad57b4da22549bb50ade43
but I just can't figure out how to combine the ocean layer with the fluid domain.
I have been searching for days I found a description of what I'm looking for but he didn't explain how one might do it here's the link to the thread that describes it better than I can: Is the ocean modifier better than the fluid simulation for making an ocean?
I would love to hear from someone who knows how the big studios do it.

Here is a complete tutorial on how to combine ocean modifier and fluid sim to generate exactly what you are looking for: https://www.youtube.com/watch?v=qVwfEHtLiyI

And here is a simpler version just with the Ocean Modifier (for zoomed out shots for example): https://www.youtube.com/watch?v=smArCTzxGpE

Both techniques can be combined but tend to be resource-intensive when rendering. I would move between two scenes (close and wide) to optimize.


Pushing back part of extruded region after using knife tool Is there an easy way of pushing back the faces on the left part on the screenshot (selected faces) to the place the original faces were extruded from? Result should be like the one the right side. The faces were originally extruded like the ones above before using the knife tool to cut out a triangle.

I normally either: extrude it down, which will be harder to get accurate to the same level as it's floor. Or you can delete these faces and edges, and simply create new vertices and edges at the floor level to get the same result.


How to add vertices loops around holes in a mesh HELP , trying to learn how to add vertices loops around holes in a mesh
or maybe the proper term is edge loops ,
for some armor Im trying to make , can anyone tell me where to find
info on how to do this ? Dont seem to understand what mesh tool to use to do this.
https://drive.google.com/open?id=1-CGZm1Y9k59X2WeGsTIFEbw5e2Vk1n

this might work for you... select the egde loops with alt right click  press F to create a face press ctrl t to triangulate  press alt j to untriangulate  and then delete those front faces there that you have created (the 3 quads in this case) that you wont need. spam: a model in progress lol https://gamebanana.com/wips/49759


How does one align texture maps of Multiple sizes and resolutions on same sphere? I'm creating the classic "Pan away from Earth" animation and would like to arrange it so that detail levels are more or less constant throughout the animation.

The problem I'm having is figuring out how to map these textures on my sphere in such a way that they line up properly.

Right now I'm borrowing the full size NASA Earth image textures, which work fine when my shaders are not too complex.  However, when I add several more layers (clouds, bump map, normal map, my own additional textures and so on) at the same resolution, my 4gb GPU can't handle the strain.

To solve this, I'd like to create several different resolutions of each texture, and then stack them on top of one another in a single texture.  I would then crop the higher resolution textures around those points near to where my camera will begin its "journey" to reduce the GPU strain.  I would then map the whole Earth with a relatively low resolution texture for when it is needed.

Unfortunately, I cannot figure out how to map the "cropped" images.  Right now, I'm cropping them in Photoshop before importing them.  However, when I map them "spherically" they are stretched to the full size of the sphere.  Playing with the texture mapping utility is difficult, and sliding around UVs manually is hopeless.

Is there a simpler way to do this within Blender?

It sounds like your images have some blank space once you've reduced the resolution. If you simply get rid of that space and make the whole image smaller blender should automatically scale the UVs relative to the image size.

What I mean by this is that if your UVs on the full resolution textures go right up to the bounds of the image, if you have a texture at half that resolution and size the UVs should just be scaled down and still go right up to the bounds of the image.

You can see how I mean if you take a lower resolution image that has no empty space and replace a high res image with it.


Video Sequence Editor: playback lag after stripchange I got some footage from a band who played playback on a stage for a music video. Now I am putting it all together in VSE with the audiofile (studio recording) they used for playback.

My machine is usually quite capable of handling FullHD video (GTX 970, 32 GB Ram, i7 4790K), but this time the video playback during editing starts to lag as hell when the current frame enters a new strip. That's quite annoying, since these transitions are the parts I am most interested in.

Here an example - to the left of the green marker: smooth 25 FPS playback. Once entering the second stip - image stops for more than 1 second and continues stuttering (not very helpful) playback afterwards. It basically skips the middle strip completely during playback.

Some notes, which may help encircle the problem:

I remember a "Prefetch Frames" setting, which should preload a certain number of frames into memory. For some reason, this has vanished in 2.79.
The Memory Cache Limit in User Preferences -> System is set to 16000, so I don't expect this to be a problem.
I guessed that blender is trying to load something from harddisk - but when I look at the Windows Resource Monitor and filter for "blender.exe", it shows no hard disk activities.
The files I am working with are quite long (4-5 Min), and I only am interested in sub-sequences in the second half. Maybe this is some codec-video seeking issue!?
Speaking of codecs: I have files with .mov and .mp4 endings. According to the tool MediaInfo, the .mov is a MPEG-4 (Quicktime) Container with an AVC (High@L4.1)(CABAC/2 Ref Frames) video stream and the .mp4 files are MPEG-4 (Base Media) containers with AVC (High@L5.1)(CABAC/16 Ref Frames) video streams.
I am using soft cuts (K and not shift-K).
In the movie clip editor, there is a purple stipe at the bottom of the screen, which shows how much frames are loaded already. At least I understood it like that. Example below. Probably this is what's happening in the VSE in my case - not loaded frames. But there is no similar visual feedback for the user in the VSE. Right?!

Any suggestions to ensure smooth playback WITHOUT using proxies are highly appreciated. I would like to avoid the overhead of generating temporary files or re-converting the footage to other codecs.

Encode your video files with post-production codec.

First thing you should look at is what a video codec you use. Every codec has a different use. In fact, most codecs that compress the video stream are only for linear playback.

So when you try to use codec what designed just for playing in videoplayer, it can be slow in non-linear playback. If you need fast workflow, use a special post-production codec. In blender good variant is a Avid DNxHD codec. Also you can try Apple ProRes

Unlike other programs, in the blender you must process the source material  manually (if necessary). If you use another application, you will see, that most other programs will re-encode the video before adding it to the editing line. In this there are pluses and minuses, but this is so.

Therefore, you still need to transcode the video, but next time you will encode into the right format. If you use files, that are not optimized to work in the video editor, there are no ways to make the workflow fast.


Why aren't my nodes showing up in the shading tab? I am following this tutorial to make a donut. However, when I am in the shading tab, nodes are not showing up in the bottom part. I have explored the area thing, but I can't find the starting nodes. Any help finding them? I tried searching online, but nothing I found is useful.

Choose your material, and in the shader workspase go to view-view all
EDIT: For me it was View:Frame All in the bar above the Nodes


Determining if Cycles light rays provide direct illumination or self-shadow I am looking to render Saturn and its rings. The sun illuminates the diffuse material of the rings on their sunlit side but their backlit side needs to have an emissive shader. However the rings must be unilluminated on either side where shadowed by Saturn itself.

Thus, in the material nodes for Cycles, I need a way to separate light rays into three categories:

Direct illumination: light rays directly hitting the diffuse sunlit side
Self-shadowed: light rays directly blocked by the sunlit side of the rings themselves
Externally-shadowed: light rays that never touch the rings because they are shadowed by the planet

This is similar to the "Is Shadow Ray" output from the Light Path node, except that covers both the self-shadowed and externally-shadowed cases together. I am looking for a way to split that up.

As mentioned in a comment, it would be incorrect to model this situation with an emissive material, as no light is being emitted. Fortunately, there is a shader in Cycles that supports your use case.
The Translucent shader emulates light passing through a thin sheet of material, and being diffused on the other side. This is frequently used for materials such as paper or grass - very thin layers that let the light pass through.
You can also use it for the ring material. However, you need to mix it with your current material, as only a fraction of the light is let through - part of it is still diffused. Example setup:

Results
From the top:

From the bottom:

Ring shadows:

forgive the lazy texturing
Note that we have not used any shadow "hacks" or emissive materials - hence the rendered result is reasonably physically accurate. In particular note that:

No fake light is being created
Rings diffuse light as expected
Rings catch shadows (on both sides) from other objects
Rings cast shadows on the planet

Possible improvements
To further improve the material, you could:

Tweak the mix value so that the material is just as translucent as it should be
Adjust the opacity of the material depending on the view angle (perpendicular angles should be more transparent, but slanted angles should be more opaque, because light has to travel further through the asteroid cloud, so it would have a greater chance of being diffused. If you wanted even more physically accurate results, you could give the rings a small amount of thickness and render their volume)
Adjust textures, colors, etc

Why this is better than hacking with shadow colors
This sort of setup will simulate light bounces more physically accurately. In particular, it will ensure that no light is being "created" from nothing - the amount of light redirected from a material will be no more than the light that has shined on it.
This would be difficult to achieve manually. As you already realized, dealing with shadows yourself would be tricky, even if you had access to shadow data. In addition, you would have to ensure that  the material doesn't emit too much light - for example, if the light source is at an angle, there should be less light than if it was perpendicular to the surface.


Motion Tracking a Camera Move and Zoom? Is it possible to motion track a camera move that zooms mid way through the shot?

No. Currently is not possible to track shots with variable focal length or shots where the lens breaths too much.


Changing texture slot *mapping size* does not sync in texture viewport mode I am in Blender Render or Blender Game.

I UV unwrapped and mapped a texture to a cube and I can see the texture in my camera window perfectly on the cube. If I change the UV Mapping vertices or edges in UV editor the changes can be seen in sync in my camera perspective window with texture mode. So far so good.

But If I change the mapping size in this little window:

It has no effect at all. I can set the Size to 10 (x,y or z) or whatever value there is no change at all.

I assume I miss something but I cannot figure out what. In cycles it works as expected. In "Blender Render and Blender Game" it does not work. If I render the picture the size changes worked. But I would like o see the changes before (sync) in my 3D windows with texture mode selected. Thanks for advice!

To view in sync you have to activate the material mode in the view port. That and rendering mode allow interactivity.


Topology correctness for quads I've come across this Topology layout a few times now and I'm wondering if its bad Topology or not. I know it's a quad, but it just feels distorted. Are there any downsides to it? If so, what should be the appropriate way to fix it.

You could reorganise quads like this, to avoid that long narrow quad


Sculpting faces for Animation I hope these types of questions are welcome here.
I have around 2K - 3K hours in Blender and I've only just started to use the sculpting tool. I heard it has been improved.
I've done some decent models so far but I have a question about sculpting a face for Animation. I have the eye balls and the eye lids as their own separate objects. This is, as far as I know, the way to do it. But when it comes to the mouth I'm a little lost.
Should the model be sculpted with their mouth wide open? So the mouth is made with the lips and then sculpting back to create the inside of the mouth and the back of the throat. Then add the teeth as a separate object?
This is the way I see it being done or I'm totally wrong.

As already mentioned in the comments you need a low poly mesh with a good topology for animation. If you have sculpted the head with dyntopo or the remesher then you can retopologize it to get the low-poly mesh.
Alternatively, you can use a low-poly base mesh and use sculpt tools to get the shape that you are after.
The mouth is created in a closed/relaxed position because the lips get stretched when it opens. The mouth consists of edge loops that form the lips. If you extrude these edge loops towards the inside of the head, you can easily create an oral cavity.
Teeth and tongue are separate meshes. You can make your own object from them.


Set various rotation points for multiple object I'm a bit stuck in my animation project. I'm trying to set multiple pivot points to several object and animate the object depending on each pivot point.

This is my mesh. At the moment I have 4 Plain Axes that I want to act as pivot point for my object. But when I use an Object Constraint, it rotates around each object axe, not the Plain Axes center.

This is the animation I'm trying to achieve.
https://www.youtube.com/watch?v=e2j-jb8c5bE

[child of] constraint and armature may be part of the answer you are looking for. You may need multiples of these.

Armatures and [child of] constraints are used below. In the images below the armature is black color in pose mode.  Some bones are are coincident (Same location ... different rotation) and thus not obvious from a casual inspection. 36 = 6 x by 6 different meshes.  Plane (very flat cube) thickness and near flat fold are for illustrative purposes.  I have not stated why I think the combination of the two is useful.

A Blender scene can have multiple [child of] constraints for optional control influence strength 00%, 50%, 100%.  Two [child of] constraints may be compounded fully via matrix multiplication ... or blended together. Each can have full strength at different times.
Please read the latest info in the manual.
Note that all rotation, scale, position boxes are checked intentionally.  The allows [moving] the origin of rotation for individual rectangular meshes  of the multiple mesh 3d-plane.  I believe you need this flexibility.  If you uncheck some boxes your rotation will use the original origin.  The multiple constraints will allow multiple fold simulations of a face.

The plane has a thickness which you might consider.

A Blender scene can have a hierarchy of parents, controls controlling other controls.

So parent of parent of parent .... grand parent concept may be useful to you.

Consider one or multiple armature modifiers. This is a mechanical hinged non organic animation.

I have not considered the video that carefully to suggest a (best if any) approach

You might consider more than one mesh.  I am only considering motion at this point.  Textures are a separate issue.
More to follow


how can I rig a 2D face onto a 3D model I'm trying to replicate the faces as seen in the Lego Movie, and somehow they get them to move. Someone recommended using the grease pencil tool, but I'm not sure how. These are like textures, but they rigged them inside the engine they were using. I would understand using black planes as eyes and eyebrows, but not if you want a 2D mouth that can open. I'm sorry if this question has been asked before, but I'm unable to find one like it

I understand this is a different engine, but is there a way to even do this in Blender?

I'd find it a bit hard to animate using textures, even though I know it is sometimes done. For Project Gooseberry, I read in one of the weeklies that they were thinking about animating UVs using drivers on bones to achieve this effect for the caterpillar scene, but it didn't look all too intuitive.

My approach would be to use the traditional armature tools, combined with a shrinkwrap modifier workflow. It would be too long to explain everything, so examine the (simple) blend here:

The trick is to have the armature deform the face mesh before projecting it onto the head mesh using shrinkwrap. So all deformation happens in a flat plane, the result is wrapped onto the head with some offset. This is what it look like before projection:

And this is after:

I use the same technique for the eyes, however you can see the distorsion on the circular shapes a bit too much for my taste, so here deeper involvement would be needed. For the mouth it works a lot better:

I really quickly hacked this together to show the concept only, much more dedication needs to go into carefully weighting this, but alas, where you take this approach to is up to you.


Blender 2.8 - Modal Operator: How to change modifier settings? I am trying to change a the "ratio" within a "decimate" modifier with a modal operator, but cannot get the value to update (my guess is I am not passing the right value?)

import bpy, bmesh

class OBJECT_OT_make_proxy(bpy.types.Operator):
    bl_idname = "object.make_proxy"
    bl_label = "mProxy"

    flt_ratio: bpy.props.FloatProperty(default = 0.25, min = 0, max = 1)

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

    def execute(self, context):
        #TODO: handle the folder selection, saving and relinking here
        return {'FINISHED'}

    def modal(self, context, event):
        bpy.context.object.modifiers["Decimate"].ratio = self.flt_ratio
        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        #### add modifier ################################
        bpy.ops.object.modifier_add(type='DECIMATE')

        #self.flt_ratio = 0.25 <- commented this out, because it already has a default value
        bpy.context.window_manager.modal_handler_add(self)
        bpy.context.window_manager.invoke_props_dialog(self)
        return {'RUNNING_MODAL'}

classes = (
    OBJECT_OT_make_proxy,
    )

register, unregister = bpy.utils.register_classes_factory(classes)

if __name__ == "__main__":
    register()

Could somebody please show me what I am doing wrong?

You are using FloatProperty, although you only imported StringProperty. You can use it as bpy.props.FloatProperty, or you can import it by adding it to the import from bpy.props import StringProperty, FloatProperty. You will need to define how it is controlled during the modal operation inside invoke as well. See the examples in the Templates menu in the Text Editor's Header.

You could open the example of the modal operator from the Templates menu in the Text Editor's header and then just modify it with what you need carefully checking that you don't break it. I would suggest using some event like mouse move or mouse wheel to control the variables, because you will have a floating panel at the bottom of the 3d view with the value after the operation anyway if you define bl_options = {'REGISTER', 'UNDO'} that is the usual Blender's behavior - adjusting with mouse on the fly and then having that last operator's history panel.

It would be something like this:

import bpy
C = bpy.context

class OBJECT_OT_make_proxy(bpy.types.Operator):
    """Saves the world from war and hunger"""
    bl_idname = "object.make_proxy"
    bl_label = "mProxy"
    bl_options = {'REGISTER', 'UNDO'}

    ratio: bpy.props.FloatProperty( name = "Decimate Ratio",
                                    description = "Does something",
                                    default = 0.25,
                                    min = 0, max = 1
                                  )
    @classmethod
    def poll(cls, context):
        return context.object is not None
    def execute(self, context): #This is apparently needed for the history panel to work
        if "mProxyDecimate" not in C.object.modifiers:
            bpy.ops.object.modifier_add(type='DECIMATE')
            C.object.modifiers[len(C.object.modifiers)-1].name = 'mProxyDecimate'
        C.object.modifiers["mProxyDecimate"].ratio = self.ratio
        return {'FINISHED'}

    def modal(self, context, event):

        if event.type == 'WHEELUPMOUSE':
            self.ratio += 0.02
            C.object.modifiers["mProxyDecimate"].ratio = self.ratio
        elif event.type == 'WHEELDOWNMOUSE':
            self.ratio -= 0.02
            C.object.modifiers["mProxyDecimate"].ratio = self.ratio
        elif event.type == 'LEFTMOUSE': #You need to be able to confirm it
            return {'FINISHED'}
        elif event.type in {'RIGHTMOUSE', 'ESC'}: #..and also to get out of it
            bpy.ops.object.modifier_remove(modifier="mProxyDecimate")
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.object:
            if "mProxyDecimate" not in C.object.modifiers:
                bpy.ops.object.modifier_add(type='DECIMATE')
                C.object.modifiers[len(C.object.modifiers)-1].name = 'mProxyDecimate'
            C.object.modifiers["mProxyDecimate"].ratio = self.ratio
            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "No active object, could not finish")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()


Lighting move with object movement I'd like to attach a light to a specific object. I used "ctrl j" but it's not permanent. For example a car or street light that I can move around the scene etc. I change my mind a lot.

Welcome to Blender Stack Exchange!

You'll want to use something known as Parenting to do this. Joining only works if the objects are the same type, and only on certain types of objects, for example meshes.

To use parenting, select the object that you want to be the follower, and then the object that you want it to follow. Press Ctrl+P and choose "Object". Now the follower (child) will be joined to the parent object and follow wherever it moves. You can still move the child object independently as well.


Set one new origin for a group I have a group of objects and I need to set a new origin to the corner of the group. Is this possible?

I have tried to set the cursor in edit mode to one of the objects in the group and then in object mode move the origin to that cursor and then shift G Group to select all the other objects in the group.

I want to move the group to a new location in the scene. I set the cursor at the new loacation and then I select Selection to cursor, but then all the objects own origins in the group move to that point. I just want one origin for the group and be able to set the location of the origin where I want.

Parent the objects in the group to an empty. Moving the empty will move all of the objects along with it.


How do I "parent" objects? I'm looking for a way to have two separate objects be connected, so that when I move the first object the second one will move also. The term parent is used, but how do I parent a object?

For a quick and simple answer, select the object that will be connected (child object) first, then select the object that will transfer transformation data to the child object (parent object). The selection order is important, the parent object must be selected last so that it is the active object. Now press CtrlP > Object.

There are many ways to parent objects in blender. You can parent objects from five different windows: The 3D view, Properties Editor, Outliner, Text Editor and Console; plus there is a daunting list of different parent types.

It seams that parenting is a complex ordeal, so let me try to simplify it.
Out of that large list, there really only are three types of parenting. Those are Object, Armature, and Vertex.
The differences in the many parenting types

Object Is by far the most common type of parent. It is used in eight of the thirteen parenting types.
Any time two or more objects are selected the object parenting type is available. Any translation (scale rotation, and location) to the parent object will effect the child.

Armature Deform This is arguably the most complicated group of parenting types. Armature Deform is only available when the active object is a Armature. It sets a Object parent, with the selected object as the child, and the active object (the armature) as the parent. It adds a Armature modifier to the child object, with the armature already set as the modifier's target Object. At this point it will do nothing more then a regular object parent. The three sub options Empty Groups, Automatic Weights and Envelop Weights are used in the rigging process.

Bone Is only available when the active object is a Armature. Is exactly the same as a object parent, but here the child is transformed from a single bone.
In the picture below I positioned the ring around the finger, then Shift selected the armature. With the armature now as the active object you can go in to Pose mode and select the proper bone. Finally  parent the object to the bone, with CtrlP > Bone.

Bone Relative Is the same as bone with the difference that any changes made in edit mode to the parent bone will not effect the child object.

Curve Deform Is only available when the active object is a curve object (Bezier or Nurbs curve). It sets a Object parent, with the selected object as the child, and the active object (the curve) as the parent. It adds a Curve modifier to the child object with the curve already set as the modifier's target Object.

Follow Path again is only available when the active object is a curve object. Is sets a Object parent, same as the Curve Deform does. It also animates the Evaluation Time for the Path Animation on the curve object.

Path Constraint Is the last option only available for curve objects.  It does not set any parents, instead it adds a  Follow Path constraint to the selected object with the constraint's target as the active object (the curve).

Lattice Deform Is a special option that is only available when the active object is a lattice. It sets the lattice as the parent and the selected object as the child, plus it adds a Lattice modifier to the selected object.

Vertex This is one of the three main parenting types. It differs from a object parent in that only location information is given to the child. It is the location of the vertex that is the parent. The parent object does not have to move, but a modifier can change the position of the vertex, the child object will move.

Vertex (Triangle) At first glance it may appear the same as a object parent but rather it is the exact same thing as a vertex parent, except now there are 3 vertices. From throes three vertices the child now gets location, scale, and rotation same as in a object parent; with the benefit of tracking the vertices.

The 3D view
The most common way to parent objects is in the 3D view with two or more objects selected, press CrtlP > Object. Note that the parent is the active object and the child is the selected object. This is the same as Using the menu in the 3D view header Object > Parent > Object.
Child parent relation ships are represented in the 3D view by a small dashed line connecting the objects origins.

Here the cube and the monkey have already been Object parented. The cube is the parent (active object) and the monkey is the child.
The Outliner
The outliner is great because there is no confusion with the active object, or which way the parent is going. You simply drag the icon of the desired child object, and drop it on top of the desired parent object.  If there is more then one option for parenting, blender will ask you which you would like to use.

The Properties window
You can simply choose the object that will be the parent. Using this method the active object is always the child.

However parenting objects using this method results in very different results from the 3D view or outliner.
In the image below both the cube and the cone are in the exact same place, and have no rotation or scale. The left side is how both looked before any parenting. I parented the cube to the cone in both the center and the right side. The center is parented through the 3D view, and the right I used the field in the properties window.

The difference comes from the different python commands (more on that in the python section).
What is important is when using the field in the properties window, the child object's distance from the world origin (0,0,0) becomes the offset from the parent. That is shown in the image above by the cube being 4 units along the X axis of the cone.
Python
The last two places you can parent objects are the Text Editor and the Console. Both of those give access to parenting directly via python. The two parenting commands are
bpy.ops.object.parent_set() and bpy.data.objects['child'].parent = bpy.data.objects['parent']
This script will parent just like the 3D view.
import bpy

bpy.data.objects['child'].select = True
bpy.data.objects['parent'].select = True

bpy.context.scene.objects.active = bpy.data.objects['parent']

bpy.ops.object.parent_set()

However this line of code
bpy.data.objects['child'].parent = bpy.data.objects['parent']

will parent the same as using the properties window. The reason being that the properties window runs bpy.context.object.parent = bpy.data.objects['parent'], but everywhere else blender uses parent_set().
However you can avoid using bpy.ops.object.parent_set() and have the child object remain in it's position after parenting. To do that you will have to explicitly set the child's matrix_parent_inverse to the inverse world matrix of the parent. See the code below:
parent = bpy.data.objects.get("parent")
child = bpy.data.objects.get("child")
if child:
    child.parent = parent
    if parent:
        child.matrix_parent_inverse = parent.matrix_world.inverted()

Other options
There are two other way of getting the same type of relationship as an object parent, those two are the Child Of Constraint and the Parent Actuator.
Child Of Constraint
The Child Of Constraint works the same as an object parent, with the added benefit that comes with being a constraint: animatible, multiple parents on the same object, affecting only certain transforms, and affecting only certain axes.
As noted in the manual after specifying the target object, you will probably want to press the "Set Inverse" button in the constraint (this goes back to same thing as the difference in the parent from the proprieties window vs the 3D view). Now you have a object that will behave just like the child object in an object parent.
One quirk with the constraint, is that if you select both the child and the parent objects and move them, the movement on the child will be compound, meaning it will move twice as fast as the parent. After the movement you simply press the "Set Inverse" button again, to bring the child back to the correct location.

My favorite feature of the child of constraint is that you can influence only certain transforms. That is demonstrated in the gif above.
Parent Actuator
The Parent Actuator, being a logic brick, only works in the game engine.  It does the exact same thing as a regular object parent.  While regular parenting works in the game engine (there are some quirks). The parent actuator gives the benefit that the parent can be dynamically controlled in game, via logic bricks or python.


Detect with python script if a blend file has packed images I'm trying to know if a blend file contains images and if it contains to unpack the images out to the directory.
So just before I'm running this line:
bpy.ops.file.unpack_all(method='USE_ORIGINAL')

to ask if this blend file is with packed images.

Image.packed_file

Look at the value of the Image.packed_file property. Will be None if not packed.

Console test.

>>> for i in bpy.data.images:
...     i.name, i.packed_file
...
('3cb598.jpg', bpy.data.images['3cb598.jpg']...PackedFile)
('3b17ebcf9eb9.jpg', None)
('huge.49.247445.JPG', bpy.data.images['huge.49.247445.JPG']...PackedFile)
('Render Result', None)

>>>


How to join joints ( Armature )? I'm new at Blender and I'm trying to make a chibi human character. As the pictures show, I'm trying to join 2 joints. Do you know how to do this?

The image is unclear. I cannot tell what end of either bone I am looking at.
To make a child bone connect to its parent after parenting, select the child bone, then go to Properties editor -> Bone properties -> Relations panel -> Connected, and check it.
To parent one bone to another in a connected manner, select the desired child bone, then the desired parent bone (so the parent will be active), and strike Ctrl + P. In the appearing Parent menu, click “Connected.”
PS: a child bone’s tail can never truly connect to its parent’s tail.


Cloth simulation artifacts Can anybody tell me how to avoid these nasty artifacts that make the flag look like it is broken on the folding part. They are shown in the Viewport and final rendering. Here is a still from the 15 second animation. I should mention that I created this flag with the "Import>Images as Plane" add-on.

It is a simple mesh, just a plane with subdivisions. The problem began when I started messing with the Force Fields and Physics.

After further investigation and testing, I discovered that the artifacts were created by the "Blend Mode" settings in the "Material" tab. Selecting "Opaque" instead of "Alpha Blend" seems to fix the problem but creates a different type of artifact that could be corrected by checking the "Backface Culling" button which once again brings other sort of issues.


crazy spikes when adding wireframe modifier I'm working with this model:
https://www.turbosquid.com/FullPreview/Index.cfm/ID/1005602

Totally groovy, right?

So I am trying to add a wireframe modifier for use in some game experiments with LibGDX. However when I add the modifier for this particular model, I get these crazy spikes shooting all over the place. Actually is kind of freaky cool. But won't work so well for my purposes.

Any ideas as to what's going on?

As said in the Blender Manual:

  Wireframe thickness is an approximation. While Even Thickness should
  yield good results in many cases, skinny faces can cause ugly spikes.
  In this case you can either reduce the extreme angles in the geometry
  or disable the Even Thickness option.

In this case you have to uncheck the "even thickness" option:


Can models with experimental features be exported? I was following a guide to create a model of a rope, it uses some experimental features available in ver. 2.78, mainly - displacement.
What I'd like to know is whether it is possible to export a model like this, preserving the detail and if not then is there a way to preserve as much detail as possible.

I am converting my models to FBX for later use in a game engine.

Adaptive subdivision and micropolygon displacement are only processed at render time. They can't be exported in FBX. If you really want all that geometry, you have to use regular subdivision and a regular displacement modifier. However the level of detail used in Andrew's tutorial is unusable for a game engine. You should use the old method shown at the very begining of the video that is create 3 circles, add a screw modifier, an array and a curve modifier like this :

and add a normal map to get the details.


How coould I scale a bone to fit inside the models body? the bone is too wider than the models body(hand) and it is giving me a trouble while weight painting(the model shrinks). And when I try to resize/scale the bones it doesn't go as I needed it(unable to make it thiner with out affecting the length). I don't get the problem on vertical bones. only when adding horizontally the bone gets wider than needed.

You cannot scale the default armature but if you change the bone display type to B-Bone, you can use CtrlAltS to scale it and make it thicker or thinner. It's also fairly easy to have the default armature display type fit inside any model by scaling it down in Edit mode and making it longer and thinner.


How to make the arms of a rigged character slide on the surface of the body So I saw a pretty good rig the other day of an egg shaped character, but what caught my interest was that when you move the arms around the body (from the shoulder), it seemed that the arms where attached using a boolean modifier, so you could have the arms move to the front of the character and the mesh still looked great. I don't have access to this rig and it was made using maya (I think) but I wanna try making the arms effect on blender on another round shaped character. I tried using booleans but it always created some artifacts, that makes me think that the original rig wasn't made using booleans. Any ideas how to recreate this?
Here goes an image of how the arms moved. Even when moved, the arms still looked like they are coming out of the body, not like it was just another object.

And here is the model that I want to use to recreate that effect.

For Cycles, a trick would be to use a distinct mesh for the arm and use the Bevel node. It will create the illusion of bevel where the meshes are joining, so you'll be able to move the arms however you want and they will still be looking like they are part of the body. Keep the Radius value low (here 0.1).

In Eevee (or Cycles) you could try with a large topology around the arm joint so that it has latitude to move. Give it a Shrinkwrap modifier with a sphere as Target so that it stays spherical:

Or you could use the arm as a distinct object and try the Shrinkwrap modifier, with the Wrap Method > Surface and with a group assigned where the arm is supposed to stick, but it looks hard to get good result: