This question is a nice example for showing how to morph one mesh into another. Lets take a general approach that will work on multiple shapes and lets make the morphing nice (where non-linear morphing is needed).

First we will need the start and end meshes. In this example, the diameter of the hole of the start torus is the same like thickness of the end torus. Because the diameter of subdivision surfaces is different than the control cage, I chose to work with real geometry. This method shouldn't depend on vertex count anyway, so let's have some nicely detailed toruses (subdiv surfaces don't produce perfectly circular shapes).

I obtained these by spinning touching circles around 3d cursor locations:

There are 32 rings with 32 vertices each on both toruses. Now we could map the start vertices to the end vertices (by fiddling with their id, or based on vertex paint, or UV unwrap data,..) and make appropriate shape-key (by scripting), but this is not the intention, because such morphing will result in linear ugly motion, which could cause self-intersecting and other non-desired results.

We will convert edges of the meridians of the start torus into bone chains, and rotate them into the final positions as equators of the end torus. Then we will skin a mesh to this armature and render it.

As the bones will come from Skin modifier, we need to mark the root vertices and also split the toruses for chain ends first (seen as 2 hard lines in shading - because of duplicite vertices, you can split vertices with V when the ring is selected). Unwanted edges were removed, to leave only the chains:

Let's put Skin modifiers on, adjust the thickness and set the root vertices. Setting the roots location and where the chains end will shape the look of animation (roots highlighted and ends visible by shading):

Both toruses are still separate objects, so we'll get 2 armatures. Delete unwanted bones, you'll end up with 2 bone chains per ring:

Similarly we can map any corresponding topologies onto each other to morph them.

The corresponding start and end bones have to have a corresponding name inside those armatures. To fix it, here is a script to name the root bones based on shared location and direction and the chain bones based on chain distance (parent count) from roots. The bones also get a start/end prefix, because we will merge them into single armature later (to have a clean scene). Name the start armature Start, and the end one End:

import bpy

start = bpy.data.objects["Start"]
end = bpy.data.objects["End"]

i = 0
for pboneA in start.pose.bones:
    for pboneB in end.pose.bones:
        if ((pboneB.head - pboneA.head).length_squared < 0.001 and
            ((pboneA.tail - pboneA.head).dot(pboneB.tail - pboneB.head) > 0)):

            pboneA.name = "Start_Chain_" + str(i) + "_Bone_0"
            pboneB.name = "End_Chain_" + str(i) + "_Bone_0"
            i += 1
            break

for object in [start, end]:
    for pbone in object.pose.bones:
        parents = pbone.parent_recursive
        if len(parents):
            pbone.name = parents[-1].name[:-1] + str(len(parents))

for pbone in start.data.bones:
    pbone.use_inherit_rotation = False
    pbone.use_inherit_scale = False

for pbone in end.data.bones:
    pbone.use_deform = False

You can now join the armatures together Ctrl+J. The deformation on end bones was also deactivated by the script.

The next script will create a custom property on the armature to drive the blending:

import bpy

def add_driver(expression, item, property, property_index = -1):

    driver = item.driver_add(property, property_index)
    driver.driver.type = 'SCRIPTED'
    driver.driver.expression = expression
    var = driver.driver.variables.get("blend")
    var = driver.driver.variables.new()
    var.name = "blend"
    var.targets[0].id = bpy.context.active_object
    var.type = 'SINGLE_PROP'
    var.targets[0].data_path = 'data["blend"]'

bpy.context.active_object.data["blend"] = 0.0
bpy.context.active_object.data["_RNA_UI"] = {"blend": {"min":0.0,
                                                       "max":1.0,
                                                       "soft_min":0.0,
                                                       "soft_max":1.0}}

pbones = bpy.context.active_object.pose.bones

for pboneA in [pbone for pbone in pbones if "Start" in pbone.name]:

    pboneB = pbones[pboneA.name.replace("Start","End")]

    constraint = pboneA.constraints.new('COPY_ROTATION')
    constraint.target = bpy.context.active_object
    constraint.subtarget = pboneB.name
    add_driver("blend", constraint, "influence")

    l_A = (pboneA.head - pboneA.tail).length
    l_B = (pboneB.head - pboneB.tail).length
    add_driver("(1-blend) + blend * " + str(l_B/l_A), pboneA, "scale", 1)

This is the result with skinned mesh:

Lastly we will unwrap the torus mesh into a single rectangle UV with the point where the hole will be in the middle. The intention is to animate a material mask to create the transparent hole. In the picture are marked seams and the UV map - I used UV Squares addon to have such nice regular UV map:

In the material lets use a procedural gradient texture set to Quadratic Sphere, offset into the center of UV space, with an animated threshold (the Color Ramp node is animated):

The only problem is that the texture does not warp with the hole. Good news is the procedural spherical gradient to drive the texture warping effect is already in place:

There is the displacement mask on the left, UV coordinates in the middle with progressively blended displacement from 0 to 100% influence and the warped texture on the right.

This is the final result:

And a finished .blend to peak into:


Is there a way to add a dynamic amount of points to a point counter?

Let the Property Actuator add the value from property counter to the value of property points:


If you use Cycles, there is a node called Hair Info. You can use the intercept value (Gives a gradient where the root of the hair is black and tip is white) from it to achieve a gradient along the length of the hair. You could for example run it through a ColorRamp. (For more info on hair rendering, see the Wiki here: http://wiki.blender.org/index.php/Doc:UK/2.6/Manual/Render/Cycles/Hair_Rendering). There is also an excellent video on hair rendering by Andrew Price, see here: http://youtu.be/jEnCsvcvX8k.


Oh, just after I posted this, I came to think of one thing the tutorial pointed out:
The order of the modifiers.
So, I tested to move the "Subdivision" modified up, so it is above "Bevel":

and after that, it looks OK in Object mode:


Character modeling: character's front view appear at side view port in Blender

Rotate your object to make it fit the viewport - select it, press R to start rotating, right after that press Z to limit rotation to Z axis, next type in 90 on your keyboard to make it rotate 90 degree along Z axis.

Try it out, it might be I am giving you wrong degrees out of my head, just experiment, it should be fairly easy to figure out.

After that you might consider applying your rotation to the object (so it thinks that's its default rotation he is in right now) by pressing ctrl+A and selecting rotation.

You can also press N hotkey when having mouse cursor centered on 3d view - this way you will be able to see rotations, translations and scale under Transforms panel, and change them however you like.


How do you add an object to a specific collection only in python?

bpy.ops.mesh.primitive_plane_add ...

... is doing stuff behind your back, based on the current context. It's creating the mesh, then an object from it, and linking it to the context's active collection. So when you call link, it's linking for the second time.

You could make the 'Tiles' collection active, and let bpy.ops.mesh.primitive_plane_add  do its own thing in there...

import bpy

C = bpy.context
D = bpy.data

if D.collections.get('Tiles'):
    tiles_collection = D.collections['Tiles']
else:
    tiles_collection = D.collections.new('Tiles')
    C.scene.collection.children.link(tiles_collection)

C.view_layer.active_layer_collection = \
C.view_layer.layer_collection.children['Tiles']

bpy.ops.mesh.primitive_plane_add(location=(1, -5, 0), size=1)

... I'm not saying it's a great thing to do, that would take someone with more experience than me. It may be better not to call bpy.ops.xxx at all, to avoid context connected activity, or the way you're doing it now may be just fine.


In your preferences under input enable "emulate numpad". Save your preferences, not your startup file.


The problem is that the .mtl file is not assigning the texture. There is no map_Kd attribute saved.

newmtl Material__27
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 18.00

If you append map_Kd cat.png as a new line, it will load the mesh with a texture. However the UV layout seems to be made with a mirror modifier applied which causes the texture to look very glitchy. This could be solved if you're willing to fix it.


Is a property of the UV editor space of the Image editor space.
Same deal as How to change View3DOverlay.show_stats?
The property is a member of the UV editor space. https://docs.blender.org/api/current/bpy.types.SpaceUVEditor.html#bpy.types.SpaceUVEditor.tile_grid_shape
following references will see that the UV editor is available from the Image editor
bpy.types.SpaceImageEditor.uv_editor

Test in python console.
>>> for i, a in enumerate(C.screen.areas):
...     i, a.type
...
(0, 'PROPERTIES')
(1, 'OUTLINER')
(2, 'IMAGE_EDITOR')
(3, 'VIEW_3D')
(4, 'CONSOLE')

>>> space = C.screen.areas[2].spaces.active
>>> space
bpy.data.screens['UV Editing']...SpaceImageEditor

>>> space.uv_editor
bpy.data.screens['UV Editing'].uv_editor
# Wrongly represents itself.

>>> type(space.uv_editor)
<class 'bpy.types.SpaceUVEditor'>

>>> space.uv_editor.tile_grid_shape[:]
(1, 1)

>>> space.uv_editor.tile_grid_shape = (2, 1)

Re error area.type is a string (see line above) and has no tile_grid_shape property.


How to access bpy.props.StringProperty() from a different class?

Window Manager keeps track of registered operators
Lets say we add a property to the simple operator template, and make it register - undo
class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"
    bl_options = {'REGISTER', 'UNDO'}
    xxx : bpy.props.StringProperty(default="foo")

Invoke it from the UI

Then in python console use WindowManager.operator_properties_last
>>> op = C.window_manager.operator_properties_last("object.simple_operator")
>>> op.xxx
'ggggg'

Note the template class name is SimpleOperator but really should be OBJECT_OT_simple_operator to match its id name "object.simple_operator" as per the naming convention
Store in blend objects
Alternatively store properties on ID objects in blender, eg scene, object, mesh etc.  Scene is often used as a "global".
from bpy.props import StringProperty

bpy.types.Scene.xxx = StringProperty()

set in an operator with
context.scene.xxx = self.my_string

retrieve with
print(context.scene.xxx)

layout with
layout.prop(context.scene, "xxx")


Objects not appearing when I render my model

You don't have light in your scene.

The hemi lamp in the middle of the room won't work, as cycles doesn't support hemi lamps yet. It will be treated like a sun lamp.

Sun lamps provide a uniform amount light from infinitely far away in a specific direction with no falloff. Because of this, the position of the lamp doesn't have any effect.
Since the room is completely closed and light has no way to get in from outside, everything renders as black.

If you change the lamp to a point lamp and increase the strength to something like 1000, you get something like this:


So, apparently I need to add an answer to mark it as solved.

Basically, if your object doesn't have collision enabled in physics, it cannot use the collision sensor. Sounds pretty obvious, but it's easy to forget about it.


How can I find the location of a node using the GUI?

In GUI you will find this info in Outliner in Datablocks view under:

BlendfileData > Materials > name_of_material > NodeTree > ShaderNodetree > Nodes > name_of_node > Location

You can also keyframe such value or even drive it.


How to create realistic steam in blender?

this might help some PS i hope you have success https://www.youtube.com/watch?v=I2m9Re8N78I
also try this node set up


Why are all these different colored lines showing up in Edit Mode?

The white lines are most likely edges, that have been "marked as sharp".

This happens quite often, when importing objects from other file formats.

Select your mesh, go into Edit Mode, hit A to select everything, then hit Ctrl+E and select "Clear Sharp" in the popup menu.

There also might be double vertices in your mesh (hard to say from the image alone).

To remove double vertices, select your mesh, go into edit mode, hit A to select everything, then hit W and select "Remove Double Vertices" in the popup menu.


How can I keep a single frame of a smoke cache?

Blender 2.81 (not mantaflow)

  This solution works but was probably never designed to work like this, therefore I can't guarantee that it's a stable workflow. It was stable enough when I tested it anyway.

Unfortunately, you should have already baked your smoke simulation using "External", otherwise you'll need to bake it again. Choose a directory for your bake to go to (e.g. //cache)

After you've baked, in //cache you will have several files called _<frame>_00.bphys. Copy the file corresponding to your selected frame, and paste it into a new directory //cache2, changing its name to _000001_00.bphys.

Note down the dimensions of your smoke domain, and create a new cube with exactly the same dimensions. You can now remove your original smoke domain.

In the newly created object, enable Smoke, set its type to Domain. Under Cache check External and use //cache2 as its Path. Simulation "End" gets automatically reduced to 1.

The object now holds the smoke information from only the selected frame and, as far as I've seen, it doesn't try to overwrite your cache or to add new frames to it.

The original //cache folder, containing all your bake and the unnecessary frames, can now be removed (but I'd keep it as a backup, at least the first N frames, where N is the frame you've picked)


I can't see the hdri background in my final render and render view in the viewport

You say you used Image texture node for the hdri? You shouldnt.  Add "Enviromental texture" node instead.


How to identify mysterious physics force affecting my objects?

The mysterious invisible force is 12 copies of your ragdoll. They are not in your scene but in your blend file. It looks like these lost objects are still used for collision detection.
To get rid of the copies, select Blender File as Display Mode for the outliner. Look for Objects and expand it. If you select everything in the viewport, then you can easily see in the outliner which objects are used in the viewport. Delete the other unwanted copies.

If you want to see the hidden copies, create a new file, delete everything and use File → Append ... to append the collections RigidBodyContraints and RigidBodyWorld from this file. These collections are used internally by Blender and are connected to the lost objects. This way you can append them easily to your scene.
Revealing the 12 hidden ragdolls


The best (and proper) way is to retopologize the model (use snaping on face) with subsurface-workflow and adding the detail by baking a normalmap with the highpoly model.

Then you'll get a animatable mesh with fast rendering details.


Two beginner questions about align correctly

Assuming there are no predetermined measurements

Alignment I

In an empty scene create a cube and scale it down on the X and Y axis only to about half the original, by press Shift + Z.

Then in edit mode, switch to Right view by pressing Num3, select both the top and bottom edges and scale down on the Z axis by about 0.5.

Add three vertical loop cuts and adjust the other two closer to the middle one by select one of edge, then tapping G twice to enter Edge Slide Mode and sliding it closer to the middle loop.

Delete the faces around the middle loop. Then select the edges around the open part and create a face by pressing F for both the segments.

Alignment II

While still in edit mode, enter Face Select Mode and select the top face of the larger segment and press Shift + S and select cursor to selected to align the cursor to the point.

Then create a cube and scale it down to the desired size. Select only the newly created cube completely and rotate it around the X axis, while using the "face dots" to check your alignment. press P and select "By loose Parts".

Select that cube, and in edit mode, select Normal Orientation and select the top face and pull it using the manipulator along its normal Z axis. Repeat the same step for the bottom face till it is at the distance you want it to be from the other surface.

NOTE: If there are any predetermined measurements feel free to alter the scaling transformations as you see fit.

Hope this helped.


How Use the rotation of a driver object to drive the 0-1 position of 12 driven objects

If you don't mind editing the drivers for every object individually its quit simple.
radians((LOWER_LIMIT <= (abs(degrees(var)) % 360) < UPPER_LIMIT) * 90)

with:

var = z rotation driver
UPPER_LIMIT = minumum rotation of driver to rotate object
LOWER_LIMIT = maximum rotation of driver to rotate object

How this works:

The comparisons return either a value 1 (True) or 0 (False)

NOTICE:  for the modulo to work you have to anable Auto run python script.
And to make it work gradually (totates 360d):
radians(LOWER_LIMIT <= (abs(degrees(var)) % 360) < UPPER_LIMIT) * (abs(degrees(var)) % 360 - LOWER_LIMIT) * 6

And if you want it to rotate back in opposite direction:
radians((LOWER_LIMIT <= abs(degrees(var)) % 360 < UPPER_LIMIT) * (-(1 / 15 ** 2) * (abs(degrees(var)) % 360 - LOWER_LIMIT - 15) ** 2 + 1) * 90)

Completely unrelated:
-binary counter
radians( ( ( degrees(var) % 2**(Driven_Object_Number))>2**(Driven_Object_Number-1))* 90)

here it is counting to 128


Strange behaviour while I'm texturing an object using the projection painting technique

Image data is treated separate to 3d model data, you must save the image data as a separate action from saving blender's data.

If an image is saved as an external file, then you need to choose Image->Save Image in the UV/Image Editor. If this is the first time you have saved the image you also want to save the blend file so that you also save the location of the image.

If an image is to be saved as a packed image within a blend file, you need to choose Image->Pack Image, then save the blend file so the image is saved to disk with the rest of the blend file.

If you alter a packed image, you need to use Image->Pack As PNG to update the packed data, then save the blend file to save it to disk.

The Image->Pack As PNG menu option is only available when a packed image has been changed.


Why are my creases horizontal instead of vertical in the sculpt mode?

My first guess would be that you don't have enough geometry in your couch. If all of your polygons are long, thin, horizontal polys, then that's going to affect the way it looks.

There are two ways to solve this problem. One is to manually add more geometry. You want the density the polygons to be the same across the whole couch, and you want them to all be as square as possible. Insert Edge Loops (ctrl+r) will probably be very helpful if you decide to try this approach.

The other solution is to use Dynamic Topology. This will dynamically add geometry as needed, but it will still have an easier time if your geometry is even and consistent.

From the Manual:

  Dynamic topology (AKA dyntopo) is a dynamic tessellation sculpting method, adds and removes details on the fly. Dyntopo is quick, just get a brush and start to sculpt. Dyntopo will add details base upon your brush size, detail type and strength.


I don't think you can keyframe the body of a text object, directly, so I think you should do something like this:

import bpy

def update(self):
    text = bpy.data.objects['Text']
    frame = bpy.context.scene.frame_current
    if frame <= 1:
        text.data.body = 'Here is my text'
    elif frame >= 2:
        text.data.body = 'Now it should change'

def register():
    bpy.app.handlers.frame_change_post.append(update)

def unregister():
    bpy.app.handlers.frame_change_post.remove(update)

register()

I have formatted this to be ready to be placed in an addon (you can see the register functions there), but you can use it as you want.

The idea is to have a frame_change handler that triggers an update function every time you change the frame (it's ideal for animations). The update function simply changes the text.data.body based on the current frame.

If you want to have more flexibility when animating, you can use custom properties:

import bpy

bpy.data.objects['Text']["Text animator"] = 0       #create custom prop

def update(self):
    text = bpy.data.objects['Text']
    frame = bpy.context.scene.frame_current
    if text ["Text animator"] < 1:
        text.data.body = 'Here is my text'
    elif text ["Text animator"] >= 1:
        text.data.body = 'Now it should change'

def register():
    bpy.app.handlers.frame_change_post.append(update)

def unregister():
    bpy.app.handlers.frame_change_post.remove(update)

register()

This way you can easily animate the custom property using keyframes and fcurves, and when the property value is more or less than 1 it changes the text body (of course you can set up more elif statements for values greater than 2, 3, 4, etc)


How do I animate a smooth transition between all colours in the RGB spectrum?

I believe that's the setup you wanted. By adjusting/animating value node you can achieve effect close enough to what I've seen in the video (or you can just use 'Hue Saturation Value' node input itself). You can adjust look of the gradient by changing texture scale (in the Mapping node), texture interpolation (in texture node itself) and by adjusting colors in the color ramp (for better look I recommend you to use HSV mode (with any sub-option) in the color ramp).

Have a good day!


I would suggest a 2 step process.

In edit mode select all the faces you want of one color. Then in texture pain mode. click the button in between the layers and the shading mode buttons. Its tool tip says Face selection masking for painting That will limit the area allowed to be painted, to only what is selected.

Then after you have the base colors down. Open the newly painted image in gimp/photoshop and paint in all your shading and details.


Can I set up one background image per scene?

Background images are part of UI data, that means they are saved along with user interface information withing the blend file, as such they cannot be different per scene, because UI data is saved once per file only.

As a side note you can also notice that if you disable the Load UI option when opening a file, background images will be gone.

They can still be controlled on a per-viewport basis, though, so two different 3D scene views can have different visible images, but the list will show the same datablocks.

Blender 2.8 post production effects and settings will probably be part of scene or even layer data, as such they have nothing to do with background image settings and can be independent per scene, as far as I know. Nothing is written in stone yet.

You could try using Empty objects as images as an alternative.


Blender 2.83.4 Eevee viewport color and rendered color are different with transparency

display viewport render is OK

If I disable the transparency from the render properties panel under film I get what I'm looking for.

The viewer for the render image is broken and has been broken for a long time.It cannot display luminous pixels that are transparent at the same time.
PNG is a format that can't do that either. It cannot do associated alpha channel correctly.
If you look at the rendered image as color (not color+A)

Or add a black backround and use alpha over to composite you the image over it and you should see if the render is correct.
As for saving the image, save as EXR and everything should be fine.
More info:
Rendering fire animations with transparent background
Render semi-transparent volume with cycles
and
How do I get the Glare node to output transparent instead of Black background


How to emulate MixRGB (Mix) with math node for Grayscale?

This 'Mix Value' node group will emulate the simple Mix of two values:

The inputs are all clamped 0-1
The result is [(1-Fac) * Value 1] + [Fac * Value 2]

You can use this framework to test it:

The outputs of the Mix RGB node and of the combined lower branches, mixing the channels independently, are indistinguishable.
If you want to test the other mix modes, this reference could be handy.You would replace the 'Add' in the node group with the functions described. here's a link to the Blender code, thanks to this answer by @Meng Hui Tan.
Have fun!


How to enable animation of linked rigged object

you have to use the Proxy Objects :

A proxy is a legal stand-in or substitute for the real thing. In Blender, when you make a linked copy (described above), you cannot edit the object; all you have is a link to it. You cannot add to it or change it, because its source is in another file that is not open.   Blender Manual

to convert the linked object into a Proxy Object you select the linked Object and hit Ctrl+Alt+P now you can animate the proxy object and it will get updated to the linked when you reload the file.


How do I install the Fracture Modifier Add-on?

The fracture modifier project is not an addon, it is a development branch of blender that adds the fracture modifier as a core feature within blender's source code and aims to have it incorporated into a future blender release. You need to use a copy of blender that was built using the separate branch of development.

The site you link to includes downloads of pre-built versions of blender which include the fracture modifier. If the available versions don't work on the system you have, then you will need to build your own copy of blender by checking out the fracture_modifier branch instead of the master branch.


Is there a way to Import old 3ds max files into blender

click file, immport and then choose which format do you have. I don't know, what formats 3ds max uses but I'm sure you can export it as .stl or .obj


Is it possible to edit all texts without affecting other curves using Python?

Edited, thanks.

import bpy

curves = bpy.data.curves

for c in curves:
    if isinstance (c, bpy.types.TextCurve):
        print(c.body)
        c.body = 'this works in better style'


Where has the "Normal" Texture paint project option gone in 2.8?

It is in a different place, but still available under the Falloff menu options.


Make sides of text object a different color?

Here's a shader which does as ideasman42 suggests:

The values of the empty sockets in the multiply nodes are all 0.

This works by taking the dot product of 0,0,1 and 0,0,-1 in object space, and mixing two shaders based on the result.
In this case, parts of the surface facing in the +Z or -Z direction (in object space) will be black, while the rest of the surface will be blue.

Using a shader has the advantage of keeping the text editable as text.


Colors will change in scene when I use RGB node as shader

I just found out, that you can change the at "Render Propeties">"Color Management">"View transform" from Filmic to Standard.
I don't need further awnsers.


Using existing topology to model details and grooves

I would do it this way: First model the general shape of the gun with no worry for the grooves. Once your good, begin to draw the grooves lines with the knife. Keep using the knife to make sure you have mainly quads and not tris or ngons, then bevel the grooves, and extrude inwards. You'll have to bring some corrections of course. You could even separate the grip in several different meshes as anyway it will be hidden by the grooves.


You should plug your vertex colors into the color input of your shader.

With your object selected, add a new material:

Create a meaningful name for the new material. Next, open a node editor window. One way to do this is to create a new UI window by dragging up the triangle in the bottom-left of an existing widow:

You can change the type of your new window with the button on the bottom-left -- select "Node Editor"

You have to type the name of your vertex color layer into the Attribute node. The default name is Col:

You can check the name of vertex color layer in the Vertex Color section of the Object Data tab in the Properties panel:


Rendered viewport shading in blender 2.8 is low-res on Retina screens

This is a feature, which actually originated from using high resolution screens.
(Other users actually want to increase the pixel size.)

With highresolution screen viewing a small portion on your display, already requires lots of pixels to be rendered. If you just want to have a rough idea of the color and shapes, you don't need a highres version.

Go to the Properties Panel.
Go to the Scene Tab (the second from top).
Go to the Performance section.
Go to the Viewport subsection.

Change the Pixel Size attribute to 1x. If it is set to automatic, Blender probably realizes you are using a high resolution screen and adjust the preview pixel size for better performance.


Mirror's axes are specified by the object, not by the world. So the transforms what you do in object mode don't count, only what you do in edit mode. You generated the circle in object mode, then rotated, then went to edit mode. You are supposed to go in edit mode, then rotate with 22,5°.
All the transforms must be 0. You can apply the transforms by hit CTRL-a and select rotate and scale.


Efficient way to get selected vertices via python (without iterating over the entire mesh)

You have to iterate over the entire mesh since blender isn't storing this data in a separate list internally.

You can use the following line of code to get a list if selected vertices from a bpy.types.Mesh object ('mesh' in the code):

selected_verts = list(filter(lambda v: v.select, mesh.vertices))

or with list comprehension:

selected_verts = [v for v in mesh.vertices if v.select]

However, in most cases, brute force looping through all the vertices of the mesh should be fine.


I found the solution in Blender Prefences shown below:


Helper Script

For each fcurve in the context object's action, space keyframes evenly based on start, end frame and how many keyframes.

import bpy
context = bpy.context
ob = context.object
ad = ob.animation_data
action = ad.action if ad else None

if action:

    fs, fend = action.frame_range
    flength = fend - fs
    for fc in action.fcurves:
        N = len(fc.keyframe_points)
        if N < 2:
            continue
        df = flength / (N - 1)

        for i, kfp in enumerate(fc.keyframe_points):
            kfp.co.x = fs + i * df


Can I start panning after orbiting without re-pressing the middle mouse button?

Sorry for necro-ing an old post. But it came up top in my google search of "blender pan mid orbit" so I thought I would share for others.
I come from Sketchup and is very used to not releasing the middle mouse button while switching between pan and orbit.
@Gerald's answer pointed me towards the right direction.

In rotate view, add a shortcut to switch to move on left shift
In pan view, add a shortcut to switch to rotate on release of left shift


You have to render it as a .png image sequence in your preferred file, and then go to the video editing section of Blender, browse for the frames, select them then add them, and then sequence the pictures into a video.


If 'the file' you are referencing is a blender file and you want to know if it has been saved then there are two properties you can check.

If a blender file hasn't been saved at all you can check it's is_saved property as this will be False if it hasn't been saved:

if bpy.data.is_saved:
    #File has been saved. Do something.

(A previous version of this answer instead checked if the filepath property was blank instead - the above is a correction thanks to poor's comment).

For files that have been saved you can check the is_dirty property, which will be True when changes have been made since the last save:

if bpy.data.is_dirty:
    #Changes have been made since the last save. Do something.

To get a button to execute code have a look at Simple way to add button to UI.

For error messages look at Proper way to show users error info in the UI for addons.


Just for fun, you can achieve this using displacement.
It works on any BW image texture, but requires a heavily subdivided mesh.
01) Displacement Node

Subdivide your mesh enough
Connect texture through Displacement Node
Enable true displacement in material settings

02) Displacement modifier

Use your image to create a texture
You can apply the modifier to turn the displacement into real geometry


I figured it out! Make sure all your bones in your armature are set to this transform.

A few of my bones had -0.00 and for some reason that was throwing my alignment off.


How do I set a custom shape for multiple bones?

Make sure the Copy Attributes Menu addon is enabled (by default embedded with Blender).
Then select first the bone(s) that should receive the shape, then the bone that has the shape holding the Shift key > Ctrl-C > Copy Bone Shape


Game engine flight animations, controlled by contact with floor, not keys

This calls for States!

Basically, States let you setup completely different logic brick behaviours for walk and fly and transition between these conditions.

Click on the (+) icon on top of the controllers list to show the all the State slots. Notice how all the logic are on the 1st state right now. We'll change that. We'll assign all the walk logic to the 1st state, and all the flying one to the second.
Let's setup a detector to figure out when the robot is off the ground using a ray sensor, and have it transition to the 'Fly' state.

Finally, let's go to the 'Fly' state and setup the logic bricks so that it will transition back to the walk state.

The rest should be pretty straight forward.


How can I change the directory used to cache BVH?

From the blender 2.62 release notes

  For renders where only the camera or materials are changing, while meshes stay fixed, it is now possible to skip the sometimes slow BVH step, by enabling BVH Cache in the Performance panel. This will store the BVH on disk for subsequent (animation) renders of the same scene. Note that if the scene does change in the animation, enabling this option will make rendering somewhat slower.

The best way to tell if your mesh is changing is to render a few frames, if you get more than one bvh file in the cache directory then the mesh is changing and cache bvh probably isn't helping. Some simple tests can show that an armature deforming a mesh is considered altering a mesh and creates a new cache file each frame, the same as an object moving in the scene, but a camera moving through a static scene can make use of one cache file.

5GB of cache files sounds extreme, of note here is that blender doesn't appear to clear this cache out by itself, you may want to delete everything in your cache folder.

As for where it is saved, you should be able to delete the cache folder and replace it with a shortcut - be sure to call the shortcut cache. I know this works on *nix systems but should also work on windows.


Hover shows only partial python bpy. path

In such cases you could have a look at the source code. Click RMB while the mouse cursor is over the property to open the context menu, select Edit Source.

Open a text editor and select the loaded file, you will notice that the cursor is already positioned at the property.
In this case the line is:

sub.prop(cbk, "use_selected_to_active") (line:1258)

Ok, this is what you already knewd , the cbk is another variable holding the context of this property a few lines above (line:1242) you will find the definition.

cbk = scene.render.bake

Now you can assemble the parts to the full path and test it in the console window:

>>> import bpy
>>> print(bpy.data.scenes["Scene"].render.bake.use_selected_to_active)
True

Note: Line numbers are valid for official 2.71, One could have used the D shortcut for bpy.data.


How can I make the effect of moving an object in a very high speed?

In real life this effect you see on the image is done by the time a camera is opened to receive lights for a very small time (shutter speed). This time cannot be zero so it records a distorted image.

In blender when animating you don't have to do anything. Just tell your renderer to calculate the Motion Blur. For cycles you can find it in the property panel in the render tab.

For blender internal you need to enable the vector pass and use the Vector blur node in the compositor.


How do I make the speed of an animated object constant instead of accelerating?

What you're looking at is the default interpolation (that is, the rate things move between keyframes).  From your description, it is likely that your default interpolation is set to Bezier, which looks like below:

Get into the Graph Editor, select the channel you want to change (the names next to the eye in the above picture).

Then you want to go to the Menu >> Channel >> Interpolation >> Constant.  It'll move constantly after that.


Making a handle for a bottle with a rounded grip for fingers

You could try it this way:

At first, to make the base, use an Array then a Simple Deform / Bend mode. At the end, keep a copy then apply both the 2 modifiers, then use a Mirror on X and Y as the object is symmetrical on these axis.

To create the handle you'll begin to extrude some faces of the base. Use your picture as a background to make sure you follow the shape.


So I found out the reason, I don't know how but the normals were facing the opposite direction. So I just recalculated the normals and that fixed it.


Simple script

Translate the circle primitive into a sine wave.  The primitive circle distributes the verts x, y coords in a circle.

The z coordinate is adjusted to oscillate in a sine wave.

import bpy
from math import sin, pi
verts = 128 #  verts per circle
radius = 1 # radius of circle
freq = 16   #  how many phases of sin wave
amp = 0.1   # amplitude of wave
# angle per vert
apv = freq * 2 * pi / (verts)

context = bpy.context
bpy.ops.mesh.primitive_circle_add(
        vertices=verts,
        radius=radius)
ob = context.object
me = ob.data
for v in me.vertices:
    v.co.z = amp * sin(v.index * apv)
me.update()


How do I merge these individual components into one solid object?

These small rectangles are called faces. It's the surface of your solid object. There is nothing wrong with them and there is no need to merge them. That's normal. The objects are shown in the Outliner in top right of the screeen.
If you're new to Blender I recommend to watch video like this 3D for NOOBS - Livestream Lesson 01. It explains 3D stuff and Blender's interface and basics. It's for absolute beginners.


Application Template on Blender 2.8 - Not working?

As of today (Jan 25 2020) Blender 2.83 alpha has been fixed to receive Application Templates again from the "blender" top left icon in the UI. Later when activated, the Application template can start from the "...." on the startup splash screen.


How to reduce artifacts on curved text/vector

I added a text, converted it to a mesh and extruded it 1 upwards. To get artifacts, I used a wave modifier. Yay, artifacts:

The artifact are because of the terrible topology Blender creates of the font. Usually, if the topology is too horrible for manual fixing, add a Remesh modifier and hope the best:

The Remesh modifier needs to be before the artifact-creating deformation. If you have to many vertices at the end, adding a Decimate modifier in Collapse mode works well.


Cloth simulation not animated in 3D Viewport

It seemed to work after waiting a few seconds when the play animation button was clicked. It took some time for it to actually start animating.


How to Construct a Diamond or Other Gemstone Material in Cycles

You need dispersion
Dispersion is the phenomenon of multicolored highlights you see in most transparent substances, resulting from different colors (light frequencies) refracting at different angles (the prism effect).
Your reference image does not have this, which makes it immediately noticeable as CG. Instead I would suggest by starting with a reference like this one.
Kent Trammell explained this elegantly in a tutorial that was published on CGCookie but has since been removed. The first person to do it was probably Kirado, who shared the node setup.
Here is the basic node setup - note how the IOR values differ:

Taking it further...
After doing some renders with the above setup I felt that the material still looked too dark, so I decided to try mixing it with a plain white Glass Shader in a way that would not interfere with the colorful highlights. The "Is Camera Ray" output of the Light Path Node seemed to work pretty well for this. What it does is takes any area where the RGB summed color is not already reaching the camera, and allows the white (clear) Glass color to shine through just in those gaps.
The IOR of diamond is 2.4175 and the dispersion is .044. So by using these values, as well as a realistic diamond size, we can get something much more accurate. Make sure to apply the scale (CtrlA) of your diamond object if you want the refraction to be as accurate as possible.

Keep in mind that we are still "faking it" by having only three set IOR values (for red/green/blue). But practically speaking this turns out to be totally sufficient.
Geometry matters
With gems like diamonds, the cut determines the way the light gets reflected. Geometry plays an important role in the appearance of this material.
A page on diamond.com has diagrams that explain this really well:

Luckily, creating an ideal diamond mesh can be done in Blender in an instant. Just enable the Extra Objects (Mesh) add-on, and it will be an option in your Add Mesh menu.

Now pressing ShiftA in the Viewport gives you new options:

In my example I slightly beveled my diamond, which allowed me to use Smooth Shading instead of Flat Shading. This did away with the angular "CG look", and scattered the light in more directions, brightening the gem. However, it has since been brought to my attention by user Thom Blair III that diamonds are sharp down to the molecular level, so a bevel is not accurate. Consider using Simple Subdivision instead.
Lighting matters
An HDRI environment map will provide a more diverse color palette of light for your scene, so consider using one if you want more realistic lighting.
If the environment color is not quite to your liking, either change to a better-suited environment map or adjust the color using a Hue/Saturation/Value Node. In my case the sky was too blue, so I reduced the saturation.

Rendering
A material like this requires a high sample count for it to look clear (I used 7500 samples!). *Update: With the new Denoise feature you don't need anywhere near this many samples now! Many thanks to Blender's developers.
If the gemstone will be part of a larger scene where other elements do not require such a high sample count, you can keep the gemstone on its own Render Layer to keep render times from becoming ridiculous. (Okay, I mean keep them less ridiculous.)

Setting Clamp Indirect to something like 10 also helps to reduce fireflies.

Compositing
If you want to adjust the exact color of your gem, or add bloom and streak effects, you can use the compositor to put on the final touches.
An example node setup for compositing:

Before compositing:

After compositing (final result):


How to apply albedo, ambient occlusion, normal/bump maps and metalic/roughness texture for Cycles?

What you want to do is use the Principled Shader node! It has dedicated slots for all of those maps, except for ambient occlusion. Albedo is the same as base color. To use your ambient occlusion, in this case, multiply it with your albedo map before plugging it into the base color. You can either do it in the node editor with a mixRGB node (one of the dropdown options is multiply), or externally in an image editor.

Here's an image of what you probably should have in the node editor so that you can apply all of your textures onto the mesh. I got this screenshot from Blender Guru's tutorial on Principled Shader in Blender:

(In addition, make sure you have a Texture Coordinate node, found in 'input' under the 'add' menu, and hook up your UV slot to your texture maps.)


video sequence editor- how to render video with reversed picture order?

Select your strip and on the filter tab select Backwards


Change the position of a face in real time

This example moves the top face of the default cube in the default scene:
Note the print( dir ( some_obj )) statements, this helps to examine the data structures:

import bge
import bpy
cont = bge.logic.getCurrentController( )
own = cont.owner
scn = bge.logic.getCurrentScene( )
obj = scn.objects["Cube"]
mesh = obj.meshes[0]
print( dir ( mesh ))
for i in range( 0, mesh.numPolygons ):
    poly = mesh.getPolygon(i)
    if i==1:
        print("v1=%d v2=%d v3=%d v4=%d" % (poly.v1,poly.v2,poly.v3,poly.v4))
        vert = mesh.getVertex(0, poly.v1)
        print( dir (vert))
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]
        vert = mesh.getVertex(0, poly.v2)
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]
        vert = mesh.getVertex(0, poly.v3)
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]
        vert = mesh.getVertex(0, poly.v4)
        vert.XYZ = [vert.x+1.0, vert.y+1.0, vert.z+1.0]


You need to go to the cube and enter Ctrl + A and hit scale to apply the scale of the object, this is to avoid the size issue. However this does not completely solve the issue because when you rotate the empty by a whopping -800 degrees on the Z axis it is off centered and the rotation is not right as seen below.

To fix this, remove the empty as the object offset of the cube, and put the cursor with Shift + S in the center of the selected cube. Then create a new empty and make it a child of the empty at the center of the scene by clicking the new empty and Shift selecting the empty in the center then hitting Ctrl + P > Object.

Afterwards make the Object Offset in the array the new empty at the center of the object. Now you can rotate the center empty by 30.1 degrees (360 degrees / 12 pieces, the added 0.1 makes it more centered somehow).
EDIT: 30.0939 is the precise rotation seems like.
The final result should look like this with no weird rotations.


What should I do to stop blender freezing on start-up, when its okay starting from a double click .blend file

startup file can be messed up.

Open with a file that's ok, reload factory settings and save starup file.

If preferences (addons or anything) are messed up, do the same but open prefs and click save user settings.

If something's wrong in program data or manually added scripts/addons, explore C:\Users\ [userName] \AppData\Roaming\Blender Foundation\Blender and delete everything (or move).

After a crash, blender files could be corrupted. You can uninstall-reinstall blender to fix them.

If nothing helps, you can check your disks (all where windows, blender and .blend files are) from explorer RMB on the disk you want to check, properties, tools tab, check now. In the pop up, check automatic repair, uncheck search and fix defective sectors (or something like that, translating). This won't last long.

If this fails at fixing, try to check fix defective sectors but it'll take more time and for windows disk, you'll need to restart (and wait).


Blender Internal glossy BSDF equivalent?

I'd like to add some information about the settings on top of micgdev's answer:

Reflectivity: There you define how strong the reflection is. 1 is fully reflective, 0 means no reflection at all. A fully reflective surface is non-existant, even a mirror is around 0.9..

Fresnel: Do you know the effect when you're looking at car windows from different angles? One time (when you face them) it's almost transparent, the other time it's almost a mirror (looking at them from the side). This effect is the fresnel effect and you enable it with this slider.

Glossy: With a glossy "amount" value below 1 you're setting the glossiness. 1 means very glossy, all below 1 means that the reflection will be blurred out.

Anisotropic: With this slider you can alter the reflection kind. If you're turning it up, the reflection will behave more and more like under a pot (become more and more circular).

I think that should set you up for the first steps...but read the documentation and experiment - there is so much to test and find out :)


Operator addons with multiple texture inputs in Python

I figured it out. I'd tried to think too much and the solution can be very simple. As nodes variable is already a list, I can simply tell the system which map belong to diffuse etc.
Instead of
 if mat.node_tree.links.new(img.outputs[0], prxy.inputs[5]):
        spec = img

        nodes = [k for k in node
                if isinstance(k, spec)]

        for k in nodes:
            k.image = bpy.data.images.load(self.rough)
            return k
    elif mat.node_tree.links.new(img.outputs[0], prxy.inputs[0]):
        dif = imgdif

        secNode = [s for s in node
                if isinstance(k, dif)]

        for s in secNode:
            s.image = bpy.data.images.load(self.diffuse)
            return s

I have done something like:
mat = self.id_data
node = mat.node_tree.nodes
img = bpy.types.ShaderNodeTexImage
nodes = [k for k in node
         if isinstance(k,img)]
nodes[0].image = bpy.data.images.load(self.rough)
nodes[1].image =bpy.data.images.load(self.spec)


how to add circle to existing mesh by python script

Using bmesh

Suggest getting to know bmesh as soon as possible.   There are a number of create primitive operators in bmesh.ops including bmesh.ops.create_circle(..)

import bpy
import bmesh
context = bpy.context
scene = context.scene
me = bpy.data.meshes.new("Circles")
obj = bpy.data.objects.new("Circles", me)
bpy.context.scene.objects.link(obj)
#new bmesh
bm = bmesh.new()
# load in a mesh
bm.from_mesh(me)

for i in range(1, 10):
    # create circle
    geom = bmesh.ops.create_circle(bm,
                segments=16,
                diameter=1 / i)
    verts = geom["verts"]
    # translate verts
    for v in verts:
        v.co.z += i / 4

# write back to mesh
bm.to_mesh(me)
# make context
scene.objects.active = obj
obj.select = True
scene.update()

Note there is a more involved example on bmesh API re circles


How can I make stationary lava with the fluid simulation in blender?

You can setup a fluid sim and start simulating some fluid, as the simulation is baking you can progress through the timeline to see each frame as it is created.

Once you get to a frame you like the look of, you can cancel the bake. Under the modifiers properties of the domain object you will find a Fluidsim modifier, by clicking apply you will remove the simulation and leave the domain object permanently shaped as you see it, as a piece of water frozen in time.


smooth shading error on a low poy model creating sharp edges

Try recalculating normals ctrl+N in edit mode or merge vertices by distance also in edit mode I think alt+M for the merge


You have a couple of problems:

You are trying a glass object and a glossy black object (the plane). Highly reflective objects need something to reflect! Create some environment and you'll see that your lights work.
Your objects are quite large! So the lights also need to be a bit more more powerful

Here's your scene with a white hemisphere and your lights a bit brighter:

To leave the environment out of the rendered image turn off the visibility for the camera

Blend file to play with:

EDIT:

if what you are after is some glow in the dark effect you might want to add a plane with an emitter shader as a light source under the object and forget about the lights on the scene altogether.

Or have no other emitters in the scene than the object generating its own luminescence:

and why not? another blend:


This gets the root directory of the add-on from any file (or at least those in the same directory).  Can always do an os.path.join() if I need a sub-directory.

def getAddonPath():
    import os
    return os.path.dirname(os.path.realpath(__file__))


Attached objects rotate at different pivot point on rig?

There are two solutions that I can think of.

Solution 1:

Make the head and the mustache one mesh. You can do that by selecting both and pressing Ctrl+J. Now you have to make sure that the pivot point is stil right. If not select the point where the head connects with the body and move your 3D-Cursor to it by pressing Shift+S and selecting "Cursor to selected". Now press Ctrl+Shift+Alt+C and select "Origin to 3D Cursor".

Solution 2:

If you want to move the head/mustache only once or twice you can move your 3D Cursor to the point where the head connects with the body as described above. Then just change the pivot center to "3D Cursor" (see screenshot). You don't need to make the head and the mustache one mesh in this option.


Why does blender delete the headlessly baked cache on startup?

After quite some digging around and wading through the source code, I found that upon initialising the ptcache for the smoke simulation, blender checks a flag PTCACHE_BAKED. This flag appears to be saved with the blend file. If the flag is not set, the cache directory is flushed.

To prevent this from happening, the file must be saved after baking. For this, a modified version of bake-all.py works:

import bpy

try:
    for scene in bpy.data.scenes:
        bpy.ops.ptcache.free_bake_all()
        bpy.ops.ptcache.bake_all({'scene': scene,})
finally:
    bpy.ops.wm.save_mainfile()

Two additions here:

A try-finally block to save the mainfile, even if the bake is aborted with Ctrl-C.
A call to free_bake_all(); this is required for re-bakes, otherwise bake_all will not do anything, for the same reason as blender will not delete the smokecache when starting (it assumes the bake is already finished).


Problems while creating a City using the OpenStreetMap maps

In OpenStreetMaps only the buildings in dark brown have had their shapes made available for blender. This means that what you are experiencing is normal. If you would like more buildings, select a different area of your city, preferably with more details.

[Edit by Brasshat] Or create the bit of the city you want, and use Blender to add the buidings not provided by OSM.


blender 2.81 can't even add single vertex

I don't think the option was ever there without an add-on. If you go to the Preferences(F4->p), Add-ons section and search for an add-on called Extra Objects and enable it, you will have your Single Vertex menu.

As you can see it in the picture, I prefer to have it straight in the Mesh menu instead of another submenu like it comes with the add-on. If you wanted to have it like that, save this to a text file(use Blender's text editor) with a .py extension and install this as an add-on:

bl_info = {
    "name": "Add Vertex",
    "author": "",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "View3D > Add > Mesh > Add Vertex",
    "description": "Add Vertex",
    "warning": "",
    "wiki_url": "",
    "category": "Add Vertex",
}

import bpy
from bpy.types import Operator
from bpy_extras.object_utils import AddObjectHelper, object_data_add
from mathutils import Vector

def add_vertex(self, context):
    verts = [
        Vector((0,0,0)),
    ]
    edges = []
    faces = []
    mesh = bpy.data.meshes.new(name="Vertex")
    mesh.from_pydata(verts, edges, faces)
    object_data_add(context, mesh, operator=self)

class MESH_OT_add_vertex(Operator, AddObjectHelper):
    """Add Vertex"""
    bl_idname = "mesh.add_vertex"
    bl_label = "Add Vertex"
    bl_options = {'REGISTER', 'UNDO'}

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

def add_object_button(self, context):
    self.layout.operator(
        MESH_OT_add_vertex.bl_idname,
        text="Vertex",
        icon='DECORATE')

def register():
    bpy.utils.register_class(MESH_OT_add_vertex)
    bpy.types.VIEW3D_MT_mesh_add.prepend(add_object_button)

def unregister():
    bpy.utils.unregister_class(MESH_OT_add_vertex)
    bpy.types.VIEW3D_MT_mesh_add.remove(add_object_button)

if __name__ == "__main__":
    register()


I think the file encoding is the problem.
The blender python assumes 'UTF-8' and maybe the command line gets the encoding from the system.

Try to give the open method a encoding:

file = open(csv_path, encoding='latin-1')

I think 'latin-1' is correct for Mac, otherwise try 'iso-8859-1' or 'cp1252'.


Motion tracking: object in my scene bonces around

My two cents:

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

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

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

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


Scale toilet paper cylinder witout affecting inner hole in preparation for unity

Unity has only simple transform tools that cant handle this case. Blender can be used to prepare the object for this.
ShapeKeys are the way to go:

Setup your object either totally "full" or "empty"
Create a basis and a key (in Object Data properties)
Select key and edit/scale your mesh with Shift + X to full/empty in Edit Mode.
Export to unity as FBX.
Import BlendShapes should be active by default
In the Skinned Mesh Render > BlendShapes play with your keys

Important: the collider of your base object is static, transformations with BlendShapes have no affect on the collider.


How to UV unwrap a wall to get a consistent texture?

While unwrapping from the view in ortho works for most cases, you can end up with texture scale inconsistency due to zoom changes in the Viewport that way. And unwrapping from view bounds will always force the mapping into a 1:1 ratio, causing distortion on any geometry except for perfectly square planes. Also, aligning the view to each plane of structures like roofs can be tedious.

Instead I recommend this great add-on that will make your life easier when doing archiviz...

Sure UVW Map

Download Page

YouTube demo video

It was released way back in 2012 by Alexander Milovsky, but is still compatible with Blender 2.79. It only generates the UV data, so it doesn't rely on any specific render engine. And of course the add-on is not needed to open .blends made with it.

After the add-on is installed, these buttons become available in the Mesh context tab:

UVW Box Map creates a UV map that is basically a box projection. It's good for boxy structures.

Best Planar Map attempts to find the optimal planar projection. Similar to Project From View.

Both of these methods have parameters you can tweak in the Operator Panel, so play with those too.

Here's a test I did on a structure with various kinds of angles:

Textures courtesy of Pixabay. 1, 2 .blend available for download here.

The conical part of the roof was not handled well, so I unwrapped with cylindrical projection on that part, which was better but still pretty bad. I think for such shapes careful, manual seam-marking and unwrapping is required.

The semi-cylindrical protrusion on the side of the building also has imperfections - the seam is showing, it just isn't very noticeable with the brick texture.

You can see where the seams are when using a UV test grid:

Conclusions

The Sure UVW Map add-on can help save a lot of time when mapping boxy/planar geometry. It runs up against limitations when used on rounded geometry. Knowing this you can probably figure out where it is appropriate to use. Hopefully it will make your architectural visualization projects go more smoothly. I have found it useful on many occasions.


Black Outline and Visible Faces in Cycles Render

Looks like problem with normal maps. Try switching to non-color color space in texture node and use bump node instead of connecting normal map directly.


Edit: Probably much easier since 2.8 with the new Mirror "Bisect" option
Former answer:

Create a cylinder (12 vertices), put its origin to its bottom.
Duplicate it with a shiftDenter.
Rotate the copy 120° on the Y axis (or whatever angle).
Duplicate the second cylinder and rotate it 120° on the Z axis.
Again create a fourth cylinder and rotate it 120°.
Now use some Boolean modifiers to merge these 4 cylinder.
Remove doubles to make the final object clean. You should not have any vertices inside your mesh but if it happened just delete them.


How do I turn off this line in weight painting?

What has happened is that you have activated a feature called Stabilize Stroke, which can be found in the Active Tool Tab of the Properties Panel, under the Stroke Section. It is very easy to enable this feature by accident, by inadvertently pressing its shortcut, which is Shift + s. The reason it is slow is because it gives up draw performance in order to facilitate a more precise line result. The same feature exists in Sculpt Mode, and can be accessed the same way.


You can use a mesh besides the cube as a smoke domain. I would however always stick to a boxes because Blender smoke simulators uses voxels (small cubes). And  other meshes can cause unpredictable behaviors, although I believe this has improved in recent GSOC. When using other meshes, depending on the smoke simulation's resolution the smoke might b outside of the domain.


I rendered the png sequence but the result video is jittery!

You should use the Blender video editing mode for exporting videos.

Then press Shift-A to get drop down add-file menu, or click on the "Add" button.
(Sorry about the sloppy arrow. I didn't have enough time to draw a good one)
select the "Image" button and go to the file in the file browser that you want to add frames from, and press A to select all. If you only want to select certain frames, then you can shift click on a frame to select it too.
Now you need to go to the box labeled "Add image strip" in the bottom left corner, and set the frame start/stop to the amount of frames you want to import.
Now select add image strip in the top right corner.
Now you can select the output format like you would normal renders, but instead of exporting as png, you export the animation as a video format. Whatever works for you. Once it is done creating the video, you can watch it in the location you set it to render to. This is Blender's Sequence rendering mode, which is probably best for quick Blender animation videos.


pinned vertices do no stay pinned when animating a cloth

The cloth simulator actually uses vertex weights (1 = pinned and 0 = unpinned).

Your vertex group has been assigned with 0 weight, as can be seen by entering weight paint mode (blue = 0 weight):

Reassign your vertex group with the weight slider on 1 (or paint some weights in weight paint mode):

Now the vertex group will have a weight of 1 and should stay pinned.

In the cloth modifiers physics settings enable pinning and select the cape vertex group.


Create a Hanging Bucket Effect (Handle Hooked on Rod)

I think your problem is the relative size of your wire and bucket meaning the physics has to be calculated very precisely.  I tried to set this up and had similar problems initially, and the the following steps fixed it for me:

Make sure the Centre of all of your objects is set to be near your geometry. (Object > transform > Origin to Geometry)
In Scene settings increase the 'Steps per second' (I went to 240FPS) (Scene> Rigid Body > Steps Per.
Make sure the 'Sensitivity' on the wire and the bucket are set to zero (or very close to) other wise the 'hole' in the bucket is effectively closed by the buffer this creates. (I think this is likely your problem, your objects are effectively starting 'inside' each other, and collisions are not detected if they start overlapping.

Set the Bucket and the Wire Like the below picture, and the thing it's hanging from exactly the same except untick 'Dynamic':

I get this:


how to mask an object so that it emerges from the floor

This is how you do that:

The cube needs this material, you can exchange the diffuse shader by any node tree you want, but the last node must be the mix shader with the holdout and transparent depth as factor.
The plane needs a transparent shader. Everywhere the cube would be visible through the transparent plane, it will be alpha.


Macro operator children are not called from python

The children operators need to be registered with their fully qualified internal name:

TestMacro.define('WM_OT_test_op1')
TestMacro.define('WM_OT_test_op2')


Rotation, move objects are not working in OS X 10.10

Enabled Emulate 3 mouse button its working fine now.

Hold MMB for rotate

Hold Shift+MMB for pan

Mouse scroll up/down for zoom

Right click to select object

Left click to complete the selection and process.

ESC key or press again to undo the changes happen in the selection process.


Viewer node in compositing doesn't show anything

Enable the Use Nodes check box in the compositor and refresh the Viewer node with Backspace.


Python script to determine XYZ of tip of cone

This script finds the vertex that is referenced by more edges than other vertices, this should meet the 'tip-criteria' to make a function getTip simply return the vert.co value.

import bpy

obj = bpy.context.scene.objects.active
mesh = obj.data

v_edge_tot = [0] * len(mesh.vertices)
maxedges = 0
maxvert = None
for edge in mesh.edges:
    for vert in edge.vertices:
        v_edge_tot[vert] += 1
        count = v_edge_tot[vert]
        if count > maxedges:
            maxedges = count
            maxvert = vert

vert = mesh.vertices[maxvert]
print(maxvert)
print('v %f %f %f' % (vert.co[:]))


How can I make the decoration to take the shape of any object

You can achieve this effect with the Shrinkwrap modifier as long as the pattern you are trying to apply is a mesh. For this to work best you should create a volume of your pattern, preferably spherical, then apply the shrinkwrap modifier with the "project" setting.

I would suggest keeping the pattern flat, then adding the thickness after it has shrinkwrapped around the object (possibly with the solidify modifier).

An alternative is also the Cast modifier, however this works only on geometric objects like spheres or tubes.


Baked normal map looks fine but has strange 'blocky' shapes when applied to the mesh (Overlapping UVs?)

Ok, I found the solution in the end! I realised that the problem was being caused by overlapping UV maps and mirrored geometry so I selected half of the model and then shifted the islands over by 2048px (the width of the normal map) so that they were off of the main area. I am not exactly sure why this happened, so if anyone has any insight it would be helpful, not only to me but to anyone reading this in the future. Here is an image of the adjusted UV map and the working mesh w/ normal map.


Divide a face following an existing edge (not part of the face)

You can create an edge there by selecting the two vertices of this provisional edge, and pressing the shortcut key J.

This nice tool works well even for creating several continuous edges


Render plane only where spotlight hits, rest should be transparent

use the color of the non-lit plane for the 'Key Color' attribute.

this makes everything transparent that's with the same color. if your logo also gets transparent then just wait a bit, i'll create a more complicated but better working compositor for you.

Edit: here's the better compositor

for this one you need to also set the plane's pass index to 1

and check the render layer's object index

I can't add more than 2 images so you need to use google for the last part


object separating itself during softbody simulation

That is a tricky problem.
The mesh geometry (length of the edges for instance) is of influence on the physics settings (like Edges Push and Pull values) and thus on how the object behaves during physics simulation. Because you have essentially two (very different) meshes in one object, they behave differently.
You could try to simply connect the to meshes in Edit Mode:

But the added edges will somewhat influence the shape of your meshes:

Also I don't think it will work for your jellyfish, since it is a more complicated mesh. I think if you want to control the behavior of both meshes, you'll have to make them two different objects, and sync their movement. I think I would animate the jellyfish manually without physics, to follow the movement of the ball.
(You might not need it, but just in case: If you were to do this, it might help to know about Cache setting to keep you simulation from changing for some reason. Can I save the baking cache?)
Not great answer I think, but I hope it helps. : )


Best guess:

You can see that bpy.context.material is listed under the "Buttons Context" section in the API doc link you posted (other sections are "View3D Context", "Screen Context" etc.). Based on what I found during my search, it looks like this is a context from 2.4x that is no longer available in 2.5x+. "Buttons Context" seems to be an old name for what we now know as the properties editor.

http://wiki.blender.org/index.php/Doc:2.4/Reference/Buttons/Window

It seems that this is old code (or old documentation) that just wasn't removed, but take it with a grain of salt, I could easily be wrong.

Edit (from comment below, which author identified as the sought-after code):
If I get what you're looking for with this attribute, you might want to try bpy.context.object.active_material.


Can't export object made with CSV mesh importer to unity

Your object has no faces. Blender cannot render single edges or vertices. You can try either the skin modifier, or press alt-c and convert to curve and use the bevel option.


What you will do to start with is add a rigid body simulation to one of your objects and set it to active. You can do this in the Toolshelf, or in the Physics tab.

Then, in order to have the objects react to each other in close proximity. use the collision margin option. Adjust this to be as high as needed. The maximum is 1.0. If this needs to be animated, you can keyframe this as well.

Next, select all objects that compose the model being exploded, or rather that should share the same rigid body properties that you just made. I sometimes find it to be faster to take advantage of wireframe here to quickly select anything behind with border selection. Now, with everything selected go to the toolshelf>physics and select copy from active to copy the physics settings to all selected objects.   It is a good idea to remember to do this anytime you change the simulation or you may have an unexpected result.

After you have done this, head over to the scene properties, and you can bake the rigid body simulation.

I just used a sphere after a cell fracture as an example, but this works with anything else also that is made of separate objects. You may also find it necessary to adjust the mass of objects in the rigid body settings.


Keyframing from properties panel and from 3d viewport creates different entry on Graph Editor

Rather than the former being a deviation from the latter, the latter seems like an automation implemented for convenience reasons.

Channel groups can be created manually with Ctrl + G. When inserting a Keyframe on a property in the UI rather than with I in the 3D View, in my experience it's usually something miscellaneous like render settings.

The Samples and Preview Samples properties have only one instance per Scene, and the Scene already has an all-encompassing group element in the form of SceneAction.


Can we use the poll() required operations without a context

As in the docs, some operations requires context to perform (For example: To select edit mode: bpy.ops.object.mode_set(mode='EDIT')) When we try to run blender from external console, we won't get the corresponding context results the error is thrown. To avoid these types of error, we need to override the context.
For this example, the required context can be obtained using the following code:
override = bpy.context.copy()
    for window in bpy.data.window_managers[0].windows:
        screen = window.screen
        workspace = window.workspace
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                override['window'] = window
                override['screen'] = screen
                override['area'] = area
                override['workspace'] = workspace
                override['active_object'] = bpy.context.view_layer.objects.active
                break
bpy.ops.object.mode_set(override, mode='EDIT')

IMPORTANT
For every operation, the context would be different. So, you need to find the correct context for every operation in a trial and error method. The above context can only be used in the case of changing to edit mode


The picture is rather limited in regards of information (especially which mode it is in), so here a little info to ground my answer on:
If you have more then one object selected in object mode, the last selected one is brighter while all other selected ones are darker, if you then go in edit mode, they will all have the same color. Object mode can look like that picture in wire-frame mode.

Since they are in the same color, i would guess that you have those objects added while in edit mode and thus all are part of the same object, means if you select one of them in object mode all parts are selected. They are kinda joined, but only as in the meshes are under the same object. If you go in edit mode (i'd suggest vertex mode) and select all by pressing "a", you can then press "p" for the separate function and chose "By Loose Parts".
That way your meshes will be separated and each gets to be under its own object, means then you can edit them separately.


How to change the thickness of grass hairs?

Mate i have a better idea for u, A way that I like to create Grass is using Planes, Not cylinders because they use way to many faces. The Goal in 3D art is to create as little faces as possible whilst still achieving a great Render. Try and create a narrow plane and scale it along the z-Axis then extrude it to make it look like a strand of Grass. Then duplicate it about 15 times moving them in different Locations to make it look like a Grass Blob. Add it to a Group. Then go to your Plane section and add a Vertex group. Go to weight paint and paint where you want the grass to appear. Then add Particle System/ Hair and click advanced. Scroll down to where it says group and click the object you added to a group. (The grass) There you can change the size and brownian to make it look like Grass.
And viola, you get an awesome scene that you can change.


How to not make scaling snap to 3D Cursor?

I guess you need to come back to Pivot Point > Median Point instead of 3D Cursor.


Using AutoMerge Editing - things aren't merging, what isn't right?

The default automerge distance is very small, as it's usually used with Vertex Snapping.

To use vertex snapping, set the snapping mode to Vertex (⎈ Ctrl⇧ Shift↹ Tab):

Then hold ⎈ Ctrl while transforming vertices (or toggle the magnet icon in 3D view > Header)

Now automerge should work as expected:

To increase the automerge distance, adjust the Double Threshold in 3D view > Tool Shelf (T) > Option > Mesh Options:


How do I transfer .blend files to a new PC and still keep all the materials?

Pack all your files into the .blend before you save and copy. See below:


Make objects invisible when they go through shadow catcher?

If it is a plane...you can use this very simple basic setup: (thanks to vklidu for the modified version with more charm)

result:
https://youtu.be/TEEF467A4E0


How do I get specular and bump maps or normal maps to work with a texture that has a transparent background?

Your next step is to make something called an transmission map. This is a black-and-white image that tells Blender which parts you want to let light through, and how much of it. In your case, your hair will be black and the transparent part will be white.

While I don't know your node setup (it would be helpful to see it to simplify your task), the next few steps should still be applicable. Add a Mix Shader and plug your current setup to the top input. Add a Transparent Shader and add it to the bottom input of the Mix Shader.

Running under the assumption you already have a bump map available, you'll need to add a total of three more nodes before you can use it. While you probably already have a fair idea of many, if not all of the following instructions (given you're already using a texture map), I'll go through them all, anyway, in case something got left out. The first node you want is a Texture Coordinate node. You should find this under the Input of your Add menu. You'll need this so Blender knows where you want the image to go on your hair. The next one is an Image Texture. You can find it under Texture on the Add menu. This is for actually bringing your map into Blender. Change the first dropdown setting from 'Color' to 'Non-Color Data' and connect a line from the UV output from the Texture Coordinate node into the Vector input on the Image Texture node. Now upload your texture by clicking 'open' and browsing for wherever you saved your map. The final node you'll need is a Bump Map. You'll see this under the Vector section of your Add menu. If your map is black-and-white, hook it into the Height input of the Bump Map. If it's colorful, it's actually a normal map, and you need to hook it into normal input. Finally, hook your Bump Map output to the Vector input of whatever node you have your hair hooked up to.

I can't really help much further until I can see your setup, but I hope this helps so far.


If you did not save the image texture externally first, you will not have access to the image when you reload the file. I only know this because I have done this many times myself!
In order to maintain the file, save it from the image editor:Image > Save As.
Then choose a location on your drive to save the image.
When you paint on it again, you will be able to see it when you reload the file, and remember to go to Image > Save every so often so you don't lose any work!


Cycles - Baking to Image Completely Different to Material

Change the mode to "Diffuse" in the baking panel then enable only color if you want no lighting:


Modified mesh loses changes when leaving edit mode

Various Explanations for the behaviour.
Incomplete list follows.

Shape Keys.  If there are multiple Shape Keys present,  then you may end up editing a shape key whose influence is zero 0 or close to zero. Blinking eyes could be done with various animation techniques including shape keys.
Modifiers.  Shrink Wrap or Armature modifier can change the mesh shape. That is the purpose of such modifiers.  For example small edits might be completely dominated by a Shrink Wrap Modifier and thus not visible.


To make just one wave uncheck the Cyclic option on the wave modifier.

Then just find the proper offset so that when the empty moves across the object the wave occurs.

EDIT

Another option I can think of (not knowing what you are after ultimately) is not using a wave modifier but a displace modifier, and using the empty to control the texture. Animating the strenght as the empty goes across the sphere can give a nice result:


Position an object's origin point to the face below (python)?

This likely needs more testing but should do what you want. This is currently set up for explicitly moving objects on a 'work layer' to the selected faces of a target object in the z direction. Currently if multiple faces are capable of being snapped to the max movement limit should help to limit but be sure to test before saving your file.

import bpy
from bpy.types import Operator
from bpy.types import Panel
from mathutils import Vector
from mathutils import geometry

bl_info = {
    "name": "Blank1",
    "author": "Your Name Here",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "View3D > Tools panel 'T' > Blank1 > Blank2",
    "description": "",
    "warning": "",
    "wiki_url": "",
    "category": "",
    }

def makeprop():
    bpy.types.Scene.my_tolerance = bpy.props.FloatProperty(
        name="bpy.types.Scene.my_tolerance",
        description="",
        default=5.0,
        )
    bpy.types.Scene.my_worklayer = bpy.props.IntProperty(
        name="bpy.types.Scene.my_worklayer",
        description="",
        default=0,
        min=0,
        max=19,
        )

def delprop():
    del bpy.types.Scene.my_tolerance
    del bpy.types.Scene.my_worklayer

def get_index_selected():
    obj = bpy.context.edit_object
    me = obj.data
    myfaces = []
    if obj.type not in ['MESH']:
            return myfaces
    for f in me.polygons:
        if f.select:
            myfaces.append(f.index)
    return myfaces

def GetTargetVert(target, object, tol):
    me = target.data
    bpy.ops.object.editmode_toggle()
    bpy.ops.object.editmode_toggle()
    my_target_faces = get_index_selected()
    for face in my_target_faces:
        x_max = -1000000.0
        x_min = 1000000.0
        y_max = -1000000.0
        y_min = 1000000.0
        face_verts = []
        for v in me.polygons[face].vertices:
            face_verts.append(v)
        bpy.ops.object.editmode_toggle()
        bpy.ops.object.editmode_toggle()
        W_mat = target.matrix_world
        my_line_a = object.location
        my_line_b = object.location + Vector((0, 0, -5))
        vert_index = me.polygons[face].vertices[0]
        my_plane_co = W_mat * me.vertices[vert_index].co
        my_plane_no = W_mat * me.polygons[face].normal
        for v in face_verts:
            l_co = me.vertices[v].co
            loc = W_mat * l_co
            if loc[0] > x_max:
                x_max = loc[0]
            if loc[0] < x_min:
                x_min = loc[0]
            if loc[1] > y_max:
                y_max = loc[1]
            if loc[1] < y_min:
                y_min = loc[1]
        print(
            'x_max %.2f x_min %.2f y_max %.2f y_min %.2f' % (
                x_max, x_min, y_max, y_min))
        print(
            'obj_x %.2f obj_y %.2f' % (object.location[0], object.location[1]))
        if ((x_min < object.location[0] < x_max) and
            (y_min < object.location[1] < y_max)):
                collision = geometry.intersect_line_plane(
                    my_line_a, my_line_b, my_plane_co, my_plane_no)
        else:
            collision = None
#            print('not in x,y range')
        if collision is None:
            print('no collision available between %s Face[%i] and %s'
                  % (target.name, face, object.name))
        elif abs(collision[2]-object.location[2]) < tol:
            print('collision found between %s Face[%i] and %s'
                  % (target.name, face, object.name))
            print(collision)
            object.location = collision
        else:
            print('collision out of range between %s Face[%i] and %s'
                  % (target.name, face, object.name))
#            print(collision)

def align_objs(context):
    print("-"*20 + "align objects button pressed" + "-"*20)
    scene = context.scene
    target = scene.objects.active
    tol = scene.my_tolerance
    my_layer_objs = [
        ob for ob in scene.objects if ob.layers[scene.my_worklayer]]
    for obj in my_layer_objs:
        if (not obj == target) and (obj.type == 'MESH'):
            GetTargetVert(target, obj, tol)

class AlignOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.align_operator"
    bl_label = "Align Operator"

    @classmethod
    def poll(cls, context):
        return (context.mode == 'EDIT_MESH')

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

class VIEW3D_PT_Solve_Intersect(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Intersect Face"
    bl_label = "Intersect"

    def draw(self, context):

        scene = context.scene
        layout = self.layout
        row = layout.row()
        col = layout.column(align=True)
        box = col.box()
        box.label(text='Move target & collision objects to work layer')
        box.label(text='Active Layer : %s' % scene.active_layer)
        box.prop(scene, "my_worklayer", "Work Layer")
        box.label(text="Set the max movement")
        box.prop(scene, "my_tolerance", "")
        box.label(text="Enter edit mode & select target faces")
        box.label(text="Press the align objects button")
        box.operator("object.align_operator", text="align objects")
        box.label(text="Collision info available in console")

def register():
    bpy.utils.register_class(VIEW3D_PT_Solve_Intersect)
    bpy.utils.register_class(AlignOperator)
    makeprop()

def unregister():
    bpy.utils.unregister_class(VIEW3D_PT_Solve_Intersect)
    bpy.utils.unregister_class(AlignOperator)
    delprop()

if __name__ == "__main__":
    register()

Edited:
removed use of bmesh
corrected target face vertex positions to reference world position
additional check for collision withing the target face min max x,y
coordinates


Select all the offending mesh in edit mode and in Shading tab select Normals: "Flip Direction". Your model appears to be facing the wrong way, so when backface culling comes into play you can only see the inside. I hihgly recommend you press N in 3D view and enable Shading: Backface Culling.


wheres the settings box in lower left corner?

Press F9  just after an action that allow some "left bottom box" customization


"Error Writing Frame" during movie render

Needed to change render settings to a different output file as described by @R00t:

  a 30min lossless 60fps video will take a lot of disk space, and by
  default it will use an .avi container which won't handle >2GB file
  size, try ticking autosplit output

  h264 is a compression standard, x264 is an implementation of h264 and
  is the codec, but it's not a container.  blender will use the avi
  container when you set the output format to h264 since .avi is very
  well supported by most platforms and systems than, for example, MPEG-4
  or matroska. and yes you should use .mp4 container if you render large
  videos.


This loads group "Head" from file mouth.blend.  The group can be added to the scene as a group instance.

with bpy.data.libraries.load("/home/batfinger/3DModels/mouth.blend") as (df, dt):
    dt.groups = ['Head']

In your case you will load group "house00" from file myHouseModel.blend

How to add a group instance is covered here Add a group instance with python


How to force the update of a property in python?

When using python to alter the current frame you should use scene.frame_set(f) which will update the scene so you can see animated values as they are at that frame.

A possible logic error in your code - you mention the value is animated between 0 and 1, if frame 1 is keyed to 0.0 then frame 1 will always return as being less than the tested value. You may want to consider a range that is acceptable to matching the value.

if val > (target - 0.1) and val < (target + 0.1):
    return frame

You should also find fcurve.evaluate(f) to be an easier and possibly faster solution as you don't need to update the scene to get the curve value.

def getFrameFromPercentagePosition(context, pCurveObject, pPercentagePosition):
    scn = context.scene
    fcurve = pCurveObject.data.animation_data.action.fcurves.find('bevel_factor_end')
    variance = 0.05
    for f in range(scn.frame_start, scn.frame_end):
        val = fcurve.evaluate(f)
        if val > (pPercentagePosition - variance) and val < (pPercentagePosition + variance):
            return f


but you are referring to lag when nagivating or when sculpting? dyntpo its better for having less polycount when sculpting but it affects the mesh and without a way to to delete it or undo what you done after finished the sculpt and also it works with triangules instead or quads. multires instead save this information in the modifier and makes a even subdivision in the whole mesh, but some times not necesary to have all the mesh subvided in areas that you wont sculpt, and it stays the original polycount and topology of the original low poly base mesh used. but you can use both like he does https://www.youtube.com/watch?v=Nc3cRVG3me4 also avoid to have matcaps and the outline select option checked because it will put it more slower when its very high poly.


Animation works in viewport but not in render

I found the answer why does anyone else can't replicate my error and why does this error exists in the first place.
So I used an external plugin called "wiggle bones", and I realized that you're supposed to bake the animations first before rendering. Others might not have this plugin installed; that's why they don't have this error.


glass of orange juice looks differently in viewport and render image

Short answer at the end, longer but more detailed way, keep reading..

Checked the file as well, had to tinker a bit as the textures were not there (used a different HDRI to lighten the scene). When i rendered and adjusted the glass/juice sizes to slightly overlap (yes, please bear with me) the picture still did not come out right, the juice was looking weird. After some tweaks on the material i could not get it better and checked the face orientation(normals) ...

Always a good idea to check normals (Face Orientation).

Option to display at the bottom of the picture(above).

As i mentioned above, i use to overlap the liquids in glasses to make it look more realistic (in regards of reflection and refraction), believe i am not the only one, but that aside, pictures are better then words.

Left side with the juice geometry slightly inside the glass walls, while on the right the juice geometry is smaller and thus not intersecting with the glass. The refraction and calculation of liquids in glass always was and most likely will be an issue in regards of realism. But with the intersection on the left the reflections/refractions are only calculated for glass then juice and not for glass then air then juice, which leads to those floating liquid in a glass effects.

Not the main issue, but i would like to also point out that the material on your table, in the "Image Texture" nodes the roughness and normal textures should be set to "Color Space":"Non-Color". Rather then me trying to explain, others did already, here a link that should clear some things up as well Understanding sRGB, gamma, color values..

Now the main issue with your juice, sorry for the long post.

It was essentially the normals(Face Orientation) of the juice-mesh that were wrong.


After hours of debugging I found out that list.insert function does not do what I expected (I was not alone in this assumption https://stackoverflow.com/q/25840177/3344612). And the order of vertices was messed because I inserted at a wrong index.

Answering my question. To get custom normals first call calc_normals_split() on the mesh and then access through loops[].normal with corresponding vertex indices in loops[].vertex_index.

To fix the mentioned code first resize the list and then modify with [] operator.

mesh.normals = [None] * len(bl_mesh.vertices)
for l in bl_mesh.loops:
    mesh.indices.append(l.vertex_index)
    mesh.normals[l.vertex_index] = l.normal[:]


Ok. The solution was to recalculate normals by using Shift + N . The problem was, that faces were facing wrong way. Blender renders fronts of faces in higher quality than backs, and mine were facing front and back in checkerboard, so that explains checkerboard thing. Recalculating normals rotated  them the right way. I think that they rotated when I was messing with UV unwrapping.


Redo armature without stacking modifications?

You need to apply the new pose of the armature as its rest pose before adding the modifier to the mesh. The mesh is deformed by the armature by using the difference between the armature's current pose (what is set in pose mode) and its rest pose (what you see in edit mode on the armature).

In pose mode, under the "Pose" menu, select "Apply Pose as Rest Pose". This will make the pose mode position of your armature become its edit mode position.


Blend the transform strips into each other instead of the original ones as you do right now.

Just remove the blend effects and add them again onto the green strips.


Iterating vertex of every frame in Blender

The mesh data always contains the original locations of vertices. Not sure if it is the only way but you can use object.to_mesh to get a copy of the mesh data that is deformed.

import bpy

obj = bpy.context.active_object
scn = bpy.context.scene

mod_mesh = obj.to_mesh(scn, True, 'RENDER')

for v in mod_mesh.vertices:
    print(v.co)

Note that this creates a new mesh object, so as you are iterating over each frame you will want to remove each copy as you go with -

bpy.data.meshes.remove(mod_mesh)


Perhaps you could play with the Gravity factor in the Options tab, and that might enable you to get the kind of fold you want - I also suggest maybe using the Crease brush in opposite direction to raise the fold out of the mesh with the ctrl key and pressure stroke.


Is there a way to call the Modifier menu with a keyboard shortcut?

A custom keyboard shortcut can be set up to call object.modifier_add, and that will make the menu appear. I've set mine up in the Object Mode shortcuts section, and am using F for modiFier.

And here's the result:

The Add Modifier menu will conveniently appear at your cursor location within the 3D Viewport.


This is not supported atm, it would require converting the smoke simulation to a mesh or some other structure (an SDF maybe). The smoke simulator can only feed Cycles 3d texture data, thus can only be represented as a volume.

Note that if you have access to Houdini or another tool with OpenVDB, you should be able to read Cycles OpenVDB smoke cache (new in 2.77), create a mesh from the cache, and export that back to Blender. But using Blender alone it is not possible to generate the correct data to use smoke sim ouput as a surface.


Viewport Background not transparent in rendered preview

I'm not quite sure why this is happening, but disabling the Background Images checkbox in the Properties shelf will return the transparent display in the viewport.


Exporting object's rigid body sim XYZ coordinates

Bake, then use the matrix world translation
As proposed here Is there any way to export the last frame of a physics simulation from command line?
bake the sim, then in this case instead of exporting, run thru the objects in the scene and print their global translation.  in lieu of Formatting and writing  data to a text file
Make the origin of the physics objects the center of mass when setting up.
import bpy
context = bpy.context

scene = context.scene
rbw = scene.rigidbody_world
pc = rbw.point_cache

# match bake to animation
print(pc.frame_start, pc.frame_end)

bpy.ops.ptcache.bake({"point_cache": pc}, bake=True)

scene.frame_set(250)
#bpy.ops.export_scene.obj(filepath="test.obj")

for ob in scene.objects:
    print(ob.name, ob.matrix_world.translation)

Result on default file, cube made a default rigid and dropped
Cube <Vector (0.0000, 0.0000, -460.8643)>
Lamp <Vector (1.7122, 1.0489, 8.5606)>
Camera <Vector (5.1171, -6.4642, 8.0004)>


Any poses etc. are moving and/or deforming the mesh are doing these operations on top the basic mesh. When you go to Edit Mode, the mesh shows its original basic appearance, to put it in simply words. It's the same with modifiers for example, if you take a cube and put a Subdivision Surface modifier on it, the cube becomes rounded. But going into Edit Mode shows the original basic cube (unless you have set the option to show the modifier effect in Edit Mode as well). This is usually useful if you want to tweak or change something general which is easier to do on the basic low-poly cube mesh than on a high-poly mesh.


Alright, this has been all sorted, thanks for the suggestions, I finally got the result I wanted. I'll do some modifications but I used a blend swap file and here is the result I've come up with so far.

Thanks for the help!!!


It is impossible to exactly reduce the amount of faces of an object, but there are tricks to doing so:

1) Use the decimate modifier, and adjust the settings while watching the faces-count and the quality of the object.
Here's how this works: Go to the modifiers tab, and select decimate. Then set this modifier to un-subdivide. The modifier will show the amount of faces in the object at the bottom. Set the iterations amount, (a couple should do fine), and watch the quality of the object and the amount of faces.

2) Another thing to do: Limited Dissolve in edit mode. This won't let you specify the face-count, but you can adjust it so that you get a lower-poly result.
Do this by selecting the object, going to edit mode, and selecting mesh > cleanup > limited dissolve. Adjust the angle factor, and watch the faces.

3) Nobody wants to do this, but go to edit mode, select certain faces and press F on the computer keyboard. Manually combine the faces until you have exactly 1000 faces (if you want), or as many as needed.

I hope these tips help you, and/or answer your question!


Dark surface unchanged by light source changes

It seems from your render that the black/dark part is a reflection of the background (the environment). Try adding a large diffuse white plane above/in front of your objects so that there is something there to reflect instead of just the empty blackness of your world. Make this plane invisible to the camera or use the compositor to exclude it from the final render if it gets in the way of your scene (or move it far enough away so it isn't in view of the camera).