What's the correct way of cutting holes in Blender?

There is not a single best way and there is really no method that will always give you good topology without a need for some further work.
Since you asked for non-destructive, you've pretty much limited yourself to using boolean operations to cut the holes.  There are add-ons, such as HardOps, that will help you with this process, but none of them will always produce perfect topology every time. Or you can do the same thing manually.
Create your object:

Create a second object to use to cut the hole

Position the cutter where you want the hole

Apply a boolean to the first object, using the 2nd object as the cutter, and set it to difference:

Nothing will appear to happen because the cutter is still visible.  A common technique to resolve this is to change the viewport visibility of the cutter by setting 'display as' to wire:

When you do this, you can still see the cutter's outline, but also the cut it has made:

But you also have to disable rendering the cutter:

As you can see from the matcap display, this works reasonably well:

There are a few other things that can help visibility.  Setting the the cutter to 'shade smooth', and enable auto-smooth for the object often helps, for example.


Remesh modifier does not have a function affecting only a specific group of vertices.

A: I don't think it is possible to Remesh only specific object faces.

Quite hard imagine how this "remeshed" part of model (vertex group) would be merged with original. I think it would result with much more artefact on surface - since it will mix two different topologies.


Can't select individual objects in object mode– why are they grouping together?

I guess you clicked join button in tools while table and chair was selected .It happens a lot if you are messing or trying  stuffs in blender.To fix your project.
select that object which you joined (in your case that chair and table).
then press tab TAB this will lead you to edit mode .

press 'A' to select all everything .
now press p and click on "by loose parts"

press TAB again to go back to object mode.
this will allow you to move individual object but we are not done here you will notice something strange may happen when you will move some object

to fix this you need to reset its origin geometry(sounds tricky but it is really easy)
now select all the object by pressing shift and clicking on object .
now press "SHIFT+CTRL+ALT+C"
click "origin to geometry"
and DONE!!!
hope it help.
next time if you mess things up do not save or close blender . press "ctrl+Z" to reverse your last action .
happy blending ;-)


Does Blender have a tool similar to Smooth Boundary in Meshmixer?

Yes. You can use either the smooth function (search it in the program, or use it from the toolshelf), or, for more control, use proportional editing. The latter even comes with a few falloff setups to choose from!

Please Take Notice: The latter is really intended more for if you're physically editing the mesh in some manner, but with a strong enough effect radius, the actual movement requirement can be minuscule.


In Drawing Mode > Active Window and Workspace Settings > Options,

Turning up the "input samples" to a higher number works. Also switching on the "Post Processing Settings" and adding more Subdivision Steps should help as well.


How do I get file such as texture out of already packed blender file?

You can either go in the UV/Image Editor, and, in the bottom horizontal menu, select the image you want to save un the drop-down menu, then Image menu > Save As Image... or in the Node Editor, click on the Open (now Unpack) button of the Image Texture node: as the images have been packed, this button will unpack the image the way you want


Although, now, you can edit multiple objects simultaneously, you can't merge vertices between them. In this case, I suspect you will have to CtrlJ join the objects in Object Mode, before merging vertices in what would then be a single mesh.


How to change the material of 1 or more faces of a object

Add all the materials you want for the object to the materials list. Then, in edit mode, select the faces you want for a specific material. With the faces selected, click on the material you want to use and then click “assign”.


8 cores (4+4HT). No antivirus installed.
No process that consumes more than 1% of the CPU.
The CPU is at 1%-7% of use.
Anyway, now i think this is not Blender's failure because now Firefox ( ^^U ) is doing something like that.
I'm going to reinstall Windows today.
Thank you anyway.

(sorry for my english again)


Blender 2.79 cycles normal map bake artifacts

Turn off Ambient Occlusion in World tab.


You have two separate 3D views, one on the left and one on the right. Each 3D view has it's own properties panel with its own settings (including background images). You have the properties panel open for the 3D view on the right, but you are wanting to edit the properties for the 3D view on the left.

Press N while your cursor is in the left 3D view to open its properties panel and remove/change the background images from there.


Looking at your question, the first thing that popped into mind is the need for Subsurface Scattering, so light is able to pass through the pages.

First of all, make the "Diffuse" shader a slightly yellow color, and then connect the shader output to an "Add Shader." Create a "Subsurface Scattering" shader and connect it to the other input slot o the "Add Shader" node. Try to pick a slightly yellow, slightly grey color for the "Subsurface Scattering" shader. Thyis will let yellowish light from other light sources seep through the pages, making it appear translucent. Make sure to crank up the samples when you do this, because this shader can cause a lot of fireflies.

For added realism, you can connect a simple "Noise Texture" node directly to the displacement, which will give the page a nice texture. In the end material set-up should look something like this:

Finally, here's the material in all its glory:

Just about every organic or living object has this property, so I hope I helped you out. Let me know if you have any questions. Happy Blendering! Cheers,
Graves Broderick


Looking at 1. to render each strip into it's own folder we can make a list of each nla strip, here I store the mute setting to restore later and mute each strip as we go through.

Then loop through our list of strips and render the frame range of each one, by setting the render.filepath here each strip can go into it's own folder.

To also achieve 2. you could look at the script in this answer and incorporate it into the rendering loop.

import bpy

output_dir = '//renders/'
scene = bpy.context.scene

# make a list of strips used in the NLA
# strips are found in -
# object.animation_data.nla_tracks[TrackName].strips[stripName]
nla_strips = []
for obj in scene.objects:
    if obj.animation_data and obj.animation_data.nla_tracks:
        for track in obj.animation_data.nla_tracks:
            for strip in track.strips:
                nla_strips.append((strip, strip.mute))
                strip.mute = True

# save to restore later
orig_frame_start = scene.frame_start
orig_frame_end = scene.frame_end
orig_filepath = scene.render.filepath

# render each strip
for strip in nla_strips:
    scene.render.filepath = output_dir + strip[0].name + '/'
    scene.frame_start = strip[0].frame_start
    scene.frame_end = strip[0].frame_end
    strip[0].mute = False
    bpy.ops.render.render(animation=True)
    strip[0].mute = True

# restore changes we made
scene.frame_start = orig_frame_start
scene.frame_end = orig_frame_end
scene.render.filepath = orig_filepath

for strip in nla_strips:
    strip[0].mute = strip[1]


See [Collision Collection] value on Deflection Panel of the Particle information as indicated by the arrows above.  The outliner window shows how the [collection] is visible.  This is how you restrict influence between particles and a Physics Collision object.

The collision object needs to be placed in the collection specified in the particle system.

Click on the image to see a larger image to read the detail.


Change extrapolation type from Python running in the background

You can't really directly set the context.area.type, or any context property for that matter - it is a read only reflection of the current state of your scene.

To use the graph editor's operators under bpy.ops.graph, you need to override the context for the operator to "make it think" it's running within the graph editor. Here's an example how to do this for another operator.

But instead I would suggest changing the interpolation and handle types using lower level code instead of using the graph editor's operators. Here's a chunk of code that will do this for all of the active object's animation curves:

import bpy
C = bpy.context
o = C.object

# Iterate over all the objects animation function curves
for fc in o.animation_data.action.fcurves:
    fc.extrapolation = 'LINEAR' # Set extrapolation type

    # Iterate over this fcurve's keyframes and set handles to vector
    for kp in fc.keyframe_points:
        kp.handle_left_type  = 'VECTOR'
        kp.handle_right_type = 'VECTOR'


Copying logic bricks causes acts strange in the logic editor

When you copy inter-object connections, they will be preserved.

The result is (when enabled) that you see indirectly connected objects too, not just direct connected objects.

You can switch of indirect links:


'Rigify' with automatic weights makes my mesh disappear

Make sure you have checked AUTO RUN PYTHON SCRIPTS in the User Preferences

Just go to File/User Preferences/File
and then check the box

☑ 'Auto Run Python Scripts'


Make sure your using the global axis which is located at the top of your screen in the middle


How do I turn my PNG Image into a mesh object?

If you want in to be well done import the image as a viewport background image and manually trace over it using a bezier curve object.

If you are more comfortable working with applications using an illustration workflow like Inkscape, you can manually trace it using a pen tool and then export/import as an SVG.

Alternatively, you you want a faster method Inkscape also has a builtin image tracer that can trace a raster file and create the corresponding vector automatically but the quality some times leaves a lot to be desired and your mileage may vary.


In the View section of the N panel in 3d view, change the Lens value back to 35. it's probably at 3 or something


you can create multiple animations for a single object.
There are 2 ways to do it.

Either key frame your animation on time line as mentioned by @Xortrox above , or do some advance working in dopesheet/action editor, which allows you to create multiple animations, all seperate in their own animation set.

I prefer the 2nd option of dope sheet editor, as it gives more flexibility.


Unregister the classes.

Rather than mess with the UI code, you can unregister the classes.  When a class is registered it is added to bpy.types  Using autocomplete in python console, dir(bpy.types) or looking at bl_ui.space_view3d_toolbar we can find the classes we wish to unregister.

Let's take the grease pencil tool bar panels as an example. The naming convention shows the panels we wish to remove start with VIEW3D_PT_tools_grease_pencil  Similarly for animation.

Test script to remove grease pencil and animation 3d view toolbar.

import bpy
from bpy.utils import unregister_class

gpclasses = [c for c in dir(bpy.types)
        if c.startswith("VIEW3D_PT_tools_grease_pencil")
        or c.startswith("VIEW3D_PT_tools_animation")]

for c in gpclasses:
    cls = getattr(bpy.types, c)
    unregister_class(cls)

Change above script to suit.

Hit F8 to reinstate the panels.


Unaligned camera: red and yellow squares

I don't know if this is a bug or just something that I don't understand deeply. The thing is that changing the clip start value within the camera lenses solves the issue.


Check Faceorientation

Press Alt+V and select face orientation, the whole object should  be blue, means the faces are oriented the right way. Blue = outside, Red = inside.

Alternative model

Maybe it would be better to use a single vertex with some extrusions to shape branches, with modifiers shown in image bellow. To make parts thinner select the vertex and press ctrl+a
Something like this:

To get a more organic look add a lattice object. Select lattice and change the resolution.

Then add a lattice modifier to the tree-like-object. Note: Object has to be the lattice you created. After that, move vertices from the lattice in editmode.


If all you want to set for the operator is a single property, you can do:

col.operator("transform.resize").value = (2,2,2)

If you want to set multiple properties, use the object that is returned by .operator() and set the properties on it one after another:

props = col.operator("transform.resize")
props.value = (2,2,2)
props.constraint_orientation = 'GLOBAL'


Use the knife tool or loop cuts to build your mesh, and then here is a trick to move a vertex or edge to a precise position relative to the corner:

select the vertex or edge you want to move
move it all the way to the corner, validate
move it back (for example with GX), enter the distance on the keyboard.


Cycles nodes: is there a way to find coordinates change, derivative, direction?

Not strictly an answer to your question, but..

To get a random value per face to be read by Cycles, you could use an adaptation
of Chebhou's answer to this question.

Run this script on the active object:

import bpy
import random

obj = bpy.context.object
obj_data = obj.data
group_name = 'face_ID'

#check for existing group with the same name
if None == obj_data.vertex_colors.get(group_name):
    obj_data.vertex_colors.new(name=group_name)
color_map =  obj_data.vertex_colors[group_name]

for poly in obj_data.polygons:
    rnd=random.random()
    color = (rnd, rnd, rnd,0)
    for loop_ind in poly.loop_indices:
        color_map.data[loop_ind].color = color

and then use the Cycles 'Attribute' node to retrieve the generated vertex color layer by name:

result of this example on a subdivided plane:

I've moved the randomization into the script - I was having trouble getting a good pseudo-random number out of  a 0.0-1.0 input range using nodes. If nobody points out something obvious in a comment, I'll post that as another question.


Fur looking different than the preview when rendered

I got it.

Just when I set Particles>>Render>>Degrees:7 and B-spline>>Steps:7.

I think it has relations with Particles>>Display>>Color also set to 7.

The picture below:


This might solve it, check here:
https://www.blender.org/manual/advanced/scripting/python/security.html
(Updated: https://www.blender.org/manual/advanced/scripting/security.html 10.23.16)

Relevant text as follows:

Setting Defaults

In the File tab of the User Preferences, there is the toggle Auto Run Python Scripts.

This means the Trusted Source option in the File Browser will be enabled by default, and scripts can run when blend-files are loaded without using the File Browser.

Once enabled you have the option to exclude certain directories, a typical configuration would be to trust all paths except for the download directory.


Why don't Edges appear when I switch to wireframe shading on an object?

Backdated to Blender 2.8 rather than 2.83 which sorted the issue. Seems to be a bug in the latest version.


Motion tracking: I have a solve. Now how to get the camera position for each video frame?

When you solve a camera using tracking, blender creates a Camera Solver Constraint.
To clear such constraint, convert the camera motion to keyframes.
Select the camera and use Constraint to F-Curve in the Object Constraint Properties.

More info:
https://docs.blender.org/manual/en/latest/animation/constraints/motion_tracking/camera_solver.html


Particle system doesn't render but shows in 3D view

Create an object with a material and shape you want for the particles and assign that to the particle's Dupli Object section.

I added a green sphere on a different layer and selected it as the particle's shape.


Cycles, UV Project Camera Modifier projects forwards and backwards

If you are using an ortho projection, I think it's easier to use nodes than a modifier.

Using object coordinates, for a specified object (an empty here) is much like using a UV project modifier.

I showed you a backface to demonstrate what I'm doing.  In addition to the object coordinates, I'm also getting the distance to the object (by taking the square root of the dot product of the vector to that object with itself.)  In this case, as shown, I'm limiting the distance enough so that it doesn't show through the other side of the mesh.  (I could also limit drawing to only faces on the negative Z side of my object, by multiplying alpha with object.z<0 instead, in which case it would only project in one direction.  Cameras point in their -Z axis.)  Note that I can just scale the empty in its local Z axis if I want adjust the "clip" of this.

If you need something with perspective, you can still use the UV project modifier-- but just like I did with this object, you can measure the distance to your UV projector in nodes, and then limit what you draw with it to one direction or to faces within a given distance.

Here my projection is only hitting faces in front of the camera that I'm using to project.

Hopefully it's clear from this how you could establish other distances or planes to limit the drawing of the projection as well.


Sculpt high detail with custom brush over low poly terrain for Unity

I would model a low poly Terrain...UV unwrap.....copy the terrain name it same name as first just add "HI_poly" to name (so it is easy to tell between the 2) add a multi res to the Hi poly...sculpt out your hi poly...(if you have an issue with it crashing you are running out of ram when it bakes the normal map)

stay under a million verts on the hi poly(hopefully that will keep it from crashing...that's what I had to do when I had just 4 gigs of ram)

once you are happy with your hi poly sculpt...

take your Lo poly terrain paint just a basic color on an image save the image...add a materiel to the lo poly and add that basic color image to that materiel....now first select the hi poly mesh, then shift select the lo poly mesh and bake an ambient occlusion map....then bake your normal map....(make sure you have selected to active in the bake panel) save the images I use _AO _NORM...ECT ECT

now paint out your lo poly color map in as much detail as you can....use that image for color take the images into GIMP and create our color map by overlaying the AO....you can also make your spec map...de-saturate the color image... invert the colors and adjust to likeness....

hope this helps.

oh and save often.


Issue with particles in blender donut tutorial

It has to do with the Solidify modifier, I guess if you leave the Solidify on top of the modifiers stack and don't activate the Emission > Source > Use Modifier Stack (which would make the object emit both on bottom and top, it's not what you want) it considers that one side must be the emitting one and not both, and it may not be the one you want. In that case maybe simply flip the normals in Edit mode and the particles will be displayed on the top, or put the Solidify modifier on the top of the modifiers stack


From the file you provided, here is the result:

Effectively, this is not as regular as the sample image in the question!!

This script works only if we have a rectangular grid along X and Y.

Here is commented code (tell me if some additional explanations are needed):

import bpy
import csv
from operator import itemgetter

csvfile = open('G:\\Telechargements\\Heatmap_ES_output_01.csv')

inFile = csv.reader(csvfile, delimiter=',', quotechar='"')
# skip header
inFile.__next__()

#Read and sort the vertices coordinates (sort by x and y)
vertices = sorted( [(float(r[0]), float(r[1]), float(r[2])) for r in inFile], key = itemgetter(0,1) )

#********* Assuming we have a rectangular grid *************
xSize = next( i for i in range( len(vertices) ) if vertices[i][0] != vertices[i+1][0] ) + 1 #Find the first change in X
ySize = len(vertices) // xSize

#Generate the polygons (four vertices linked in a face)
polygons = [(i, i - 1, i - 1 + xSize, i + xSize) for i in range( 1, len(vertices) - xSize ) if i % xSize != 0]

name = "grid"
mesh = bpy.data.meshes.new( name ) #Create the mesh (inner data)
obj = bpy.data.objects.new( name, mesh ) #Create an object

obj.data.from_pydata( vertices, [], polygons ) #Associate vertices and polygons

obj.scale = (1, 5, 0.2) #Scale it (if needed)
for p in obj.data.polygons: #Set smooth shading (if needed)
    p.use_smooth = True

bpy.context.scene.objects.link( obj ) #Link the object to the scene

Blender 2.8

For 2.8:

The last line:

bpy.context.scene.objects.link( obj )

should be replaced by:

bpy.context.scene.collection.objects.link( obj )


Edit: I've edited my post as, at first, I didn't understand your question

The easiest way would be this one:

Create 2 circles
Merge them
Delete some vertices
Fulfill the shape with F
Extrude with E and press Z to constraint on the Z axis

but it also depends on what you want to do with this shape later on


Cannot add Visual Effects to Grease Pencil Drawing (Blender 2.80 Beta)

Finally it has worked out. Change the view mode from solid to LookDev or Rendered.


How to lock viewport to object via the Python API

Property of the 3D view space
Similarly to Change tile grid shape and similarly to the answer it was similar to.
Mousing over the property in UI (with developer extras enabled) shows the proprerty as
SpaceView3D.lock_object

Python console, lock 3d viewport area of screen to context object.
>>> for i, a in  enumerate(C.screen.areas):
...     i, a.type
...
(0, 'PROPERTIES')
(1, 'CONSOLE')
(2, 'OUTLINER')
(3, 'VIEW_3D')

>>> space = C.screen.areas[3].spaces.active

>>> space.lock_object = C.object
>>> C.object
bpy.data.objects['Cube']

>>> space.lock_object
bpy.data.objects['Cube']

>>> type(space)
<class 'bpy.types.SpaceView3D'>

set to None to remove
space.lock_object = None

For scripts run in the context of the 3d view
space = context.space_data


Photogrammetry retopology/projection like Zbrush

Retopology and Baking of 3D Scans/ Photogrammetry with Blender and Free Software
First, it's important to ask what you want to do: 3D print, static render or animation or detailed animation.
For the later ones you need to do some texture baking from your original high-poly mesh to your refined low-poly mesh. Blender can handle this really well (See at step 2).
Step 0: Cleaning raw scan-data
Free Software: MeshLab (http://www.meshlab.net/)

Fix small floating objects, fix non-manifold, fix holes
Paid Software (optional): 3D Coat (https://3dcoat.com/de/)
Sculpt on voxel basis, good for repairing bad areas, has autopo/retopo tools/uv tools

Step 1: Retopology
[Manual Retopology]
For detailed Animation you need a specific edge-flow, witch Auto-Retopo solutions wont give you. Therefore you could use various AddOns/Workflows in Blender for some quality of life.
Free AddOn F2: (https://sites.google.com/site/bartiuscrouch/scripts/f2)
Paid AddOn RetopoFlow
General Retopo-Tutorial: https://youtu.be/CuQzPDs99yM?t=1463
[Auto-Retopology]
If your goal isn't detailed animation, but static renders or "simple" animations that don't require good edge flow you could use an auto-retopology-solution, sadly not with Blender.
Free software: Instant Meshes (https://www.blendernation.com/2015/11/16/instant-meshes-a-free-qaud-based-autoretopology-program/)
Step 2: Baking Maps
Normal-Map, Color-Map etc. from highpoly meshes to lowpoly meshes:
In general:
You place your lowpoly object and your highpoly object at the same spot. The lowpoly object has to have uvs to bake to a texture. Rays are cast for every pixel of your destination texture from their corresponding location on the lowpoly mesh (via uv-coordinates) to the high poly mesh. The more difference in distance there is between the two meshes the more bad results can happen. Here it is important to play with the ray-starting-location controlled via the setting Ray Distance in step 5. Also the uv layout of the highpoly mesh doesnt have to be clean or ordered for this. Even the lowpoly object uvs, only have to be clean if you want that for further texture-painting.
Specific Blender Workflow:
I'm using using as a highpoly mesh a displaced susanne (very rough and quick)
This is not the same as a 3D Scan but should suffice for getting the principle across. After cleaning your raw-scan data in step 0 it shouldn't be that different, except a more chaotic edgeflow.
Open your model in InstantMeshes
Set target vertex count and manipulate edge flow with comb tool, then export.

Import in Blender and do your UV-Layout. (for reason of speed I just used "smart uv project") (here you could do your grouping etc.)

There are a few programs/formats were you have to uncheck "normals autosmooth" after import, so you can activate smooth shading which is important for baking a smooth transition.

Both objects low and high have to be on the same spot.

For baking you need a texture to bake to. So you have to create a material on your low-poly mesh and place an texture node there and press new, then apply size.

Now for baking to work there are a few things that are important:
The texture to bake to has to be selected, but not necessarily connected to anything in the node editor.

Select Source/High first, then Goal/Low second with shift, both have to be selected

Switch to cycles render menu > bake > select type (here normal)

Check: selected to active

Set Ray Distance appropriate in relation to differing distance of high to low (here 0.3m) You maybe have to play with this value a bit. As a rule of thumb: normals have to stay blueish. (What you see at step 8 in the back would be wrong and a result of wrong Ray Distance or a to big of a distance between high and low mesh at that point)

Margin is the pixel distance the bake will print beneath your uv-edges, so that no uv-lines show up later. (here i keep it low at 2)

Press bake

Important: Save Image externally, then load into your image node.

Plug your bake into your shader.

Finished

Here you can see a after/before of the lowpoly object on the left with normal plugged in on the right without:

Note for color-baking: With color I like to use the emission shader on the source and baking emission instead diffuse so that no shadows are baked.


Edit mode, press x or menu Mesh then Delete-Faces


Can not figure out why this python mesh object script will not run

Your script has two minor issues

Line 11,12 should be removed

#mesh.from_pydata(verts,[],faces)
#mesh.update(calc_edges=True)

The console window from Menu:Window/Toggle System Console shows a traceback:

  File "\Text", line 51, in <module>
  File "C:\Program Files\Blender Foundation\Blender\2.70\scripts\modules\bpy_typ
es.py", line 418, in from_pydata
    p.vertices = f
TypeError: bpy_struct: item.attr = val: expected sequence items of type int, not
 numpy.int32

this means that for some reason the face's values are of type numpy.int32 instead of the expected int type.

This is easy to fix. Just add casts to int type in line 40:

face = (int(iv1),int(iv2),int(iv3),int(iv4))


How to tweak verts while in Anotate tool active?

They use right-click for selection in the video. It's a preference setting: Preferences... → Keymap → Preferences section → Select with Mouse Button left / right.
With right-click for selection you can use the Annotation tool with the left mouse button, and drag vertices around with the right mouse button. In Selection mode, new vertices can be extruded with Ctrl + left-click. The context menu is opened with the W key.
Video: Right Click Select - Blender 2.80 Fundamentals


How can I make tight clothes that squeezes the body?

ok, lets imagine you want to make a tight boot.

cover the leg with a cube. use some loopcut and slide to give it a siluette of the boot. now use a boolean modifier at the cube - operation intersect and chose the skin of your char as object.
this will cut away anything from your simplyfied boot that doesnt look like a leg for example, but you will not have a closed surface.

after that, you put a shrinkwrap modifier on the boot. this will lift the surface of the boot above the  skin. target is skin, mode nearest surface and keep above surface yes. this is important! now, here is a little trick. with offset you tell, how far the surface is away from the leg. 0.01 does a pretty good job, but the trick is even though only two digits behind the  point are shown, values like 0.005 and 0.001 can be used which makes it realy tight.. now you only need a shapekey at the leg and tada. job done.

there are two problems.
1. i am not sure if you can use uv maps
2. whenever another part of your skin passes the area of the boot, it will be covered by the boot two. maybe you can solve this when you first copy and aply the boolean and than cop and aply the shrinkwrap with an offset of .03 or .04. this creates a tighter boot than your simplyfied version. parent it on the armature of your char if you want to move the legs and than let the copy of the boolean and the shrinkwrap do the job.

play around a little. first the boolean than the shrinkwrap.


Custom exporter does not preserve scaling

Unless you apply scale, rotations, transformation to the mesh the vert coordinates are "local".  Eg for the default plane combinations of -1, 1 for x, y and 0 for z.  If it is the mesh of an object that is scaled by 20 (with no rotation or transformation) then the global coords are 20 times the local.

To get the global coord multiply by the matrix_world of the object.

ob = context.scene.objects.get("Plane")
if ob:
    mesh = ob.data
    # global vert coordinates
    for v in mesh.vertices:
        print(ob.matrix_world * v.co)

btw that print statement is awful..

for i in f:
    v = mesh.vertices[i]
    print("%f %f %f" % v.co.xzy[:], end=" ")
    print("%f %f %f" % f.normal.xzy[:])

Also look at bpy_extras.io_utils.axis_conversion it gives you the matrix to convert from -Z_FORWARD Y_UP to -Y_FORWARD, Z_UP and other combinations.


Rigging technique for flexible cardboard packaging

To make sure that the slot is sharp and to avoid unpleasant mesh folding, you need to rework the topology and bring a new bone that overlap the slot. Now parent With Automatic Weight again, give your object a Subdivision Surface modifier (with a Subdivision of 2), and right click and Shade Smooth:

The way you wanted to mirror your animation is not the right one, you need to create bones for the left part. Apply the rotation of your armature, create a root bone, change the name of your bones to bone1.R, bone2.R, etc, symmetrize your armature:

Delete the Armature modifier of your object, parent again, for example With Automatic Weight, switch to Weight Paint mode, set your brush correctly, give some corrections so that it works the way you want:

If you want the left bones to copy what happens to the other side, give them Copy Rotation constraints:

The blend file:


In the properties panel, World section, Ray Visibility tab, unceck the "Camera" option.


You don't have to keep pressing shift Z, just press once, release, and scale


This is because your mesh edges change direction sharply. It's unavoidable by default unless you add supporting geometry to make the transition smoother.

The image below shows 3 similar cylinders that were smooth shaded. The first has a ngon capping the top, the second is capped with triangles and the last has a ngon cap but has a bevel around the edge. Notice that the 3rd cylinder doesn't have any weird shading since we eliminated the sharp edge.

So to fix, add supporting geometry by beveling your edges to avoid sharp curves and turns.

Another fix is to just add an Edge Split modifier. The cylinder on the left is the default one shaded smooth, the other one has the modifier. This won't always just work out of the box though for more complicated shapes and might require some tweaking.


In your render settings you have your aspect ratio set to something other than 1 and 1 for the X and Y values. This will scale the image while rendering and give you the result you are seeing.


Record mouse movements for Animation = gone?

Set Automatic Keyframe insertion

Play animation (Alt + A)
Move the camera

NOTE: Since the animation plays in a loop, pay attention not to replace the keyframes you've just added...


problem with sharp transitions between rotation keyframes

The Gimbal Lock ... maybe?

You might have tripped on "Gimbal Lock" problem with Euler. And yes Quaternions method let you avoid the "Gimbal Lock" issue. There is a very clear video about gimbal lock issue here ...

https://www.youtube.com/watch?v=zc8b2Jo7mno&list=PLLJePYWucKoOm0NN3blOFqAlvL5Etyf6A

Understanding the topic may help you avoid gimbal lock if you want to continue
using Euler solutions. To summarise what I have learn is that if your object is a camera, you can avoid Euler's gimbal lock with some good knowledge and learn how to avoid them. However if you are working of an object like a fighter jet that has radical rotation in your scene, it's best to apply Quaternions.


How to recalculate Follow Path animation after curve length has been altered?

Semi Quick Overview

When your path has multiple temporal/spatial milestones that can move, create a path and constraint for each, create [influence] keyframes, for maintainability in the future.  Blender to the future.  The more milestones you have the more maintainability is an issue.

In the images above in the 3D view the green ball has two follow path constraints.  One path constraint to the yellow curve and one to the red curve.  Positive constraint [influence] means, influence = 1. The graph window shows that the constraint [influence] on a frame, is 1 for only one constraint at most and switches discretely to 0 in one frame.  The [influence] curve has four values [0,1,1,0].  When the [influence] is 0 the constraint has zero effect.  The [offset] curve has two values[0,1]. The constraints can independently be deleted or (enabled/disabled with the eye) and the other one will have a predictable affect.

In the 3D View are two Bezier curves, red and yellow which visually appear continuous by position and slope.  The two curves which were originally one and were [separated] to preserve slope/position continuity (piece wise continuous).  The green ball first follows the yellow curve and then the red curve. The movement is smooth across curves. Speed continuity is reasonable because the constraint influence curve has value 1 for a designed range of frames.

Curves are different colors and have positive bevel for explanation purposes only. Curves need not be rendered.  The image on bottom is to emphasize the graph [influence] values as they transition.

In this example I have repeated the location for one frame.  Change the end [offset] to a number such as ( 1 - (1/[number of frames in range])) if this suits your goals.

Method 1 Verbose Discussion of above

If you will be changing paths often this work will be to your advantage.
Consider two or more contiguous paths.   This will allow easier independent control of position and thus speed.  Create a longer path from pieces of shorter paths.  These paths will have influence on distinct ranges of frames/time and thus will ease the [Oh no! I have to change the path!] problem.
In the discussions below N1 and N2 are frame numbers such that 0 > N1 > N2 and N2 > N1 + 2.  We use the names path 1 and path 2.  FrameRange0110(f1, f2) means [influence] keyframes set on four frames. 0 > f1 and f2 > (f1 + 1), that is the range is two keyframes at least long for ease of discussion. Frame (f1-1) = 0.  Frame f1 = 1. Frame f2 = 1. Frame (f2 + 1) = 0. Four [influence] values [0,1,1,0] listed in increasing order of (frame or time). FrameRange0110(f1, f2) also means constraint [offset] values which are Frame f1 = 0 and Frame f2 = 1.  Two values indicating beginning and end of curve [0,1].  Every FrameRange0110(<.>, <.>) denotes 6 keyframes.
Independent Frame Ranges.  Lets also call two Frames ranges A = FrameRange0110(s1, e1) and B = FrameRange0110(s2, e2) Independent, if the positive [influence] values do not overlap in frame or time. Either (e1 < s2)  or (e2 < s1). The 0 [influence] of one range may exist with the positive [influence] of  another range, which should be the case for this particular example.
Action. For path constraint 1 with curve 1 create Range 1 = FrameRange0110(1, N1).
Action. For path constraint 2 with curve 2 create Range 2 = FrameRange0110(N1 + 1, N2)
Range 1 and Range 2 are now independent frame ranges and have convenient control.
This can be extended to many curves so long as the all path constraints are pairwise independent. Make small adjustments to suit your needs. Once you get independent control you might try some advanced mix of influence for interesting results.
To edit the range of influence for two adjacent curve you can select 4 adjacent points in two contiguous ranges in the Graph Window and move them in the X direction respecting the notion of Frame Range independence.

Advanced

In certain circumstances visual objects can control the Bezier curve itself.
By using [influence] keyframes with two curves and no independence one can add circle wobble which is different than the curve noise modifier. The second curve could just be a circle or other closed curve with curve cycles modifier.  Curve placement is being added.

Beware

It is not clear that simple scaling of dopesheet frames will  produce acceptable/predictable results.  I have not seen documentation of how parametric distance is calculated in Blender. Complications are Bezier versus Path. Similar mathematical information is published in computer graphics books.  It might be difficult to determine which particular method Blender uses.
Looking at source code may be more difficult than Method 1.

Method 2 (Superstitious)

Reflect on the likelyhood of further path changes.  If you believe no further changes are coming then just use the new curve and set new keyframes.  You have only doubled your work for this task.


The luminance weights are intended to be summed. That is, for any given colourspace, multiply each light by its luminance position, and sum the result with the other two. You will end up with equal values across all three channels.

For REC.709 lights, which are the lights that define the sRGB specification, the formula would be:

Y = 0.2126*R + 0.7152*G + 0.0722*B


create cubemap from 6 images (with python)

You don't need to use Python to turn 6 cubic images into a single environment map. But once you set up a .blend for handling this task you could augment that with Python to make an automated process out of it.

Create a fairly large cube, with normals flipped, in your World center. UV map and texture your images onto it. Give it a shadeless material. Place your camera at location 0,0,0 with rotation X:90 Y:0 Z:0
Set your Camera to "Panoramic" to render an environment. I recently made a post here that goes into some more detail that you may find helpful.
You'll want to make that cube spherical using a SubSurf and then Cast modifier. For the SubSurf modifier use "Simple" subdivision at 5 or 6 subdivisions. For the Cast modifier leave the type as "Sphere" and set the factor to 1.

If you want to use Python to process large quantities of such cube maps, look into how to use Python to replace the source images in the folder where Blender will be looking for them. And research how to use Python to call on Blender to load up the .blend and render out the image(s).


Why are Texture Coordinate or UV map used before mapping node?

Mapping node only transforms texture coordinates(rotates, scales and moves) while UV Map or Texture Coordinate nodes provide the actual coordinates. It is possible to transform various kinds of vectors with the Mapping node.


Why do similar UV islands rotate differently when unwrapped?

Blender by default uses a pretty outdated algorithm for island packing, it doesn't account for cavities in shapes, it creates a bounding box and disregards the rest and also it really doesn't care for angles much, it only looks at optimal solutions, if it's a square, it'll be packed properly, but if it has cutouts or beveled corners blender may align it to those in order to pack it more efficiently (at least according to the algorithm) So there are a couple of factors here:

First your third longest island is touching both sides of the UV space (I marked one visible side by a vertical line). Since it's touching the sides Blender can't scale other islands any more so they're stuck at this size, really their position doesn't matter much it's still very inneficient.

Second factor is Blender's default algorithm doesn't have good tools for evaluating such situations and the efficiency of packing here, if you're looking only at the bounding boxes areas it makes sense to align the second (lowest UV island) to the angle it aligned it to.

This sounds really complicated but it basically means that if you cut the longest segment into a few smaller ones, it might fix it, if it doesn't you might try unwrapping a single poly, pinning it and unwrapping the whole island to fix rotation.

When you're packing you have an option for rotation. But in general if you'd go with a different algorithm that accounts for cavities, simplifies the shape better (or at least looks at 3d angles) you wouldn't have this problem. It is being worked on I read but I have no idea when will it be integrated

There are two good addons for better UV packing that may make packing later much easier but you still need to unwrap it correctly first.

https://gumroad.com/l/uvpackmaster

https://gumroad.com/l/UVShotPacker

If you have any questions let me know


While it's not very pretty, it is possible. This example recreates the default  NURBS Surface. Inspired by https://blender.stackexchange.com/a/8587/47
import bpy
from mathutils import Vector

surface_data = bpy.data.curves.new('wook', 'SURFACE')
surface_data.dimensions = '3D'

# 16 coordinates
points = [
    Vector((-1.5, -1.5, 0.0, 1.0)), Vector((-1.5, -0.5, 0.0, 1.0)),
    Vector((-1.5, 0.5, 0.0, 1.0)), Vector((-1.5, 1.5, 0.0, 1.0)),
    Vector((-0.5, -1.5, 0.0, 1.0)), Vector((-0.5, -0.5, 1.0, 1.0)),
    Vector((-0.5, 0.5, 1.0, 1.0)), Vector((-0.5, 1.5, 0.0, 1.0)),
    Vector((0.5, -1.5, 0.0, 1.0)), Vector((0.5, -0.5, 1.0, 1.0)),
    Vector((0.5, 0.5, 1.0, 1.0)), Vector((0.5, 1.5, 0.0, 1.0)),
    Vector((1.5, -1.5, 0.0, 1.0)), Vector((1.5, -0.5, 0.0, 1.0)),
    Vector((1.5, 0.5, 0.0, 1.0)), Vector((1.5, 1.5, 0.0, 1.0))
]

# set points per segments (U * V)
for i in range(0, 16, 4):
    spline = surface_data.splines.new(type='NURBS')
    spline.points.add(3)  # already has a default vector

    for p, new_co in zip(spline.points, points[i:i+4]):
        p.co = new_co

surface_object = bpy.data.objects.new('NURBS_OBJ', surface_data)
bpy.context.collection.objects.link(surface_object)

splines = surface_object.data.splines
for s in splines:
    for p in s.points:
        p.select = True

bpy.context.view_layer.objects.active = surface_object
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.curve.make_segment()

The ideal situation would be where the spline.points would take a nested list and automatically combine them under the hood, rather than requiring calls to bpy.ops.
Edit: For Blender 2.8+, linking objects uses 'bpy.context.collection'


Just unwrap the black cable and add the text as an image texture.

Add seams to the cable - two around (to cut it from the rest), and one straight (to make it flat).
Connect and position the image texture (either by moving the UV or using the Mapping node)
Done.

You'll need at least three seams here, to unwrap it flat.


What is the hotkey for sculpting grease pencils included in v2.77?

I don't know if you've solved this problem as yet, but the method to sculpt Grease Pencil strokes is as follows:

press 'Enable Editing' in the Grease Pencil tools panel on the Toolshelf or choose Edit Strokes interaction mode in the 3D Viewport header;
choose desired brush (on the Toolshelf > Grease Pencil Sculpt Strokes rollout)
press and hold the E key whilst pressing the LMB or using the pen of a tablet.

Ensure you still have the RMB as your object selection choice. If you've changed the preference for selection to the LMB then you will need to hold the E key and use the RMB to sculpt your Grease Pencil strokes.


Why are my objects flattened or distorted when using the Shrinkwrap modifier?

The shrinkwrap modifier moves vertices against the target object. The effect you are seeing is the intended effect, as it has no notion of maintaining the volume of an object.

To move the whole object, while maintaining the shape of the object, you can use a shrinkwrap constraint, which will move the object as a whole to place it's origin onto the target surface.


Emit each particle while scaling one after another

Add a Texture under the Particle System:

Set it to gradient(Blend), set the mapping to Particle and influence Size:

This is what you get:

The rest is just setting the gradient and default particle size so when they die their size is 1. If they die at random then no, I think this cannot be done without some custom scripted particle generator with frame change handlers.


How do I render in blender 2.8 to get the same result as I see in viewport?

Turn transparent ON in Film in Rendering Settings.

Go to Shader editor, choose World, add environnement node (open your HDRI here), mapping node, and texture coordinate and set it up like so. in mapping node you can change HDRI orientation by changing Z rotation value.

That should answer all your questions.


Found the problem: In Blender 2.74, inside

def getDefName(self):
        data = self.x3dNode.getAttributeNode('DEF')
        if data:
            data.value  # XXX, return??
        return None

Does not return the name in case it found it, changing it to

def getDefName(self):
        data = self.x3dNode.getAttributeNode('DEF')
        if data:
            return data.value  # XXX, return??
        return None

worked for me, however I don't know how to suggest it as a bug fix nor am I sure that it is indeed a worthy fix as clearly someone already noticed that this function doesn't return anything in case there is a DEF.


Do you have proportional editing turned on?  Toggle this on/off to see if your proportional editing zone is simply not visible and gives the impression the entire curve is moving as you try to adjust.


How to detect when object it is on-screen? bge

This is easy enough from python by casting a ray from the camera to the object:

import bge
own = bge.logic.getCurrentController().owner
cam = own.scene.active_camera
own_screen_pos = cam.getScreenPosition(own)
result = cam.getScreenRay(*own_screen_pos, 100)
if result == own:
    print("The object can be seen")
else:
    print("The object cannot be seen")

Be aware this will only check the centerpoint of the object rather than the edges.


Particles not showing up in cycles render

The object named "fountain particle water" (a sphere) has its ray visibility disabled for camera rays, so enable that, as shown in the image below, and the problem should be gone.


You have only one object in this scene, and all these shapes are part of that same object. You probably added each new mesh in Edit Mode, instead of Object Mode.

When you add a new mesh primitive while in edit mode, the new primitive is added into the same object you are in the process of editing.

Since the name of the object is "Cylinder", I assume you created the cylinder first, then added the other shapes while editing the cylinder.

You can see that this has happened since all 3 meshes are editable when you are in edit mode. Normally, when meshes are separated into different objects, you can only edit one at a time:


How do I add a shortcut to add a modifier to an object?

As with a lot of things in blender, you do this by right-clicking on a menu item and choosing Add Shortcut. In this instance, open the Add Modifier menu (the menu found on objects where you choose which modifier to add), right-click on the modifier you want to add a shortcut to, choose Add Shortcut and then press the keys you want to assign to the modifier:

Alternatively, if you want to do this via the User Preferences you can go to the Input tab of the preferences, open the 3D View> Object Mode category and click Add New.

In the operator id box you put object.modifier_add as this is the command that is triggered when adding a modifier. You can then select the type of modifier you want to add from the Type dropdown box and then of course specify the keys you want for this shortcut:


You can use the Lattice modifier for this.
It works almost exactly as you described.

Add a Lattice Modifier to your Mesh.
Create a new Lattice through Add > Lattice and deform it to your needs
Target the new Lattice object and use the Strength slider to control the influence


How to find if a point is inside a mesh?

let's look at the documentation for object.ray_cast(start, end).
The ray_cast function returns 3 values:  (location, normal, index):

location, The hit location of this ray cast, float array of 3 items in [-inf, inf]
normal, The face normal at the ray cast hit location, float array of 3 items in [-inf, inf]
index, The face index, -1 when no intersection is found, int in [-inf, inf]

It will return the index of the first face encountered on the path between start and end Vectors.

If the start vector is outside of the Object, and the face index is -1, you already know the point is not inside the object.
But if it does return a face index, then you start counting how many consecutive faces it intersects by doing a ray_cast from the Vector of the  most recent intersection (plus a small offset towards the destination to push it away from the most recent face) to the end point.
When at some point the face index returns -1, you know there are no more faces between the checked point and the end point, then you add up the total number of intersections.

If that number is even, it went in and out, and is currently out.
If it's odd, it's still inside.

In code that might look something like this:
def is_inside(ray_origin, ray_destination, obj):

    # the matrix multiplations and inversions are only needed if you
    # have unapplied transforms, else they could be dropped. but it's handy
    # to have the algorithm take them into account, for generality.
    mat = obj.matrix_local.inverted()
    f = obj.ray_cast(mat * ray_origin, mat * ray_destination)
    loc, normal, face_idx = f

    if face_idx == -1:
        return False

    max_expected_intersections = 1000
    fudge_distance = 0.0001
    direction = (ray_destination - loc)
    dir_len = direction.length
    amount = fudge_distance / dir_len

    i = 1
    while (face_idx != -1):

        loc = loc.lerp(direction, amount)
        f = obj.ray_cast(mat * loc, mat * ray_destination)
        loc, normal, face_idx = f
        print(face_idx)
        if face_idx == -1:
            break
        i += 1
        if i > max_expected_intersections:
            break

    return not ((i % 2) == 0)

Here a test blend using Sverchok Scripted Node with that algorithm.

caveat: The fudge distance is not very nicely calculated, if might help precision to repeat the algorithm from a few randomly picked points around the object, and take the most common return value.
edit:
I just realized you can track the indices of intersected faces and adjust the fudge factor of the ray until the ray_cast no longer returns the index of a previously intersected face, letting it progress on..
Another approach
using obj.closest_point_on_mesh. Offered by Kosvor on sverchok issue tracker:
def is_inside(p, max_dist, obj):
    # max_dist = 1.84467e+19
    point, normal, face = obj.closest_point_on_mesh(p, max_dist)
    p2 = point-p
    v = p2.dot(normal)
    print(v)
    return not(v < 0.0)

this assumes all faces of the object are pointing outwards


How to create a fire/light effect in a spaceship engine

When dealing with these effects, generally you have 2 ways - create some geometry with high amount of lighting and use volumetrics for them or fake these effects with compositor.

Using volumetric materials

You should have some geometry providing actual rays of light; this may be some basic mesh which has forms of rays, or particles emitted from somewhere, forming cloud of light. Then with using volume materials you'll get desired effect.

To begin, either model basic form of rays as mesh as @PGmath suggested or create particles system on the object, which is supposed to emit light, and render those particles as volumetric halos with using Point Density texture which is what I did. See What is Point Density for more info about this feature. See Halo particles don't render in Cycles for details about texture setup (Note: accessible starting from Blender 2.76).

Add a particle system to the object, with vertex groups point it to be emitted from adjacent place (via Vertex Group rollout in particle system's settings). Set up a force field / emission direction for particles to form basic shape of the rays. You might want to disable gravity for particles to stop them falling down while being emitted.
Create several cubes which will contain particles inside. They will serve as domains for volumetric materials. I added particles coming from the floor too, for adding a bit of volumetric lighting across the scene.

Also you may want to position illuminating objects on different layers; this could improve scene allowing to:

overlay objects that illuminate scene while post-processing; this can save render times quite a bit.
control reflections / refractions if needed. See Post-processing Lightsabers in Blender for more info.

In material setup for the domains add Texture > Point Density and Shader > Emission shader which will be connected to Volume output socket of Material Output node. Set Point Density to Particle System mode and choose adjacent one. You may want to add Math node in order to control amount of final effect.

Play animation to let particles emit. After rendering and a bit of post-processing you'll get something like glow where particles are located.

Faking effect in compositor

While you will get nice result with volumetric material it's very heavy for rendering. And since you asked about animation the rendering times may be even more important. Hence it may be worth trying to fake it with post-processing (at least, part of effect). From this point of view, I think How to render lightning in Cycles is related with only exception for actual object.
In case of this scene, I used following steps:

Model the objects, apply emissive material for adjacent parts. Render the image.
In Composite nodes with keying get part of image which is going to be heavily processed. Create a mask which will control where post-processing will occur. Overlay them together.

The Post-processing group is the one used in the first way and it was used for refining the result (adding Glare, Sunbeams, vignette, desaturation of some parts of image and Lens Distortion).

Final result:

The rendering is ~ 15 times less.

There's a lot of room for improving:

if considering caustics in render it may be a bit more complicated to setup;
the result with volumetric materials lacks gradient fade out and consistence of light; result with compositing has too short rays etc.

It may depend on the actual scene requirements / limitations.


2 joined objects won't display materials correctly

I suppose the problem is the following: you have a mesh with two materials and you want to change these materials but keep respectively the faces that correspond to the first and to the second.

Say we have a mesh with two materials RedOne and BlueOne, like this:

If you remove the material slots and add new material slots, you will lose which face is correspond to which material:

Instead of removing the slots, you should assign them directly the new materials, because faces of the mesh are assigned to slots (and so you keep face/slot correspondences).


Knife cut with closed sides like boolean difference does

The Bridge Edge Loops function provides a powerful tool to close these holes: https://docs.blender.org/manual/en/dev/modeling/meshes/editing/edges.html#modeling-meshes-editing-bridge-edge-loops

It is worthwhile to play with its many options.


The size of the image texture you need depends on a number of things, including:

How close to the camera is the object? The closer it is, the higher the required resolution.
The size of the output render. If you render in high res, you should probably use higher res textures at least for objects close to the camera. If you render in low res, high resolution textures will mostly go to waste as the details won't show on the rendered image.
Type of texture: For instance, if this is an environment map, and you want sharp, clear reflections on glossy materials, you should use a high res environment map for image based lighting. If you don't care about the reflections and just need to get nice lighting and environment colors, you can use a low res, blurry image.
If this texture is used for displacement, normal or color, again it depends on how much detail you need, and this determines the resolution you'll choose for the image.
As you can see I'm not specifying any actual pixel sizes, since as the saying goes, "everything's relative". Your starting point is your render output resolution, and the rest is experience and trial and error.


How to merge/morph/transform an object into another object in Blender?

Took a while, but found the answer watching an Olav3D Tutorial on Transformation Animations:

Basic Steps:

Add two objects (Object A [Default Cube] and Object B [Suzanne])
Add shrinkwrap modifier to Suzanne, select target--> Default Cube
Apply shrinkwrap modifier as shape key
In Object Data Properties Panel, edit shrinkwrap shape key: Increase shrinkwrap value to 1.0 (this shrinks it down to default cube size)
Click "i" to insert keyframe
Go to frame 100
Decrease shrinkwrap to zero
Click "i" to insert another keyframe
Set up camera and add materials, background, and lighting to taste
Edit render output settings (resolution quality, render samples, etc) to taste
If adding a material to Suzanne, add it to the default cube as well
Change render end frame to 130
Change file format output from PNG to AVI JPEG
Set render output quality to 100%
Render animation and voila! We're done, we successfully transformed(merged/morphed) Object-A into Object-B along the timeline.

Final Result (Better late than never!)


How to modify the uneven space between separate loop cuts, while they are already cut?

The shipped add-on Loop Tools > Space will space a selection of vertices evenly over the selected range on a single loop. To space the parallel loops in the same move, make the selection on one loop, as shown, and check 'Parallell (all)'. If the points lie on a curve, the tool can make a cubic interpolation to approximate the new positions of the moved points, if you choose.

An edge loop is an end-to-end chain of edges on one side of one, or between two, chains of quad faces. It's what you get when you Alt right-click a single edge in Blender. Alt right-clicking is a good way to test that your mesh is well-formed. If the selection doesn't run where you expect it to, it indicates there is something wrong where the selection stops or diverts; a double vertex, or internal face. (An edge ring is a set of parallel edges along a chain of quad faces - it's what you get when you CtrlAlt right-click a single edge).

In your particular case, you would make a selection of vertices like the ones circled in yellow, all on a single loop. You can probably make that selection more reliably in vertex mode. With 'Selection' set, those vertices would be spaced evenly along their edge. With 'Parallel' set, the vertices on parallel loops (the visible ones circled in red) would also be spaced evenly in their respective ranges.

If you select vertices on another loop, such as the ones marked in red, the tool will fail - it won't know along which loop you want the vertices to be spaced. Horizontal, or vertical?


I have since discovered a two step method that seems to work. (Whether it's the best method is another matter.) I parent the hair mesh to the armature with empty groups. Select the model mesh, then shift select the hair mesh. Go into weight paint mode and transfer weights, selection: by name. Wa-La. It works, but then the hair mesh picks up all of the model's vertex groups.


Expression Node Result in different type?

The expression node can output any type you want. When you click on the little gear icon you can also change the socket type of the output.

However not all python modules can be used by default. To use other modules like mathutils you have to enable them before. This can be done in the advanced settings like in the image below.


Stop rendering each time camera is moved or anything else is modified

Well, it sounds like you have your 3DView set to display rendered

try changing it to one of the other settings and see if that fixes the issue.

The only other place I can think of to check is the 'autorender' button in the compositor.
try unchecking-that and see if it then only updates the render layer when you hit F12.


To assign mat to the nth material slot on ob:
ob.material_slots[n].link = 'OBJECT'
ob.material_slots[n].material = mat

If you want to create new slots, I think you should do that on the Mesh (ob.data.materials.append(None)).


How to place match the floor of a picture with a plane using f-spy?

Incorrect perspective reconstruction
Your reconstructed camera in the blendfile has different orientation from the one used in the source image. Just look at the angle between the floor ad the camera's horizon: yours is totally parallel.
The narrow focal lenght of the camera is not helping either in hiding the little differences.
Here's my reconstruction in fSpy:

And here the reconstruction of the scene.


Character getting distorted while Parenting to bones

It might be due to the origin of the armature being different from the one of the model. Try setting both origins to the same point and then try it again.


How to reconnect a split face to its mesh?

Being in Edit Mode select the whole mesh (A), hit W-->Remove Doubles. Now you have a consistent mesh.

You may also use a Undo History pop up menu (press Ctrl+Alt+Z) and select the step you want to get back to.


Have you tried doing exactly this selection?

Select the rider armature (in object mode).
Shift-select the horse armature (also in object mode).
Then do Ctrl+J.

If you've already tried this, ensure all the meshes' object transforms are zeroed out first, and then repeat the above.  If that still doesn't help, check out any constraints/controls you have.  If you have a master-slave style rig, you'll probably have to re-apply the constraints after doing the join.

Posting a .blend would help too.


I would like to have it so the texture is linked to an empty point

Put some kind of mask into the object space of the Empty, using the bottom slot in a Texture Coordinate node:

Here, the Empty is a circle, and we're interested in the Y dimension of its object space. The Value input node labelled  'Fade' is provided to adjust the sharpness of the transition.

The character can be made the parent of the Empty, so it will work wherever the character happens to be.

To achieve a complete change of clothes, geometry and all,  the cluster of nodes determining the Factor of the mix could be made into a Node Group, and the mask made between opacity and transparency on all materials concerned. But if things got too tangled, you might consider using compositing instead.


Model a magnifying glass lens (biconvex)
Set its color to white
Use raytrace transparency


Where is radius parameter for sun lamp in newer version of blender 2.8?

The size of the sun is now "angle"

The tooltip describes it as

  the angular diameter of the sun as seen from the earth.

Making that value smaller will make the shadows sharper (a more defined umbra), and making it larger will result in softer shadows (or less penumbra).

Do a search online the concepts of Umbra and Penumbra.


Making collections unselectable at the same time

You can CTRL + Left Click on the mouse icon to make all but the clicked collection selectable.
If you want to restore the clickability to all collections, CTRL  + Left Click on the "isolated" collection.


How do I specify the 3D Cartesian coordinates of each vertex in a plane?

If you're doing it by hand, in Edit (Vertex) mode when a single vertex is selected, you can read/write its coordinates in the N Properties Region, 'Item' tab.

You have the option of seeing them in World or Object space.


For all the lazy people, who don't like reading the API on how to register and call an operator:

import bpy

class RENDER_OT_test(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "render.custom_test"
    bl_label = "Test"

    def execute(self, context):
        self.report({'INFO'}, 'Printing report to Info window.')
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

Run the script, press F3 to open up the search menu, type Testand press Enter.

No additional link to prevent lazy people from getting even more lazy.


Creating Sapling Tree in the Python Console

Using 'INVOKE_DEFAULT' Execution Context   to your operator call always creates default

bpy.ops.curve.tree_add('INVOKE_DEFAULT')

"Basically" this emulates the pressing (invoking) of button / menu in UI, and calls the invoke method, that in this case is required. This will create the default tree "quaking aspen"

Note using 'INVOKE' is calling the preset

bpy.ops.sapling.importdata(filename="callistemon.py") is hardcoded into the invoke method, changing other settings with 'INVOKE_DEFAULT' will have no effect.  Will always get this sucker when invoked.

Fixing to call from command line.

Edit: it appears the bend parameter has been not completely edited out of the addon.  . For now to fix, run the addon and right click on any operator property and "view source". This will open __init__.py from the addon in  your text editor. (Or go to addons/add_curve_sapling in filebrowser and open with text editor of choice)

Search for bend around line 713 and remove the quotes """ from above and below the property definition.

EDIT

As of 2.83 still need to make edit above as well as commenting out line 1611 in utils.py

#cu.use_uv_as_generated = True

Save the text file, hit F8 to reload addons.
Or for 2.8 run

bpy.ops.script.reload()

Now it will execute correctly with

bpy.ops.curve.tree_add(some_parameter=some_setting)

Test in 2.83 using command from question crunched into console I get

producing


number_of_ticks = (animation_length/animation_fps)*game_fps
in your case (100/24)*60 = 250

you can set the animation frame rate in the render tab :

also you can set the game frame rate in the world tab :


Using cycles displacement combined with volumetrics seem to work only if you are using the 'Object' texture coordinate.

I tested the following : Generated - UV - Object

I don't know if it's a bug, but we can see the displacement in the rendered viewport if we add a surface and remove it

So if you want to use other coordinate than Object, you have to use the displace modifier


why is everything white when i try to paint mesh?

Make sure you have a target texture for your paint information to go to.  You likely just need to add one (by clicking new texture in the UV/Image view) or choosing one (by click the texture dropdown in the UV/Image view).

I believe everything is white because that is your material diffuse color.


Is it possible to use "Animation Nodes" when exporting it to a game engine?

As Duarte Correctly pointed out, animation nodes are Blender exclusive data. If you use a format that supports animations, such as Collada or Alembic, you should be able to export the animations as keyframe animations. However, this will only work for the basic location-rotation-scale animations, things like mesh deformations created with animation nodes will not be exported. A similar question has been asked here if you want a bit more info: Blender page animation collada file in Scenekit

If you have any issues, you can also check out this question that the creator of the addon answered: Convert Animation Nodes to Object and Keyframes


Trouble referencing images on local Viewport

When Display Perspective is disabled in the settings of the Empty then it always disappears as soon as you change your view from orthographic into perspective view. Enable it to see the Empty in perspective view as well.
When enabled and the frame is there but appears empty, that's because the face normal (or the orientation axis of the Empty, since there is no real "face") is pointing the other way. Above the Display Orthographic setting, switch Side to "Back" or "Both". At the moment it's set to "Front" but your view is on the back of the Empty. Or you simply rotate it 180° on the Z axis if you want to keep one side transparent.
Another reason if it still doesn't appear is that Only Axis Aligned is checked. This makes the image disappear if the view is rotated off-axis.
Best is you check out all the settings in the red framed area in this image. The settings shown there are the default values.


Cynicat Pro really helped me out with explaining how you can connect the Substance bitmaps to his PBR node groups.

In the material node group you may notice that :

when importing a DirectX normal map you have to convert it to Open GL normal map
the roughness is corrected with power node before connecting it to the shaders (according to JtheNinja" The other thing we need to do is square the roughness value to match the range between SP and Cycles. To do that, add a math node, set it to “power”, connect your roughness map to the top slot, and set the bottom slot to “2.0”."
the metallic map is a sort of mask that tells blender what is metallic and what is not

This seems a very elegant setup with little fuss and very reusable. Comments ?

Now I also learned that you can download compiled Substance files from Textures.com and open these in Substance Player (free) and tweek the maps before exporting the bitmaps. This next to importing images in B2M and creating your own bitmaps. Apart from some issues with the displacement map it seems to work fine


SVGWriter for Blender/Freestyle

  The SVGWriter package provides a set of Python script files for authoring SVG documents with Blender and Freestyle.

Nowadays, SVGs are more portable than PDF, with support in all major browsers. There are also many free tools that can convert them to PDF if that's required. One such program is PDFAid.


Totally white shadeless material in Cycles?

Here is a node setup for a shadeless material:

If you use just an emission shader the object produces light.  So it still is not shadeless as it is casting light on other objects. To make it shadeless, you must make sure it sends light only to the camera. To do this, add mix shader with the emission shader plugged in the bottom node socket. Leave the mix shader's top node socket empty (or plug in a holdout shader if the empty socket bothers you). Then plug the is camera ray from a light path input node into the factor of the mix shader.


Is there a standard set of benchmark files to compare Blender installations?

The benchmarking file often used is the 'BMW Benchmark' file by Mike Pan, available on the blender.org site under 'demo files':

https://www.blender.org/download/demo-files/

There are other files on that page which are sometimes used by developers to test Cycles improvements, called 'Production benchmark'.

If you then want to compare your 'BMW Benchmark' results with other blender users you can use the 'Blender Cycles Benchmark' spreadsheet:

The Blender Artist's thread for that spreadsheet is here, just in case the link gets changed at some point.


How to make bones follow each other instead of individually?

I agree with Frederik's comment on your original post, using either the spline IK or bendy bones would be how I would approach the problem if you wanted to have animation control over the tentacles. For the flailing, you could parent the IK targets to empties that are randomly animated using noise/sinusoidal modifier on the animation curves or the "wiggle" feature in animation nodes.

Another way to approach it if you don't care about being able to pose the tentacles could be to use cloth physics for each arm as is done for a rope in this post: How To Simulate a Rope. You could use hooks as is done in the tutorial, or alternatively use a wind and turbulence force field on the "ropes" to get them to wiggle randomly. In the example below, i used the skin modifier on the cloth "string" to give the tentacles some mass and a subsurf modifier, then duplicated the objects around the hole. The wind and turbulence fields give them the "wiggle".

Of course this is just one suggestion. You could combine methods and have one or two you animate and the others random. Hope this is helpful?


Event key for "TAB" and "TAB + shift" on add-on modal?

I finally found a correct solution using a better code semantic.

The code should be done in 2 nested conditions; the main TAB event and the SHIFT event as in the following code:

elif event.type == "TAB" and event.value == "PRESS":

    if event.shift:
        # ... (code for TAB + SHIFT)
    else:
        # ... (code for TAB)

    return {'RUNNING_MODAL'}

A second good solution, closer to the initial code, consists to put the TAB + SHIFT condition first (thanks to batFINGER).

# TAB + SHIFT event -FIRST-
elif event.type == "TAB" and event.shift and event.value == "PRESS":
    ...
    return {'RUNNING_MODAL'}

# TAB event
elif event.type == "TAB" and event.value == "PRESS":
    ...
    return {'RUNNING_MODAL'}

Hope that could help someone else!


How can I use hooks for cloth simulation?

Ok I think Nathan has solved the problem. Here are 2 other methods:
First an alternative with empties:

Select each corner vertex and hook it to an empty (CtrlH > Hook To New Object).
Select the 4 corner vertices and create a group that will be the pin group of the cloth simulation:

Don' forget to put the Cloth modifier on the bottom of the modifiers stack, under the 4 Hook. Keyframe the empties, play the animation, bake if necessary:

Or you can use bones:

Create an armature made of 4 bones, parent the cloth object With Empty Groups, select the armature, shift select the cloth object, switch to Weight Paint mode, paint a small surface on each corner for each bone:

Create a new vertex group for the cloth pin, assign it the 4 corners:

Keyframe the bones in Pose mode, play the animation, bake it if necessary:

file:


Smooth shading doesn't work in final Cycles render, why?

Verify your normals are correct. Then turn on Normals Auto Smooth. An angle of 30 is good for most stuff.


depends on what the inflow object is, if it's flat you need to check "is planar" and add some surface emission, also if the object is smaller then the voxel size, which is represented by the cube inside the domain, it may not emit particles


Smooth Shading artifacts on low poly model

In smooth shading, the vertex normals are interpolated as shown in this profile view diagram :

More details in this video : https://youtu.be/PMgjVJogIbc

Most of the times, we want acute angles or right angles to stay sharp.

To do that, you can either :

enable Autosmooth and set the minimum angle for smoothing (above that angle the edges will stay sharp) :

Note that Autosmooth only works when Smooth shading is also enabled for the object.

or :

manually select the edges you want to keep sharp in Edit mode and click on Mesh > Edges > Mark Sharp. They will appear in blue (you still need to have Autosmooth enabled but this time you can keep the angle at 180° so only your selected edges are smoothed) :

here's how it looks :

or :

add edge loops and bevels at the right places to avoid smoothing artifacts. This usually produces more realistic results, since perfectly sharp angles don't exist in the real world even when the bevel is very tiny. Here I highlighted the results of the beveled edges in pink to show you :

and here's how it looks (the bevel is big here, you can make it smaller) :

compared to no bevel at all and smooth shading on all angles :


Animating cameras focal length via python code

Your code works fine. But note that you are adding a new camera data when you
do bpy.data.cameras.new('Camera'). If there already is a Camera data, the new one you created will be named Camera.001. Make sure this camera data is assigned to your camera object.


I'm having problem with adjusting the pivot of an Object

The pivot point of an object is its origin: you can set the origin where you want: a common procedure is to select a vertex (or a group of vertices) where you want the pivot to be, then press Shift S - "Cursor to selected", then in object mode select the object and choose the option "Origin to 3D cursor".


Are Blender 2.8 Halo Particles meant to render? [EDIT: Or ANY particle, for that matter!]

I don't know about Eevee because I'm still working with Cycles even in 2.8, but in Cycles halo objects don't render.

The workaround I use is to render particles as objects. I either use planes with halo images mapped to them as textures, or I use tiny icospheres with an emission shader and use the compositor to make them glow.


Model disappears above and below origin of armature when I run gltf made in blender on three.js

The model is probably being culled incorrectly, when the renderer believes it may be offscreen. You can disable that entirely...

model.traverse((object) => {
  if (object.isMesh) object.frustumCulled = false;
});

... although you'll lose the performance benefit of not rendering the object when it's offscreen. An alternative is to manually increase the size of the bounding box:

model.traverse((object) => {
  if (object.isMesh) {
    object.geometry.computeBoundingBox();
    object.geometry.boundingBox.expandByScalar(2);
  }
});

The root of the issue is that the skinning animation happens on the GPU, and the renderer needs to cull objects that aren't visible before drawing them on the GPU. So the animation isn't taken into account in that process currently. Sometimes the skinning data changes the scale of the object, not just its pose, which would exacerbate the problem. More details in https://discourse.threejs.org/t/object-bounds-not-updated-with-animation/3749.

threejs r116


This is because you have created non-planar faces.

A non-planar face is a face with vertices which are not aligned in a plane in any direction.

Under the hood everything is represented in triangles (at least for drawing purposes), so blender must decide how to cut the quads. It can cut them two different ways:

Which way is used appears to be decided more or less at random.

To avoid this undefined behavior, you can split non-planar faces manually to match what you want (J works well for this). You can also press 3D view > Header > Clean up > Split non-planar faces to automatically split all non-planar faces automatically:


You can access it either through F9 or Edit > Adjust Last Operation.


Instead of parenting the Camera to the Player, use this code to copy the location of the Player to the location of the Camera:

import bge
import GameLogic as g
cont = g.getCurrentController()
own = cont.owner
scene = g.getCurrentScene()

player = scene.objects["Player"]
camera = scene.objects["Camera"]

loc = player.position
x = loc[0]
y = loc[1]
z = loc[2]

own.worldPosition = [x, y, z]

Since you don't want it to move on every axis along with the Camera, i would simply fill in each axis in the own.worldPosition = [x, y, z] line that you dont want to be changed with the camera's actual location. For example my line reads own.worldPosition = [x, -30, 5.8]. This keeps the Camera locked on the y and z axes while copying the x location of the Player. Hope this helped. :)


how to use matplotlib interactively with blender?

This answer reports the best solution I found so far, I'll be happy to hear from feedback or better alternatives:

I wanted to integrate matplotlib into Blender in its own space, but sadly learned that the Blender 2.80 API can't (yet) create new space types.

Therefore the solution for me was to let Blender's Python3.7 interpreter run a separate matplotlib window in a child process (see image).

For that, I had to do the following things:

Make sure import tkinter works (here how I did it, no root privileges needed). With that, it should be possible to <BLENDERS_PYTHON> -m pip install matplotlib and import it. Note that running matplotlib in plt.ioff() mode blocked Blender, and running it in .ion() mode did nothing. Running it on a child process solved it for me.
Make sure multiprocessing.Queue() can be instantiated (In my Ubuntu17 system, this required to copy the _multiprocessing.so file from my non-Blender lib-dynload Python environment.

Now running the following from the Blender interpreter should spawn a child process, that interactively reacts to any changes that the Blender user makes to queue:

import matplotlib.pyplot as plt
import multiprocessing as mp
import numpy

def worker(q):
    fig=plt.figure()
    ax=fig.add_subplot(111)
    ln, = ax.plot([], [])
    fig.canvas.draw()   # draw and show it
    plt.show(block=False)
    i = 0
    while True:
        obj = q.get()
        n = obj + 0
        print("sub : got:", n)
        lnx, lny = ln.get_xdata(), ln.get_ydata()
        ln.set_xdata(numpy.append(lnx, i))
        ln.set_ydata(numpy.append(lny, n))
        ax.relim()
        ax.autoscale_view(True,True,True)
        fig.canvas.draw()
        i += 1

queue = mp.Queue()
p = mp.Process(target=worker, args=(queue,))
p.start()

Once the window is open and listening, add entries to the plot, for example like this:

queue.put(bpy.context.scene.frame_current)

The new entry will be interactively incorporated to the plot. Once you are done, simply kill the process with:

p.terminate()

Hope this helps!
Cheers,
Andres


How to stop objects sticking out from the sides

One way to fix this:

Select your mesh
Switch to Edit Mode
Select all
Press P then choose 'By loose parts'. This will divide the mesh by loose parts.
Switch to Object mode.
Select the objects (parts of mesh) which you want then delete them.
Select all remaining mesh parts using A
Join them to be one mesh using Ctrl+J


There isn't one good method for unwrapping an object, it needs some experience, here are the steps I would do:
Make sure it doesn't have a UV map, Seams usually do not get shared by different programs, so sometimes they do have a UV Layout, just no seems. Make sure that's not the case.
Don't create additional Vertices (Knife tool)
Worth a shot: in Edit Mode hit U and choose smart UV project. It will probably create a lot of small islands though, which might not be what you want.
In edit mode select everything and hit ALT J. That gets rid of as many triangles as Blender  can do. If you're lucky, now you can use ALT click on edges to select loops and turn them into seams.
Try to hide the seams (less visible places on your object), because that's were texture artefacts can occur. It's not super important when you're drawing yourself, but it's a good practice none the less.
Create as big islands as possible without distortion/overlapping.


You could use a method similar to the one shown here, mounting the plates on a moving array of supports on the curve, to avoid deformation.

But since you would want some variety in the plates, you could use a Particle System  emitted by the support-array, with settings as illustrated, rather than face-instancing:

EDIT: Thanks, @MrQuery, for pointing out a possible source of error with the rig as described. It turns out, to make it more robust, you should specify the rotation of the particles, as well as the settings above:

The phase, rotation, may vary with your plate model: orientation of its mesh with respect to its axes, (which can also be adjusted in Edit Mode).

The emission is all at frame 1 of long-lived particles, one per face, with no physics or randomness. 'Count' is used to give an ordered, cyclic, selection from the source Collection of particle variants.


EEVEE doesn't support Panoramic, for now.

:(


EDITED:

Did find a quicker, easier way after all:

v2d = Vector((1,2))
v3d = v2d.to_3d()

Or if you do prefer to do it in place, rather than assign to a new variable (you were very close in your original attempts):

v = Vector((1,2))
v.resize_3d()

>>> v
Vector((1.0, 2.0, 0.0)) # Has been converted in place to 3D

Old method:

Generate a new 3D vector from your 2D one:

from mathutils import Vector
2dVec = Vector((1,2))

3dVec = Vector((2dVec.x, 2dVec.y, 0))

If you have a whole list of 2d vecs, you can simply use a list comprehension to convert 'em all:

3dVecs = [ Vector((2dVec.x, 2dVec.y, 0)) for 2dVec in 2dVecs ]


Is there a way to automatically cut everything away outside of an object?

From what I understand (?) I would do it that way (I tried with intersect with no success)


Scripting -- Can't figure out how to use correct contexts?

I encountered a similar error recently, and thought of adding another solution in addition to the one from @sambler , for the sake of posterity.

The line of code that caused the exception was:

bpy.ops.constraint.followpath_path_animate(constraint='Follow Path')

and, the exception was as follows:

Traceback (most recent call last):
  File "/Users/xxxxxxx/Workspace/blender/moveAlongPath.py", line 30, in <module>
    bpy.ops.constraint.followpath_path_animate(constraint='Follow Path')
  File "/Applications/Blender/blender.app/Contents/MacOS/../Resources/2.76/scripts/modules/bpy/ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.constraint.followpath_path_animate.poll() Context missing 'constraint'

Digging into the source code of ops.py that's mentioned in the exception, I ended up at the documentation for bpy.ops and noticed the section on "Overriding Context". The exception's indication of Context missing 'constraint' seemed to ring a bell, and I changed the above line of code to the following:

override={'constraint':mycube.constraints["Follow Path"]}
bpy.ops.constraint.followpath_path_animate(override,constraint='Follow Path')

and, voila! it worked. So, it seemed that somehow the data on the constraint was missing in the context, and injecting the constraint information using the override helped the engine find the constraint where it expected.

Full working code:

import bpy
import math

"""
blender -b template.blend -P moveAlongPath.py
"""

scene = bpy.data.scenes["Scene"]
mycube = bpy.data.objects["Cube"]

scene.frame_start = 1
scene.frame_end = 100

# Add a nurbs curve
bpy.ops.object.select_all(action = "DESELECT") # Deselect all objects
bpy.ops.curve.primitive_nurbs_circle_add() # Adds a Nurbs Circle and sets it to selected object
bpy.ops.transform.resize(value=(3,3,3)) # Increase the size of the circle
path = bpy.context.selected_objects[0] # Get the currently selected object and get a handle

# Select the cube, and set it to the active object
mycube.select = True
bpy.context.scene.objects.active = mycube

# Add the follow path constraint to the cube, and set target as the Nurbs Circle we just added
mycube.constraints.new('FOLLOW_PATH')
mycube.constraints["Follow Path"].target = path
mycube.constraints["Follow Path"].forward_axis = 'FORWARD_X'
mycube.constraints["Follow Path"].use_curve_follow = True
override={'constraint':mycube.constraints["Follow Path"]}
bpy.ops.constraint.followpath_path_animate(override,constraint='Follow Path')

# Render the animation
scene.render.filepath = "render/anim"
scene.render.image_settings.file_format = "AVI_JPEG"
bpy.ops.wm.save_as_mainfile(filepath="moveAlongPath.blend")
bpy.ops.render.render(animation=True)


How to make a button that changes lamp energy in BGE?

scene = bge.logic.getCurrentScene()
cont = bge.logic.getCurrentController()
light = scene.lights['Lamp']

if cont.sensors['Mouse1'].hitObject.name == 'button.up' and cont.sensors['Lclick'].getButtonStatus(bge.events.LEFTMOUSE) == bge.logic.KX_INPUT_JUST_ACTIVATED:
    light.energy += 0.5

if cont.sensors['Mouse1'].hitObject.name == 'button.down' and cont.sensors['Lclick'].getButtonStatus(bge.events.LEFTMOUSE) == bge.logic.KX_INPUT_JUST_ACTIVATED:
    light.energy -= 0.5

Attach this script to your two buttons with these logic bricks. The two buttons must be named button.down and button.up, or you will have to change the names in the script.

The two buttons will increase and decrease the default Lamp energy by 0.5 per click.


Another way is to add a Curve/Circle and then add a Bevel in the geometry properties. Scaling the circle will change the size of the torus while changing the thickness of the bevel will change the torus thickness.


Subdivide a face by connecting opposite vertices

Delete the face, select the vertices around the hole, then Ctrl F > Grid Fill. Maybe you'll have to play with the parameters available on the bottom of the left menu (displayed with T) to correctly fulfill.


Is filmic blender already included in Blender 2.8?

Yes, Blender includes the view transforms Filmic and Filmic Log. The implementation in Blender was originally created by Troy Sobotka, who independently continues the development in his own repository.


2.78b : Blender system Cloud texture addon not showing

The Blender ID add-on was first bundled with Blender in 2.78; it was included with the Blender Cloud add-on to allow people with Blender 2.77 to use it too.

To get to the Texture Browser, the easiest way is to press CTRL+ALT+SHIFT+A. Alternatively, in the UV/Image editor, choose 'Image' > 'Get Image from Blender Cloud'.

The documentation is available from the add-on screen itself, and describes some of the other features too (like Blender Sync):


You can create a path (Shift + A  > Curve > Path) that you want the camera to follow. After that, move the camera to the starting position of the path.

Then set the path as a parent of the camera (Ctrl + P  on a PC) and select Follow Path.

In the path settings, you can now set the duration of the animation. Using a constraint you can even make the camera track another object or always look forward or whatever.


I'm not sure you can have a straight line with the current topology, what you could do in the UV Editor is rip the 2 horizontal rows, rotate them 90° and stick them to the vertical.
Or you can change your topology, going from that:

to that:

then select all, select an active face, press U > Reset, then U again and > Follow Active Quads, and it will give a straight line.


Huge cycles render - not possible to save image?

I think found the reason.

After the last tiles of the render finish blender suddenly needs a lot of RAM. More than I expected for the image buffer. Maybe because it uses floats and not bytes?

During my earlier tries I had a lot of chrome and firefox tabs open (browsers take so much RAM, incredible! :)) and only 2GB of the RAM were free.

When I rendered again, this time I closed most other applications before the rendering finished. With 5GB of free RAM it worked! :)


Rename and use multiple "Animation Nodes Object Containers"?

No sorry, this is currently not supported. Maybe it will be in the future but I'm not sure.

You can however disable the parenting at all in the advanced settings in the node and parent them manually to an object. (Note: you'll have to do this again when you click the update button)


Blender Fracture Build Bake to Animation for Alembic export

You should just try to export the set up FM simulation via "File->Export->Alembic". Then set your desired frame range and while exporting, the FM simulation is being run in the background and the mesh is dumped out once per frame. That's why the resulting .abc file becomes rather big, 145 MB in this case. And note you will have to re-map the materials manually... only the material assignments are exported / imported, but the values of the material settings AFAIK not (they differ between different programs, this might be the reason.)

I have set up an example blend with a tree fracture scene, derived from your initial blend. In blender you should just need to export this to Alembic. But in case you also want to edit something, it becomes much more tricky IMHO.
You could also convert to keyframed objects, but this will mess up the "fixed" normals again (only FM supports this).

Edit: I did not use fixed normals here, because they work better with more regularly divided base geometry, and best with autohide / automerge. But when the simulation runs and the mesh gets hit, you might get temporary artifacts at the splinters. Instead i tried to mimic the behavior with an Edgesplit modifier. The result is not as smooth as the other approach, but is visually "stable".

Here is the example blend:


How to create normal (direction) widget?

Actually it is not a separate widget as I thought but argument for float vector property (subtype='DIRECTION'). In general it can be done in next way:

    vector: bpy.props.FloatVectorProperty(default=(0.0, 0.0, 1.0), subtype='DIRECTION')

    def draw_buttons(self, context, layout):
        layout.prop(self, 'vector')

Test script.

import bpy
from bpy.props import FloatVectorProperty

context = bpy.context

bpy.types.Scene.normal = FloatVectorProperty(subtype='DIRECTION')

def draw(self, context):
    scene = context.scene
    self.layout.prop(scene, "normal")

bpy.types.SCENE_PT_scene.prepend(draw)

context.window_manager.popover(draw)


Need to understand how to show reflected light well with cycles

This is pretty much the worst-case scenario for backwards path tracing.

On contact with the diffuse plane the ray could go in literally any direction, and only a tiny fraction of those directions will hit the glossy object at the right place and angle to rebound into the smallish light source.

To see why increasing the roughness of the glossy material helps, look at it from the point of view the ray right after hitting the diffuse plane:

As you can see, the area which the ray can hit and still find the lamp is much larger even with only .1 roughness. In addition, MIS probably can do a bit more to direct samples to the lamp when there is some roughness and the ray doesn't need to bounce at an exact angle (as is the case with specular reflection).

Note that with enough samples it does eventually converge (in this sense these aren't fireflies so much as noise). Here's a render with 10000 samples:


So, I solved the problem by dividing the animation into pieces and gradually rendering these parts. Then I will just grab these pieces in Adobe Premiere Pro and join them together.
When you search for maximum size of AVI, it outputs 2 GB. That's most likely why the files above this limit are corrupted.