Equal distribution on sphere
Using the script from This answer
Need to alter the parameters. Here is what I used for the 14, 16, 18 side die. (where n is number of sides.  Had to run the 16 side twice, as it didn't find solution the first time, kill the script by hitting ⎈ Ctrl C
 over the system console.  The rat value determines the size of the hole. Too small 0.8 and the holes overlap, too big 0.999and the holes will be too small
# parameters
n = 18  # number of points on sphere
rat = (n - 1) / n # how far along the radius to bisect
u_segments = 32  # UV sphere settings
v_segments = 32
thickness = 0.2  # solidify thickness
TOL = 1e-7

14, 16, and 18 sided die, ret = (n - 1) / n
To make the die "solid" remove the solidify modifier, and grid fill each circular hole.
Solid Version
Here is an edit to create a solid version, where the holes can overlap. The holes are filled with an ngon. Poke it to make tris.

14, 16, 18 sided solid, where ret = (n - 2) / n.
Edit update for 2.8x for prior see revisions
import bpy
import bmesh
from mathutils import Vector
import random
from math import pi, asin, atan2, cos, sin, radians

# parmaaters
n = 23  # number of points on sphere
rat = (n - 2) / n # how far along the radius to bisect
u_segments = 32  # UV sphere settings
v_segments = 32
thickness = 0.2  # solidify thickness
TOL = 1e-5

points = [Vector((0, 0, 1))]
for i in range(n - 1):
    theta = random.random() * radians(360)
    phi = 2 * asin(random.random() * 2 - 1)
    points.append(Vector((cos(theta) * cos(phi),
           sin(theta) * cos(phi),
           sin(phi))))

while True:
    # Determine the total force acting on each point.
    forces = []
    for i in range(len(points)):
        p = points[i]
        f = Vector()
        ftotal = 0
        for j in range(len(points)):
            if j == i: continue
            q = points[j]
            # Find the distance vector, and its length.
            dv = p - q
            dl = dv.length
            dl3 = dl * dl * dl
            fv = dv / dl3
            # Add to the total force on the point p.
            f = f + fv
        # Stick this in the forces array.
        forces.append(f)
        # Add to the running sum of the total forces/distances.
        ftotal = ftotal + f.length

    fscale = 1 if ftotal <= 0.25 else 0.25 / ftotal

    # Move each point, and normalise. While we do this, also track
    # the distance each point ends up moving.
    dist = 0
    for i in range(len(points)):
        p = points[i]
        f = forces[i]
        p2 = (p + fscale * f).normalized()

        dv = p - p2
        dist = dist + dv.length
        points[i] = p2
    # Done. Check for convergence and finish.
    if dist < TOL: # TOL
        break

context = bpy.context
view_layer = context.view_layer
scene = context.scene
coll = context.collection or scene.collection

# make one point north pole.
R = points[0].rotation_difference(Vector((0, 0, 1))).to_matrix()
points = [R @ p for p in points]

bm = bmesh.new()
#bmesh.ops.create_icosphere(bm, diameter=1, subdivisions=5 )
bmesh.ops.create_uvsphere(bm,
        diameter=1,
        u_segments=u_segments,
        v_segments=v_segments)

for p in points:
    ret = bmesh.ops.bisect_plane(bm,
            geom=bm.faces[:]+bm.edges[:]+bm.verts[:],
            plane_co= rat * p,
            plane_no=-p,
            clear_outer=False,
            clear_inner=True)

    # fill the holes
    bmesh.ops.contextual_create(
            bm,
            geom=[e for e in ret["geom_cut"]
                  if isinstance(e, bmesh.types.BMEdge)]
            )

me = bpy.data.meshes.new(f"{n} Sided Dice")
bm.to_mesh(me)
ob = bpy.data.objects.new(me.name, me)
coll.objects.link(ob)
view_layer.objects.active = ob
ob.select_set(True)
ob.location = scene.cursor.location


Like Chebhou mentioned, you can use material.users to find out how many users there.

So you should use this in your method:

def is_used(material):
    if material.users == 0:
        return False
    else:
        return True

Or because it is a very simple condition, it would be more effective to not use a separate function at all:

for material in bpy.data.materials:
    if material.users == 0:
        print('material %s is not used' % material)

Also, the new str.format() in Python 3 should be used to fit the new standard (but it isn't really necessary). You can also use material.name for a prettier output.

print('material {} is not used'.format(material.name))


how to set the moved bone to original location?

Go to pose mode, select the bone, and go to the search tab. Search "Clear pose transforms" and it should do the trick.


You are using interpolated children. Those try to place children between hair strands. Simplest case: The hair closest to the current hair has a deformation slightly different than the original, if a child is placed half way between them, it will have a 50:50 mix between both positions and deformations. That can easily cause bad results, especially when 2 hairs are fairly close together, but combed in the opposite direction, the interpolation can look like what you're seeing. For longer hair simple children are usually the better option.


Rotate with the z-x'-z'' Euler sequence with Animation Nodes

You can use Combine Matrices for doing any complex transformation.


If I understand correctly the deformation you are getting is cause by the spiral curve being naturally twisted itself.

You can probably minimize this by changing the curve tilt per vertex (which would be very cumbersome), or overriding it's twist mode.

In the Properties Window > Object Data (Curve) > Shape > Twisting switch it from whatever you have now to Z-Up and should ease the problem


Driven shape key on multiple bone poses?

In the "generator" section of the dope sheet panel, you want to adjust the x-coefficient of the Expanded Polynomial.

You can see a visual explanation starting around time 11:30 in this video on corrective shape keys.


How do I determine NodeTree overhead in a .blend file?

This should not affect anything significantly. I have already added a few of my own nodegroups and a couple node groups from the b°wide nodepack to my startup.blend and have noticed no side effects.

Nodegroups don't really affect performance (unless they are being used), the biggest thing would be file size (which you probably don't have to worry about, because they don't take up much space).


I am not an expert, but if you can add cloth physics that would help, as you can simulate jelly quite well with a cloth simulation.
Here is a video about using cloth physics to simulate soft-body physics: https://www.youtube.com/watch?v=EdIGfANAF7M&ab_channel=SouthernShotty


An easy fix would be to export in the blender exchange format. All textures should then be displayed correctly.


Check your ray distance in the Selective to Active window of Cycles Bake. When in doubt, set it to 1 meter and it will capture all the data it needs. Good luck by the way!


I figured it out. Firstly, I needed tick the toggle 'Register' top right of the BMesh Clean script, I guess this basically means it compiles it for other scripts to use?

Anyway, once done, I was able to import the script correctly, and call the function.


How to pick an object before operator execution? (object picker/pointer ux?)

Update method on pointer property

Not sure if this is a bit of an XY Problem
In as much as agree that invoking the filebrowser is a way to select the filepath before executing the operator  it is generally displaying other options (often for import export) while it runs modally.
To simply select a filepath before running could achieve same with
def foo(self, context):
    bpy.ops.export_scene.foo(filepath=self.filepath)

Foo.filepath = StringProperty(subtype='FILE_PATH`, update=foo)

So similarly, can "do your thang" when the object is selected via the eyedropper.
Object selection box with eyedropper
import bpy
from bpy.props import PointerProperty

def poll(self, obj):
    return obj.type == 'MESH'

def update(self, context):
    # self is scene (or self.id_data if in prop group)
    ob = self.prop
    if ob is not None:
        print(f"Run operator or do something to {ob.name}")
        self.prop = None # reset?

class TEST_PT_layout_panel(bpy.types.Panel):
    bl_label = "Prop Panels"
    bl_category = "Test Panel"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

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

        col = layout.column()
        col.prop(scene, "prop")

def register():
    bpy.types.Scene.prop = PointerProperty(
            type=bpy.types.Object,
            poll=poll,
            update=update)
    bpy.utils.register_class(TEST_PT_layout_panel)

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

if __name__ == "__main__":
    register()

Note: have reset the pointer to none after each pick for way of example. Will prompt the "No value set warning in UI.


I have a solution, but i still do not know what caused this problem.

When i create an extra Screen Layout (opened the '3D view Full' and pressed the '+' to make it a new one, named it 'Default_2'), and reconstructed my preferred screenview, the problem is gone. The original Default screenview is still broken. Dunno why.

Found this solution in another topic:

Original posted solution to the same problem


yeah, you have to draw by setting a bgl.color** before each new differently coloured text. It's not like a terminal print command, though you could write really simple functions that take

(x, y, [(str, col),...])

Because you can query the x,y dimensions of a string, you can easily generate the offset coordinates.

Something like this:

def draw_string(x, y, packed_strings):
    font_id = 0
    blf.size(font_id, 18, 72)
    x_offset = 0
    for pstr, pcol in packed_strings:
        bgl.glColor4f(*pcol)
        text_width, text_height = blf.dimensions(font_id, pstr)
        blf.position(font_id, (x + x_offset), y, 0)
        blf.draw(font_id, pstr)
        x_offset += text_width

x = 60
y = 100
RED = (1, 0, 0, 1)
GREEN = (0, 1, 0, 1)
BLUE = (0, 0, 1, 1)
ps = [("Blue ", RED),("Yellow ", BLUE),("White ", GREEN)]
draw_string(x, y, ps)


not sure if answering 9 months later is going to be helpful but I came across a similar problem yesterday. In my experience Random per Island works fine until you use autosmooth (Botom Row of the picture) thats when it gets funky, it also changes if you are using hard normals (first column of the picture) or smooth normals (second column).


How can I navigate my scene FPS style similar to how Unity does?

The latest version of Blender has Walk Mode, You can access it by pressing Shift~ (the tilde/backtick key above Tab) or View > Navigation > Walk Navigation. If you want to use Fly Mode (which used to be the default), you can switch between them in User Preferences > Input.

Under 2.8+ you can access both from the 3D View header menu View > Navigate > Walk or Fly:

It's WASD just like in FPS-games, Q and R to move up/down. G or Tab enable gravity and collision, and V to jump in gravity mode. Space teleports you to the surface you are pointed at. You can even change the key-bindings to enable FPS Walk (the official name) on MMB down, and confirm on MMB up to always rotate (or rather: look) in FPS-style - or even hold MMB down and use WASD!


How to set the camera position and rotation to my view position and rotation?

Select the camera and use the Ctrl+Alt+Num 0 shortcut. You may also do it via View-->Align View-->Active Camera to View.


A powerful graphics card, or cloud render farm, which is more effective?

It all depends on the complexity of the scenes, the type of GPU, the speed and number of cores of the CPU, the amount/speed of memory available on your system, and how fast you need your final product.

A few considerations:

Sometimes rendering on GPU can be faster, but the amount of memory available for rendering is limited to that built into the card.

The easiest way to render faster in Cycles, is adding additional GPUs to a single computer. That way you can render more than one tile at the same time: Cycles will render as many tiles as there are GPUs. Two CPUs will render a single frame in almost half the time as a single GPU. 4 GPUs will cut render time to almost a quarter...

You can add as many GPUs as you can physically fit or connect to your computer and blender can use them all (It's more efficient if all of them are the same kind)

There are some solutions out there to use other computer's GPUs see: http://www.renegatt.com/blog/?p=130

But memory usage will still be an issue, as the memory available for rendering with multiple GPUs is not the sum of the memory on all of the cards, but is limited to the amount of memory on the smallest card on the system.

There are scenes that can only be rendered on CPU:

Complicated scenes with large textures, or operations that require more memory than that available on the GPU.
Scenes with features that are not supported for GPU rendering or are in experimental stages.

Even when rendering on GPU, there are still some operations that require processing by the CPU (Simulations, Physics, Particles, etc).

When rendering on CPU only, cycles will render as many tiles as there are processors or cores on your system. The more cores the system has available the more tiles can be rendered simultaneously. A single GPU will only render one.

You can render much larger/complex scenes in CPU because you can use all of the memory available on your system, and should you need more, then the Operating System will virtualize memory using the hard drive.

A render farm has the advantage of splitting render load across several computers and does not require a large investment on your part and you only pay when you are using it.

When you need to deliver on a fast turnaround there is no substitute to a render farm where you can have dozens or hundreds of computers at your disposal...
If it takes you 10 minutes to render one frame on your computer. It will take you over 33 hours to render an animation of 200 frames. Using 200 computers on a farm you can render the whole thing in 10 minutes...

Also when shopping for GPUs keep in mind that not all of them are created equal.
Currently Blender is more compatible with Nvidia graphics cards, but they are pricier than other brands.

Oftentimes the specs for GPUs are misleading so search online for benchmarks specific to blender performance before purchasing. Some very expensive "professional" graphics cards do not make blender any better than "gamer" oriented ones.

I'ts sometimes better/cheaper/more efficient to buy a couple of mid-performance cards than a single "high end" one.

Adding more GPUs to a computer requires a more powerful power supply and efficient cooling for the whole system.
If you are investing in many computers make sure that the power/electric installation is adequate...

Before you buy into one solution or another other, I suggest that you make some tests and see what solution works best for your workflow or specific project.


Tracing a monochrome image into a 3D, extruded object with a script

Blender doesn't have image tracing built-in, and without some tracing algorithm that outlines the shape, you're unlikely to get very nice results.
so suggest...

Open the image in a vector image editor (such as Inkscape)
trace the image (most vector editors have auto-trace)
save the vector as an SVG
import the SVG into Blender
use the curve bevel setting, or convert the curve to a mesh and extrude that.

If you want to automate this, you would have to automate converting the image into a vector outside blender, using something like Potrace, once you have an SVG you can automate loading and extruding it.


Edit multiple parts of tower mesh simultaneously

As the comments above indicate, the best way to do what I wanted is to create a circular array.

What I did was:

Delete everything except one buttress and wall.
In object mode, select the remaining buttress and wall then in the Modifiers panel, click "Add Modifier" > "Array"
Press Shift+C > "Cursor to Centre" then Shift+A > "Empty" > "Plain Axes".
Reselect the buttress and wall then in the Modifiers panel, tick the "Add Offset" box, then click the box below that and select the empty created in the previous step, then untick the "Relative Offset" box and finally, change "Count" to the number of duplicates needed.
Reselect the created Empty then, in the transform box, change the Rotations until the clones are positioned correctly.
Make the required edits to the mesh.
When finished, in the Modifiers panel, click on "Apply".

Edit: The above are the instructions for Blender v2.49, which I was using at the time. For v2.79, the instructions are slightly different:

Delete everything except one buttress and wall.
In object mode, select the remaining buttress and wall then in the Modifiers panel (wrench button in Properties pane), click "Add Modifier" > "Array"
Press Shift+C then Shift+A > "Empty" > "Plain Axes".
Reselect the buttress and wall then in the Modifiers panel, tick the "Object Offset" box, then click the dropbox below that and select the empty created in the previous step, then untick the "Relative Offset" box and finally, change "Count" to the number of duplicates needed.
Reselect the created Empty then, in the transform box, change the Rotations until the clones are positioned correctly.
Make the required edits to the mesh.
When finished, in the Modifiers panel, click on "Apply".


Meshes aren't visible anymore in Solid Mode, only in Material Preview Mode. Can't select any of them

My reputation is not high enough to leave a comment, so I have to put my suggestion here in the answers. I will remove this if it doesn't solve your problem, so please let me know. Also, it would be helpful if you could share your blend file.
A few things that have helped me in the past:

try unchecking and checking the collections that you made in the outliner

try pressing "/" on your keyboard with an object selected, this will toggle/untoggle local view

check your clip start/end distance (press N, go to view tab, decrease the clip start number and/or increase the clip end number)


A quick way of doing this is to parent the windows' empties to the building by first selecting the empties, then the building, then hitting Ctrl+P.


Tried dynamically switching pinned vert groups - that resets simulation.
Tried dynamically changing vertex weights inside group - that resets simulation too.
And the bake wouldn't work at all, that was clear from beginning.

The workflow I suggest is to

simulate part of your cloth animation with one set of pinned verts and then save the animation as .mdd mesh cache.
Then apply the cloth modifier, add another and simulate with different set of pinned verts. Export to .mdd
After you have all the parts, load them to Mesh Cache modifiers and blend them with influence. With good blending you can mask some of the discontinuities that happened while switching simulations.

Since any motion between simulations will be canceled you would need to adjust with force fields and plan the transitions carefully. But that's probably the best you can do.


You can't find the source within the Blender installation because it's compiled code (C/C++).

An probably older implementation: Blender_Ocean.c has pointers to the original paper by Jerry Tessendorf Simulating Ocean Water.

You find the current source file in GIT version control


The reason for the discrepancy is the inter-character spacing (obj.data.space_character, where obj is the long text object). There are 5 additional inter-character spaces in the long text object, and if I add them to the short string length x 6 then the lengths almost match. There is still a small discrepancy (of 0.06 mm/batch of 5 Is) which I can't explain, but it's so small that it can be safely ignored for the purpose of this exercise.


This question can be answered by reading the Blender manual, section Game Engine by clicking here.

But as I'm answering and not commenting, I'll give an answer.

AND

Activates all connected actuators when all connected sensors are active.

NAND

Activates all connected actuators when none connected sensors are active.

OR

Activates all connected actuators when one or more (or all) connected sensors are active.

NOR

Activates all connected actuators when one or more (or all) connected sensors are not active.

XOR

Activates all connected actuators when one, and only one connected sensor is active.

XNOR

Activates all connected actuators when one, and only one connected sensor is not active.

Expression

Activates all connected actuators when the evaluated expression is true. A remark about this one: this controller is (after Python) the most powerful one, as you can evaluate complex expressions, which could demand several sensors, on a single line.

On Expression controller you can:

Mix the previous controllers. Example: sensor1 AND sensor2 OR sensor1 AND sensor3.
Check values of properties without the need of an Property sensor. Example: property > 0 OR property < 10.

I seriously recommend you to learn Python, but if you don't, learning the Expression controller can help you in making complex logic while avoids 'spaghetti code' on logic bricks.

Python

As the name says, executes Python code. However, there's two modes: Script and Module.

Script mode runs a Blender text block. Using this mode is highly disencouraged, as it is pretty slow (as Python compiles it to bytecode each frame it runs) and harder to maintain (as it belongs to the blend file). This mode is only kept for backward compatibility.

Module runs a Python function. This function can be present inside a Blender text block or an external Python script (in both cases, the scripts must end with the extension .py). The field of the controller is a path to the function, which could follow the pattern script.function, folder.script.function, folder.subfolder.script.function, or any other pattern which fits your Python script.


Video is rendered at half the resolution

Blenders default configuration sets the default resolution to 50%. Which means that it will render at half the size.

You can adjust these values in the properties panel under the 'scene tab'

For a full scale render set the resolution value to 100%


Normal map doesn`t show up on more complicated meshes

Missing unwrap

By default image textures are mapped with UV texture coordinates. This means that , even if you don't see any input node for the Vector socket of your Image texture node, you should assume that your UV map is being used for spreading the colors around.

I wild guess that you don't have UV unwrapped your mesh yet, so there are no proper UV island to work with for your shader setup.

The default cube, as many of the primitive objects, comes with a proper UV unwrapping by default: that's why you see the texture there.

My suggestion would be to urwrap your mesh or use another texture coordinate system, like Object's coordinate with Box projection method.


is the AMD Radeon HD 5700 card supported?

Unfortunately your graphics card doesn't fulfill the minimum requirements for Blender 2.8x. GCN first generation or later is required for AMD GPUs. Your graphics card has the older Terascale architecture.


Why is my model lit up when the sun is pointing away?

I made a plane big enough to block out light coming from below. That fixed it.

It does not matter where you place your sun in the model. If it points up, it will light the bottom of the model even if it's above the model.


Missing model whilst viewing in active camera

The problem is the value of your camera clipping in the Properties Panel N. At the top of the Panel you should see a section called Clip. Increase the End value and this should fix your problem.


add text
object -> convert to mesh
add sphere
add curve -> circle
add modifier "curve" to text
choose "circle" from 3)
animate location x of text

result, if you rotate the beziercircle a bit:

better explanation by video tutorial: https://youtu.be/tcKOR9TZHcA (please be patient - my internet is not that fast - is should be uploaded in 30 mins)


Deforming text maintaining vertical alignment

You can use a Lattice and Proportional Editing

Add a lattice object and scale it so that it covers your object.
Make the number on the U axis an odd number so that you have a division in the middle.

Select the Text Object and add a Lattice Modifier. Assign the newly created lattice as the deform object.

Select the lattice, enter edit mode, select the vertices in the middle.

Enable Proportional editing and set the falloff type to "sphere"

Press G (to move the selected vertices) and use the scroll wheel on the mouse to adjust the influence of the proportional edit, so that the circle covers the whole text.

Move the vertices up.


Although not 100% sure, I believe
1. I need to press and hold the Ctrl key while extruding.
2. I set the snap to option to Closest
3. I set the pivot point to active element

I did turn on "Automatically merge vertices moved to same location".  However, when I checked afterwards by clicking the remove doubles, 56 doubles were still removed.  So not sure how that is suppose to work.


How to use root motion with inverse kinematics?

You can bake your action into a new action clearing all constarints, so the animation will act the same movements without the need of IK.

To do so, select in pose mode all deforming bones, and go to the menu:"Pose - Animation - Bake Action".


Is there a way to move, scale and duplicate hidden objects with the gizmo?

Summary
You can constrain the location, scale and rotation of the to-be-hidden object to another object, which you then manipulate to indirectly influence the invisible object.

Preface
Some terminology I'm using for clarification:
'Target' = The object that Boolean-intersects the mesh, you want to hide this but manipulate it as well;
'Modifier' = The object that you need to manipulate to indirectly manipulate the Target object.

Constraining the Target to the Modifier object
Create a duplicate of the Target object (linked(Alt-D) if you also want to edit the Target's mesh, but a link is not required).
This duplicate will be the object you manipulate, the Modifier object.

Note that you can also just use an Empty or generally any object; I like to duplicate the object to better see what is going on.

Create three constraints on the Target object; Copy Location, Copy scale and Copy Rotation.
For Copy Location you will want to enable the Offset option; this will allow you to move the Target object away from the Modifier object instead of them occupying the exact same point in space.

Copy Scale and Copy Rotation should be set up correctly as soon as you add the constraint. You may need to adjust the 'Invert' options on the Copy Rotation constraint to get the Target to link in the correct orientation.

The target for all constraints is the Modifier object.

If you select both the Modifier and Target object and duplicate these(Shift-D), the Target copy will already have it's constraints set up to target the duplicated Modifier.

Images for reference
Image 1: Here you can see the setup of objects and the constraints. The Target is already hidden and is selected in the Outliner. Note the position of the hole in the Cube.

Image 2: Now if you move/rotate/scale the Modifier object, the Target will move/rotate/scale accordingly.


Cloth Simulation: How to keep vertex groups unaffected?

Quick answer:
the way to do this is to separate the lights and pin them to the cloth sim.
Long answer:
Step 1:
separate each light to it's own object
Step 2:
at the top of every light create an empty
use Shift S to snap the 3d curser to the vertices at the top of each lamp and add an empty there
Step 3: Select 1 of the empties and Shift select after that the wire
Step 4: go into edit mode and find the nearest vertex and select only it.
Step 5: Now that our empty and our vertex are selected, press Ctrl+P and click "Make Vertex Parent"
Step 6: go out of edit mode and deselect all. Now Select the Lamp were working with and then select the corresponding empty.
Step 7: Press Ctrl+P again and parent the lamp to the empty with the "Keep Transform" option

Step 8: Repeat from Step 3 to Step 7 for each lamp and corresponding empty
Step 9: Make sure only the wire has the Cloth simulation
And Were Done!
(I know I went into detail, but since a lot of people deal with cloth simulations I want this answer to be good for beginners as well)


What is the right way to apply an image texture over a glass or plastic material?

To begin with, the add shader node can only be used to add shader/closure outputs (green sockets).

With invalid input, the output of the add shader node will always be 0.
To add values (grey sockets), use a Math node (ShiftA> Converter > Math) instead.

Note that plastics do refract light, so a glass node will probably do just fine for the plastic material (if you were using the transparent node to reduce noise/render time, you might be better off with the fake glass setup).

As for mixing, you need to use a black and white stencil (in this case the alpha channel is perfect, but this will not always be the case) as the mix factor (I multiplied it with the output of this node group to remove the tiled repetitions of the image):

Here is the node setup (click for higher resolution):

And the result:


Blender dropped support for the 32bit versions of OSX in 2.72.
To your question about running a 64bit version on your 32bit system, I will direct you here.
If you find that you can not use any 64bit software, because of your CPU or some other reason; then you can still use 2.71 with no problem.
Download link for 2.71 32bit OSX on blender's server.


UV Project Modifier in Cycles has no effect. What am I doing wrong?

You need to select the image to use in the UV project modifier and enable Override image.
Your Diffuse nodes need to be flipped:


This isn't so much about Blender as physics.

Real ocean water is very light. Like almost white.
Aim your camera more downwards, to decrease reflections.
Add a shallow seabed to better control your ocean color.


How to list the frame numbers which contain keyframes in Python?

Graph editor Operator
(for version 2.79.4 and above)

Set up the selections on your graph editor to match those of the dope sheet.

Since version 2.79.4 the graph editor has the very handy context.selected_editable_fcurves property. The operator below uses each of these selected fcurves.  Render frames are added to a list sequentially from frame start to end if there is any change (over a tolerance) in the evaluated fcurve between frames current, f, and previous  f-1.

The render command line is written to a text block

To use, run the script (to register) Use the space bar and search for  "Report Changed Frames" in the graph editor space.  Remember it uses the selected fcurves, press A before running to select all visible in current graph editor selection.

import bpy

def main(context):
    scene = context.scene
    selected = context.selected_editable_fcurves[:]
    # all selected fcurves
    f = scene.frame_start
    render_frames = [f]
    f += 1
    while f <= scene.frame_end:
        def changed(fc, tol=0.0001):
            return abs(fc.evaluate(f) - fc.evaluate(f - 1)) > tol

        if any(changed(fc) for fc in selected):
            render_frames.append(f)
        f += 1

    report = bpy.data.texts.new("Changed Frames")

    report.write('"%s" -b "%s" ' % (bpy.app.binary_path, bpy.data.filepath))
    for f in render_frames:
        report.write(" -f %d" % f)

class GRAPH_OT_report_frames(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "graph.report_frames"
    bl_label = "Report changed frames"

    @classmethod
    def poll(cls, context):
        return context.area.type == 'GRAPH_EDITOR'

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

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

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

if __name__ == "__main__":
    register()

As stated this doesn't list all frames with a keyframe, rather it lists all frames that have some animated change on that frame, (for any of  all selected fcurves).

If you are just after keyframe frames, add all kfp.co.x (keyframe point frame) points to a list, for all selected fcurves.  Converting to a set s = set() will remove doubles.

all_frames = set(kfp.co.x
        for fc in context.selected_editable_fcurves
        for kfp in fc.keyframe_points)

Oldschool (all versions)

You can also iterate through all actions and check the state of Keyframe.select_control_point property to get the corresponding frame of all keys in the selection.

import bpy
from math import ceil

class ACTION_OT_report_selection(bpy.types.Operator):
    """Report Selected Keyframes"""
    bl_idname = "action.report_selected_keyframes"
    bl_label = "Report Selected Keyframes"

    def selected_keys(self):
        """Returns the frames of all selected keys"""
        ctrl_points = set()
        for action in bpy.data.actions:
            for channel in action.fcurves:
                for key in channel.keyframe_points:
                    if key.select_control_point:
                        ctrl_points.add(ceil(key.co.x))
        return sorted(ctrl_points)

    def cli_block(self, frame_list, block_name):
        """Creates a new textblock with all necessary command line arguments"""
        report = bpy.data.texts.new(block_name)
        report.write('"%s" -b "%s" ' % (bpy.app.binary_path, bpy.data.filepath))
        for f in frame_list:
            report.write(" -f %d" % f)

    @classmethod
    def poll(cls, context):
        area_types = ('DOPESHEET_EDITOR', 'GRAPH_EDITOR', 'TIMELINE')
        return context.area.type in area_types

    def execute(self, context):
        render_frames = self.selected_keys()

        if not render_frames:
            self.report({'ERROR'}, "Nothing selected")
            return {'CANCELLED'}
        else:
            textblock_name = "Render Arguments"
            self.cli_block(render_frames, textblock_name)
            self.report({'INFO'}, "'%s' text block created" % textblock_name)

        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()


Can I block the area of a face (the surface) and then have one axis length automatically changed?

This would not be possible for single faces in vanilla Blender.  There may be an add-on for this somewhere.  One of the main problems is that faces aren't always rectangular quads aligned on an axis.  Once you get out of that realm, the math can become pretty messy.

There is a way to do this in Object Mode, though, for whole objects using Drivers.  The only problem with this method is you can't add a Driver to the Object Dimensions.  So we must Drive the Scale of the object instead.

I won't go into all the ins and outs of creating a driver because that subject is well documented.  A great intro video tutorial can be found here: https://www.youtube.com/watch?v=BJJJpWcxp0o

This will show how to scale proportionally in the X/Y direction:

1.) Create a Single Driver for the X-Scale of the cube.

2.) Create two custom properties: "Area" (for the desired L x W area) and "X @ Scale 1.0" (to describe the X dimension when the Scale is at 1.0).  The reason we need the latter is because we cannot use the actual X dimension, since we are using the driver to change that dimension, which would create a circular dependency.

3.) Use the following for the Driver expression: (Area / Y_Dim ) / X_Dim  -- where Area = the ["Area"] custom property, Y_Dim = the actual Y Dimension of the object, and X_Dim is the custom property ["X @ Scale 1.0"]

The relevant information is highlighted with red.  After setting the Y-Dimension to what you want, it will be necessary to click the "Update Dependencies" button to get the most accurate X dimension.  Click the image to enlarge:

If you Apply the Scale you must change the ["X @ Scale 1.0"] Property to reflect the new value.


If you are using Cycles render engine you could easily use a gradient texture as illustrated in the node setup bellow, though I am not sure it can be animated, as color ramp handles can't be keyframed as far as I know.

Has suggested by timaroberts, you can then animate this as desired by keyframing the position of the Color ramp handles in the Pos value.

Otherwise your best bet is probably unwrapping your mesh and animating the UV coordinates. You could then use a regular linear gradient with it.


How to bake brick-wall geomerty into texture image?

There's An Easy way to Bake a Normal Map from High Poly Mesh (Your Wall) To a low poly simply a cube.The first thing you would have to do. Is place High Poly Mesh in First Layer & Lowpoly in Second.

I hope you'd be using Cycles Rather than Internal its just a slight difference.

In UV Image Editor Click for Image > New Image. Select a relation accordingly (make Sure it will be the power of 2) The Higher Resolution will give better Result.

Black Image Should Appear

Select the Both Mesh High-Poly (Inactive) Low-Poly (Active). Select High Poly First & Lowpoly then(so High Poly will be inactive & Lowpoly Active) (Remember with Both layer Active).

Last one Open Node Setup add a material for the Mesh (if it don't have one). Add Texture Node Don't Connect this node to the shader instead browse the Black Image which was created in UV Image Editor.

Bake It. (I will Edit the answer & will Post the Result later. I was in a Hurry) Sorry :(

For Any Further Video Detailes Checkout BlenderGuru Tutorial


If you're looking for a quick way to delete faces that will never ever be visible from the outside, you're in luck. If you're trying to do something more complex, you're going to be stuck with manual work.

To delete these inside faces, select everything using A. Then switch into face mode Ctrl-Tab>Face. Set your camera to orthographic Numpad-5. Finally enter each one of the side/top views, use Box select with MMB to de-select all the visible faces. You will need to do this for all 6 views: The short cuts are 1,3 and 7 for front, right and top (respectively) To get back left and bottom, combine  1,3 and 7 with Ctrl to get back, left and bottom (respectively). The selected faces you will now have are the inside faces. Delete them.


You could use Checker Deselect and Dissolve Edges to get rid of this kind of pattern.

Select an Edge Ring. (Click Edge with Alt + Shift)
Choose Select > Checker Deselect
Set Parameters to Nth Selection = 2, Skip = 2, Offset = 0
Hit X for the Delete Menu and choose Dissolve Edges


Is MotionBuilder compatible with Blender?

You can export animations from Motion Builder in FBX or BVH formats, which Blender can import as an animated armature.


Compositor: dilate/erode except on predefined edges?

So this is as close as I could get. It's not ideal but I could go in frame by frame and remove the excess outline created from the hand you see on top of the lowered fingers (middle and ring).

I'll try to break down the process. If someone can find a way to fully remove those lines I'd love it:

Step 1: Duplicate mesh to a second layer, remove fingers from the first layer.

Step 2: Remove the back-faces from the hand and fingers with a mix of your material and transparency.

Step 3: In compositing, instead of using the "dilate/erode" node to create your outline, use "filter->filter->lapace" node.

Step 4: Specifically for the fingers, you'll take the difference between the outline generated from the hand on the first layer, and the outline generated from the fingers on the second layer (you cannot have fingers on the first layer and you must have the whole body on the second layer).

Coming out of the top outputs of "fingers.R" and "hand.R" in the image above are just the outline created from the lapace node, the skin color is added at the end of this tree with the "alpha over" node.

I hope I'm making sense.
Again, freestyle just doesn't work for me because of it's inconsistencies; I'd prefer to have complete control over where my outlines are generated. There have been some instances of freestyle where I lose parts of the outline around the main body, and that just won't work.


The only way how you can do that (at the moment) is to actually join them togeher. Select all of them, the Shift-click on the one you want to be the center and press Ctrl+J. This way they are all one mesh and you can sculpt away.
If you need them to be separate again at some point, go into Edit Mode, press P and select By Loose Parts.


What does it mean when my Angle setting under Auto Smooth greyed out?

Go to Properties editor > Object Data panel > Geometry Data and click on Clear Custom Split Normals Data to re-enable the angle setting.


You already added Operator Properties to your operator, which is perfectly fine.

The missing link is how to access the operator property values, which is rather simple (remember it's a python class after all):

print(self.foo)

self refers to the operator instance, which stores the property values.

import bpy
from bpy.types import Operator
from bpy.props import StringProperty

class ExampleOP(Operator):
    bl_idname = "object.test"
    bl_label = "Is just an example"
    bl_options = {'REGISTER'}

    foo = StringProperty()
    result = StringProperty()

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

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

        col.prop_search(self, 'result', context.object.data, 'uv_textures', text="UV Layer")

    def execute(self, context):
        print("foo =", self.foo)
        return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

    bpy.ops.object.test('INVOKE_DEFAULT', foo="bar")


Placing objects using a relative coordinate system

Do this via a script, if you have the X, Y, Z coordinates of the base of each windmill, you can iterate through the list of coordinates and place a windmill at each coordinate.

Let's say you make a windmill object, or a group..

import bpy
import mathutils
from mathutils import Vector

scene = bpy.context.scene

# if you have a group named windmill
group = bpy.data.groups['windmill']

# all coordinates will be offset by this vector, your new 'origin'.
custom_origin = Vector((3, 4, 0.2))

coordinates = [
    (18.2807, 9.1404, -1.2686),
    (27.4211, 9.1404, 0.9514),
    (9.1404, 9.1404, -1.11),
    (18.2807, 31.9913, 2.1671),
    (18.2807, 13.7106, 0.0),
    (18.2807, 22.8509, 1.3214),
    (27.4211, 13.7106, 2.96),
    (27.4211, 22.8509, 2.1143),
    (31.9913, 22.8509, 3.7),
    (22.8509, 22.8509, 1.3214),
    (13.7106, 22.8509, 0.0),
    (4.5702, 31.9913, 0.0),
    (22.8509, 13.7106, 2.96),
    (13.7106, 31.9913, 2.4843)
]

for loc in coordinates:
    instance = bpy.data.objects.new('dupli_group', None)
    instance.dupli_type = 'GROUP'
    instance.dupli_group = group
    scene.objects.link(instance)
    instance.location = Vector(loc) + custom_origin  # adds them.


Need to get a 360 view of the object using cameras

Animate a single camera

Parent your camera to an empty placed in the rotation pivot point.

Now the camera should follow the rotation of his parent object using its origin as pivot.

Than insert two keyframe to the empty's Z-rotation channel in 0,0 and in 36,360 to animate the rotation through time.

Remember to set the interpolation mode of your keyframes to linear if you want a constant angular velocity and to set the final render frame range to 35 as the 36th is the same as the first.

Set png, jpeg ... an image, non video, format in the output tab and than pressing Render Animation button you'll get each frame rendered individually.

Note: if it is suitable for your scene, you can also think about rotating the object(s), instead of the camera.


There seems to be a keymap added to your system (most likely accidentally), which calls the add modifier operator, and its default is the mirror one. Go to your User Preferences -> Input section, and search for 'modifier' in the 'Name" field:

If you find a keymap like the one in 'nicely drawn' brackets in the screenshot, remove it by clicking the X button (marked with the arrow).

More interesting is actually how you got there. I did it like this: I clicked the 'add modifier' command in the Spacebar menu. The Properties Panel one works of course as well. When the menu pops up, I RMB clicked on the Mirror Item, which brings up another menu. I chose 'Add Shortcut', and simply LMB clicked in there. And the damage was done  :)

However, it's not exactly what you have, as my version automatically adds a Mirror, it does not open the menu any more. I had to manually clear the 'Type' field in the Keybinding (see screenshot, bottom right) to have exactly your behavior. Maybe now you can remember how you achieved it? Just played with keymaps maybe?


Move Object aroud curve withot deforming

You've scaled your plane on the Z axis, you need to apply the scale (CtrlA > Apply Scale) and the child object won't deform:


How to add image texture to an existing material?

You can use object texture coordinates to do that:

In the node above, object texture coordinates are driven by the position of an empty.
Then the mapping node shifts things by 0.5 to center the decal image around the empty (on left for the cube the material has no mapping).
Now you can adjust the empty position as you need, using the snap tool, for instance (Z must be up).

The mix color node (before the shader) can be replaced by a mix shader node (after the shader) as you wish.
You can use the setting several times, if needed:

The image size and rotation depend on the empty size and rotation.


You need to select the armature and then change the action in the action editor. You created the animation for the armature, then applied it to the mesh object in the action editor by mistake. This doesn't do anything because the animation expects the transform hierarchy of the armature. You can check in the outliner where your animations are. They should only exist under the armature, not under the mesh objects.

Select Cube and remove the action in the action editor.
Select Cube.001 and remove the
action in the action editor.
Select Armature and choose the action you want to play and it
should work.


Baking object with "combined" results in much too bright an Image Texture (Cycles)

I can't be sure, but it seems entirely likely that your whites are getting crushed. I can guarantee that the white in your specular highlight on that chair is much higher than "255." But a typical image can only hold up to a 255.

Generically, this situation is handled one of two ways. Either, anything over 255 is just clipped/clamped to 255, or the whole range of values is crushed/scaled so that everything fits in a 0-255 range. This makes all the highlights darker because what used to be between 1000-2000 level of intensity gets scaled down to something like 150-250.

You situation would only be explained if Blender is doing some kind of intensity compensation that's tuning everything down so that your whites are crushed instead of just clipped. I don't know if Blender actually does that or not, but it'd explain what you're seeing.

I also don't know how to solve that, unless you can bake to an EXR or HDR that will record values higher than 255.

Hope that helps.


My guess is that you accidentally set some other object as your active camera (yes, believe it or not this is possible - Ctrl+Alt+Num 0 snaps the active camera to the view, whereas Ctrl+Num 0 re-assigns the active camera to whatever object you have selected - easy to mix up by mistake). To fix it, select your camera, and then make it the active camera again from the View menu or by pressing Ctrl+Num 0. This should make it behave as normal again:


if you go to the weight paint mode and paint a certain area that you want to animate and then in physics settings you check goal and choose the vertex group you created, you can add location/rotation/scale keyframes which will affect the vertex group only.

here the object(cube) is being pulled by 2 simple keyframes


Blender 2.8 (python) - How to set material color using hex value instead of RGB

You can convert a hex value to rgb like below, using shift and bitwise and operator, then divide it by 255 to get a value between 0 and 1.

import bpy

def hex_to_rgb( hex_value ):
    b = (hex_value & 0xFF) / 255.0
    g = ((hex_value >> 8) & 0xFF) / 255.0
    r = ((hex_value >> 16) & 0xFF) / 255.0
    return r, g, b

def add_material(obj, material_name, h):
    material = bpy.data.materials.get(material_name)
    if material is None:
        material = bpy.data.materials.new(material_name)
    material.use_nodes = True
    principled_bsdf = material.node_tree.nodes['Principled BSDF']
    if principled_bsdf is not None:
        principled_bsdf.inputs[0].default_value = (*hex_to_rgb(h), 1)
    obj.active_material = material

h = 0xE7E7FF

obj = bpy.context.object

add_material( obj, "test", h )

Note: you won't obtain the same value in the UI as the hex value is shown gamma corrected.


Add UV Mapped texture coordinates to OBJ file?

If you want texture coords when exporting to .obj, make sure you have Include UVs ticked in the exporter options (it should be checked by default). Also, make sure that you actually unwrapped the model, check UV Maps under Data in the Properties panel to make sure that a UV map is assigned to your object.

If you should open an obj file you should see something like

vt 0.000100 0.000100
vt 0.999900 0.000100
...
f 1/1 2/2 4/3 3/4

where the lines with vt are texture coordinates and the line(s) with f specify faces that are a part of the UV map. Read more on the obj format here. That being said, it is an open format and people might roll their own custom exporters and importers and name these identifiers differently (not recommended). I know that g is used by default for groups so you might be looking in the wrong place, also if you have a texture with the model make sure their is a .mtl file along with the obj to ensure that everything works correctly.


Exporting IK bones from blender2.8 to unity has problem

I just figure it out.
I've re-rigging(?) my model at IKLegBone parts.

Delete IK constraint.
Change both side of calf bone's rotation a little bit.
Add IK constraint.

Finish!
If it doesn't work, repeat 2 differently.


How can a Method from a startup Script be invoked?

To answer your question:

Operator types are automatically added to bpy.types on registration.

This is how a method on an operator your register can be called.

bpy.types.OBJECT_OT_util.dump(bpy.context.object)

Note that it is very rare to ever access operator types like this, its more of an internal implementation detail.

normally you would access the operator via bpy.ops.object_utils() but this is only for calling the operator and won't expose its original class.

Suggested alternative

In this case I would suggest not to having dump() as an operator class method at all.
If you have a function that can run outside of the operator, you're better off having it as a utility function in a module other scripts can import and use, then have the both the operator and external scripts use it.

my_module.py:

def dump(...):
   ... do stuff ...

class MyOperator(Operator):
    ...
    def execute(self, context):
        dump()

So now any script can do:

import my_module
my_module.dump()

This way we bypass Blender/Python API internals where its not helpful and let Python modules interact as they would typically  (outside of Blender).


You may want to generate your "rational path" with a different cleaner technique possibly using some screw modifier or something different.

Your current method is bound to give problems sooner or later, most related to bad topology and self intersecting geometry both of them well known enemies of Boolean operations.

This has been asked countless times, search this site for "Boolean" and you will find hundred of questions about failed Boolean operations and all the recurring problems and solutions.

If you really insist in doing that way don't plan on being able to add dozens of live Boolean modifiers on top of each other interactively. Blender will eventually crash or most likely fail to preform operations well before that.

Apply your modifiers one at a time before proceeding to the next cylinder


Scripting the generation of a curve from the set of mesh centers drawn using BTrace add-on

The operator that you're trying to call "bpy.ops.object.btobjectsconnect()" is part of the bTrace addon and not in Blender by default. It's defined in the plugin file btrace.py. You can find the code that built that operator around line 534 here: https://github.com/scottjwood/bTrace/blob/master/bTrace.py


during copy transform constraint, the child object snaps to the origin point of the parent object

It looks like the Copy Transforms doesn't have any Offset option (I don't know why), so I guess if you want it to copy each of its target's transformation you need instead to give it a Copy Location constraint (enable the Offset option), a Copy Rotation and a Copy Scale.


Complex mesh with armature and mesh deform modifier

Your use of mesh deform is not really warranted here in my opinion. Keep your bones, maybe subdivide them into many smaller bones (in edit mode, "w" -> subdivide). Then, change armature to object mode. Select cylinder, then shift+select armature, ctrl+p, "with automatic weights".

This should give you a nice smooth deformation.

If you are going to use mesh deform, why do you use 2 cubes. It should be one mesh. I think a better explanation of your exact problem may assist in answering in a more detailed fashion.

I will add another note. Maybe a better solution for you is to use shape keys to correct issues after armature deform. There is another method, add object -> lattice. In mesh panel subdivide it more. Then add modifier to your object -> lattice and select the lattice you created as the source. You can parent the lattice to bones just fine.


I don't think a simple way exists yet.

A workaround could be to use vertex groups. By selecting a centre vertex and then selecting side of active to select all the vertices on the side you don't want, you can then create a vertex group and assign these vertices to the group.

With the vertex group setup you can select the centre vertices and expand your selection, then deselect the vertices in the group, which will leave you with only vertices on one side of your mesh selected.

I think you may even want to select only one new edge loop each time, in that case, after deselecting the vertices to one side you can assign the newly selected vertices to the group, then the next time you expand the selection and deselect you will also deselect the previous loop and all the previously selected vertices.

As you are saving your progress each time you can perform any steps you want between each step, you can always select the group vertices and expand then deselect to get the next loop.


I made a model too tall, how do I chop the bottom part off?

This is probably not the most efficient way, but it's simple and clean.

I hit z to enter wireframe mode.
Then NumPad_1 to enter front view mode (depending on how your
boat is orientated, it could be NumPad 3, side view)
Then b to box select the bottom faces (one row before the
vertices you want to keeP)
Then x and Delete Vertices
Making sure I had the vertex select mode on, I clicked one
vertex away from the corner, held CTRL and right clicked the
point opposite it which was one vertex away from the opposite
corner. (Holding control while right-clicking selects the shortest
path between selections). I do the same for the other side of the
boat.
Then Space and type in Bridge Edge Loops
I hit CTRL + r to enter loop cut mode and hover my cursor over the newly made row of planks and type in the number of loop cuts I want to be made. I made it 2 because I had 2 middle vertices I needed to be joined with something. Then once the pink lines are where you want, hit Enter twice.
Finally, use b to box select, c to circle select, or simply
right-click the vertices left and hit f to join them into faces.
Do this by sets of 4, not all at once.

Or, try selecting the hole's perimeter with Alt + Right Click then hitting Space and typing in Grid Fill. Sometimes that works, and sometimes it doesn't.


Found your problem, there's a magic 90 degrees on one of your empty objects, if you reset to 0 it works like you wanted.

You can see the other empty that connects the other leg, doesn't have that 90 degrees on the X Axis.
Cheers,


How to keep parts of single object easily selectable in 2.8?

You want vertex groups as you've mentioned.

So go into Edit Mode, then press 1 to make sure you are selecting vertices.

Go into plan view with NumPad 7 so we're all setup.

Now click open the Mesh Properties Panel and expand Vertex Groups if not already visible.

Now the essential part. Click the + button to create a new vertext group.

Double click it to rename Hand

Then in 3D view box select all the vertices of your hand and click Assign.

This assigns the selected vertices to the group.

Now if you deselect all vertices, you can select them again by clicking Select.

You should now have all vartices which were assigned to the group selected again.


Why is texture distorting at the sides? How to fix it?

You're using object coords. If you watch it right from above it will look okay. But since the edges of the blanket are not flat and have some verticality, X axis projects onto it and you see the distortion

The solution I think is to unwrap the mesh and use UV coordinates:


How to join more bones in a armature together

The connected bones are a Parent/child relationship: a Parent can have lots of childrens but a child can have only one parent: from the tip of a bone you can extrude (or connect) more than one bone, but you can't connect two or more bones to the base of another bone (it would have more than one parent).

Usually a complex facial rig is made of shapekeys; each shape key can be controlled by one or more bones using drivers: so you will have a rig made of deforming bones (the classic way) and non deforming bones (to drive shape keys).

Don't be afraid of drivers: they look more complicated than they are, and they're very very useful.


Baking textures: Circular Reference in texture stack error

One example when this occurs is when the receiving image is used as a texture e.g. (has been unchecked) the issue can be reproduced by checking the enable/disable checkbox.

Either way baking worked


Everything Disappears When I Come Out of Camera View

Actually I may have solved my own problem but wanted to keep the question active just in case anybody else was experiencing the problem. Turns out "View All" did end up solving the problem but I had to actually use the Home button rather than selecting the menu option. Live and learn! – Jim McNeill


"Updating Objects Flags" -- Best ways to get around long rendering times?

There are a couple of things you can do to try to decrease render time.  For example, you could try decreasing the number of volumetrics by using the glare node rather than volumetrics to create glares around lights, by faking clouds with textures or images, by replacing 3D explosions with 2D explosion special effects, by creating hazes with planes that have a transparent cloud texture on them, or by simply eliminating some or all of the volumetrics altogether.  It all depends on what you were using the volumetrics for.  Of course, it won't look as good as with volumetrics, but that's the price of shorter render times.
Another thing to try is using the denoiser node and reducing the number of samples you use (and the number of light bounces).  For best results, check "Denoising Data" under Properties -> View Layer Properties -> Passes -> Data.  However, you're still beauty for time.
Whatever you try, there's ultimately no solution for long render times except progressing Computer Science research and render farms (hundreds or thousands of high-end computers working together to render animations).  Actually, 15 minutes is pretty good, even for an animation.  It takes Pixar about twenty-four hours to render each frame for their animated films.  The only way they can render the entire animated movie in a reasonable amount of time is by using huge render farms of thousands of computers working together.
The good news is that there are several online render farms that you can use.  The bad news if that they cost money.  However, they're still a viable option (better than half a year of rendering for you).  You can read more about some of those options here:

https://www.blendernation.com/2019/09/06/8-blender-render-farms-compared/
https://renderpool.net/blog/best-online-render-farm/

Hope that kind of helps, and sorry I can't give you a better answer.


How to write bpy.data.libraries avoid packed file with python?

Check the data
Chances are the objects are saved to the library blend, . but are not linked to any scene, or collection, hence the file appears empty when opened.
Check the library files bpy.data.object  collection to confirm.
Consider adding the scene datablock to the library.
You can try this.  I don't know much about...


First you have to select the output format, if you select image file format (PNG, JPG,...) every frame of the animation will be saved as single image, on the other side if you select video format (H.264,...) animation will be saved as video. The destination of the saved video or frame images is specified by the output path.

It is recommended to render the animation as images and then make video using the Video Sequencer, because if something happens halfway rendering the animation you can start it again from the last rendered frame, which is not possible when the output format is video.


Thanks for the help I figured it out by:

Creating the outline by bezier spline

Created the with by using the depth setting in the curve meny

Converting it to a mesh and moved half of the geometry to create the with of the towel

Removed the edges on the other side

Used the solidify modifier to create the with of the towel on the other side

Fine tuned the geometry so the fold isn't resting in mid air

Used hair particles for the strands


How to bake object with cloth simulation and subsurf (not applied)? Having trouble using .mdd method

Enable the .mdd file importer / exporter addon:

Select an object with the cloth simulation and subsurf (not applied). CTRL + A - apply rotation, scale and location. Note that if some other objects, which are parented (or vertex parented) to that object, after applying operation, they may change their position and rotation. To avoid it, unparent them (ALT + P - Clear Parent), before applying, then apply rotation, scale and position, and then parent them back.
While the object with ththe cloth simulation is selected, export the .mdd file. Export may take some time.
After  export - remove the Cloth simulation.
Unparent (ALT + P - Clear Parent).
Apply subsurf.
At this stage, I usially re-applying rotation, scale and position, just in case - (CTRL + A).
While the object is still selected - import .mdd file.

Play the animation, or select a different current frame to update the final result. Note that the shape key animation rather increases the size of the project.

Many thanks to  Mr Zak, m.ardito from blender.stackexchange.com and to Richard Marklew, benu from blenderartists.org for their help in finding solution!


Use Ctrl+R to loop cut. This is useful for making new edges/verts around an object. Do this and select the part of the handle, then press S to scale everything up so it matches. All in Edit Mode of course.

Additional tip:
For the tip of the broom, you can either make "hair" strands (Look up hair/grass/fur tutorials), or you can extrude the broom staff all the way back, scale it up a bit, and add transparent textures with the strands. The last one is most useful if you're going to use this in a game though.

You can also subdivide your object and enter sculpt mode to make the patterns on the broom handle.


No. However, by theory of relativity, you can achieve the exact same effect by placing the 3D cursor at the origin (Shift+C), setting the transform orientation from “median point” to “3D cursor,” selecting all, and then transforming.


How would I create a dent on a car from a falling object? Details in body message

If you go in the object data properties , the triangle with 3 dots , you'll find a setting known as shape key , so you can create 2 shape keys , one will be the Undented shape and another will be the dented shape , you can sculpt or manually move vertices o make the dented shape and then you can keyframe the value below it to the frame when your object descends.


Why can't I create a new face connecting the selected vertices?

Most likely there are overlapping duplicated vertices. The first image indicates a selection of 48 vertices, the second one 12.
So you should select all A then M to merge and "by distance".


With help from @batFinger I derived this working solution:

import bpy
import os

scene = bpy.context.scene
cam = bpy.data.objects['Camera']
obj = bpy.data.objects['Cube']

scene.render.image_settings.file_format = 'PNG'
scene.render.filepath = 'testImage.png'
scene.render.resolution_x = 640
scene.render.resolution_y = 640

# change mesh
path = r"assembly_upsampled.stl"
bpy.ops.import_mesh.stl(filepath=path)
obj.data = bpy.context.object.data
bpy.data.objects.remove(bpy.context.object)

# scale size
max_dim = 2
if obj.dimensions.length:
    obj.scale *= max_dim / max(obj.dimensions)

# render
scene.frame_set(scene.frame_end)
bpy.ops.render.render(write_still = True)


More light is what you need. Try to ensure that your lamps are not all placed near the stones, so as to give a more even illumination.

Keep in mind that the environment is directly affecting the brightness/color of reflective objects, so set the world color to at least a brighter gray, though white is probably to much.

Imagine (or look at reference images) the kind of ambient light there is reflected from the roof/walls and floor of a large, brightly lit ice rink/arena. Sort of a soft grayish white. Here's what I used for the image above (I didn't use any method to come up with this value, I just eyeballed it):

Note that enabling AO will really brighten things up, but I'm not sure that's what you want. (you can also use the AO pass to get finer control using the compositor)

There are a couple more things you can do to make your ice material look nicer:

Use the Layer Weight node to make reflections more intense at sharp angles.
Bump map the glossy shades separately from the diffuse shader, which is acting more like the floor under the ice. If you really wanted to be realistic you could use multiple objects and a glass shader, but it is quite unnecessary as separate bump mapping looks fine.
Use two glossy shaders, one for sharp reflections and one for softer reflections.

Here's the node setup used for the ice material in the above image:

Note that it is possible that the bump mapping in your material has gone wrong in some way, causing the gray ice. But it's impossible to say without at least seeing the nodes.


Wind Falloff

The force field in the scene is being affected by a high dampening due to the simulation of gravity introduced by the Falloff settings you are using. The wind is now acting as if it was dragged down by a strong force that is currently erasing its influence on the smoke.

If it is suitable for your project, my suggestion would be to simply come back to the default value of Falloff Power = 0.


Outlines display option "visible layers" does not work. How to fix it?

In the 3D view that you want the outliner to update on depending on what layer you're on, click the square with a link in front of it.


Set the normal
The default values of cutting plane coordinate and normal are (0, 0, 0).  A zero length normal is invalid and quite likely does nothing.
Test script
Here is a minimal working example of a script, adds a cube, runs the operator with plane coordinate at origin and its normal as the x axis. Recommend setting up a little script like below when asking questions
import bmesh
import bpy
from bpy import context

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

print('Nverts0',len(bm.verts), len([v for v in bm.verts if v.is_valid]))
bmesh.ops.bisect_plane(
    bm,
    geom=bm.edges,
    dist=0.0001,
    plane_co=(0, 0, 0),
    plane_no=(1, 0, 0),
    use_snap_center=False,
    clear_outer=True,
    clear_inner=False,
    )
print('Nverts1',len(bm.verts), len([v for v in bm.verts if v.is_valid]))
bm.to_mesh(me)

Result
Nverts0 8 8
Nverts1 12 12

Effectively bisecting all x axis aligned edges, creating 4 ngons with 6 verts.  Nothing to clear as faces are not "ripped".
Input geometry
For clear to work on a mesh that has faces, we are going to need to add the faces and verts to the geometry input of the operator.  Recommend with geom giving all geometry of a region of interest will make all options work as expected.
    geom=bm.verts[:] + bm.edges[:] + bm.faces[:],

making this change an running again
Nverts0 8 8
Nverts1 8 8

Has bisected cube, same vert count one less face.  The "outer" is cleared, ie all resultant geometry on the input normal's side of cutting plane.

Return Dictionary
Bmesh operators return information in a dictionary.
ret = bmesh.ops.foo.bar(blah)

in the case of bisect plane it has members "geom_cut" the edges and verts of the cut and "geom".
Some Examples of using bmesh bisect plane operator.
Python: Bisect mesh into n parts, without separate 'LOOSE'
using bisect but still failing
Slice up terrain mesh into chunks
How to get part of a mesh with Python API, which requires breaking down some faces?
Cutting a mesh in half
How to extract side-view outline (e.g. top view) of a 3D object to 2D surface?
Transform cylinder to flat plane - cylinder maze map


Script to fix texture nodes after importing a file

Loop the materials collection

Loop over the material collection. Need only do this once per material, rather than for each object that uses the material.

Search for links from tex node to bsdf and from color to alpha socket, if found unlink old, make a new link, and print the image name.

import bpy

for m in bpy.data.materials:
    if not m.use_nodes:
        continue
    print(material.name)
    node_tree = m.node_tree
    links = node_tree.links
    # list comprehension to find those links
    tex_ps_links = [l for l in links
            if l.from_node.type == 'TEX_IMAGE'
            and l.from_socket.name == "Color"
            and l.to_node.type == 'BSDF_PRINCIPLED'
            and l.to_socket.name == "Alpha"]

    for l in tex_ps_links:
        # print tex node image
        texnode = l.from_node
        if texnode.image:
            print(texnode.image.name)
        else:
            print("No Image")

        from_socket = l.from_node.outputs["Alpha"]
        to_socket = l.to_socket
        # make the new
        links.remove(l)
        links.new(from_socket, to_socket)
        # remove the old

Blender scripting connect nodes

Also note this one, where it maps socket index to name.  When playing around with languages noticed the names can be in a different language, eg Color in Spanish will fail the node.outputs["Color"] name lookup.

https://blender.stackexchange.com/a/160069/15543

eg instead of name test used above, if we know a socket number eg "Sheen Tint" is 11 could look for l.to_socket == l.to_node.inputs[11] instead of l.to_socket.name == "Sheen Tint"


How to move multiple faces along their individual normals?

Set Transform Orientation to Normal (, 2) and Pivot Point to Individual Origins, then hit G and then Z button twice to move along normal.
Using Alt+S shortcut will do the same for individual faces, but will scale faces that are connected.


How to make Eevee viewport background transparent?

You can use chosen color for EEVEE viewport using Light Path trick.

In the Shader Editor, go to World view and mix HDRI Background with Solid Color Background using Is Camera Ray. This way your HDRI will have influence over the scene, but it will not be visible in viewport/camera.

To make it transparent you can set Alpha in Solid Background Color to 0 but it will be pure black color then.

If you want to render with actual transparent background you will need to set Film > Alpha to Transparent:


Why isn't merge by distance allowing me to merge doubled vertices from different meshes?

The merge by distance work on single mesh data only. It doesn't need to be connected, but at least same mesh.

Usually you will need to join two meshes first and then merge doubles vertices. As an user dominant program, Blender should not do anything that user was not expecting for. It could be a good feature to make an option in operator. But multiple meshes editing is a new thing in 2.80, this is a new use case that developer need to consider.

So you might want to file your request as described here


Parent object to a bone and object becomes offsets! How do I prevent object from moving?

I have just tested batFINGER's code in Blender 2.79b, there is a bug in the formula.

When you multiply armature's world matrix with pose bone's object space matrix, you actually reached the bone head, not the bone tip, so you need to walk a bone's length to the bone tip, which is the origin of the pose bone.

Pose bone has a 'head' property and a 'tail' property, so we can calculate the bone vector, which equals to bone.tail minus bone.head.

I have verified the code in my project, it works correctly.

Here is the bug fixed version:

import bpy
context = bpy.context
from mathutils import Matrix
scene = context.scene
armature = scene.objects.get("Armature")
cube = scene.objects.get("Cube")

if cube and armature:
    cube.parent = armature
    bone = armature.pose.bones.get("Bone")
    cube.parent_bone = bone.name
    cube.parent_type = 'BONE'
    # keep current location
    cube.matrix_parent_inverse = (armature.matrix_world * Matrix.Translation(bone.tail - bone.head) * bone.matrix).inverted()


A release candidate can be downloaded at  https://builder.blender.org/download/

From the release Notes:

  As the 2.79 is an important release before the transition to the 2.8 series, please help Blender by testing the available builds and reporting possible issues.

  Compatibility Warning

  When using add-ons in Blender 2.79 that take advantage of the new data-block pointer properties, the resulting .blend files can't be opened in earlier versions of Blender. Attempting to open such .blend files in Blender 2.78c and earlier may crash.

Where should I report bugs? Read this


Is it possible to make a change that affects the whole animation but keeps the original animation relative to the change? (like 3ds Max)

Let's start with a simple animation.

With the Delta Transforms
I think this would be the preferred way to do it since it is pretty straightforward.
Head in to the object properties and expand the Delta Transforms panel. There you can add an additional transform that will be added to the animation.

Note the Delta Transforms can also be animated.
With the graph editor :
Hide all the channel you want don't want to offset. Select the channels you want to offset with A while hovering over the curves.

Now type G, Y, 100 and Enter to validate. This will grab (G) the curves, and move them uniformly along the Y axis (the actual transforms values) by 100 units.
Note that if you press G, X and a value this will offset the keyframes along the time axis.
You can also access the Grab tool by going Key > Transform > Move


For " Follow active quads" method, do I need to make the entire object active or just the outside face?

You can use Follow Active Quads on any selection you want.
I doesn't have to be the whole mesh.

Example of unwrapping a part of mesh using Follow Active Quads.


The simplest method of creating mist is to simply use the Compositor to use the Z pass to control a Mix Color node.

The Divide node should be set to the range of the required mist in Blender Units - ie, the distance between the point where there is no mist to where the mist is fully obscuring the scene. The Subtract node can be set to indicate where the mist starts - with zero being at the camera and 1 being the distance specified in the Divide node. The color of the mist can be set in the Mix node.

EDIT : The above screenshot (and the one below) have Clamp enabled on each of the Maths nodes. While this appears to work in my specific example it will cause problems with different values and as the Subtract gets closer to ‘1’. Only the last node in the chain should be set as Clamp - so in this case just the Subtract node - otherwise the clamping on the previous nodes interferes with the result.

The Blend file linked in the question seems to be empty so here is a simple forest scene to use as a demonstration.

Varying the Divide node to control the depth of mist can produce different apparent density of mist.

Varying the Subtract node changes the 'closeness' of the mist.

Using a dark color can also be quite effective for a night scene (with local light).


Blender 2.8: Restrict influence of Force Field to its Collection

I hope it's not too late for this answer, I just found out how to do it. In the properties of your particle system, at the Field Weights tab, there's an option named Effector Collection, select the collection where your force fields are and that's it.


optimal transcoding format (3d viewport and VSE)?

OpenEXR for a multitude of reasons. Half EXR is superior in every way compared to every other format if you are [intra | inter] pipeline at equivalent bit depth.


How do I bake a Bent Normal Map in Blender

I managed to write an Open Shading Language script that provides an ambient amount output (AO) and a direction vector from which the most ambient light came from. This can be used to create the bent normal map.

To use it, switch render engine to Cycles and enable the Open Shading Language checkbox.

For the object from which you want to bake the Bent Normals add a material if there isn't one yet. In the Material Node Editor add a Script Node and select this script:
AmbientOcclusionDirection.osl

Make sure the input Normal node is connected to the Normal from a Geometry input node. And the output NonOccludedDirection node to the Normal node of the shader.

Then bake as you would bake a normal normal map :-)

To check if the Distance and Samples settings are reasonable before baking, connect the AmbientOutput to the color and make sure the AO gradient is nice.


Change a Driver based on which Scene is being Rendered

It is possible to script drivers. Normally if you use a scripted expression as a driver, you can use any function that is defined in any script and added to driver namespace:

import bpy

def f():
    if bpy.context.scene.name == 'Scene.001':
        return 1
    else:
        return 0

bpy.app.driver_namespace['f'] = f

'Register' would need to be checked in the Text Editor also the script needs to have .py extension and Auto Run Python Scripts must be enabled for the function to exist every time the file is reloaded.

However apparently this does not work with driving material node properties because Blender's drivers seem to be broken in this area.

It would probably be possible to script an app handler that would take care of it, but at this point I would suggest to simply use a script to switch the mix nodes in all of your materials before rendering. Since this extra step takes only a few seconds it might be easier to have less complexity and you could possibly get away with only one scene as well. You could give the Mix node some specific name in every material like for example "OSL_mix"(in the n panel of the Node Editor). Then you could run this to change the values of the nodes with that name in all your materials at once:

import bpy

for m in bpy.data.materials:
    for n in m.node_tree.nodes:
        if n.name == "OSL_mix":
            n.inputs[0].default_value=1 # or 0

For your convenience you could change the render setting with the script as well by adding something like:

bpy.context.scene.cycles.device = 'CPU' # or 'GPU'
bpy.context.scene.cycles.shading_system = True # that's the OSL
bpy.context.scene.cycles.samples = 1000

Or something like that. You can just change what you want in the render settings and copy the command from the Info panel.

I would just have two scripts like that to switch between CPU-OSL and GPU rendering.

I hope that might be a convenient enough workaround.


Here's a way to do this using modifiers:

Add a circle (⇧ ShiftA> Mesh > Circle) and set the number of Vertices to 6 in the redo panel to make a hexagon:

Take note of the X dimension of the object. With the default radius of 1 it should be 1.732:

Add an Array modifier with a relative offset of .5 and .75 to create a tile-able section with two offset hexagons:

Add an array modifier to tile the object along the X axis.

Note the X dimension of the object now with the modifier. It should be equal to original_x+(original_x/2) (2.598 with the default radius):

Set the relative X offset of the array modifier to original_x / modified_x), or .666...:

Add yet another array modifier to tile the object along the Y axis, with a Y offset of .857, or radius*3 / (original_y+original_y/2).
Increase the Count of the last two array modifiers as desired:

Now you have a wireframe, but it needs thickness. Switch to edit mode (↹ Tab), select all (A) and extrude (E). Cancel the transform part of the extrude (Esc) and scale down (S):

Enable Merge on all the array modifiers.
Add a solidify modifier (and optionally a bevel modifier):

In case you might want something more rounded, you can adjust the angle limit on the bevel modifier and toss a subsurf modifier on the end:


Get bones associated with specific action in python

Following is one way of getting the bones in a given action.

armature = bpy.context.scene.objects['Armature']
action = bpy.data.actions['ArmatureAction.002']

pose_bones = set()

for fcurve in action.fcurves:
    pose_bone_path = fcurve.data_path.rpartition('.')[0]
    pose_bone = armature.path_resolve(pose_bone_path)
    pose_bones.add(pose_bone)

>>> pose_bones
{
    bpy.data.objects['Armature'].pose.bones["R_lower_jnt"],
    bpy.data.objects['Armature'].pose.bones["R_hip_jnt"],
    bpy.data.objects['Armature'].pose.bones["R_thigh_jnt"]
}

Getting to the actual bone (that belongs to the data of the Armature) is accomplished like below

>>> bone = armature.data.bones[pose_bone.name]
>>> bone
bpy.data.armatures['Armature'].bones["R_hip_jnt"]

References

path_resolve
FCurve


Is there a way to address the shrink / fatten / radius values of individual vertices on a curve with animation nodes?

If you are creating the spline in Animation Nodes, you can evaluate the sound falloff and use it the the radii input in either the Spline From Points node or Create From Edges node:

If you already have the curve and want to edit its radius, use the Set Radius node:


Blender allocates memory for the undo stack when you perform undo-able actions. There is a limit to this allocation determined by the number of undo steps you have specified. See "User Preferences->Editing->Undo->Steps".


The Outliner doesn't show Parent-Child relations in blender 2.8

Child-Parent relations are displayed when the Outliner is in the Scenes mode. This can be selected from the header:

A convincing and efficient way of showing simultaneously Collection hierarchies and Parenting hierarchies has been looked for, but hasn't been found yet. I'd say that this is still likely to change before the Beta becomes Stable.


Blender renders the input video instead of Composite node

I solved it by trial and error. The Video Sequence Editor didn't have the scene strip. I thought the Composite block alone would override it if it were empty.


The Record Button keyframes automatically every change in the Viewport.
But that recorder works only in object mode, so not in Edit Mode, since keyframes are created for objects. Also it works for all properties in Blender wich already have one keyframe inserted. If you change them then they are automatically keyfamed too. If you need to change the "shape" of the object, you need to learn to use shapekeys (and you can animate them too).

However, you can also keyframe and animate the Vertices (because with your method you don't move the object, only the vertices) directly in the Edit Mode with the AnimAll Add-on. But this will only playback properly in Object Mode.


How to emulate tracking to objects like the 'Nokia snake game'?

No worries all, I found a website which describes perfectly what I wanted to do. My bad, ignore this!! Sorry.

For anyone else whom is dense, with poor research methods (like myself), please see this site:
https://wiki.blender.org/index.php/Doc:2.4/Manual/Modeling/Objects/Tracking


How to see the changes in the graph editor while rotating an object

The graph editor displays keyframed values. If you haven't keyframed a value then the graph editor doesn't have any data to display.

Similarly, as you move an object in the 3DView you are not altering any keyframed data so there are no changes being made to the data displayed in the graph editor.

Note that it does work the other way. After keyframing a value you can make adjusts in the graph editor and see the changes in the 3DView as you make them.


Linked scene in VSE doesn't run Python script

Make sure, in the User Preferences (Ctrl+Alt+U) you have Auto Run Python Scripts selected in the File Tab at the very bottom.


I can't get Object Index to give me a clean Luma Matte. Please Help!

My guess is you are only rendering at 50% resolution. At 100% resolution it will look sharper.

1920 px x 1080 px at 100% is probably fine for video.

If it's for a still image go crazy and try something like 6000 px x 4000 px at 100%.


Have you tried experimenting with different HDRIs? It could just be that the lighting you're getting from that specific HDRI isn't what you're looking for. If you want crisp shadows then maybe try looking for an HDRI that has a strong, single light source.

This is more anecdotal, but I've personally never had to put an HDRI at anything above a 2 in strength. This seems to lend more evidence to the HDRI itself being washed out/being the problem child


Is there a way to automatically remove ngons?

From left to right:

Add loopcuts CTRL+R. Number of loopcuts = number of vertices (I marked them with blue dots) except those in the corners, because they already have a proper connection.
Select and delete Ngons: Delete->Faces. Select edges
Press W-> Edge Bridge Loops


Creating realistic plastic with parting lines?

Here is a way to do it, you could make the parting with a simple extrude (but you could as well do it with a Bump node). To make the plastic material you could mix a Diffuse with a Glossy node. To create the small wave bumps and the logo, use a MixRGB (Add mode) to mix a Wave texture with an Image Texture, and plug the MixRGB into the Normal sockets of the Diffuse and GLossy.


Trying to render a .mov file in Blender's video editor

You also have to set the encoding settings correct.

The following settings will output a .mov file with h.264 codec.


Problem with sharp edges after subdivision surface modifier

Looks like I've found an answer. Don't know how, but all normals were mixed up, so modifier went crazy. Shift+N solved the problem.

Now I have the habit of checking normals before using any modifiers and posting simple questions =)).


Have you tried the J "join" tool instead?

Here is a link to the Blender Reference Manual on Vertex tools

https://www.blender.org/manual/modeling/meshes/editing/vertices.html


What is this and how do I get rid of it?

The issue is being caused by the presence of an extra face inside the mug. Its a quick fix; in edit mode, select it and press  X  > Faces.

Also note that there's an Ngon near the base of the mug that could use some splitting, for uniformity's sake. In edit mode, select the top and bottom vertices and press  J .

This should do it, good luck!


Animate mesh so it's parts appear from left to right

There are at least 2 ways to do it: With a Boolean modifier or with a Build modifier.

You could use a Boolean modifier (Difference mode). It looks like you'll avoid bugs if your boolean object (my cube) is a bit subdivided:

To make the cube transparent in Solid mode, choose Viewport Display > Wire, to make it invisible in Render, disable all its Ray Visibility options.

For a different kind of effect you could use the Build modifier, it will make your object gradually appear, face by face, as if you were building it:

Model your object, in Edit mode put the 3D cursor on its tail:

Select all, in the Mesh menu > Sort Elements > Cursor Distance. It will sort the vertices from the tail to the head.

Give your object a Build modifier, play with the parameters so that the object appears gradually. You can animate with some keyframes on these values.


Change slightly Strenght value of first Displace modifier.
Or move vertices a bit on Y axis.
In this case t is caused by first Displace modifier that brings vertices in conflict position for boolean operation. Usually it is some overlapping geometry that creates weird cut that collaps all system :)
Sometimes helps to change Overlap Threshold value, but not in this case. In general just change a bit topology in any way.


List of vertices at intersection of two objects

Just a possible way to do this (there might be a better method to do this):

First set up materials on both objects (as in my answer in the link) and apply the boolean modifier: How to colour an indent that's been produced by a Boolean modifyer in 2.8

Then select by each individual materials, loop through them and save those vertices that are in common for both material selections. These should be the vertices you are looking for!

Happy blending!


You can type dir(C.active_object) in python console to print all properties of currently active object.


Can you put Multiple physics simulations in one scene simultaneously?

In your physics settings, go to the cache tab and choose free all bakes

Once you have done that choose Bake all dynamics. That should do what you need.

FYI: If you want your smoke simulations to interact, the easiest method is to have them in one simulation, else it becomes tricky. Someone else may have a way to do so but this is the best method I can think of.

Good luck with your project and I hope I helped,

BFB


Blender report error during loading: DNA block missing

I found a solution if this happens. go to recovery and save the files again . Need some luck too :)


Construct a cuboid as a minimum bounding box with native dimensions that work in a mathutils analysis

I implemented a minimum bounding box algorithm as an addon that simply attempts to fit a box from many different directions.  It is not exact, however it is robust :-)

https://github.com/patmo141/object_bounding_box


Realism mistakes/tips/tricks/ for modelling/texturing realistic low poly terrains

I found the original artist's ArtStation page (https://www.artstation.com/artwork/Qqy0B) and the information on the left says he did photoscan a lot of the models.

My guess is his process went something like this. Keep in mind that this is only how I would imagine something like this would be done. This isn't an area I'm particularly familiar with, nor do I know what programs he all used, or exactly how the final models are put together.

All of the square terrain models are definitely photoscanned. It may be possible for a highly talented artist to create something like that from scratch, but it would take a huge amount of time, whereas photoscanning by comparison is much quicker. Given that he was working for a game, the company would want the fastest results with the highest quality, for which photoscans are great.

Photoscanned models are very high in detail to start with. From the silhouettes of the models it appears that they have been either retopologized, or the model started as a subdivided plane. The terrain models have a fair amount of detail in them, much more than your model does.

From the photoscanned models, the artist most likely baked the maps from the high resolution mesh to a low resolution one, possibly even just a plane. This would give maps that could be applied to the low detail object and give it the appearance of high detail. A displacement map could also be greated this way, so the terrain models could be subdivided planes.

For the large terrain models, he did you WorldMachine, which is a program specifically made for making large terrains.I haven't used it, but I can guarantee it has terrain building features that Blender doesn't, that's just the nature of the two programs. The artist most likely created the large terrain models, and then used the textures he created from the photoscanned models to add the smaller details. All of the created textures would be layered on each other at the place he wants the detail to be, and they would be blended into the rest of the terrain. I have no idea how WorldMachine handles geometry, but it's likely that there is a way to add more geometry to high detail areas, so the displacement map would look good. If you want some more information, look at how others have created game terrain, such as this discussion here: http://polycount.com/discussion/88933/how-to-make-terrains-for-games.

Now that's all great, but you want to recreate this in Blender. For the small terrain sections that's definitely possible. However, if your end goal is large game terrains, I would suggest using the game engine you plan on using. Unreal Engine 4, for example, is often used for level/world creation and levels are often built in the editor. If realism is your goal, I would definitely suggest UE4, Unity, or some other capable engine for building your levels. The Blender game engine won't be the way to go for creating terrains like this.

To create terrain like the artist did, I would suggest starting with a photoscanned model. Photoscanning yourself is a lot of work, so try to find some free models online. Quixel has some great free models, such as this one here: https://megascans.se/assets/rjgmQ.

From that model, work on retopologizing it if you are only using it once, but if you want it to be entirely map based, then bake some maps from the model. There are plenty of baking tutorials online (make sure you search somewhat specifically for blender related baking tutorials unless you feel like making cakes or cookies).

I can only say so much here, and I don't have the most experience in this area. What I can say for sure though, is that creating terrains like this is an art form that requires a lot of time and practice to get right.


You have to work in segments, layers and sometimes different blend files linked together.

For such large models it makes no sense to have the whole object loaded at once. Split it in smaller chunks that you can work separately.

Use layers not to have all of the geometry visible at all times. Objects that are hidden save them on a different file and link them only when you need them.

If you are doing the detail of a doorknob, for example, you don't need the towers or any of the landscape.

Think of what is your final goal for this scene. Objects that are not going to be seeing in detail in the final product can be rough and don't need as many vertices as those that are meant to be features prominently.

Most importantly you need to start thinking of a strategy to render (if you are making images) or to split it in to much smaller and manageable parts for it to work on a game (if you are creating assets).

Unless you have supercomputing power at your disposal (which I doubt judging from your post) You need to fragment your scene.  Close to 3 million faces with no textures yet is a lot for an average computer.

Reality has to sink in at some point and you have to realize that blender can deal vast amounts of information, but your computing power is limited, and I think you are getting close to the max.

Try to decimate the geometry, use the minimum amount of subdivision that you can get away with. Use instances instead of duplicating objects (see these links: How can I save memory in cycles when I have a lot of duplicates? and What techniques have been used to repeat geometry or other detail to the infinite horizon?)

Plan ahead so that your scene can be rendered: https://www.blenderguru.com/articles/how-to-render-a-complex-scene-without-crashing


Add a Keyframe Option to a Button in a Panel

Window manager properties are not animatable

Doh.. should have looked harder. The issue here is the use of window manager

>>> C.window_manager.keyframe_insert('test')
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: bpy_struct.keyframe_insert() property "test" not animatable

Use another ID type, Scene for example and all is sweet.

import bpy
from bpy.props import BoolProperty

def update_test(self, context):

    test = int(self.test)
    return

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

    def draw(self, context):

        scene = context.scene
        layout = self.layout
        layout.use_property_split = True
        layout.use_property_decorate = True
        obj = context.object

        col = layout.column()
        col.prop(obj, "location")
        row = self.layout.row()
        sub = row.row()
        label = "test = 1" if scene.test else "test = 0"

        sub.prop(scene, 'test', text=label, toggle=True)

        return
        icon = 'DECORATE_KEYFRAME' if wm.test else 'DECORATE'
        sub.operator("object.simple_operator", text="", emboss=False, icon=icon)

def register():
    bpy.types.Scene.test = BoolProperty()
    bpy.utils.register_class(HelloWorldPanel)

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

if __name__ == "__main__":
    register()

Notice can emulate this with an operator. Have put in the draw method to display only icon for operator (example toggles icon simply using bool value)  Otherwise could pass the path to operator and keyframe insert, change icon based on key at that frame.