I wrote the function get_3x4_RT_matrix_from_blender to do this, listed below.
import bpy
import bpy_extras
from mathutils import Matrix
from mathutils import Vector

#---------------------------------------------------------------
# 3x4 P matrix from Blender camera
#---------------------------------------------------------------

# Build intrinsic camera parameters from Blender camera data
#
# See notes on this in
# blender.stackexchange.com/questions/15102/what-is-blenders-camera-projection-matrix-model
def get_calibration_matrix_K_from_blender(camd):
    f_in_mm = camd.lens
    scene = bpy.context.scene
    resolution_x_in_px = scene.render.resolution_x
    resolution_y_in_px = scene.render.resolution_y
    scale = scene.render.resolution_percentage / 100
    sensor_width_in_mm = camd.sensor_width
    sensor_height_in_mm = camd.sensor_height
    pixel_aspect_ratio = scene.render.pixel_aspect_x / scene.render.pixel_aspect_y
    if (camd.sensor_fit == 'VERTICAL'):
        # the sensor height is fixed (sensor fit is horizontal),
        # the sensor width is effectively changed with the pixel aspect ratio
        s_u = resolution_x_in_px * scale / sensor_width_in_mm / pixel_aspect_ratio
        s_v = resolution_y_in_px * scale / sensor_height_in_mm
    else: # 'HORIZONTAL' and 'AUTO'
        # the sensor width is fixed (sensor fit is horizontal),
        # the sensor height is effectively changed with the pixel aspect ratio
        pixel_aspect_ratio = scene.render.pixel_aspect_x / scene.render.pixel_aspect_y
        s_u = resolution_x_in_px * scale / sensor_width_in_mm
        s_v = resolution_y_in_px * scale * pixel_aspect_ratio / sensor_height_in_mm

    # Parameters of intrinsic calibration matrix K
    alpha_u = f_in_mm * s_u
    alpha_v = f_in_mm * s_v
    u_0 = resolution_x_in_px * scale / 2
    v_0 = resolution_y_in_px * scale / 2
    skew = 0 # only use rectangular pixels

    K = Matrix(
        ((alpha_u, skew,    u_0),
        (    0  , alpha_v, v_0),
        (    0  , 0,        1 )))
    return K

# Returns camera rotation and translation matrices from Blender.
#
# There are 3 coordinate systems involved:
#    1. The World coordinates: "world"
#       - right-handed
#    2. The Blender camera coordinates: "bcam"
#       - x is horizontal
#       - y is up
#       - right-handed: negative z look-at direction
#    3. The desired computer vision camera coordinates: "cv"
#       - x is horizontal
#       - y is down (to align to the actual pixel coordinates
#         used in digital images)
#       - right-handed: positive z look-at direction
def get_3x4_RT_matrix_from_blender(cam):
    # bcam stands for blender camera
    R_bcam2cv = Matrix(
        ((1, 0,  0),
         (0, -1, 0),
         (0, 0, -1)))

    # Transpose since the rotation is object rotation,
    # and we want coordinate rotation
    # R_world2bcam = cam.rotation_euler.to_matrix().transposed()
    # T_world2bcam = -1*R_world2bcam * location
    #
    # Use matrix_world instead to account for all constraints
    location, rotation = cam.matrix_world.decompose()[0:2]
    R_world2bcam = rotation.to_matrix().transposed()

    # Convert camera location to translation vector used in coordinate changes
    # T_world2bcam = -1*R_world2bcam*cam.location
    # Use location from matrix_world to account for constraints:
    T_world2bcam = -1*R_world2bcam @ location

    # Build the coordinate transform matrix from world to computer vision camera
    # NOTE: Use * instead of @ here for older versions of Blender
    # TODO: detect Blender version
    R_world2cv = R_bcam2cv@R_world2bcam
    T_world2cv = R_bcam2cv@T_world2bcam

    # put into 3x4 matrix
    RT = Matrix((
        R_world2cv[0][:] + (T_world2cv[0],),
        R_world2cv[1][:] + (T_world2cv[1],),
        R_world2cv[2][:] + (T_world2cv[2],)
         ))
    return RT

def get_3x4_P_matrix_from_blender(cam):
    K = get_calibration_matrix_K_from_blender(cam.data)
    RT = get_3x4_RT_matrix_from_blender(cam)
    return K@RT, K, RT

# ----------------------------------------------------------
# Alternate 3D coordinates to 2D pixel coordinate projection code
# adapted from https://blender.stackexchange.com/questions/882/how-to-find-image-coordinates-of-the-rendered-vertex?lq=1
# to have the y axes pointing up and origin at the top-left corner
def project_by_object_utils(cam, point):
    scene = bpy.context.scene
    co_2d = bpy_extras.object_utils.world_to_camera_view(scene, cam, point)
    render_scale = scene.render.resolution_percentage / 100
    render_size = (
            int(scene.render.resolution_x * render_scale),
            int(scene.render.resolution_y * render_scale),
            )
    return Vector((co_2d.x * render_size[0], render_size[1] - co_2d.y * render_size[1]))

# ----------------------------------------------------------
if __name__ == "__main__":
    # Insert your camera name here
    cam = bpy.data.objects['Camera.001']
    P, K, RT = get_3x4_P_matrix_from_blender(cam)
    print("K")
    print(K)
    print("RT")
    print(RT)
    print("P")
    print(P)

    print("==== Tests ====")
    e1 = Vector((1, 0,    0, 1))
    e2 = Vector((0, 1,    0, 1))
    e3 = Vector((0, 0,    1, 1))
    O  = Vector((0, 0,    0, 1))

    p1 = P @ e1
    p1 /= p1[2]
    print("Projected e1")
    print(p1)
    print("proj by object_utils")
    print(project_by_object_utils(cam, Vector(e1[0:3])))

    p2 = P @ e2
    p2 /= p2[2]
    print("Projected e2")
    print(p2)
    print("proj by object_utils")
    print(project_by_object_utils(cam, Vector(e2[0:3])))

    p3 = P @ e3
    p3 /= p3[2]
    print("Projected e3")
    print(p3)
    print("proj by object_utils")
    print(project_by_object_utils(cam, Vector(e3[0:3])))

    pO = P @ O
    pO /= pO[2]
    print("Projected world origin")
    print(pO)
    print("proj by object_utils")
    print(project_by_object_utils(cam, Vector(O[0:3])))

    # Bonus code: save the 3x4 P matrix into a plain text file
    # Don't forget to import numpy for this
    nP = numpy.matrix(P)
    numpy.savetxt("/tmp/P3x4.txt", nP)  # to select precision, use e.g. fmt='%.2f'

Detailed Tests

I included some helper functions and tests to cross-check the 3D-2D projection process with another approach using world_to_camera_view from @ideasman42's answer to How to find image coordinates of the rendered vertex? The floating point coordinates match up perfectly up to many decimal places. To get the integer pixel coordinates after projection, just round them.

I tested this visually and analytically with a few scenes, to make sure both routines were exactly correct on actual rendered images.

I represented e1, e2, e3 and O with small cone objects whose tips were at the desired positions
and coded with different colors: Red for X, Green for Y, Blue for Z
I placed the camera at a convenient location at first,
R = identity, T = (0,0,5)
I used default Blender parameters for the camera intrinsics
I computed the P matrix by hand and computed it using my rountines and they match perfectly
Visually comparing both the Cycles render and the OpenGL render in GIMP show that the produced coordinates match well visually (up to perhaps +- 1 pixel error, which is the sort of thing this careful testing was carried out anyways - to be investigated).
I then arbitrarily rotated and translated the camera such that the world e1, e2, e3 remain visible and at general locations. The projections match visually in the rendered images, and also match to the ones given by the object utils routine given above.

Here is an example of a test output:
  K
<Matrix 3x3 (2100.0000,    0.0000, 960.0000)
            (   0.0000, 2100.0000, 540.0000)
            (   0.0000,    0.0000,   1.0000)>
RT
<Matrix 3x4 (-0.0594, -0.9483, -0.3118, -0.6837)
            ( 0.6234,  0.2087, -0.7536, -0.1887)
            ( 0.7797, -0.2391,  0.5787,  4.2599)>
P
<Matrix 3x4 ( 623.8236, -2220.9482,   -99.1637, 2653.7441)
            (1730.0916,   309.2392, -1269.9426, 1904.1343)
            (   0.7797,    -0.2391,     0.5787,    4.2599)>
==== Tests ====
Projected e1
<Vector (650.3716, 721.1436, 1.0000)>
proj by object_utils
<Vector (650.3716, 721.1436)>
Projected e2
<Vector (107.6402, 550.4857, 1.0000)>
proj by object_utils
<Vector (107.6403, 550.4857)>
Projected e3
<Vector (527.9586, 131.0692, 1.0000)>
proj by object_utils
<Vector (527.9586, 131.0693)>
Projected world origin
<Vector (622.9655, 446.9949, 1.0000)>
proj by object_utils
<Vector (622.9656, 446.9949)>

Here is the test set with the blender rotation and location for the camera.

Here is the OpenGL render. The coordinates output above match the tip of the cones visually (up to +- 1 px error, perhaps due to aliasing).

Limitations: this code currently does not support certain intrinsic camera parameter configurations, see my answer to What is blender's camera projection matrix model? for a list of the limitations to get_calibration_matrix_K_from_blender.
Object coordinates: to deal with object coordinates, first transform to world coordinates, see my answer to How to find image coordinates of the rendered vertex?
Matrix multiplication used to be * before Blender 2.8, newer versions use @ instead


How to find an object's locational displacement in Blender using Python?

I'd use a driver based approach

Define a function interp which maps a value from one range to another, in this case the displacement range to 0,1 used for color.  Copy this script and run it in the text editor.

import bpy
def interp(value, f, t):
    m = (value - f[0]) / (f[1] - f[0])
    return t[0] + m * (t[1] - t[0])

#register it in the driver namespace

bpy.app.driver_namespace["interp"] = interp

Now if we look at an object that moves from (1.0, 0.0, 3.0) in frame 1 to (100.0, -199.0, 0.0) in last frame. Add a driver into the red color field field by typing

#interp(frame, [1.0, 100.0], [0.0, 1.0])

straight into the field, the # tells it to interpret it as a driver.  Could do this for r, g, b for x, y, z.  If you use object.color then you can do this quickly on each object, otherwise you will need  to create a material for each object.

Once you have made a driver it can be copied and pasted to other fields, requiring only to edit the location range. If you have zillions of objects probably pay to write a script, or request help on writing one to automate the creation of drivers.


How to apply rotations for seperate object's axis?

cont = bge.logic.getCurrentController()
own = cont.owner

#Set orientation to euler!
orientation = own.worldOrientation.to_euler()
#Set up orientation of each axis
orientation.x = 0.0
#Apply rotation
own.worldOrientation = orientation

Here is the code that resolves the problem! It absolutely works


Can 2 sets of parented objects be added to a 3rd parent?

Yes, this is possible.

Just select the parents of each individual set of parented objects and parent them to another object.  Note: it is often good practice to use empties as parents for sets of objects for this kind of application.


It can be a little confusing at first to figure out how materials are applied and to which objects. Are you sure the object you're rendering is the one to which you've applied the pictured texture? You seem to have a lot of similarly named objects in the animation.
I'd recommend you make sure you don't have duplicate objects in the same space, and then make sure the material is applied to the one visible in the render.
Good luck!


If you just want to copy the rotation values, there is "Copy Rotation" in the Constraints tab, no need for Python scripts. If you need it for a Python script, objects have rotation_euler, rotation_quaternion, and rotation_axis_angle attributes, and rotation_mode for selecting one of them.


Blender Game Engine: do something when an actuator happens

Ironically, we have an "Actuator" sensor. weird right?
all you have to do is set up one of these and it will send a positive pulse every time the specified actuator changes.

or (recommended) you can simply hook the property actuator to the exact same sensor that your fire animation uses.


Adding Thickness to a 3D Textured Plane in Blender

Use the displace modifier on your plane, setting the texture to your aforementioned texture. You'll need to have enough vertices on the plane for this to work - if it's still just a 4-vertex plane, either subdivide everything multiple times in Edit mode or add a higher Subdivision Surfaces modifier before the Displace modifier. Play around with the setting until your texture is elevating itself nicely out of the plane without crashing your computer (or your 3D printing company's limits).

Then in edit mode select all the vertices down (E key) and after extrusion scale all of them to end on the same height so they form a flat surface to make your box.


Pie menu gone! No, addon is not the correct one

The options are not the same, but the "Mode Selection" Pie menu is the one on your image and the shortcut is Ctrl + Tab


For some odd reason this has happened to a student of mine several times. When we go to her keymaps we find Context enum menu mapping mapped to left click. She has not did that herself but it comes back even after reinstall etc. I have no idea why but it happens.
Taking the tick off the context enum menu or changing it to something else works (for example the normal E).
Go to
Edit > Preferences > Keymap, search for Context Enum or Left Mouse to find it.

Your keymap might look like this

It should look like this


To set settings:
import bpy
import json

my_txt = '''
{
    "render": {
        "engine": "BLENDER_EEVEE"
    },
    "eevee": {
        "taa_render_samples": 45,
        "use_motion_blur": false
    }
}
'''

render_settings = json.loads(my_txt)

for section in render_settings.keys():
    for name, value in render_settings[section].items():
        setattr(getattr(bpy.context.scene, section), name, value)

To get primitive settings:
import bpy
import inspect

primitive_types = {int, str, float, bool}

section = bpy.context.scene.render

def is_valid(i):
    if i[0].startswith('_'):
        return False
    if not type(i[1]) in primitive_types:
        return False
    if section.is_property_readonly(i[0]):
        return False
    return True

settings = inspect.getmembers(section, lambda i: not(inspect.isroutine(i)))
settings = dict([i for i in settings if is_valid(i)])

for name, value in settings.items():
    print(name, value)


Blender AttributeError: 'PreferenceView' object has no attribute 'use_international_fonts'

It seems that the version of Groove3D that you're using hasn't been updated for Blender 2.83. This Blender version introduced a change to the Python API. The handling of languages and translation were adjusted by:

https://developer.blender.org/D7210
https://developer.blender.org/rB968619d03626c7e4d92d4cb383ac304b72595af3

As a consequence the use_international_fonts mentioned in the error message no longer exists.
Therefore, I would suggest you contact the developer, in case they aren't aware of this change. In the meantime you could use the add-on in Blender 2.82.


How to set up game engine publishing (cross-platform) addon?

Click on the arrow pointing down below the platforms label, there should be a button to automatically download and install them for you. Alternatively you can download them manually from www.blender.org, basically just download blender for windows/mac (zip version) and extract them on the //lib folder.

However, if you really are looking for a profesional way to publish your game, avoid using the addon at all, use a launcher instead. BGECore comes with a ready-to-use launcher: https://github.com/elmeunick9/BGECore/tree/master/tools/Simple%20Launcher


How do I make an object begin following a path, but only after a certain point?

If you use Follow Path object constraint(Ctrl+p -> Path constraint with object and path selected path being last/active), you have a property of Influence that you can animate(set keyframes to with i while hovering mouse over it) in order for it to start having influence only at some point.


It's because of the bit depth you're using in your file.
For short, you're using a 8bit depth picture, which is limited to 256 levels of shade for each red, green and blue channel. It's enough data for display on internet, but it's quickly limited in CGI.

When you create a picture in blender to bake your normal map in, make sure to check the "32 bit Float".

Then when you save your picture, you need also to use a format that supports all this data. You can check this in detail in this Blender manual page, but just keep in mind that usually internet-friendly picture formats like jpeg or png don't support that and the best option in Blender will be Open EXR with full color depth.

Then, you can use this as-is. It's heavier though, so if storage usage is a concern, there's a little trick you can do: convert that 32bit into a 8bit dithered. Basically, you would still be in 8bit with not enough data to make correct normals, but the dithering of values will make it less perceptible. If used well, it might not even be noticed.

More detailed infos and how-to's in this CG Cookie video:
https://www.youtube.com/watch?v=6D5tBEjS-N0


Is it possible to denoise a baked texture?

You can, using the node setup you show in your screen shot. The only thing you need is to open the image editor, set it to show the composite output or viewer node result. Then you will be able to save your picture using the menus or via alts.


How do I randomise a glossy node's roughness within a specific range?

All that is needed is a bit of math:

With an input of 1: 1 * .03 = .03, .03 + .02 = .05
With an input of 0: 0 * .03 = 0, 0 + .02 = .02


How to bake using Principled + cycles under reasonable time? GPU + CPU = Instant crash

OK, looks like todays (07/07/2018) Blender 2.79 is baking using GPU + CPU without crashing. Plus I've unchecked the square samples and now it baked the same file with same node setup in 40min instead of 44 hours.

very nice!


I want to render a few frames and all I get is a black screen

The 'active camera' is the one used for rendering. To make a camera the active camera, click on it and press Ctrl + NumPad 0.
To render a single frame you press  F12 or in the top left corner click Render > Render Image.


How can I control one modifier on five different models

By using drivers you can use one value to control multiple settings.
In the watch (or the first strap piece), add a custom property called StrapLength then use that property to drive the array modifier value of the other pieces. Right click on the array count value and select Add Driver, then in the driver properties you set it to use a single property and select the object and set the path to ["StrapLength"]. Repeat for each piece in the strap.

Then when you adjust the property, each array using the value in the driver will change at the same time.


Part of object and texture colour not rendering properly, lamps beside sun does not work

there are several things that went wrong:

no lamp other than the sun working:
thats indeed due to the fact that your frame is 400 m wide. Lamps in Blender (as in the real world) have a quadratic light falloff. so the strength is dependent on the distance from the lamp and your object. if you want to have light from 500m away, the strength must be something like (insert a really high value here).
The sun doesn't have a falloff in blender as it has no real location, it's just a directional light source.
Your image plane is not a plane. it has 8 vertices and the faces overlap each other.
go into edit mode with TABface select (shift + TAB) select the front face and delete it ( X > Faces)


Error: Object 'Sphere.022' has no mesh data to be used for ray casting

You need to link the object to the scene and update it for ray casting to work.

import bpy, mathutils

obj = bpy.data.scenes[0].objects["Cube"].copy()
# Insert your new object in the scene
bpy.context.scene.objects.link(obj)
# Update scene
bpy.context.scene.update()

is_hit, hit_loc, hit_normal, index = obj.ray_cast(mathutils.Vector(), mathutils.Vector([1,1,1]))

print(is_hit, hit_loc, hit_normal, index)

Prints:

True <Vector (1.0000, 1.0000, 1.0000)> <Vector (0.0000, 1.0000, 0.0000)> 5

You might need to delete the object after your operation

bpy.context.scene.objects.unlink(obj)
bpy.data.objects.remove(obj)
del obj


fluid simulation showing and odd box instead of working

So that is actually the intended result. Let me explain.

Whats happened here is there has been a new object created, which is the "odd box" that you see. Your sphere is still there, you just cannot see it as it is inside of the box.

This box is what is know as the domain object. The domain is a boundary object that tells blender where fluid is allowed to be in your scene.

Your original object has now become a fluid object, and will behave like a ball of water (or whatever your settings make it behave like) when you run the simulation.

Now, if you just try and play the animation you will see that nothing happens. The reason for that is because the simulation has not been baked. Baking the simulation runs through the simulation and stores the simulation in memory so that it can be replayed faster. To bake a fluid, select the domain object, go to the physics tab of the properties panel, and about halfway down in that panel there will be a big button that has a water drop icon that says Bake on it (and the amount of memory it will take). Click on that, let it finish baking, and things should be as you expect. The bake may take up to a minute or so depending on your computer.


Draw rectangle around active window (C or Python)

It should be done in the C code, there's already something to highlight the active area.

With Python, you're pretty limited to draw handlers, which are attached to regions:

import bpy
import bgl

def draw_callback_px(self, context):

    # 50% alpha, 2 pixel width line
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor4f(1.0, 0.0, 1.0, 0.5)
    lw = 4 // 2
    bgl.glLineWidth(lw*2)

    r = context.region

    bgl.glBegin(bgl.GL_LINE_STRIP)
    bgl.glVertex2i(lw, lw)
    bgl.glVertex2i(r.width - lw, lw)
    bgl.glVertex2i(r.width - lw, r.height - lw)
    bgl.glVertex2i(lw, r.height - lw)
    bgl.glVertex2i(lw, lw)
    bgl.glEnd()

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "view3d.modal_operator"
    bl_label = "Simple Modal View3D Operator"

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type == 'LEFTMOUSE':
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.area.type == 'VIEW_3D':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "View3D not found, cannot run operator")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

    for area in bpy.context.screen.areas:
        if area.type == "VIEW_3D":
            bpy.ops.view3d.modal_operator({'area': area}, 'INVOKE_DEFAULT')
            break


This method works:

import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        for region in area.regions:
            if region.type == 'WINDOW':
                override = {'area': area, 'region': region, 'edit_object': bpy.context.edit_object}
                bpy.ops.uv.smart_project(override)

the important thing is passing override to whatever operator you are trying to call, this forces it to take that context for a brief moment. You can read a little about it at http://www.blender.org/documentation/blender_python_api_2_72_release/bpy.ops.html?highlight=override


How to calculate movement of a radius of one sphere to intersect another sphere and create a specified distance for the intersection

We'll start with the 12 mm radius sphere, note the 12mm chord is in the XY plane, so scaling on the Z axis won't change its size, it will only move the position in the Z direction. Because we can draw a right triangle with hypotenuse 12 (the radius) and leg 6 (half the chord length) we know the remaining side is $6\sqrt{3}$. When we squish the sphere by 90% that side will also squish, so the red dot winds up at $0.9 \cdot 6\sqrt{3}$

Moving onto the smaller, 6.63 mm sphere, we can again draw a right triangle, this time with hypotenuse 6.63 but still with a leg of 6. We need to resort to the distance formula $ k = \sqrt{6.63^2 - 6^2} $ to find the side length because this triangle wasn't special like the last one.

To position the red dots on top of each other, we need to move the green dot so it is in the right place below the red dot: $ \textrm{green dot} = 0.9 \cdot 6\sqrt{3} - \sqrt{6.63^2 - 6^2} $
The final result.


Best way to achieve floaty bouncy physics?

I realize that my first answer may be buggy (or at least I need to fix the issue), so here are 2 alternatives, with or without addon, I don't know if it will fit your needs though, as you ask for realism:
With the Wiggle Bones addon:

Create your mesh and armature. Download the Wiggle Bones addon created by Shteeve here. In Pose mode, select each of the ear bone and go in the Properties panel > Bone and enable the Wiggle Bone option, play with the parameters.

Without addon:

Create an edge, each of its vertex must stick to each bone's head and tail. Assign it a vertex group, the bottom vertex must have a weight of 1, the second a weight of 0.7, the last one a weight or 0.2 or 0.1.
Give this edge a Physics > Cloth and in the Physics Shape panel, choose the group as Pin Group.
Create an empty for each vertex, parent each empty to its vertex (select the empty, shift select the edge, go in Edit mode, press CtrlP > Make Vertex Parent).

Give each bone an IK constraint and give it as Target the empty its pointing to. Choose a Chain Length of 1.
Parent the edge to the head bone.


How to have volume material cast shadows?

You have to enable Receive transparent in the material settings of the floor plane:

Result:


Is there a way to display the radius of fluid control object?

You can do this through a driver with a few simple steps.

Right click on the "radius" setting and select "Add Driver".
Add an object as a visualizer for the size of the radius.
Select your control object again, and go to the graph editor.
Switch to driver editing mode.
Select to driver you created, and open the properties panel with n.
Scroll down to the variables section and select the visualizer object you created earlier.
Now change the type to X Scale. (we will scale x and y uniformly)
As the expression to be used, type your variable name.

Finished! You can now select your circle, and  scale it to adjust the radius value.
You can also change the steps a little to edit the value and have it change the object.

Instead of adding a driver to the "radius" value, add it to the scale of the circle.

Change the transform channel of the driver to single property.

Make sure the type is set to object.

Set the object to your fluid controller

Right click and copy the data path to the radius property.

Paste it into the RNA path section (ctrl+v)

You can now right click on your driver to copy and paste it for the "y" scale as well.
Notes:

These tips work for any object, such as a sphere.

You may need to change which frame of the animation you are on for the changes to take effect. Otherwise, Blender may not reload the data.

I hope this helps. Check out this little gif I made of the steps.


How do you create an infinite ground plane?

For Cycles:

I don't think this really is possible in cycles currently, however you probably don't actually need an infinite plane.

The camera will only render objects up to a finite distance away (end clipping value), so your plane only needs to be larger than this value to appear "infinite".

To do this, enable Limits in Camera settings > Display to display a line visualizing the start and end clipping of the camera:

As long as your end clipping value is reasonably high and your plane is larger than it, the plane will appear reasonably infinite:

If you instead want an effect like in iKlsR's answer, you'll have to do some compositing with renderlayers.

Move your diffuse ground plane to another layer
Create another renderlayer and set the layer to the layer on which your ground plane is, then enable the shadow, AO, and Diffuse indirect passes:

In this example, the ground plane is on layer 2 and the rest of the scene is on layer 1.
Enable Environment on the original renderlayer, which should also be set to only render the layer with all the objects besides the ground plane.
Enable Transparent in Render settings > Film
Composite:

Example .blend


Creating a wavy dot pattern in a Cycles shader

This tree divides the UV space into XY cells, and samples the sine of X at every cell to stagger the position of the Y cells.

This results in a modified UV space which looks like this: (X->R, Y->G, 0 at the center of each cell)

This space can be used to tile any UV-dependent texture in a sine-wave pattern.

In this case, we use the output vector as the 'Vector' input of a procedural dot:

With this sort of result:

It's actually quite tricky to adjust the frequency and amplitude so the cells sample the sine wave at the right rate to maintain the 'wavy' look, but I don't think that can be constrained to make it easier.. unless we fixed it to make every other row black, or something, so the right dots are associated with the right dots, perceptually. We could tweak it to do that, or something like it, if you like.

EDIT: @natedogg has improved the answer, to make it easier to see the pattern. (See OP) The attached .blend includes the improvement.


If you are in edit mode and you have the object selected (or part of the object) then press the period key on the num pad.

If you are in object mode you can do the same but if you have nothing selected on the object then select it in the outliner first.


The first thing i tend to teach people in 3d modeling is that loop cuts are good and that their geometries should be quad based.

Having told them that I immediately tell them that loop cuts arent ALWAYS a good thing and that not having them is sometimes preferential before they start to spam loops everywhere generating unnecessary geometry.

Its much more important that you have clean and simple topology than it is to work with loop cuts (unless you have a very good reason)

In your case I would finish the door and then model the lock as a separate object, keeping the geometry as simple as possible. If you parent the lock to the door (ctrl+p) it will stay with the door at all times when you move it.

Don't be afraid of non-manifold objects/meshes.
Unless you work in 3D printing, then be very afraid.


How do I hide wireframes of other objects, showing the wireframe of only one?

After searching comments on youtube for hours I found a few people having same issue, OPTIMAL DISPLAY  on SUBSURF MODIF should be UNTICKED , and Xray dropdown under Geometry WIREFRAME should be set to 0.5  to get the same display as Andrew.


Rigify pose Issue Mesh Deforming on knee

Thanks for the support Candice babe. But I finally figured it out! Woo Hoo!

Alright so I figured out that my Z Axis in the legs were facing the wrong direction of the Original Human Meta Rig Armature.

So then I was like, That looks wrong. I fixed it but I still had an Issue.

But Then I finally figured out I had to fix the Z Axis of my Foot's Roll. Makes perfect Sense.

So all in all for those of you with this issue.
Look for your armature's Foot IK (Which should be that little bone sticking out from the back of your foot) Find that, click it and press N to open your Window.
Next! Scroll to the top in that window and find Roll.
Change the Z Roll till it's pointing Downwards/Backwards and Bam! You got it fixed.

Tip: Now if you want to make a Horseman Just make your Roll face towards the front or   The Opposite Direction.


Slide object straight forward when object is facing a arbitrary direction i.e diagonal

You can change the transform orientation to Normal and move it on the according scale.

Also, you can select 'Individual Origins' and move them all at once across their own normal.


how to ad a panel in the properties/data Speaker specific

Add a poll method.
To narrow it down could look to see if context object is of type 'SPEAKER' or since it is in the properties space, there is a speaker context member available when the object is not a  speaker it will be none.
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 = "data"

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

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

        obj = context.object

        row = layout.row()
        row.label(text="Hello world!", icon='WORLD_DATA')


Is there a way to hide parts of an object?

You can use boolean modifier to cut volumes with other volumes.

(In the pictures below, the black object has faces and is set to wireframe display for better overview.)


Using the cycles experimental render engine, how do I use textures in nodes to create actual mesh geometry and not just bump?

Two reasons why your mesh is not displacing. 1= you have to give your mesh a subdivision modifier and set it to adaptive (Can be done only in experimental cycles mode) so you can have enough geometry for displacement. 2= Instead of adding a math node between your noise texture and displacement output, replace the math node with a displacement node. The color of your noise texture should first be plugged nto the factor of a color ramp node and the colour of the color ramp node into the height input of your displacement node. The scale input on the displacement node decides how heavily the mesh is displaced. Then connect the displacement node to your displacement output. Your mesh will be actually displaced now. Note: You have to foolow both the methods for real displacement to work. If you get really huge spikes on your mesh try reducing the scale on your displacement node. If it still doesn't work try subdividing your mesh in edit mode a lot of times and make sure to have adaptive subdivision on on your sudivision surface modifier.


Can I create deep divots in my mesh using sculpt brush? Is there a better way without booleans?

Well, after banging away for a while I concluded that the brushes are not really made to creating deep pits like I was thinking, an that actually editing the mesh would make the realism I want. So I went back to an earlier version of the watch band, one with the subsurf modifier still intact, and added lots of loop cuts until most of my faces were squares and there were no long skinny triangles. Then I increased my subsurf level from 2 to 3, made a backup, and applied it. This gave me a ton of evenly distributed geometry to work with.

Then, rather than trying to do it with a brush, I simply went to the top-down view, in vertex select mode, used the circular selection tool, and just selected a blob of vertices near each entrance/exit point of the thread.

Next I did proportional editing mode, sharp falloff, used individual origins, and just did G, Z to move the select vertices downward to create little pits.

The result is what I had in mind and looks pretty good when rendered.


The cornea is the transparent front part of the eye that covers the iris, pupil, and anterior chamber

(https://en.wikipedia.org/wiki/Cornea)

So my guess would be that you have found the normal map responsible for creating an apparent bump in the front of the eye.


how to get the vertice's Horizontal and vertical location in the window?

There is a function that does the conversion from 3d space to 2d view area location_3d_to_region_2d see the DOC :
in this example, i get the 2d coordinates in the area, window and the system screen

import bpy
from bpy_extras import view3d_utils

oa = bpy.context.active_object

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        viewport = area.regions[4]
        for v in bpy.context.object.data.vertices :
            #coo in 3d space
            co_3d = oa.matrix_world * v.co
            #coo in the 3d view area (2d)
            co_2d = view3d_utils.location_3d_to_region_2d(viewport, area.spaces[0].region_3d, co_3d)
            #coo in the blender window
            co_2d_w = (co_2d[0]+viewport.x, co_2d[1]+viewport.y)
            #coo in the system screen
            co_2d_s = (co_2d_w[0]+bpy.context.window.x, co_2d_w[1]+bpy.context.window.y)
            #display
            print("\n\n3d space co :",co_3d,"\n2d in viewport co :",co_2d)
            print("2d in window co :",co_2d_w,"\n2d system co :",co_2d_s)

NOTE :
this is what window ,area and region stands for in blender :


Can't get model manifold for 3d printing

Non-manifold doesn't necessarily mean double vertices (although there are quite a lot in your mesh). It could also mean that you have vertices inside your mesh. Import it into blender, tab into Edit Mode, then go to "3D Viewport - Menu - Select - All By Trait - Non Manifold". Try to delete the vertices and then try to verify on shapeways again.

Your second question: I don't have much experience with printing, but I think your model is way too complex and it also contains ngons.


What is the fastest way to create a curved plane?

I usually do it like this, it's the quickest I've been able to find.

Add a curve (I like to use paths because they are initialised as a straight line)

Change its shape around a bit

Convert it to a mesh Altc

Extrude (in edit mode, e)

Admire the beauty.


A few things to try:

1) Select the new object, and remove the old material, then add a new material. This should disconnect the material of the new object from the old one.

2) Select the old object and go to Object > Apply > Make duplicates real. This will make the duplicates connected to the object (in case somehow the object is a duplicate) a real object.

3) Select the new object, and go to Object > Users > Make single user-Object & Data & Materials & tex.

If one of these three things do not fix the problem, I don't know what can.


What datablock should I use to store properties?

You use bpy.context.scene. which refers to your current active scene, e.g. bpy.data.scenes['Your Scene Name']. When you change the active scene in Blender the bpy.context.scene. starts to refer to another scene, e.g. bpy.data.scenes['Another Scene Name'] Context in bpy.context means "current". About Blender Properties like bpy.types.BoolProperty and the others - they are supposed to be used to dinamically change values of operators, not for storing any constant information.

If you want to store your properties you can:

1) Set a global variable outside all classes, right in your script body and call it from your functions and methods by marking it global (using global variables in big programs is not a very good idea because as your program grows it is getting hard to manage them):

bcp_return_result = None

def register():
    global bcp_return_result
    bcp_return_result = 1

print(bcp_return_result) # >>>None
register()
print(bcp_return_result) # >>>1

2) Set and change it as your class variable. It can be either Blender Operator class

import bpy
from bpy.utils import register_class, unregister_class

class RegisterOperator(bpy.types.Operator):
    bl_idname='reg.op'              # id_name for bpy.ops, e.g. bpy.ops.reg.op()
    bl_label = 'Register Operator'  # Operator name
    bcp_return_result = 0           # Operator class variable

    def execute(self, context):     # to work as an operator this method must be
                                    # called "execute" and have self and context
                                    # arguments

        op = bpy.types.REG_OT_op    # to access an operator as a class we type:
                                    # "bpy.types", add uppercased start of
                                    # bl_idname, add _OT_ instead of dot and the
                                    # final part of bl_idname as it is
                                    # Example: 'reg.op' = 'REG_OT_op'

        op.bcp_return_result = 1    # change operator class variable with what
                                    # you need

        return {'FINISHED'}         # also necessary part of operator

register_class(RegisterOperator)    # register operator

op = bpy.types.REG_OT_op            # set variable with operator class

print(op.bcp_return_result)         # >>>0
bpy.ops.reg.op()                    # execute operator
print(op.bcp_return_result)         # >>>1

or just a common Python class:

class RegisterClass():
    bcp_return_result = 0           # Operator class variable

    def __init__(self):
        pass

reg = RegisterClass                  # create class instance

print(reg.bcp_return_result)         # >>> 0
reg.bcp_return_result = 1            # change class variable
print(reg.bcp_return_result)         # >>> 1


I was able to fix the issue by turning of snapping.


Ik Stretch: Finding the Proportional Value

Finally found the answer from Rigify scripts:

    l1 = ulimb_p.length
    l2 = flimb_p.length
    if l1 < l2:
        ulimb_p.ik_stretch = (l1 ** (1 / 3)) / (l2 ** (1 / 3))
        flimb_p.ik_stretch = 1.0
    else:
        ulimb_p.ik_stretch = 1.0
        flimb_p.ik_stretch = (l2 ** (1 / 3)) / (l1 ** (1 / 3))


Video preview plays at old frame rate after changing it

It seems that you were using a HD video source. AFAIK, Sequencer still works with single thread and not so much effective, relatively speaking. In that case, Proxy is born to well solve such issue.

Select the video strip you want to make proxy for, toggle Proxy/Timecode on the property sidebar;
Menu > Strip > Rebuild Proxy and Timecode Intices;
on Preview window sidebar, Switch the Proxy render size to the expected proxy percentage, which is just generated. As shown below:

Since the video quality would be significantly reduced, the playback speed is quite faster than the original source. However, VSE still uses original source for final rendering.

Another way to keep the video/audio sync while playing preview is to use the suitable playback sync mode, which locates on Timeline header. (AV Sync or Frame Dropping)

Of course, you can use the above tricks all together to keep the sync best. However, if the playback is still slow or not sync enough, then you'd better turn to a higher performance PC for that. :)


How Do You Make A Suggestion To Blender Developers?

Blender does include a macro capability - most of the operations you perform are output to a log window that's normally hidden off the top - drag the bottom edge of the top menu down to see it.

When you perform an action you'll see the equivalent python call in the log. You can copy the command and paste it either into a Console window or into a Text Editor text block to run as a python script (give a name ending in '.py' to tell Blender it's python code.

For example, add a cube, scale it, rotate it :

bpy.ops.mesh.primitive_cube_add(radius=1, view_align=False, enter_editmode=False, location=(0, 0, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
bpy.ops.transform.resize(value=(2, 1, 1), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.ops.transform.rotate(value=0.785398, axis=(0, 0, 1), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)


It's a custom Group created by the add-on "Import-Export: Import Images as Planes". (IAP = Images As Planes)
Go to Edit > Preferences > Add-ons, search for "Images" and tick the checkbox to enable the "Import-Export: Import Images as Planes" add-on.

Now you can use the add-on through File > Import > Images as Planes (or through the Add menu in the 3D View). Select an image to import and pick "Shadeless" under the Material Settings. Then hit import.

Your image will be imported as a quad. The material it uses will have the IAP_SHADELESS node.
After you've done this once in a file, you can add the group to any material you want by picking Add > Group > IAP_SHADELESS in the Shader Editor.


Camera facing backwards when exported as FBX and imported to Fusion 7

To get the right settings for the camera into Fusion7 I found I had to use version 6.1 ASCII of the FBX exporter.

Now my tracked camera and geometry match the blender file :)


From what i know there is no such thing as Weight group in Blender.
What you need to do Crissie, is:

Create 3 vertex groups - north(reaching from the edge of the east-west road to the last north most vertex), south (reaching from east-west road edge to the north most vertex), and weed (those two earlier groups combined, so all terrain except the east-west road) and assign appropriate vertices with weight 1 to them.
Use weight paint to cover lake part with weight 0 for south group.
Use the same method to cover road and pavement with weight 0 for north group.
Use the same method to cover road,pavement and lake for weed group
Use north group for Density in Bahia particle system,
Use south group for Density in Rye particle system,
Use weed group for Density in weed particle system.


Need help animating slow traffic on a freeway with random placement variation

Primitive Method
A primitive way to do this is to sample a noise function and use the noise value as an offset to the original location.

offset = noise(scale_pos * car_starting_position, scale_time * frame)
final_position = frame * car_speed + car_starting_position + scale_noise * offset

scale_pos would be a scaling factor which influences the correlation of subsequent cars. A larger value would mean that subsequent cars would be sampled further apart which would result in more “tailgating”. Smaller values would make the flow more uniform.
scale_time controls how fast the offset changes with time. The larger the value, the more often drivers will drive back and forth in their spot.
And scale_noise will be a final factor to control the size of the offset. It has to be small enough, w.r.t. the mean gap size to guarantee that the cars don't intersect, and w.r.t. the car_speed so that there aren't any cars which drive backwards.
Implementation
I implemented this method with the add-on Animation Nodes in the tree shown below. The shown values are the ones used in the animation above. Width and height as well as mean gap size is one unit.

The default car position is stored as an Object ID Key which is set by selecting all objects and pressing Create in the 3DView's Tool Shelf in the AN tab.

To use the noise function in AN's expression node you have to add the mathutils module in the Advanced Node Settings in the node's properties.

Precise Method
An alternative would be to calculate the car positions directly with some implementation of the Nagel-Schreckenberg model, which would also have the advantage of being more suitable for slow speeds or cars which are actually stopping.
However, all implementations of these models that I've encountered use an abstraction that might not be good enough for a scene like this as the gap size in real traffic is usually rather large compared to the car length. If you use some trucks in a scene with slow traffic then I assume you would have to include the vehicle length in the model.
If you choose to use Animation Nodes for this approach then there is a useful setting for the Script node, or more precise, the Invoke Subprogram of a script, that lets you cache the output of a script. E.g. you can use one script to calculate all car positions at once (or read them from a file) and another script to actually place the cars after each frame.


Using overlap() to check if two meshes are intersecting?

Turns out I had to apply location to the BMesh I generated, I have edited code above to work:

        bm1.transform(scene.objects[obj_now].matrix_world)
        bm2.transform(scene.objects[obj_next].matrix_world)

This is the reason I was getting intersection for every face and object, since they were all in the same location as far as BVHTree was concerned.


Why is this button only getting triggered when 'mouseover' is true?

Simply use an AND controller:

This is just animating the button. To trigger certain operations there are many options.

Send a message

This way the button does not even care who is processing the command.

The recipient can even reside in a different (but active) scene.

Direct operation

This means the button performs the operation. This creates a tight coupling between button and operation. I suggest to use this only on menu operations (such as switching menus, or closing the overlay scene).

Logic Bricks

Python

There are few ways too. The problem is that you can't connect to the already setup AND controller as there is no Python actuator.

This means you need to recreate the AND controller behavior within your custom brick.

Sample code:

import bge

def allSensorsPositive():
    for sensor in bge.logic.getCurrentController().sensors:
        if not sensor.positive:
            return False
    return True

if allSensorsPositive():
    print("run your code here")

Remarks

I strongly recommend to separate button presentation from button operation. Otherwise your design will quickly become unnecessary complex.

Debug sensor status

If you do not know the sensor status you can run this script. It will print it to console:

import bge

sensors = bge.logic.getCurrentController().sensors
output = ""
for sensor in sensors:
    output +="'{0}' t:{1:d} p:{2:d} |".format(sensor.name, sensor.triggered, sensor.positive)
print(output)

Example:

'Mouse' t:0 p:0 |'Mouse over' t:1 p:1 |
'Mouse' t:0 p:0 |'Mouse over' t:1 p:0 |
'Mouse' t:0 p:0 |'Mouse over' t:1 p:1 |
'Mouse' t:0 p:0 |'Mouse over' t:1 p:0 |

It is

'sensor name'
t: 0=not triggered, 1=triggered
p: 0=evaluated nothing, 1=evaluated positive

Obviously at least one sensor must be triggered to get a new output.


Issue with arraying an object along a curve

Key R, then Y, then 90. If you want them to continue to change shape, then you may have a problem, but if the following is good, then so are you.


Import polygons with predefined coordinates

Your best bet is to use the Wavefront .obj format. As it's written in ASCII, it's fairly easy to generate.

A simple introduction to the specification of this format is as follows:

#This is a comment

o Object      #Defines an object named Object
              #All the vertices, edges and faces below this belong to this object
              #Until another object is declared

v 1.0 1.0 1.0 #Defines a vertex at the XYZ coordinates 1, 1, 1
              #and adds it to the list of vertices, like an array (starts at index 1)

f 1 2 3 4     #Creates a face defined by the indexes 1, 2, 3 and for
              #Which refer to the vertices in the list above

.
For the complete specification, please see this page.

To import it, you can just go to the 3D View header, press File, then Import, and then Wavefront (.obj). This will bring you to the file browser, where you can choose your file, and in the bottom left corner, choose some extra settings.


Use the FBX import-export plugin. Try to export the scene as FBX 6.1 ASCII - this should work immediately. Go to File > Export > FBX.

Load it into Nuke via ReadGeo and Camera Nodes and plug both into a Scene Node. Don't forget to to enable compute rotation in the camera property panel.


Why is there no glow with the emission shader added?

First of all turn up the strength of the emission shader. In the screen shot the color is being animated but the strength is zero. This will most probably solve your problem . Also turn on bloom in the eevee settings for better glow in eevee.


Having problems making transparent plastic in Blender cycles

My method is more based on feeling rather than a rational explanation of physically based values.
Examining various plastic references as your example, it appears much brighter than glas. There also seems to be some diffuse/translucent scattering which you tried to add with the transluceny BSDF.
This is the final node setup.

Here are various example of shaders.

To the right is a plain glass shader. It seems to have more Glossy Reflections and more clear refractions than plastic should have. There are also very dark areas which appear because of the refraction. Plastic has close to no black.
To the left is a shader which resembles plastic more.It mainly consists of a mixed Glossy and Refractions BSDF. If you look at IOR values, plastic ranges around 1.49 (used in the refraction shader).It still doesn't have the add shader depicted in the node setup. That's why it appears to be more see through and more glassy.
Then we add the Add Shader after the Refraction, and mix it with a Transparent BSDF. When combining Transparent BSDFs with the add shader, more light is added. This is obviously not physically correct, but sort of creates a plastic feeling which is probably caused by imperfections in the surface in reality.
Finally, I mixed in a Diffuse BSDF at the end. The factor is a very small noise value. You did something similiar with using the translucency BSDF. I'd advise you against that, because you don't have the proper IOR. If you want the Refraction to be more unclear or blurred you can always use the Roughness value. The outcome is used by the center objects in the image.

Examination

Although the render is bad, the brightness from the added Transparency BSDF makes the material resemble plastic.

BUT, don't forget

You will only achieve the proper result with the fitting lighting.
The material only does a small part. The main work is done by modelling the base and the imperfections in the right scale and proportion. The small details can also come from bump maps. Try using a solidy modifier on your model!
Imperfections: uneven thickness, seams, ridges, dents/bends, roughness on the inside. It is more difficult to make a convincing geometrically perfect model rather than a naturally distorted one.

Modeling

The shader doesn't quite look right, yet. Maybe there should be more of the diffuse component of some slight roughness in the refraction. There is also no thickness to it, in this case the solidify modifier is required.
Nevertheless, the viewer will probably be convinced that this is plastic, becuase of the shape and imperfections. Even if we used a glass shader it would be interpreted as plastic, because only glass would usually not be found in the surface shapes.

Same principle with a normal map. The Transparency shader not that bright in this case, because I had to place an emission shader underneath. Therefore I simply increased the roughness on the Refraction to increase the scattering towards the camera. Already this drawback makes it look more like glass. The sharp edges on the material can also be interpreted as glass compare to the smooth rounded shapes of plastic.


Blender API documentation - where are the constructors?

I see, in that api_doc there is info about class functions but not how you can construct that class.

Go into python console and type the class name, follow with ( and hit CtrlSpace. It will hint what it wants:

It's however not the only way to create (get) that object. Numerous other functions or classes can return Euler:

Quaternion.to_euler()
Matrix.to_euler()

And you can get those also in many ways.

Btw. always use the up-to-date docs version: https://www.blender.org/api/blender_python_api_2_77_0/mathutils.html

This new version has the constructor infos there.


The issue is (as already pointed out by Vader) your mesh is not manifold, basically meaning that it can't exist in the real world.

You can select non-manifold geometry by pressing CtrlShiftAltM in edit mode:

The reason all those edges are selected is because your mesh as no thickness. This will cause the fluid simulator (and a good many other things) to have problems.

You can partially fix this situation with a Solidify modifier (note that modifiers must be applied for the fluid simulator to take them into account), however there are still a few other problems.

I think you are better off starting over than trying to salvage this mesh, as even with the solidify modifier I don't think it will do what you want (I assume you want to have fluid everywhere except inside the letters).

An easy way to make hollow manifold text is by setting the Fill to None and adding a solidify modifier.


Is it possible to save a selection of vertices?

You could add the selection to a vertex group so the next time you need the vertices to be selected you just need to to click on Select for the current vertex Group


It's all about context, at no point are you in the image editor. The same bpy.ops.transform.translate() is used in the 3d view and the image editor. Basically, you could just save the current area, switch to the editor, perform transforms and switch back. Granted, there are much more elegant ways to do this but for a 3 line hack, it works quite well.

import bpy

#+ grab the current area
original_area = bpy.context.area.type

scene = bpy.context.scene
for count, ob in enumerate(bpy.context.selected_objects):
    if ob.type == 'MESH':
        scene.objects.active = ob
        #+ switch to the image editor to perform transforms etc
        bpy.context.area.type = 'IMAGE_EDITOR'
        bpy.ops.object.mode_set(mode='EDIT', toggle=False)

        bpy.ops.mesh.reveal()
        bpy.ops.mesh.select_all(action='SELECT')
        #+ select the uvs
        bpy.ops.uv.select_all(action='SELECT')

        bpy.ops.transform.translate(value=(0.125, 0, 0), constraint_axis=(True, False, False))

        #+ return to the original mode where the script was run
        bpy.context.area.type = original_area
        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)


How do I select multiple items in the outliner or file browser without selecting all the items in between?

It seems like you are trying to Select the different Objects withShift+Click.
Try to use Ctrl+Click on the different Objects to select multiple Objects.


UV unwrap ignores mirror on part of the mesh?

I had this same issue and it was doing my head in, but it turned out because the mouth and face were separate materials, the pinning of the face were messing with the mouth.


The rigged eye does not close completely

It's a weights problem.
This tutorial is quite advanced and relates to a dense mesh properly and evenly modeled because it's automatically weighted.
As I can see from your 2nd picture (in example) even the closer vertices of the lower eyelid don't follow exactly the closer bones: it means that those vertices are weighted also in other Bones/vertex groups. Probably your mesh needs some manual weighting to work properly: if a vertex is weighted (any value of weight) to a bone/vertex group only, it follows EXACTLY the bone movement.
The button assign gives to the selected vertices the weight indicated below (from 0.0 to 1.0). The button remove removes the selected vertices from the vertex group. The button select adds to the current selection all the vertices of that vertex group. The button deseletc removes from the current selection all the vertices of the vertex group (but those deselected vertices are still assigned and weighted to the current vertex group, so - if you click select - they appear again). In edit mode, press N for the properties tab, select a vertex and you can find the "vertex weight" tab that shows you all weights and all  vertex groups your vertex is in (sorry for my english, I'm from Italy).


As long as your edge loops have the same number of vertices you can use the bridge edge loops tool to join them.

In Edit mode, select the edge loops you want to connect, press the space bar and type bridge edge loops.

After that just recalculate your normals: Select all and press CtrlN


Procedurally Generated Texture Scaling based on Surface Curve

You can try using a grayscale image to set the factor of the scale of... heh, the scales. That's an incredibly esoteric thing to say, so here is my setup (please forgive my liberal use of "reroute" nodes, I wanted to fit it all in at a decent resolution);

Which results in this (with the "factor" texture that's used in the above node setup, but you can paint the values however you want);

I'm also including the .blend file;


How can I fix this scaling issue I have?

I think your mesh is not aligned with its own object's local axes.. (you may have reoriented the cube in Edit Mode). So the Local axes are aligned to Global axes, but the mesh isn't, it wouldn't make any difference whether you transform in Local or Global. It's probably quickest to start with a new cube.

But you could select its top face, and CtrlAltSpace create a Custom Orientation from it, checking 'Use after Creation' and then transform the object in that space, SXX,SYY, etc.

You could even reoirient the cube's local axes to one of its faces, by snapping a helper cube to one of its faces,CtrlJ, joining the object to the helper, and deleting the helper in Edit Mode.. but in this case, that would be silly.


Splitting vertex at end of 4 lines, to fix tris

I don't think there is any magical way to do it, anyway I would do it with the knife tool:


how can i select 2 markers using python?

Can do this without the operators

import bpy
from bpy import context

scene = context.scene

start_marker = scene.timeline_markers.new("start") # make a new marker
start_marker.frame = scene.frame_start # set a frame
start_marker.select = True # set selected
end_marker = scene.timeline_markers.new("end")
end_marker.frame = scene.frame_end
end_marker.select = True

# get a marker
marker = scene.timeline_markers.get("start")
if marker:
    print(marker.name, marker.frame, marker.select)


is it possible to change a material depending on whether it is intersecting with another object?

An update, thanks to moonboots comments:

It is possible using Cycles:

The shader simply tests if the transparent depth is at least 1 as the cube is transparent but also we don't want more than one (as if not the cube shape may appear in non ortho views):


Snapping to grid get's messed up after scaling down vertexes

I think the issue comes from a misunderstanding of when increment snapping works.

Grid snapping only works for translation operations, scaling and rotation use value increment snapping not grid snapping, since rotations and scaling can't always be forced to coincide with the grid without some distortion.

The fact that your first scale does alight with the grid is a coincidence because the starting plane edge was exactly 2 units in length, and the end vertex were both grid aligned to start with.

That resulted in increment snapped values randomly being fractions of 2 units, which matching the grid cells by chance. When scaling up again, the edge will have a random different length, and fractions of that value will no longer necessarily align with the grid.

Bottom line, if you want grid aligned vertex use translations, or manually match them after using other transformation tools.


command/object option window - how to recover

I am still a noob so forgive me if I'm wrong, but as far as I know, you can, but not for the operation you just completed (by clicking).

This command window appears after doing an operation (scale, add mesh, in your case move, etc) and allows you to set the parameters of the operation precisely by inputting numbers. When you click anywhere you complete the operation and can't adjust it anymore. But you can ctrl+z and try it again of course.

So if you want this window to reappear you select the object and hit G (for move), but then the move parameters will be based off the current position. If you put in numbers and click, you can hit G again, but now the move parameters will be based off the new position.
I hope this helps.


Is there any other way without array modifier?

Maybe you can use both X and Y symmetry in the mirror modifier.

Like so..

It does depend on the complexity of your subject. In many cases Array will give you more control than the mirror modifier but for less complex objects this may be helpful.


Flipping the direction of bezier curve path for a crown molding

For the bevel object in •[edit]• mode, see yellow arrow in image below,

Try rotating in X or Y or Z axis to see result in the final mesh.
Try 90 degrees and -90 degrees.


Can't fully rotate object with quarternion rotation enabled

Quaternions are only in the range of -1 to 1, and so 0 and 360 (and 720 and 1080 etc.) are basically identical.  That's why the cube doesn't rotate, because it has nowhere to go.

Quaternions also generally take the shortest path. That's why you need multiple keyframes. The algorithm might be deciding that it's quicker to go back the way you came vs. go forward, which gives you undesirable rotations.  More keyframes should solve it.


Two Particle Systems - Fire +Water, But only one shows - How come?

Okay, stupid me!

On further exploration and clicking on everything I could find, I opened the object properties tab/Cycles settings.

Ray Visibility for Camera was unchecked for some reason. I don't remember clicking it but obviously I must have.

I found it through @tacofisher answer here: Particles not showing up in cycles render

Check it on and suddenly the particles show up]1


The file needs to have the proper file extension. Files without the proper file extension gets filtered out in the dialog.

Or you need to turn off the file filter. This can be done up right in the filter settings. The better way is to name the scripts proper though, with its correct file extension. Python scripts ends with *.py


In blender cycles, change your camera settings to these

Then render and use KolorEyes to run your 360 video: http://www.kolor.com/kolor-eyes/

Hope this helped.


Why is my limb flipping when trying at constain to armature?

To sum it up :

Join all the meshes within one object
Recalculate the normals in Edit mode
Apply the scale of both the armature and the mesh (once done read here to correct the armature)
Select the knees of the armature and in Edit mode bend them a bit forward
Enable the Deform option for each bone that is supposed to act on the mesh (not the IK targets or pole target, not the root bone)
Select the object, shift select the armature, parent With Empty Groups, then switch the object to Edit mode, select one mesh after the other, and in the Properties panel > Object Data > Vertex Groups list, select the group it is supposed to be part of and click Assign
Correct the IK constraint Pole Angle value if necessary


doing animation in one laptop and render it in another is this possible?

Of course, if you use image textures make sure to also copy them in a folder, or even simpler: pack them all into your blend file with File > External Data > Pack All Into Blend.


Can I use the the animation/action from one bone on another bone on a later time?

Yes, when you keyframe a bone an action will be created. To assign the same action to another bone just switch to the Dope Sheet set Action Editor mode and select the action.

In the NLA you can arrange the actions e.g.


Fill a volume with spheres from a particles generator

If I am correct that this is the effect that you are trying to achieve, the most important thing is enabling collision on the volume sphere, not rigid body simulation.

A quick visual walk-through of what I did...

1. Add three spheres

Volume sphere
Emitter sphere
Particle sphere

Note: the max draw type of the volume sphere was set to wire to make it easier to see.

2. Setup particle system on the emitter

Give the particles a long lifetime (like 250+)
Emit them from the volume of the mesh
Turn off gravity effects
Set the render mode to object with the particle sphere selected

3. Enable particle collision on the volume sphere

Note: the default settings work fine if you don't want particle damping/killing.


How do i straighten UV island without warping them?

Maybe this video will help
https://drive.google.com/file/d/1TZMg3nT229WVAF4RRS4pz20XnROdeJ7M/view?usp=sharing
This is the method I always use. If this doesn't work, you can try UV Squares add-on


Why Does My Other Software Exported Heightmap Displace My Mesh So Much In Blender?

This looks to me like a color transform is being applied your displacement map prior to displacement. Don't save your height map as sRGB. I would also save the file itself as OpenEXR. Don't use PNG / JPG / other garbage formats.
Lastly, make sure the color space value of your displacement map texture is set to "Non-Color" before hooking it up.


Why is the colour of my model the same as its normal map?

You still have the Viewer node connected.

Remove it by CTRL+SHIFT+Left-clicking on the Principled shader. (Assuming you have the 'Node Wrangler' addon enabled).


Why is my mesh flipping? (Rigid body simulation)

I had the same problem in blender 3.0, the cause was the object having a negative scale. It worked fine after updating the object's scale with positive values.
This link posted in one of the previous answers was useful:

https://blenderartists.org/forum/showthread.php?311350-Rigid-Body-Tools-turns-my-object-upside-down.


Select Input Texture file name as parameter/node

This can be achieved with OSL - but this is not compatible with GPU rendering - so CPU rendering only.

To start with we need a node where we can specify the filename. For this we can use the following OSL code - paste it into a new Text Editor datablock named 'simpleFilename.osl' :

shader simpleFilename(
    string FileName = "",
    output string oFileName = "<undefined>"
    ) {
    oFileName = FileName;
}

In the Node Editor, add a Script node and set point it at your new 'simpleFilename.osl' text block. Assuming you have OSL enabled (if it's available in your Blender then you'll have an Open Shading Language checkbox on your Render properties) you should see the node transform into the following :

This new node provides an input (which can either be connected to another 'string' socket or the filename can be typed into the input field - enter the full path to the image or use a '//' prefix to indicate a 'local' file relative to the location of the saved .blend file) and an output - both of which should be colored white to indicate type 'string'. The output from this node will be used to drive our Image Texture node (so you can drive multiple Image Texture nodes from the same input).

However, while we're at it we might want to add some flexibility - we can use OSL to combine multiple inputs to generate the filename. For example, create another Text block , this time named 'dynamicFilename.osl' and paste the following :

shader dynamicFilename(
    string Base = "//",
    int Index = 0,
    int Digits = 4,
    int Subframe = 0,
    int SubframeDigits = 4,
    string Suffix = ".png",
    output string oFileName = "<undefined>"
    ) {
    string filenameFormat;
    if (Subframe > 0) {
        //Build format string as "%s%0<Digits>i_%0<SubframeDigits>i%s"
        filenameFormat = concat("%s%0",format("%i",Digits),"i_%0",format("%i",SubframeDigits),"i%s");
        oFileName = format(filenameFormat, Base, Index, Subframe, Suffix);
    }
    else {
        //Build format string as "%s%0<Digits>i%s"
        filenameFormat = concat("%s%0",format("%i",Digits),"i%s");
        oFileName = format(filenameFormat,Base, Index, Suffix);
    }
}

Assigning this to a Script node will produce a node with additional inputs :

This node will behave similarly to the 'simple' version except that the filename will be built from the various elements in the formal PPPPNNNN_MMMMSSSS where PPPP is the prefix (eg, //images/), NNNN is a numeric representation of the Index input value (formatted to Digits number of digits - eg, '0001'), MMMM is similar but based on Subframe (and if Subframe is zero then the _MMMM element is omitted entirely), and SSSS is the filename suffix (eg, .png). In this way you can construct a filename that is automatically generated based on the input values similar to that used in How to show different images based on Object ID.

Now all that is required is the actual Image Texture and this is achieved by using the OSL 'texture' function which can extract pixel data from an image. Create another Text datablock (named 'imageTexture.osl') and paste the following :

shader imageTexture(
    vector Vector = P,
    string FileName = "",
    int Wrap = 0,
    output color Color = color(1,1,0)
    ) {

    string wrap;
    if (Wrap > 0)   { wrap = "periodic"; }
    else            { wrap = "black"; }

    Color = texture(FileName, Vector[0], Vector[1], "wrap", wrap);
}

Assigning this script to a Script node will produce the following :

Note the FileName input to accept the filename (as generated by either the 'simpleFilename' or 'dynamicFilename' node) along with a Wrap input (the equivalent to Repeat/Clip of the standard Image Texture node - set to '0' for Clip, 1 for Repeat).

Now simply connect the nodes as required, linking the output oFilename to each of the ImageTexture's FileName input :

Varying the inputs to the 'Filename' node will vary the image for each of the Image Textures. Each Image Texture will be using the same image and this can be amended by simply changing the Filename node. The filename can also be passed into and out of node groups.


image loading, but not appearing in an Empty, latest release 2.77

Use shiftA and select Add->Empty->Image

Then in the data section of the Properties panel Look for the Display control to open the image:


Rotate object on axis between two points

We have several transform orientations available within the 3D view that determine which way an object moves along a given axis.

When these options don't fit the task you can define a custom orientation. This option is available in the properties sidebar N

To put it simply, if you add an object and rotate it 23.6 degrees on the z axis and then use it to define a custom orientation, you can then use that orientation to move, rotate or scale another object along the same x and y axis which will be at 23.6 degrees from the world x and y axis.

To use this when you have two empties in place -

Select one empty and press ShiftS and select Cursor to Selected.
Add a plane and scale to zero on the x axis (SX0Enter).
Enable snapping to vertex  in the 3D Header.
Ensure the view is aligned to a preset (left, top, front...) that is looking straight at the two empties so that the only angle between the two is the angle you want to define. If you wish to define an orientation that alters more than one axis you can repeat the next step several times from three views to get the alignment right.
Begin rotating the plane R and move the cursor over the second empty. When a circle is shown around the centre of the empty showing that it is snapping to it, accept the rotation. The rotation of the plane will now match the angle between the two empties.
Show the properties sidebar and find the Transform Orientations panel, create a new orientation by clicking the .

The plane can now be deleted and the new transform orientation can be used to move or rotate other objects along an axis running parallel to a line between the two empties.

When a custom orientation is selected the XX, YY and ZZ shortcuts normally used to move on the local axis will use the custom axis instead of the local axis.


Bone whose movement is tied to the furthest of two other bones?

You can use drivers: in my example I'm driving Y loc of bone C as maximun value between Y loc of bone A and Y loc of bone B.

Y loc is intended in local space, so bones are moving along their Y axis (Z world).


I can't render any fluid dynamic nor can see inside any fluid domain

The main problem is that you need to increase the "Resolution Divisions" setting for the Domain object. In newer versions of Blender (I'm using a 2.90alpha), the default looks like it's 32.  In the tutorial, the default appears to be 64.  It refers to the number of divisions along the longest dimension of the domain.  With a tall domain and short flow (in the Z direction), there's a reasonable chance the flow will get missed entirely, and it won't generate any particles.  Reset to the first frame with Shift←, and then try increasing the resolution division until particles appear.  (You need to reset to the first frame for this to work.)
Now, if you start the animation with Space, the particles should start moving around.  If they don't, it's probably because the cache directory is bad, so blank out that cache filename and try resetting to frame 1 and replaying the animation.
Once that's working, another problem is that a Replay Cache (i.e., Cache -> Type -> Replay) is extremely flaky in current versions of Blender.  You'll find that if you move participating objects (e.g., move flows and effectors) or change certain settings, stale cache information will be left in place.  You might get particles sourced from the wrong place, particles exploding, particles leaking, etc.  It's best to switch from Replay to Modular (which is what's ultimately used in the tutorial) so you have explicit Bake/Free buttons.  Specifically, you can "Bake Data" in the Fluid -> Settings panel to generate the particles and then play the animation.
Finally, you can make your domain see-through while working on the animation by going into its "Object Properties" and selecting Viewport Display -> Display As -> Wire.  This doesn't affect the render, so it will still render as a solid cube until you get the mesh simulated (see later in the tutorial).  Once the mesh is baked, that mesh replaces the domain mesh in the final render.


Align vertices in straight line in the uv image editor

You can select all vertices in a row by using alt+ RMB on an edge;

You can align selected vertices on the x axis with the following keystrokes (one after the other, not all at once);

s, x, 0, enter

Same for the Y axis, select with alt+ RMB

s, y, 0, enter

(those are zeros, not the letter o)

Continuing this process, you can align the desired vertices on x...;

Then y...;


Will it soon be possible to render an Eevee animation in realtime (2.8 Beta)?

I think what you are looking for is this!


How do I change the transparency of an object without changing the material (Cycles)?

Using pass index

You can use the object 'pass index' from the 'object info' input node.

Pass index is an integer. But you can divide it by a given 'scale' value to have a progressive transparency:

So that:

Note: pass index will animate (keyframes) in render mode only.

Using object proximity

Another way can be testing the proximity of an object/empty to the mesh:

In this case, the node setting can be using object texture coordinates from both the mesh itself and an empty.

Then we take the difference and test it on X, Y (eventually Z), then multiply (will make like a ponderated logical 'and' then divide by a tuning value).


Properties belong to a single game object. They are not shared by default.

There are several ways to implement the requirements you have.

Here is one:

a single object handles the clicking -> button controller
the buttons do nothing regarding the click processing (maybe some feedback animation). Each button provides a meaning (e.g. via name or via property).

The button controller can be an empty as it has no further meaning within the 3D scene other than processing the clicks.

The button controller triggers a Python controller on mouse button and mouse over any sensor. Then a button is sensed the controller identifies the meaning and adds an entry to a button tracker. The button tracker tracks the button clicks. It can be a simple list.

example:

import bge

def recordClicks():

    if not allSensorsPositive():
        return

    hitObject = getHitObject()

    meaning = hitObject["meaning"]
    getTracks().append(meaning)

    print("clicks are", getTracks())

def allSensorsPositive():
    for sensor in bge.logic.getCurrentController().sensors:
        if not sensor.positive:
            return False
    return True

def getHitObject():
    for sensor in bge.logic.getCurrentController().sensors:
        try:
            return sensor.hitObject
        except AttributeError:
            pass

def getTracks():
    tracker = bge.logic.getCurrentController().owner
    try:
        return tracker["tracks"]
    except KeyError:
        tracks = []
        tracker["tracks"] = tracks
        return tracker["tracks"]

The clicks are recorded in property "tracks". It is a list (not view able by show debug properties) containing the clicked objects in the order they are clicked.

The clickable objects should contain a property called "meaning". The best is to filter the mouse over any sensor with property "meaning".

Configure the Python controller with Module mode and "demo.recordClicks".

Unfortunately you did not mention what to do with the tracked clicks. So this example just prints them to console.


You should check if those vertices are duplicates. It looks like vertices being overlapping (2 or more in the same space). It happens a lot when trying to extrude, then "forgetting" to move your extrusion

Correct this issue in EDIT mode. Select all by hitting A, then by go to MESH menu, then choose Clean up, merge by distance. If not, there must be something you are doing wrong when extruding, but I am almost sure those are vertices overlapping.


How to UV unwrap this object and how to have the same textures resolution for the two objects

Ok so I'm guessing you mean relative UV scale between the two separate mesh objects when you say same resolution.
But first we need to clarify what you mean by "share the same UV layout after".
Do you
A. mean that you want the UVs to overlap or sit on top of each other in the UV space like this.

Or B.
Have their own separate islands but on the same UV map like this

I got this result by using blender 2.8 new feature that allows going into edit mode of multiple meshes at once and a combination. of uv mapping operation.
So in edit mode of both mesh objects, first using project from view, from the back with just the faces along the center point of mesh since its a mirrored mesh. Then using constrain to proportions, move to one side, then move to center using snapping to align that center line of mesh with center of x axis like in screenshots. Making sure when you scale them to scale them together.
Next I take all those uvs in the uv editor and hit p to pin them in place (the red verts in UV editor), then select all faces, and run unwrap. This will keep the pinned UV verts in place and fill in the rest linked faces with usual unwrapping.
Then we can use the mirror modifier setting for flip U to automatically mirror the UV to the other side like this.

https://drive.google.com/file/d/1a5dIbtKAD47t3x--GEjsx9qR0oqUPT-V/view?usp=sharing


How to get random color variation on a single mesh?

Following the several comments, I've thought an addon can be useful to do that and may have a general interest.

What does it do:

Identify loose parts of the object (or all selected objects)
Generate a random color for each loose part
Follow the mesh loops to assign the vertex colors

(can be installed as an addon)

The code is commented below (please comment if needed):

bl_info = {
    "name": "Assign random vertex color to each loose part of a mesh",
    "author": "lemon",
    "version": (1, 0),
    "blender": (2, 78, 0),
    "location": "Properties Editor > Object data",
    "description": "",
    "warning": "",
    "wiki_url": "",
    "category": "Mesh"}

import bpy
import time
import random
from mathutils import Color

def LoosePartsMakeVertPaths( verts, edges ):
    #Initialize the path with all vertices indexes
    result = {v.index: set() for v in verts}
    #Add the possible paths via edges
    for e in edges:
        result[e.vertices[0]].add(e.vertices[1])
        result[e.vertices[1]].add(e.vertices[0])
    return result

def LoosePartsFollowEdges( startingIndex, paths ):
    current = [startingIndex]
    result = set( current )

    follow = True
    while follow:
        #Get indexes that are still in the paths
        eligible = set( [ind for ind in current if ind in paths] )
        if len( eligible ) == 0:
            follow = False #Stops is no more
        else:
            #Get the corresponding links
            next = [paths.pop( i ) for i in eligible]
            #Get the new links as new inputs
            current = set( [ind for sub in next for ind in sub] )
            result = result.union( current )

    return result

def LoosePartsCountIslands( obj ):
    #Prepare the paths/links from each vertex to others
    paths = LoosePartsMakeVertPaths( obj.data.vertices, obj.data.edges )
    found = True
    n = 0
    while found:
        try:
            #Get one input as long there is one
            startingIndex = next( iter( paths.keys() ) )
            n = n + 1
            #Deplete the paths dictionary following this starting index
            LoosePartsFollowEdges( startingIndex, paths )
        except:
            found = False
    return n

def LoosePartGetIslands( obj ):
    paths = LoosePartsMakeVertPaths( obj.data.vertices, obj.data.edges )

    result = []

    found = True
    while found:
        try:
            #Get one input as long there is one
            startingIndex = next( iter( paths.keys() ) )
            #Deplete the paths dictionary following this starting index and append the result
            result.append( LoosePartsFollowEdges( startingIndex, paths ) )
        except:
            found = False

    return result

def RandomColor( rnd ):
    return Color( (rnd.random(), rnd.random(), rnd.random()) )

def RandomColors( rnd, count ):
    return [RandomColor( rnd ) for i in range( count )]

def ColorFromVertexIndex( vertexIndex, looseParts, colors ):
    for c, lp in zip( colors, looseParts ):
        if vertexIndex in lp:
            return c
    return Color()

def RandomVertexColorsByLooseParts( obj, vcolName, useSeed, seed ):

    rnd = random.Random()
    if useSeed:
        rnd.seed( seed )

    mesh = obj.data

    #Create vertex colors if it does not already exist
    if vcolName not in mesh.vertex_colors:
        mesh.vertex_colors.new( vcolName )
    #Update it so that it is available below
    mesh.vertex_colors.update()
    #Get the vertex colors
    vertexColors = mesh.vertex_colors[vcolName]

    #Get loose parts
    looseParts = LoosePartGetIslands( obj )
    #Generate random colors
    colors = RandomColors( rnd, len(looseParts) )

    mesh.loops.update()

    #Follow the loops
    for i, vertexIndex in enumerate( [loop.vertex_index for loop in mesh.loops] ):
        #Assign vertex colors from loop index and vertex index
        vertexColors.data[i].color = ColorFromVertexIndex( vertexIndex, looseParts, colors )

def InitProperties():
    bpy.types.Scene.VertexColorsName = bpy.props.StringProperty( name = "Vertex colors", description = "Vertex colors to use or create", default = "Col" )
    bpy.types.Scene.VertexColorsUseSeed = bpy.props.BoolProperty( name = "Use seed", description = "Use fixed seed to generate random values" )
    bpy.types.Scene.VertexColorsSeed = bpy.props.IntProperty( name = "Seed", description = "Seed for random values" )
    bpy.types.Scene.VertexColorsAllSelected = bpy.props.BoolProperty( name = "All selected objects", description = "Apply to all selected object or only active one" )

class RndVColToLoosePartsPanel(bpy.types.Panel):
    bl_label = "Random vcol to loose parts"
    bl_space_type = "PROPERTIES";
    bl_region_type = "WINDOW";
    bl_context = ""

    @classmethod
    def poll(self, context):
        return context.object and context.scene

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

        layout.prop( scn, 'VertexColorsName', icon='GROUP_VCOL' )
        layout.prop( scn, 'VertexColorsUseSeed' )
        layout.prop( scn, 'VertexColorsSeed' )
        layout.operator( "rndvcoltolooseparts.ope")
        layout.prop( scn, 'VertexColorsAllSelected' )

class RndVColToLooseParts(bpy.types.Operator):
    bl_idname="rndvcoltolooseparts.ope"
    bl_label="Generate random vcol to each loose parts"

    def execute(self, context):

        scene = context.scene
        obj = context.object

        if scene and obj and obj.type == 'MESH':

            prevMode = obj.mode
            bpy.ops.object.mode_set( mode='OBJECT', toggle=False )

            if scene.VertexColorsAllSelected:
                for obj in [obj for obj in context.selected_objects if obj.type == 'MESH']:
                    RandomVertexColorsByLooseParts( obj, scene.VertexColorsName, scene.VertexColorsUseSeed, scene.VertexColorsSeed )
            else:
                RandomVertexColorsByLooseParts( obj, scene.VertexColorsName, scene.VertexColorsUseSeed, scene.VertexColorsSeed )

            bpy.ops.object.mode_set( mode=prevMode, toggle=False )

        return {'FINISHED'}

def register():
    InitProperties()
    bpy.utils.register_class(RndVColToLooseParts)
    bpy.utils.register_class(RndVColToLoosePartsPanel)

def unregister():
    bpy.utils.unregister_class(RndVColToLooseParts)
    bpy.utils.unregister_class(RndVColToLoosePartsPanel)

if __name__ == "__main__":
    register()


Use hooks.

Hooks will allow you to parent vertices (or control points in a curve)
to empties or vertices in other objects, so that the deformations are controlled by the parented element.

read the following links:

Attaching a curve by its endpoints to two spheres

Is it possible to assign a parent to a control point of a curve using animall?

How to make an object's vertex follow another object

How to make a wiggly animated curve?

Dotted line on curve?


Different output image when I set "use_borders = True" - in python script

It is caused (probably) by compositor. If I render part of image, compositor change only this one piece (tile) - without affecting another tiles. After joining them, seams can be seen.

To reduce seams I will render scene by scene (without using compositor - I will set bpy.context.scene.render.use_compositing = False), tile by tile (saved to erx-multilayer format) and then join outputs. Then I will change inputs in compositor (render layers will be replaced by images).
I hope it will work.


illustrating transparent tunnel while embodying solid front

I think this is not a question of how to do it, but a question of what you want to do. My recommendation would be to think more about what you want to do, what you wish to communicate visually and how. Maybe look for something visually similar or attempt to sketch it. It is hard to achieve what you want if you do not know what you want. Work more on the concept so it is clearer.


Bump node doesn't produce bump from normal vector

The problem here isn’t the Bump node but how the Noise Texture is being used.

With no input to the Noise Texture it will automatically assume Generated coordinates and with nothing connected to the Bump Normal it will automatically assume the Geometry Normal - ie, it's effectively automatically :

NOTE : The nodes shown in white are optional - if nothing is connected to the texture Vector or bump Normal then those are the values that are assumed anyway.

By connecting the Normal of the Geometry node to the Vector of the Noise Texture you are telling Blender to use that normal in place of the usual Generated coordinates , overriding the default with something that doesn't make sense (as @Nathan says, it's a circular dependency - the normal is dependent on the result of the bump which is dependent on the normal). This is effectively destroying your coordinates used to generate the noise.

If you do need to use a modified normal for the Bump then you could potentially use a calculated normal - either via Maths nodes based on something other than the actual normal or from an Image Texture via a Normal Map node.


What you're asking for, and showing with your pic, sounds a lot like the behavior of bones with a clamp-to constraint.

These four bones, parented unconnected in a row, each have the same, copied clamp-to constraint that keeps them clamped to the curve, without affecting their rotation.

If I duplicate this structure, then add damped track constraints to the bones, I get this:

The heads of the bones are clamped to the bottom curve, while the tails point to the top curve.  Note that I have to specify where on the top curve they point, with the top four bones.  These four bones couldn't be parented directly to the bottom four bones, because that would involve a dependency loop, but both could be parented to the same (unpictured) bone, so that bone slid them along their respective curves from the same controls.

Note that the bottom bones don't reach the top curve, they only point at it.  In order to reach the top curve, you could add stretch-to constraints for the bottom four bones.

Finally, be aware that tails don't mean very much, not as much as they seem to.  The location of a tail has absolutely no effect on deformation-- any unconstrained bone will rotate, scale, and translate in the exact same ways, regardless of where its tail is located.  Tails are useful only for controlling local bone axes and for use with some constraints.


How to add a texture to the emitter surface of a hair particle object (over riding object material)

When you assign the material to the particle, put the base object in the Texture Coordinate node and you can use Object Coordinates this way.

For reference, without:


It has to be a Curve object. BezierCircle e.g. works, while a mesh circle does not. If you add a BezierCircle:

It will show up and work as intended:


Keep losing "sub" pose library after re-openning the file

See the zero next to the name of the new pose library in the first screenshot? That means it has no objects using it and so blender will thing this is unnecessary data and clean it up when the file is saved.

You can fix this by adding a 'fake user' to each pose library you want to keep using the button with a big F on it next to the pose library name when you have it selected.

This is very counter intuitive behavior.


Diffuse node compability for glTF exporter

Just setting metallic to black(0) and Roughness to white(255) should solve the problem of getting a diffuse shader.

I think that your shader is diffuse but you cant see the colors when you export it out. I had the same problem, I solved it by using the Emission node packed with the two nodes you mentioned.

All those texts are using emissive nodes.

Also applying material on text objects doesnt work. You have to break them to mesh, draw out UV map and then apply texture(also using emissive map).


Take 1 seamless textured plane, and make a large square out of multiple of that 1 texture

You can use two Array Modifiers. One for direction X and one for direction Y. The setup would look something like the following. Note how the values in the green boxes are different. This allows for the object (plane) to be arrayed in multiple directions. Just remember that Array Modifiers utilize local coordinates and you can negatize (did I just invent a word there?) values to have the object array in the opposite direction.

How this modifier stack would look when applied to a cylinder (for clarity, because cylinders are easier to differentiate than planes):

As a last note, you can use a Vector > Mapping node to tile textures on a single plane. See David's answer on How to Make a image repeat in cycles.


Taking some information from the comments:

You have at least two ways to do this.

Option 1: Duplicate the object, and set the Angle on the new object to a negative value.
Option 2: Add a Mirror modifier after the Screw modifier (just one object here).

Note that with either of these, you may end up with Z-fighting at the points where the two wraps intersect.


This is more for reference for other users having issues with the DAE Format.
It could be that the Collada DAE version being used for your assets is 1.4.0, where as Blender only seems to read 1.4.1
Try using Autodesk's FBX Converter tool on the DAE files and you will be able to use your files in Blender.


Can I use the shoe last technique with modifiers or constraints in Blender?

No not an option, currently its vertex orientated (and it can add vertexes as well) its not object orientated and i doubt that will get into blender

However what you might do in your case is paint masks and play with the strength of it.


How can I visualize progress in a panel?

No you can't (not without fairly bad hacks at least).

As of 2.69 this is a limitation in the Python API, layout.template_running_jobs() shows progress for blenders job system which Python has no access to.

You can however control the mouse cursor to display progress.


How to successfully transfer one .blend to another computer and keep everything intact?

Video files and image sequences are not packed as part of the blend file.
Why? because they would create an impractically large file.
No video editing program stores the media and the projects on a single file.
The way you transfer the project is you bring along all of the files that are linked to the project. If you want a single file to transport/upload, then zip the folder with all the elements and the project.
But it is more practical to put your files in an external drive and plug it in to to the new computer and re-link.