Does a Subsurf modifier slow down renders? First of all, this is all hypothetical; I'm not actually doing this in a project. For example, let's say I'm trying to make a shape that can either be made by modeling it by hand, or I can get the same shape by applying a subsurf modifier to a cube. Which renders faster, or does it even matter since in the end they are both exactly the same shape?

While it is true that an object with a high number of polygons might indeed take the same time to render as another with a smaller polygon count, but using a subsurf modifier yielding the same number as the first one, but using the subsurf modifier will give you more flexibility and a more responsive interface

Having said that, you do have to be careful with the amount of subdivisions set by the subsurf modifier because it will definitely affect render times and the amount of memory used.

You will probably not notice it on simple geometry, like the example you provide, but once you get into more  complex geometry, if you increase the number of subdivisions in the modifier, you can easily push your computer to its limits and potentially make it crash.

The subsurf modifier is a great tool to easily create and edit complex shapes and still have a responsive interface, while keeping a non destructive or permanent workflow.

Creating virtual subdivisions on your geometry saves you the trouble of creating smooth curved surfaces, but when you do the final render, blender has to compute all of that "virtual" geometry as if it was real anyway.

Please read a more detailed post here: Blender render crash when using subsurf modifiers.


What does 'nanm' mean? For a camera object, under Transform/Location, the x,y,z values are all nanm.  What does that mean?

"Not a Number" appears when you excede a range. This means your object is too close/far away. Move it closer or away.


Where to place lowpoly object compared to highpoly object? I am confused, when I want to bake normal map from high poly object I need to duplicate it and make the copy the low poly object I want then
1- One tutorial I saw said that I need to place the low poly is the same place of the high poly.
2- Other tutorial said I must give it higher position on the z axis than the high poly.
So which one is it?

Normaly, the lowpoly is in the exact same place as the highpoly object. But if the lowpoly is completely flat, it could be "above" the highpoly. Look at this answer where I project the normals upwards with baking.

Creating game models for android

If your lowpoly object is not flat, you can't move it if you want to bake normals.

If you are willing to bake the lowpoly piece by piece, and each piece is relatively flat you can move details from the highpoly object. Then you must fiddle with the offset parameter and this is usually a pain to get right.


Can I add "min" and "max" properties to the "location" property? In my first Blender script, I'm asking how can I control the slider value with min and max values without using FloatProperty.

box1 = layout.box()
box1.label("Span (Z) profiles positions:")
box1.prop(obj, "location", index = 2, text = "Span")

After looking at the documentation, I do not think there is a built-in option for an object's location (some other Blender values may be, but you could check on Blender's API docs).  It would be best to use a FloatProperty or FloatVectorProperty.  You could use a setter so it updates the object's location whenever the value changes, but that would also require some way to keep track of the object for the property.


How to set the default fill type to NOTHING (Cone, Cylinder), once and for all? I'm banging my head trying to find any documentation, but I can't seem to find anything about that matter.

Background:
I was sick of manually changing the default vertices for Circles, Cones and Cylinders to 12.

I found this script and it works just perfectly.

# To be saved in
#    scripts/startup/
# with a .py file extension.

from bpy.props import IntProperty
from bpy.types import (
    MESH_OT_primitive_circle_add,
    MESH_OT_primitive_cone_add,
    MESH_OT_primitive_cylinder_add,
    MESH_OT_primitive_uv_sphere_add,
)

MESH_OT_primitive_circle_add.vertices = IntProperty(name="Vertices", default=12)
MESH_OT_primitive_cone_add.vertices = IntProperty(name="Vertices", default=12)
MESH_OT_primitive_cylinder_add.vertices = IntProperty(name="Vertices", default=12)
#MESH_OT_primitive_uv_sphere_add.segments = IntProperty(name="Segments", default=16)
#MESH_OT_primitive_uv_sphere_add.ring_count = IntProperty(name="Rings", default=8)

Problem:
Now, I'm still sick of having to change the default fill type to NOTHING.

I tried adding the following lines (one at a time, of course) to no avail:

MESH_OT_primitive_cone_add.vertices = StringProperty(name="End_Fill_Type", default='NOTHING')
MESH_OT_primitive_cone_add.vertices = IntProperty(name="End_Fill_Type", default=0)
MESH_OT_primitive_cone_add.vertices = StringProperty(name="Base_Fill_Type", default='NOTHING')
MESH_OT_primitive_cone_add.vertices = IntProperty(name="Base_Fill_Type", default=0)
MESH_OT_primitive_cone_add.vertices = StringProperty(name="Cap_Fill_Type", default='NOTHING')
MESH_OT_primitive_cone_add.vertices = IntProperty(name="Cap_Fill_Type", default=0)

I tried both with and without underscore (_).
And the same for Cylinder

Note:

I tried entering the following in a console window:

bpy.ops.mesh.primitive_cone_add(end_fill_type='NOTHING')

and also

bpy.ops.mesh.primitive_cylinder_add(end_fill_type='NOTHING')

and both worked flawlessly.

You can see the property names by hovering mouse above the field.

Note that you need to match this name in the first part of the script file before the =. The latter needs to define property in blender operator format. For the dropdown menu it's in fact enumerator type, not string. You can't really specify default value for enumerator but I found that this has the desired effect nonetheless. So the file should look like this (note you need to import EnumProperty in the beginning as well):

from bpy.props import IntProperty
from bpy.props import EnumProperty
from bpy.types import (
    MESH_OT_primitive_circle_add,
    MESH_OT_primitive_cone_add,
    MESH_OT_primitive_cylinder_add,
    MESH_OT_primitive_uv_sphere_add,
)

MESH_OT_primitive_circle_add.vertices = IntProperty(name="Vertices", default=12)
MESH_OT_primitive_circle_add.fill_type = EnumProperty(items=[('NOTHING', 'Nothing', 'Tooltip'), ('NGON', 'Ngon', 'Tooltip'), ('TRIFAN', 'Triangle Fan', 'Tooltip')], name="Fill Type")
MESH_OT_primitive_cone_add.end_fill_type = EnumProperty(items=[('NOTHING', 'Nothing', 'Tooltip'), ('NGON', 'Ngon', 'Tooltip'), ('TRIFAN', 'Triangle Fan', 'Tooltip')], name="Fill Type")
MESH_OT_primitive_cylinder_add.end_fill_type = EnumProperty(items=[('NOTHING', 'Nothing', 'Tooltip'), ('NGON', 'Ngon', 'Tooltip'), ('TRIFAN', 'Triangle Fan', 'Tooltip')], name="Fill Type")
MESH_OT_primitive_cone_add.vertices = IntProperty(name="Vertices", default=12)
MESH_OT_primitive_cylinder_add.vertices = IntProperty(name="Vertices", default=12)

If you need to create certain type of geometry often you might as well copy the operator that creates it and store it in script file or python console where you can execute it. You can store all the properties you can edit in the side panel.

Drag the top info bar down and right click to select and CTRL-C to copy the lines for quickly using them later. You can even make them their own operators, add them to menus or add keybinds to them.


Cannot truly separate parts There must be an easy answer to this. I'm in 2.82 and I made 10 dupliverts of a mesh on a plane with 12 points. I made them all real in object mode, selected all in edit mode, did P - separate by loose parts. I thought all was well as I could move each mesh independently and they each had their own origin. No trouble moving them independently etc. However when I go into edit mode for any of the 'independent' meshes, all the other ex-dupliverts are selected too! I cannot make them individual mesh-wise, even though they appear to be independent objects and are listed as such. I cannot even colour them independently. Any ideas?
Edit: here is the file.

The objects in the file you provided in the comments of your question are linked copies.

Select them all together;
press F3 (or spacebar, if in blender 2,79 or earlier);
type "make single user" to find the "Make Single User" command and click it;
in the popup that appears check "Object Data" (see img) and press OK.


Make sides of text object a different color? I have a text object and I want to change the inner color of it, so that it is black. How can this be achieved?

So the inside of the S is black, and the outside it still blue?

Like this:

I've already done it but there should be a faster way to do it.

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.


Select objects with name sequence I'm trying to organize a big scene file where some objects has this name (small sample) "US40.004, US40.005, US41.001, US51.006" or even possible for the names to be like this "US-009.009, US-009.010, US-015, US-016" as you can see the names are incremental or in sequence, and then I have some other objects with the name "USA, USDOT"
On my script I ask to select all the objects with "US" in their names but it select also the "USA, USDOT" which I don't want then to be selected.
Is there a way to tell the script to focus on selecting the objects that has US plus the sequence?
I hope this makes sense.
Here is my code so far:
import bpy

params = ["US", "US-"]

for obj in bpy.context.scene.objects:
    if any(x in obj.name for x in params):
        obj.select_set(True)
        bpy.context.view_layer.objects.active = obj
    else:
        obj.select_set(False)

bpy.ops.object.select_pattern
As mentioned in your previous question re the operator script  Script is selecting all the objects (unwanted) there is already a pattern matching operator, bpy.ops.object.select_pattern which uses Unix file token matching.  See no need to "reinvent the wheel" and write another, which so far has no extra functionality.  Here is quick run down on how it works. (The code of the operator is available in bl_operators/object.py.)
>>> bpy.ops.object.select_pattern(
select_pattern()
bpy.ops.object.select_pattern(pattern="*", case_sensitive=False, extend=True)
Select objects matching a naming pattern

options to extend the selection, and a case insensitive match.
>>> import fnmatch
>>> fnmatch.fnmatch(
fnmatch(name, pat)
Test whether FILENAME matches PATTERN.
Patterns are Unix shell style:
*       matches everything
?       matches any single character
[seq]   matches any character in seq
[!seq]  matches any char not in seq
An initial period in FILENAME is not special.
Both FILENAME and PATTERN are first case-normalized
if the operating system requires it.
If you don't want this, use fnmatchcase(FILENAME, PATTERN).

So for example sake will pinch
>>> txt = {"US40.004", "US40.005", "US41.001", "US51.006", "US-009.009", "US-009.010", "US-015", "US-016", "USA", "USADOT"}

make a pattern, Case sensitive, any name starting with "US" but not having  an uppercase character as third character. then end with anything
>>> pattern = "US[!A-Z]*"
>>> for t in txt:
...     t, fnmatch.fnmatchcase(t, pattern)
...
('US-009.009', True)
('US40.005', True)
('US41.001', True)
('US51.006', True)
('US-016', True)
('US-009.010', True)
('USA', False)
('USADOT', False)
('US-015', True)
('US40.004', True)

Looks about right, so a call with instead object names matching the sample list
bpy.ops.object.select_pattern(pattern="US[!A-Z]*", case_sensitive=True)

in object mode will select all objects denoted True above
To clarify, re the commentary below, it is not necessary to use the operator could (thought this was implied TBH) instead
for ob in scene.objects:
    ob.select_set(fnmatch.fnmatchcase(ob.name, pattern)) # match case

Re setting the active object. If the context object is no longer selected, or None and you wish it to be one of the selected
if context.selected_objects and context.object not in context.selected_objects:
    context.view_layer.objects.active = context.selected_objects[0]

ie If the active object is set and selected probably don't want to randomly change it to another of the selected objects.  (BTW most selection operators do not set the active object)


Change material on multiple (different) objects simultaneously Is there a way to "link" two different object's materials, so that if I choose a different material on one it changes on the other, without technically "joining" the objects?  Not talking about changing the nodes inside a material, I mean substituting an entirely different material to the current slot.

I am modeling a rifle and I have 2 parts that I want to always share the same material.  Using Cycles.

Not exactly, no. But there a few workarounds.

Object Groups

You can quickly copy the materials from the active object to all selected objects with ⎈ CtrlL> Materials.

Combining that with groups, you can "store" selections of objects for later. Group the selected objects together with ⎈ CtrlG, then update the materials of the group by activating the object with the updated materials and pressing ⇧ ShiftG (to reselect the group) then ⎈ CtrlL> Materials.

Node Groups

I know you specifically asked about switching materials and not about altering a single material. However, if you relax that constraint a bit you can use node groups to achieve this. Put the entirety of your material in a node group (A to select all nodes, then ⎈ CtrlG), and voila:

Note that in this example, the objects have separate materials: "Material A" and "Material B". They could instead share the same material, or have multiple materials each, some shared and some not. The link is through the node group.


Having a problem with hair particles So i've been modelling a boardgame figurine, and i wanted to add hair on it. I set the settings and all kinds of stuff, but halfways trough decided to separate the hair into two sections, and each would have different hairlengths.

I separated the hairlayer i duplicated from the head, but when i set the hair length value on one part, the hairlength changes on the other part as well

I dont know why they're still sharing that same number, since i separated them. Can anyone help me explain why this happens and how can i fix it?

If they have the same preset, they will share the properties. Hit on the little + near the Settings preset to create a new slot for the second one.


Weight painting problems I have a problem with weight painting in blender. As you may already know, automatic weights while rigging is not at its wisest most of the times... Is there any way of making my struggles with animating this human better?

When I move right arm his palm won't move, and some other issues occur as well... I don't know how else can I help myself...

Any advice from the "wiser ones" would be appreciated :)

Here is the blend file:

Select your mesh, in the modifier stack delete the armature modifier, apply the mirror, parent the object to the armature with automatic weights and put the suburf modifier after the Armature modifier (down). You'll have a good starting point to tweak with the tricks described in my comment.


How do I keep the aspect ratio of an image imported to the 3d viewport as a plane? I use the import images as planes addon. I get the image. But then I noticed when I use it on a 480p image, its the same size as a 1080p image. I don't understand....is it keeping the aspect ratio but displaying them as the same size.....? When I try to define my aspect ratio in the dimensions tab it blows up so large that I can't zoom out to see the actual image anymore. So I'm guessing these are 2 different things.

All I want is to display my image in the 3d viewport at the same aspect ratio as the image actually is.

I don't really understand the unit system in blender. I can make a cube 1 unit in the x direction, 1 unit in the y direction. What is this unit though? I'm used to units being pixels.

Think of it this way:

A scene in blender is created in a virtual world.

The units for that world and all of the objects are blender units (that coincide with meters. one blender unit is one meter, the units can also be set to imperial measurements or KM or mm if you wish)

When you import an image as a plane, it will create a plane that is one blender unit tall (that can be changed in the options as you import the image), and that has the aspect ratio of the imported image.

The number of pixels in the image does not determine the size of the plane.

If you need to create planes that are different sizes and have their size relative to their dimensions in pixels, you could do that manually using the information on this link:

How to map an Image on a plane manually?

Do not touch the aspect ratio on the dimensions for the render unless you know what you are doing and need to export an image that is using anamporphic pixels. Read: Rendered aspect ratio different from the viewport's camera view


Cycles wont do the amount of samples I put in at min samples I don't know what I changed but I've been trying to change my settings to get less noise and a faster render, but now it wont do the amount of samples I want it to. 1 sample takes as long as 1000 samples and has 0 difference in noise.

Adaptive Sampling min samples is not the actual amount of samples that cycles is using to render the scene.
From the manual:

Min Samples
The minimum number of samples a pixel receives before adaptive
sampling is applied. When set to 0 (default), it is automatically set
to the square root of the total (max) sample count.

So, what is happening in your case, is that your scene is set to render at 128 samples (the default until changed), so changing the adaptive samples to a higher setting doesn't change anything. If you raise the sampling to something more like 500, you will see a difference.


How do I delete actions from the Browse Actions list? I can't seem to be able to delete any animations from my list of actions.
How do I delete just the ones I want gone and keep the others?

In the Dope Sheet Panel
In the Actions Editor
Click on the Browse Actions and select the animation you want to delete.
Hold Shift and press the X next to the + sign.
This will add a 0 prefix to the name of the action.
When you reopen the file all marked with 0 will be eliminated from the list.


Texture UVUnwrap Follow Up-- What did I do wrong? Previously I asked a question about textures not appearing correctly. I tried unwrapping it manually and it really hasn't helped very much, as you can see:

I'm starting to wonder if the texture itself is just too small an image or something, or too large?

Figured out what I was doing wrong. I deleted my file, and started from scratch. I realized that like what @DiogoValadares said, I have to actually put the "maps" / islands on the texture while in the UV texture editor. Unwrapping it cleanly isn't enough. To do this, go to your UV editor, then in the bottom left to the right of "UVs" tab, press the little image icon and select the texture you want.


What Lens Model does Blender use for Camera Tracking? I recently started working with the camera-tracking estimator to produce short augmented reality videos. I'd like to learn more about the lens model and its parameters (K1, K2, etc...).
Can anyone tell me the specific name of this lens model, or the general theory it belongs to? Would this model/theory fall be covered by the general study of undergraduate-level Optics as taught by a Physics department, or in what book or article would I be able to learn more about it? (Assuming I meet any basic calculus and linear algebra prerequisites).

As far as I know Blender works with a pinhole camera matrix. Where an image is created by a projection of the 3d coordinates into a 2d plane.

k1, k2 etc are radial distortion coefficients. Blender does not deal with tangential distortion.
For a deeper explanation refer to the following links:
http://lfa.mobivap.uva.es/~fradelg/phd/tracking/camera.html
https://calib.io/blogs/knowledge-base/camera-models
3x4 camera matrix from blender camera
You can get more information also reading on OpenCV and camera calibration.


How can I move my character's foot in the direction I chose with a key input? I'm trying to make a game with some aspects similar to octodad but for this to work I need something that will allow me to move my characters foot in the direction I chose with a key input, it may seem simple but I'm a bit of a noob.

I am new as well. But i am pretty sure you would not create the event in blender, but a game engine.

To explain, in Blender you would create an animation of, lets say a swinging sword, and save that animation to your model.

Now that your model has an animation you would load your model into a game engine (such as Unity or UE4) and in the game engine you would setup your input handler (When i click, play swinging sword animation)

Like I said, I am new as well so I probably need someone to confirm.


Can I control the visibility of edges in a cycles wireframe? I want to create a (barely) visible seam like this.

Beveling that edge to create a face and assigning a darker material to that face is one solution, however it is cumbersome, breaks the topology and interferes with the bevel modifier (causes artifacts).

What I am trying to do is add a wireframe shader but control which edges will be shown. Is this possible?

One simple way to do it is the following:

Mark the edges as Freestyle Edges
Enable Freestyle
Configure Freestyle to only show marked edges
Configure the Freestyle line style to set the thickness and color

EDIT If you want thinner lines on objects that are far away, see this question: How to make freestyle lines stay the same size?


Script working on an object but not on another I downloaded a blend file from another user here with a script (for drivers) and a mesh + armature.
On the driver of said mesh it says Error:invalid Python expression. I couldn't get it to work for so long although it worked for the user that sent it to me. However after a while I figured out a really odd fix.The fix is to move the armature then ctrl+z after I do that, the driver no longer shows an error instead it shows slow python expression which is fine as long as it works I guess.
Now I tried applying the script to a personal mesh+armature I copied the same exact drivers+variable. I get the Error:invalid Python expression. I tried doing the same odd fix that worked for some reason on the other mesh+armature but it didn't work in this case. Here's the script
import bpy
from mathutils import Vector

def left(self, z_rotation, speed_low, speed_high):
    prev = self["prev_z"]
    self["prev_z"] = z_rotation
    delta = z_rotation - prev
    if delta > 0:
        self["z"] -= delta * speed_low
    elif delta < 0:
        self["z"] -= delta * speed_high

    return self["z"]

def right(self, z_rotation, speed_low, speed_high):
    prev = self["prev_z"]
    self["prev_z"] = z_rotation
    delta = z_rotation - prev
    if delta < 0:
        self["z"] += delta * speed_low
    elif delta > 0:
        self["z"] += delta * speed_high

    return self["z"]

bpy.app.driver_namespace["left"] = left
bpy.app.driver_namespace["right"] = right

Here's the driver of the mesh I downloaded from the other user.

And this is the driver I applied to my own mesh(the exact same thing)

I have no clue why this is happening the issue is just really weird and very frustrating.
Help would be immensely appreciated.

Custom properties not set
The driver script as is will throw an error if the custom properties "z" and "prev_z" are not set on the object.
Look for errors in the console.
Where does console output go
Add the appropriate custom properties to the object being driven for it to function as expected.
Note.
The object referred to as self in a driver is an  evaluated copy of the object.
Silly test script to ensure the original object has a custom property "foo" set from within the driver.
Returns the evaluated value of the custom property, if it exists, else 0.0.
from bpy.app import driver_namespace as dns

def test(ob):
    ob.original["foo"] = ob.original.get("foo", 0.0)
    return ob.get("foo", 0.0)

dns["test"] = test

copy and paste this driver into any object to create a "foo" custom property if one does not already exist.


Why does my Mantaflow waterwheel not work? Apologies if this doesn't light correctly, I omitted the HDRI I was using to save space for upload and download of the .blend. Plug in your HDRI of choice and the scene should look fine (or turn off HDRI and light as you desire!).

I'm trying to turn a physics object through contact with the Mantaray liquid simulation and it's not working.

The simulation particle system is set to render as a simple object with a sphere rigidbody with sphere collision.

The domain also has a passive rigidbody and collision system - added this out of desperation, and it doesn't seem to be doing much.

The water wheel is a Fluid effector set to collision.

The water wheel also has an active rigidbody and collision system set to mesh - which doesn't seem to be doing much.

The wheel attached to the pole behind it with an empty set to Generic physics constraint (having some problems getting that to rotate reliably on the Y axis, but that's not the main problem).

Can anybody tell me how to get this waterwheel spinning with Mantaflow?

Bi-directional fluid-structure interaction is quite an advanced topic.
(Bi-directional meaning that the fluid reacts to forces applied by the structural domain and vice versa)

There is of course specialized software which can perform these simulations. However, most current simulation packages focus on simulating either the fluid or the rigid (or deformable) bodies accurately and model the other as simply as possible.

That's why in almost all those nice 3D visualisations of fluid-structure-interaction (at least outside the scientific or engineering world) the motion of the rigid (or soft) bodies will most certainly be faked with non-simulated animation.

Further reading e.g: research.manchester.ac.uk/portal/files/70404430/FULL_TEXT.PDF


Bones don't appear in Action Editor at all Hi there, I'm new to Blender.
I've watched a few tutorials where all of the bones are selected. And then Alt+G and Alt+R are pressed, then the bones appear listed in green in the Action Editor. (To make a simple walking animation).
Pressing them resets the pose for me but does not show anything in the Action Editor.
How can I make the bones appear in the action editor?
Thank you.

In the Dope Sheet you've enabled the Only Selected Objects option, so you'll only see the tracks and keyframes of the bones that are selected (if keyframes have been created for these bones! as pointed out by Batfinger). In the video he also has this option enabled but he has selected all his bones.


the bake button is not where it should be I was trying to bake a displacement map into the actual map following

https://www.youtube.com/watch?time_continue=94&v=McALCOr39rY&feature=emb_title
for how to do it but I can't find any bake options. please help

Here is the save file for anyone that would like to check problems with the mesh or the UV:

I have seriously no idea.

Go to Edit > Operator Search > Bake and done


Bones and rotation property sliders I am creating a UI for a rig and I want to have a property on a panel.

The property is a bones rotation_eular.x value and it needs to be a slider. When setting a property as a slider "slider=True" it uses the min and max values of the property to determine the range of the slider.

The problem is that a bone has no min or max values so the slider is useless.

Is there a way to either set a custom range for the slider or to set the bones rotation_eular properties min/max values?

I want the slider range to be from -90 to +90, I know I could create a custom property and then add a driver to the rotation_eular.x property but then I could not use the manipulator in 3Dview to animate it.

Any Ideas? some more info in this thread:
http://www.blenderartists.org/forum/showthread.php?333659-property-ui-question

You can use limit constraints, the catch is that they limit visual values used but the actual values can be anything. This is only of concern if you want to access the values in python.

So while your slider will continue to display large rotation values like 1346 degrees the bone will only be rotated between -90 and 90 degrees visually.

If you setup a driver to use the rotation value of the bone then it will just work, the driven value will be within the limit rotation values.

If you want to access the rotation value within python then you should manually apply any limits to the value before using it.


I can't get a SpaceView3D draw callback to work I'm trying to add a callback which runs at every SpaceView3D draw. As suggested from Change Current Frame acc. to Active Layer.

class DrawClass:
    def __init__(self, context):
       self.handle = bpy.types.SpaceView3D.draw_handler_add(self.draw_callback, (context,), 'WINDOW', 'POST_PIXEL')

    def draw_callback(self):
        print("Testing...")

if __name__ == "__main__":
    DrawClass(bpy.context)

This is a script I wrote to test if my callback function gets added to the draw handler. I would expect an output from print function on the console I started Blender from. But I get nothing. Am I doing something wrong here?

All possible callbacks

Prints to console when callbacks fired

So much info in the python console, autocomplete on draw handler add. Will see that args is a tuple of arguments passed to the callback method.  Error in question was passing 1 arg to a method with none.  Will show up in system console as an error.

>>> bpy.types.SpaceView3D.draw_handler_add(
draw_handler_add(callback, args, region_type, draw_type)
.. method:: draw_handler_add(callback, args, region_type, draw_type)
Add a new draw handler to this space type.
It will be called every time the specified region in the space type will be drawn.
Note: All arguments are positional only for now.
:param callback:
   A function that will be called when the region is drawn.
   It gets the specified arguments as input.
:type callback: function
:param args: Arguments that will be passed to the callback.
:type args: tuple
:param region_type: The region type the callback draws in; usually ``WINDOW``. (:class:`bpy.types.Region.type`)
:type region_type: str
:param draw_type: Usually ``POST_PIXEL`` for 2D drawing and ``POST_VIEW`` for 3D drawing. In some cases ``PRE_VIEW`` can be used. ``BACKDROP`` can be used for backdrops in the node editor.
:type draw_type: str
:return: Handler that can be removed later on.
:rtype: object

Attempt to add every draw call back possible.  Has to be a redraw of the type specified to fire the callback.  I doesn't relentlessly fire.

import bpy
from bpy.types import SpaceView3D, Region
class DrawClass:
    def __init__(self, context):
        print("INIT")
        for rt in  Region.bl_rna.properties['type'].enum_items.keys():
            for d in ('POST_PIXEL', 'POST_VIEW', 'PRE_VIEW', 'BACKDROP'):

                try:
                    SpaceView3D.draw_handler_add(
                        self.dcb, (rt, d,), rt, d)
                except:
                    print("No dcb for", rt, d)

    def dcb(self, rt, d):
        print("Testing dcb:", rt, d)

if __name__ == "__main__":
    DrawClass(bpy.context)


Proportionally scaling a mesh I'm new to Blender, but I come from SketchUp. I would like to extend a stair a little bit to match other geometry, but I'm really struggling to get it done. The bottom of the stair is already fitted with snap tool. Now I would like to deform the top, so it matches the rest of the geometry. Is it possible?

As I come from SketchUp, I'm used to use the scale tool and simply pull the geometry as I show down in a test I made to illustrate it (please, forgive it's done in SketchUp, but I need it just to illustrate what I'm trying to achieve as I can't do it in Blender).

As you can see in my example, all the steps are deformed, but they stay proportional. Can I do something similar with Blender or am I doing something wrong here?

I found the solution: Pivot point! I discovered I can edit the pivoting point Blender uses to transform the geometry. So if I choose the opposite edge middle point as the Pivot point (marked by an orange dot), I can then change the scale of my stair with total control :)

More info here: Setting the pivot point of an object


Is a domed plane possible? So I'm trying to create a new icon, and I've managed to use curves to successfully create the object in a 2D sense, but I want to be able to give it a domed appearance. I know I could extrude and bevel, but the sides will be pushed out and it will make the image seem like its a marshmallow. If I extrude and scale, the separate parts of the plane will scale based off of the cursors location. Heres a screenshot of the plane:

I want this face to be domed. How can I do this?

Yes, but it may be tricky to get a stack of modifiers that will work well for you modifiers. Here's an example with a simple target shape made with 2D Bezier curves getting warped in 3D space by a Lattice modifier:

The mesh created by the bezier object isn't going to play will with deformations, but the Remesh modifier will. But that won't work on something flat, so you need to use Solidify first. Give it a small thickness if you want the end result to still seem flat.

Depending on your shape, Remesh may need a larger Octree Depth, and sharpness tweaking.

Next, to fix the smooth shading around the edges, I added an EdgeSplit - the default options should work well.

Finally, the deform is done with a Lattice. If you aren't familiar with using a Lattice to deform objects, these are a little out of date, but still accurate: https://wiki.blender.org/index.php/Doc:2.6/Tutorials/Modifiers/Lattice/Shaping_a_Fork

If you don't need the level of control the Lattice gives you, you could also try the Cast modifier (with an Empty as the center of the virtual sphere it is being cast to):


How do I make edges on a curve have equal length while maintaining the rough shape of the curve? So I'm trying to make a cylinder that has faces with equal dimensions, and I already have a cylinder that has the exact curve I want to use. How can I make a new curve with equal edge lengths while maintaining the rough shape of the curve I have already created? The cylinder and curve I created are in the image linked. As you can see, the edges and faces do not have the same length.

To subdivide the long faces on the length of your tube you can add loop cuts. Press ⎈ CtrlR and use the scroll wheel or ⇞ Page up to increase the number of cuts being made.

If you want to subdivide the top of your tube you could use the knife tool K to mark out the path of the cuts you want to make.

Another option for the top is to use the inset tool I to add loops parallel to your profile.


How to get color data of lighting for materials? I'm trying to make a cell-shaded material in EEVEE using a color texture plugged into an emission shader. However, I'd like the color of the texture to react to the color of the light it is around. How can I accomplish this? I assume I'll need to convert a shader to RGB and overlay it with the texture, but I'm unsure how to go about this.

I'm not 100% sure this is what you're looking for, but if you want colored light to apply in a "toon" fashion, you could try something like this.
In the example below, I have a single red light to the side.

And in this picture, I un-hid a green light above and to the right as well.

If you want to take it one step further and make the toon shadows darker and more apparent, you can turn it back into an RGB, and then multiply it with the values from your "toon shadows" ColorRamp.

Or if you want really dark, vibrant colors from the lights (this will heavily wash out the original texture's color, but can be slightly overcome by turning up the emission strength from your image texture), you can make it a Diffuse Shader again:

Let me know if this works.


How can I smooth a triangle fan? As a picture often speaks better than words, here are the two images of my problem. I'm trying to get a smooth render on this object. I tried many options but no way I always have these artifacts. Is it possible to have a smooth rendering with a convex surface?

Here what I'm trying to model

The Subsurf Modifier doesn't work well with Triangles.

Ideal topology consists of mainly quads (faces with four vertices) and each vertex is connected with exactly four edges.

I created the following quarter sphere by smooth subdiving a cube (edit mode: w > u), shaped it to a sphere (edit mode: Shift + Alt + s) and deleted the excess vertices.

EDIT: After requests and additional info in the question, I will provide a step by step workflow.

Create a cube Shift + A > C, then go into edit mode (Tab). Make sure the pivot stays in the center of the cube.

Do a smooth subdivision operation three times. (W + U)

Select and delete the unnecessary vertices.

Select the outer edge loop (Alt + rightbuttonclick) and scale it to zero along the Y - axis. (S > Y > 0). Make sure to enable proportional editing for this step, so the topology stays even.

With the edge loop still selected, do the to sphere operation.(Shift + Alt + S > 1 > Enter)

Select all vertices A, enable 2D Cursor as Pivot . and do the to sphere operation.(Shift + Alt + S > 1 > Enter), the last edge loop will still be on two axis.

Delete the additional vertices, then select the lower edge loop.

Extrude, scale according to the reference, insert edge loop to make the edges clearer.


How to define double shortcut like GG I would like to define a shortcut that allows to call a custom translate function while translating. Like G for Vertex move and GG for vertex slide, my shortcut should allow G for Blender's translate and GG would call my custom translate function.

I tried with a modal operator calling blender's translate function and an elif event in ('G'): my_translate but it hitting G while translating just doesn't do anything (no error in console output).

GG is not actually a keybinding, G starts the grab operator and that reacts on certain keytrokes while it's running modally. It uses a modal map (keymapping) for this ability.

You can edit modal maps in User preferences > Input, but not call arbitrary operators (in fact, only sub-operations defined by the operator in C, like Select or Deselect in Border Select op).

For python-scripted operators, there's an event argument passed to modal() and you can check for keystrokes (event.type, event.value etc.) and react in whatever way.

Detect G keystroke in a modal operator:

import bpy
from bpy.props import IntProperty, FloatProperty

class ModalOperator(bpy.types.Operator):
    """Move an object with the mouse, example"""
    bl_idname = "object.modal_operator"
    bl_label = "Simple Modal Operator"

    first_mouse_x = IntProperty()
    first_value = FloatProperty()

    def modal(self, context, event):
        if event.type == 'MOUSEMOVE':
            delta = self.first_mouse_x - event.mouse_x
            context.object.location.x = self.first_value + delta * 0.01

        elif event.type == 'G':
            self.report({'INFO'}, "G")
            context.object.location.x = self.first_value
            return {'CANCELLED'}

        elif event.type == 'LEFTMOUSE':
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            context.object.location.x = self.first_value
            return {'CANCELLED'}

        return {'RUNNING_MODAL'}

    def invoke(self, context, event):
        if context.object:
            self.first_mouse_x = event.mouse_x
            self.first_value = context.object.location.x

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "No active object, could not finish")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

Transform Modal Map - what (sub-)operations a possible during the modally running operators:


Vertices with no loops I'm working on a Python script to export a mesh. I need to export normals, so I use this code:
def get_custom_vertex_normals(mesh_obj):
    mesh_obj.data.calc_normals_split()
    nrm_avg_list = [None] * len(mesh_obj.data.vertices)
    for loop in mesh_obj.data.loops:
        nrm_avg_list[loop.vertex_index] = (loop.normal.x, loop.normal.y, loop.normal.z)
    return nrm_avg_list

(As pointed out by @batFinger, this method will take the info from the last loop that shares the same vertex. This is fine for my own workflow since I'm merging normals before exporting, but readers of this question should use his method if they want average normals for a vertex).
The problem is nrm_avg_list ends up having elements with None on it. Did some debugging and effectively these vertices had no loops on them.
Did try to clean up my mesh (deleting loose geometry) but these vertices are still present (and I can't find them in the viewport).
How should I clean these rogue vertices? Is there a way, using the Python API (avoiding bpy.ops if possible) to simply remove these vertices?

Bmesh script to remove verts not linked to any faces
import bpy
import bmesh
from bpy import context

ob = context.object
me = ob.data
# clean all verts not connected to faces
bm = bmesh.new()
bm.from_mesh(me)
bmesh.ops.delete(
    bm,
    geom=[v for v in bm.verts if not v.link_faces],
    context='VERTS', # default
    )
bm.to_mesh(me)

Re your question method
At issue with the question method is that the same vert can be a member of many loops. Only that of the vertex in last loop will be assigned to your list.
Find with one to many relationships like this that the defaultdict class from collections when created with a list gives any key a default value of list() or [] which can be appended to.
import bpy
from collections import defaultdict

def get_custom_vertex_normals(me):
    me.calc_normals_split()
    loop_norms = defaultdict(list)

    for loop in me.loops:
        loop_norms[loop.vertex_index].append(loop.normal)
    return loop_norms

ob = bpy.context.object
loop_norms = get_custom_vertex_normals(ob.data)
for i, normals in loop_norms.items():
        print(i, [tuple(round(x, 4) for x in v)  for v in normals])

when run on default cube, outputs:
0 [(0.0, 0.0, -1.0), (1.0, -0.0, 0.0), (0.0, 1.0, 0.0)]
1 [(0.0, 0.0, -1.0), (1.0, -0.0, 0.0), (-0.0, -1.0, -0.0)]
2 [(0.0, 0.0, -1.0), (-0.0, -1.0, -0.0), (-1.0, 0.0, -0.0)]
3 [(0.0, 0.0, -1.0), (-1.0, 0.0, -0.0), (0.0, 1.0, 0.0)]
4 [(0.0, 0.0, 1.0), (1.0, -0.0, 0.0), (0.0, 1.0, 0.0)]
7 [(0.0, 0.0, 1.0), (-1.0, 0.0, -0.0), (0.0, 1.0, 0.0)]
6 [(0.0, 0.0, 1.0), (-0.0, -1.0, -0.0), (-1.0, 0.0, -0.0)]
5 [(0.0, 0.0, 1.0), (1.0, -0.0, 0.0), (-0.0, -1.0, -0.0)]

ie every vert has 3 loops for each face it belongs.
The average normal could be calculated via
avge_normal = sum(normals, Vector()) / len(normals)

or
avge_normal = sum(normals, Vector()).normalized()

to get a normalized sum vector. which when run on default cube edited into above
for i, normals in loop_norms.items():
    print(i, sum(normals, Vector()).normalized())

outputs
0 <Vector (0.5774, 0.5774, -0.5774)>
1 <Vector (0.5774, -0.5774, -0.5774)>
2 <Vector (-0.5774, -0.5774, -0.5774)>
3 <Vector (-0.5774, 0.5774, -0.5774)>
4 <Vector (0.5774, 0.5774, 0.5774)>
7 <Vector (-0.5774, 0.5774, 0.5774)>
6 <Vector (-0.5774, -0.5774, 0.5774)>
5 <Vector (0.5774, -0.5774, 0.5774)>

which could be more like the result you are after.


Create a Group of Objects That Hide or Unhide as One Is it possible to create something like a "visibility group" to toggle hiddenness on and off for many many many objects at once? Layers are great and all, but....

You can select a number of objects, and key Ctrl + G to add them to a new group. Then, whenever you want to hide them, key Shift + G to open the Select Grouped menu and select Group.

Key H to hide them and Alt + H to unhide all hidden objects.

Additionally, you can clear the group from any or all of the objects by selecting 1 or more and keying Ctrl + Alt + G. You can also add more objects to the group. Do this by selecting the objects that you want to add, selecting an object that is part of the group, and keying Shift + Ctrl + G.

Hope this helps and happy Blending!


Making Ores Glow (Minecraft) A couple weeks ago I got into animations and I find it really interesting. One thing I have not been able to figure out is how to make only specific parts of a block glow. Specifically, I am unable to make the ores in an ore block glow.
When I add an emission to the block or add a point light to the block and turn off shadows, the entire block lights up. The image below is pulled from the internet and it's what I am trying to go for.
As you can see, only the diamond ore is glowing/illuminated, the stone part of the diamond ore bock is the same as the stone around it. Any help would be appreciated.
I am using Blender 2.9.

Edit: I wrote that quickly in late night, so today I added my Result and also fixed some information.
You can do this by making a mask, with which you can map an Emission Shader with  a Principled BSDF Shader. Set up your UV system first, you need the image to be projected perfectly on one of the faces, I picked the front one.
Second, find an image texture of diamond ore- I used this one

Then, in the Shader editor, we need to mask out the Ore from the stone.
First, take the UV coordinates and put them through a mapping node. With it, set the Location. If you want it centered, then add -0.5 on X and Y axis. Then, use Vector Math, set to scale to control the Scale of the image. Then, plug in the image texture. After that, if you scale it, you will see that it will repeat. So, that's why you have to set the image from Repeat to Clip. Now, you will have those diamonds to scale up and down with the scale node.
Now, Math node, set to Maximum, to cut out the diamonds from the background stone. After this, feed it through Map Range node cut out the background completely. So, now you have a good mask. Then, use Emission Shader for the diamonds part, and Principled BSDF for the stone. Mix then with a Mix Shader node, with factor of our mask.

Now, if you plan on using EEVEE, you can check on Bloom in the render settings for that bloom effect. But, in Cycles, you need to go into the compositing and to add a Glare node, set to Fog Glow effect, in order to get that bloom.

And that's it!


how to check if a vertex group is empty or not with python I am figuring out a way to check if vertex group is empty or not. if it contains at least 1 vertex or totally empty.

I am trying to make if condition to check for empty vertex group and delete the vertex group if it's empty

can I do this with vertex group data or should i use functions from bmesh

Using list comprehension

similar to that  used in this answer

Because we are only interested in empty group will use python any to move on quickly when a non empty group is found.

import bpy
ob = bpy.context.object
me = ob.data
for vg in ob.vertex_groups:
    mtvg = not any(vg.index in [g.group for g in v.groups] for v in me.vertices)
    print(vg.name, mtvg)

Then if vertex group vg is empty can remove with

ob.vertex_groups.remove(vg)


Hair particle system moves position when loading I am using Blender 2.79b in cycles render trying to create a character model with realistic hair and eyebrows.  I have set up my hair using a vertex group for the scalp, and the eyebrows were placed using the add tool and X mirror.  Standard hair settings;

Hair dynamics unchecked
Velocity settings default
Rotation unchecked
Physics settings default
Render settings default with B-Spline at 6 steps
Display rendered with 6 steps
Children interpolated, display 25, render 25, long hair checked (unchecked for eyebrows)
Field weights default
Force field default
Vertex groups density set for scalp
Custom properties default
Textures default
Cycles hair settings with root at 0.20 and tip at 0 with close tip unchecked

After combing the hair into the position I want, I can render an image and it looks good.  I save the .blend file.  If I close the program and load the file I encounter a few problems.

The hair is now completely messed up and out of position.
Some of the hair parents have moved position, away from the vertex group in random places on the model, and sometimes floating in mid air away from the model.
The eyebrow I placed appears to stay in position, but the mirrored eyebrow is randomly scattered.

Any guidance would be greatly appreciated.

I believe I found the answer to my problems.  In my subdivision surface modifier I had view and render at different values.


How do I achieve the tri view in Blender? How do I achieve this view in blender??
I've tried quad view but it's not the same effect.
I want to be able to assign different backgrounds for each view separately as Im using it to make a car model.'
Thank you.

EDIT: ok I found out how to do it, you get to any corner of any view and you just drag it. and then from view , you change it to whatever ortho you want.
Now how do I delete one of them if I made one by mistake?

LMB the three hash marks in the top right corner of the 3D Viewport and drag to the left to divide the view.  LMB the three hash marks in the top right corner of the right 3D Viewport and drag downward to divide the view again. You can now add a different Background Image to each.

Tri View:

.blend file:


Trifold Symmetry giving odd results i'm making a spitfire and my previous propellor was incredibly off regarding symmetry so i'm redoing it.

I've looked up how to do trifold symmetry and found the answer here however these are my results: this is how i set it up

does anyone know what i might be doing wrong? perhaps how to fix this? or an even better method of doing this?

I'd say it's an issue with offsets and / or scale.

Here is the default cone, with its origin moved to the tip.  (Add default cone, move cursor to (0, 0, 1) then transform > Origin to 3d cursor. Now we add an empty at this point and make it the object offset.

ie the origin of one blade (basically its pivot point) and the array modifier object offset, the empty, are at the same point.  Ok that's offset dealt with.

For your blade, make the origin the pivot point in centre of propeller nose cone. Even if this means it is outside the blade mesh.

Rotate the empty to 120degs on y, and "whallah" a cone propeller.

Make sure the scale of the empty and prop (in my case the cone) is (1, 1, 1) by applying scale, or this will effect the array modifier result. (increasing or decreasing in size of each iter)

Lastly, if I make the empty the parent of the cone, I can move the whole set up by moving the empty without upsetting the array mod.


Blender 2.77 - glass shader looks like glossy shader I downloaded Blender v2.77 and try to render Suzanne with HDRI Lighting.

First I've used a glossy shader, then a glass shader and it surprises me that the glass shader totally looks like glossy, it's not glass. When I switch back to Blender v2.76b and render the same file again, everything goes fine, glass is glass and glossy is glossy. See the images and the test file below.

http://www.pasteall.org/blend/41146

Any ideas?

I cannot confirm this. Glass looks totally normal in 2.77, GPU and CPU.

Some things to check for you:

Do you use a 2.77 release, not a beta or rc version?
Do you maybe use Feature set: Experimental?
If it's on GPU, got all the latest drivers?


Adding hair particles in particle edit mode So I set my emission number to zero and decided to add my eyelashes manually. In the "add" section, I have the radius way down and the count at one, but when ever I try to add a hair, it doesn't apply where I want it to. I did this with the eyebrows and it worked just fine. Not sure what's going on...  Hopefully a quick fix.

Link to my .blend file: https://drive.google.com/file/d/0B6xONZ2msgKHT1p2cEw5akZ5Yms/edit?usp=sharing

my mouse is where i clicked...

Try moving the particle system above the subsurf modifier in the Modifier stack by pressing the up arrow:

The resulting order should be something like

The two particle systems
The Subsurf modifier

E.g.:


Blender 2.8 (Python) - manipulating the camera for resized objects In python, is there a method or function for adjusting the camera's parameters so that it covers a specific area, rather than just pointing at a specific point?

This would be handled by zooming in or out, but to what degree?

The following is one way to handle it, but not the only way - if there are other ideas I would appreciate the opportunity to learn about them.

Let's assume that I want the camera to point at (X,Y,Z).

I also want the camera's perspective to meet the following requirements:
(a) left edge includes point (X-2,Y,Z)
(b) right edge includes point (X+2,Y,Z)
(c) top edge includes point (X,Y+2,Z)
(d) bottom edge includes point (X,Y-2,Z)

As an illustration, I would pass the desired points to the function, which would position the camera in such a way that the points fall on the edges of the camera view as follows:

The above would not only aim the camera correctly, but would insure that all of the important elements of the scene are included.

Thanks in advance!

So basically you want to have a plane or area that should be included in camera view?

There are few way to include different area size:

Actually move camera to get a better cover of view.
Adjust the camera sensor size directly.
Adjust FOV setting for wider view.

For the first one: view_selected is already include in Blender.

My naive solution is to actually create a mesh indicated your desired area and select it, view_selected it and move camera to here. But the size of the render view might cut up some places since the view won't be entire include in camera. So the things get more complicate if using existed function. Then writing some math function will be faster for sure.

You only need to calculate those coordinates from your points, using camera view coordinate system. Then other thing should be easily done


How to add current state to history by script? I'd like to know how can I add current blender state to history stack over script? Thanks

Its functionality is limited, but bpy.ops.ed.undo_push() may give you close to what you're looking for.


Transparency turns black after Math:Multiply node. Need help I'm working on Blender VFX and I'm using a blur node. This weakens the colors and I am trying to use a Math:Multiply node to strengthen the colors. However, when I use this node, it turns the transparent background to black. Is there a node that strengthens colors but does not change the background, or a node that changes transparency based on how dark the image is.

EDIT::
Unfortunately, palkomino's answer doesn't really help. The RGB Curves node does nothing!

I need a result like the Math:Multiply node, but with a transparent background.

The problem is that the math node uses a value (=> grey dot) and not a color (=> yellow dot). You'd rather use a RGB Curves node (ShiftA => Color => RGB Curves) and change it's C value. This will give you what you want.

Look at how the backdrop changes. The first time it's the normal render without any compositing. It still has an alpha channel. The second time it's with the math note. The alpha channel disappears. The third time it's with the RGB Curves node. The colors get strengthen but the alpha channel stays.


Copying pose of one leg to another withouot using x- axis mirroring I have a 3 legged character and I want to copy the pose of one leg to another. Shift Ctrl V doesn't work tho because that only works when I want to mirror along the x-axis but my character has 3 legs so that isn't possible. Is there anyway I can do that?
For example I have this pose

And when I copy then Shift Ctrl V it simply moves the same bone in a different spot. Instead of having the same pose on the other leg.

I don't know if there's another way to do it than this one:

First make sure that the axis of your second bone is good:

Create the animation for your first bone. Select the keyframes in the Dopesheet and copy, make sure to have the Only Selected (little arrow icon) option enabled:

Select the second bone, in the Dopesheet create a keyframe on its rest position (this step seems necessary):

Now paste in the DopeSheet, it creates new keyframe(s), the second bone has now the same animation as the first one:


Polygon Material_index Animation I would like to change polygon material during an animation with the following code.
However, the animation does not show the color changes of the polygons.
What is going wrong, isn't it possible to animate polygon material changes?
What is the best solution to do it with Python?
frame_count = 1

for polygon in polygons:

    bpy.context.scene.frame_set(frame_count)
    polygon.material_index = 1
    polygon.keyframe_insert(data_path='material_index', index = -1)

    frame_count += 10

Random keyframing polygon material indices

Code below run on a default cone with 4 materials of colour: red, green, blue, yellow.

Can set the frame in keyframe insert

All polygons are given material index 0 at frame 1

At the frame 2 times the polygon index plus 10 the polygon changes to a random choice of material slots with material.

Example script.
import bpy
from random import choice
context = bpy.context
ob = context.object
me = ob.data

choices = [i for i, s in enumerate(ob.material_slots)
        if s.material]

for p in me.polygons:
    p.material_index = 0
    p.keyframe_insert("material_index", frame=1)
    p.material_index = choice(choices)
    p.keyframe_insert("material_index", frame=2 * p.index + 10)

Using Drivers

It is a low level version of dynamic painting

In which case here is an example of using a driver instead of keyframing an fcurve.
Example below selects face index based on integer global distance of face center to emtpy.  Have left in test driver method with  test prints
The world matrices of the empty and the mesh object are added as driver variables, and passed to driver method by way of locals.
The image above is on a 16 x 16 grid, takes a while to run.  On my system a 100 x 100 grid works but takes a while and can get unresponsive.
Select the mesh object and run script.
import bpy

context = bpy.context
ob = context.object
me = ob.data

bpy.ops.object.empty_add()
mt = context.object

def add_driver(face):
    face.driver_remove("material_index")
    fcurve = face.driver_add("material_index")

    driver = fcurve.driver
    driver.use_self = True
    driver.expression = "x(self, locals())"
    var = driver.variables.new()
    var.name = "mw"
    var.targets[0].id = ob
    var.targets[0].data_path = "matrix_world"

    var = driver.variables.new()
    var.name = "emw"
    var.targets[0].id = mt
    var.targets[0].data_path = "matrix_world"

def x(self, locals):
    print(self)
    print(locals)
    mw = locals["mw"]
    emw = locals["emw"]
    d = (mw @ self.center - emw.translation).length
    return min(int(d), 5)

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

for p in me.polygons:
    add_driver(p)

Related
This one randomly sets color of faces of a modified (eg subsurf) mesh using a frame change handler.
https://blender.stackexchange.com/a/183440/15543


How to save the render result within Blender Is it possible to render an image and have blender remember it, so that next time I open the file the render result will not be blank?  I am not talking about saving to an external file.  Specifically I would like to render an image, close blender, and come back later and be able to do some compositing on the render without having to waste a half an hour rendering it again (my GPU drivers are messed up so I have to use the CPU).  Currently the render result is blank when ever I open a file.

No, Blender doesn't have this functionality.

Its possible to write an addon to do this, on-save it could save the render result to a Multi-Layer-EXR image, and on load it could check for that image, loading it if its available. (probably not all that hard to get basic functionality, but you will loose render slots).

An alternative which is admittedly little clumsy, you could use a file-output node in the compositor and save this in your user-defaults,
so your renders are automatically saved. In the user default you could have an image view pointing to this file, so on-load it would read the last rendered image.


Trying to put color on part of object I'm trying to make pokemon but I have some problem, i use circle select tool - C in edit mode to select part of object and then I put white color on that part but there are just some stains on the character and not the entire white circuit. Can someone help me, I don't know what to use.

It looks like you have some coincident geometry, but it's hard to tell what's causing it. It's quite possible that you have two copies of the same thing there, one of which is getting the material you want, and the other is covering it up. Right-click and drag on that model to make sure there's not another one underneath it.

Make sure that you're doing your selection in wireframe mode (not shaded), so that you're certain you're getting all the vertices. Keep in mind that you'll have to DEselect any vertices on the opposite side of the model, that you don't want to use that material.

I hope this helps!


Blender background simulation (GUI-less) is different from the actual simulation I am new to Blender as well as python scripting. I went through various documentation and was able to put together the below code that creates a plane as a passive rigid body, followed by creating one cuboid and 2 cylinders at random locations in the space on top of plane. I want to record the change of positions before and after the simulation. Below is my code to do this.

import bpy
import random
import copy

def createPlaneMesh(name, origin, scale, weight):
# Create mesh and object
    bpy.ops.mesh.primitive_cube_add()
    bpy.ops.transform.resize(value=scale)
    bpy.ops.rigidbody.objects_add()

    ob = bpy.context.object
    ob.name = name
    ob.location = origin
    ob.show_name = True
    ob.rigid_body.mass = weight
    ob.rigid_body.type = "PASSIVE"
    return ob

def createCubeMesh(name, origin, scale, weight):
# Create mesh and object
    bpy.ops.mesh.primitive_cube_add()
    bpy.ops.transform.resize(value=scale)
    bpy.ops.rigidbody.objects_add()

    ob = bpy.context.object
    ob.name = name
    ob.location = origin
    ob.show_name = True
    ob.rigid_body.mass = weight
    return ob

def createCylMesh(name, origin, r, h, weight):
# Create mesh and object
    bpy.ops.mesh.primitive_cylinder_add()
    bpy.ops.transform.resize(value=(r, r, h))
    bpy.ops.rigidbody.objects_add()

    ob = bpy.context.object
    ob.name = name
    ob.location = origin
    ob.show_name = True
    ob.rigid_body.mass = weight
    return ob

def clear():
    print("inside clear")
    candidate_list = [item.name for item in bpy.data.objects if item.type == "MESH"]
    for object_name in candidate_list:
        bpy.data.objects[object_name].select = True
        # remove all selected.
    bpy.ops.object.delete()
    return

def run(origin):

    l = []
    surface = createPlaneMesh('surface', (0, 0, -10), (100, 100, 3), 10)
    cube1 = createCubeMesh('cuboid1', (random.uniform(-15, 15),   random.uniform(-15, 15), random.uniform(5, 10)), (7.75, 5.625, 1.5), 0.296)
    l.append(cube1)
    cyl1 = createCylMesh('cylinder1', (random.uniform(-15, 15), random.uniform(-15, 15), random.uniform(3, 10)), 3, 9.75, 0.169)
    l.append(cyl1)
    cyl2 = createCylMesh('cylinder2', (random.uniform(-15, 15), random.uniform(-15, 15), random.uniform(3, 10)), 3, 9.75, 0.169)
    l.append(cyl2)
    return l

def get_location(list_ob):
    list_location = []
    for i in list_ob:
        list_location.append(i.location.copy())
    return list_location

def run_sim(list_ob):
    print('pre-simulation')
    prepose = get_location(list_ob)
    for i in prepose:
        print(i)
    scene = bpy.context.screen.scene
    bpy.ops.rigidbody.objects_add(type='ACTIVE')
    bpy.ops.ptcache.bake_all(bake=True)
    context = bpy.context
    context.scene.frame_set(scene.frame_end)
    scene.frame_current = scene.frame_end
    bpy.ops.object.visual_transform_apply()
    print('post-simulation')
    for i in range(len(prepose)):
        print(prepose[i], '=>', list_ob[i].location, list_ob[i].name)

    return

if __name__ == "__main__":
    clear()
    run_sim(run((0,0,0)))

It works well if I use

./blender -P ~/Desktop/physics_simulations/python_scripts/question_simulation.py

I can see the objects after simulation.
But when I use -b I see only change in the last object when I output the positions of the objects. As below

post-simulation
<Vector (11.4047, -10.3778, 8.7058)> => <Vector (11.4047, -10.3778, 8.7058)> cuboid1
<Vector (-13.9499, 7.4854, 6.9536)> => <Vector (-13.9499, 7.4854, 6.9536)> cylinder1
<Vector (6.8909, -7.7191, 8.7173)> => <Vector (-45.5964, 49.2257, -4.0609)> cylinder2

Please let me know if I am missing anything here.
Thanks in advance

Found the method that selects all the objects. I added the below line before visual_transform_apply() and it works as expected.

bpy.ops.object.select_all(action='SELECT')


Where do these black stripes come from on this texture? I'm fiddling a bit with SteamVR Workshop to recreate the atic. I've modeled the top of a desk and I wanted to give it proper coloring. So I used a texture. This is the first texture I have ever created, so this might be a noob question. It seems not all colors are in the right spot.

This is the model in blender

This is how the texture is put together

And this is how it is rendered in the VR world

Where could these black faded spots come from?

Or maybe it is not entirely fair to ask it in blender.stackexchange.com, as in blender, all looks fine. But, since I have such little experience with texturing, maybe I did something wrong?

Your mesh seems to be quite rough. Try remeshing the corners where this effect appears (avoid triangles) and then put a subsurf on the object.

Those faded spots appear if smooth shading is applied onto edges with a big angle of the two touching faces.


Is there a limit past which bigger textures has no effect? I have a human model with 8k textures. will reducing the textures to 2k have an impact on visuals or performance? can I get away with compressing just the specular and bump map and keep the diffuse map at full size?

Yes reducing the resolution of the textures will eventually make the pixels large enough to notice, but will improve performance.
Compressing one map and not another depends on your node setup or in a external application it's limitations, but it should be fine.


Data transfer to a mesh with different topology Is it possible to transfer mesh data such as UV map projection and vertex weights to another mesh that has different topology?

I thought the Data Transfer Modifier could do this, but I haven't figured out how to make it work. Or maybe I am mistaken?

I made a test .blend of a very simple scene containing three spheres, each with different topology. The Roundcube is textured and weighted, but the other two are not. How can I make the other two spheres use the texture space and approximated weights of the Roundcube?

Thanks in advance.

I was able to get a uv transfer using the the Data Transfer Modifier.
Select object to transfer the UVs to, add the Data Transfer Modifier
In the source parameter select the model to get the uvs from, check on Face Corner Data.
In Face Corner Data check on UVs. In the mapping parameter select Nearest Face Interpolated.
Also, clicking off the Object Transform button next to the Source parameter is great if your source object has been moved away from your destination object.


why UV texture seems to be translucent on renders? I have to model/texture a 4mob and have a curious problem with UV texture render. I have a UV texture representing really black lines and icons on a grey background.

In the Blender's 3D view, the texture appears normally (grey background with black drawing)

The problem appears when rendering the image, the contrast is very low, like if the texture was translucent (grey background with dark grey drawing).

Is someone able to explain what can cause this?

NOTE:
I use the internal Blender render engine and do not know anything about Cycle.
Here is a screenshot of my material settings:

And here is a screenshot of the texture settings:

Well, I just find what was causing my problem: the white specular.

Lowering the specular intensity and darkening it actually solved the "issue":


How to access per-face UV assignment via API In Blender 2.79, how can I find the per-face UV image associated with a given face? Essentially what I want to do is this (pseudocode):

for face in mesh:
  if face.uv_image == "some_image.png":
      do something
  else:
      do something_else

Found it. This code prints the name of the TexFace image for each face of the mesh:

import bpy

object = bpy.context.object
mesh = object.data

for face in mesh.uv_textures['UVMap'].data:
    print(face.image.name)


Cycles Render is showing black silhouette I'm running into the attached issue when trying to render my model. I'm fairly new to blender and am using a free model form the internet to practice on. I'm not sure what is going on here.

I've done some googling prior to submitting this and none of the solutions I found resolved my issue.

https://imgur.com/vpirao5

I found out the issue. I had some masks turned on...


Camera to user view? Let's suppose we have a medium-poly mesh, and we want to snapshot several different closeups by just flying in the camera or using the user's perspective to flyover.

Is there a keyboard shortcut for adding a camera to the user's current view without all having to moving the camera all over the scene to fit a desired position? The switching back and forth from user perspectives to camera view is annoying.

To make your active camera match up with the viewport, use Ctrl + Alt + 0 (Numpad 0, the other zero won't work).
Also, you can track the camera to an empty with the Track To constraint. This will force your camera to point to the empty, which you can place in the center of your medium complexity face mesh.

To set up the Track To constraint:

Select your empty first, then camera.

Ctrl + Shift + C key, and choose Track To from the menu.

Then, go to the Properties panel > Object Constraints tab. The Target: should say Empty. Change the To: axis to -Z and the Up: axis to Y.

Now your camera will always point to the empty, making things easier for you to position.


I accidentally closed the layout I was working on I'm sorry I don't know the vocabulary for Blender
The thing is I was working on a layout screen and then I added another screen (using vertical split) to adjust the light
 But instead of closing the new one (the one I was just adjusting the light on) I accidentally closed the one I put all my work on. I tried selecting the 3D viewport again but the layout I was working on is still missing.

If I understand you correctly you fear your 3d work is lost. Rest assured, even if you remove a view in the interface, it doesn't affect your 3d scene.

All you need to do is resetting your "Layout" workspace. This is purely an interface thing and is irrelevant to the content.

One way to reset your "Layout" workspace is pressing the plus(+)-button on the workspaces tabs and selecting General -> Layout.

Alternatively you can open Blender, then select "File -> Open" from the top menu. Deactivate "Load UI" on the bottom left and then find and open your file.

This way any .blend will open with your startup Blender workspaces and interface settings.


Blender saves a new file every time When I click save or hit Command + S what appears to be a new version of the document is created. So if I save 2 times, I get 2 documents, filename.blend1 and filename.blend2.

What exactly are these files and why is Blender creating them?

These are backup files created by Blender and are fairly normal.

Excerpt from the wiki

  Save and Auto Save

  ...To reduce the chance of
  losing files when those events occur, Blender can use an Autosave
  function. The File tab of the User Preferences window allows you to
  configure the two ways that Blender provides for you to regress to a
  previous version of your work...


Blender doesn't launch I recently installed Blender(2.82) on Steam and when I wento to run it, Blender simply flashed a grey window and didn't launch! Can someone please help me?

Had same problem on Ubuntu - 2.8 didn't want to start up. 2.79 however works fine. This problem may be caused by GPU requirements. I had this problem on a laptop with an integrated GPU...


workflow for creating sculpted tileable Tiles in blender? As a sculpted tile I want it to be exported just as a OBJ textured quad, And I want to use Blender to bake also NormalMap, HeightMap, AmbientOcclusion.

How do I carefully sculpt my tile? (not necessarily by raising/decreasing only height: even custom morphing is allowed, in that case the baked texture should be projected from top anyway) as long as the final exported result is:

1 quad (2 triangles)
tileable diffuse texture (do I have to paint it before or after the tile?)
tileable normal map
tileable height map
tileable ambient occlusion map

Any tecnique is fine.

everything should be baked, exporting the tile as a high poly mesh is not my goal (Even though it could be a desiderable option in a future time) since this is for a mobile game using physically based shaders.

I checked also on blender forum. There is currently no simple workflow. Some workflows require offseting the mesh to sculpt over seams.

Seems there's a patch for the issue submitted in 2015, but seems it was not officially accepted yet.

https://blenderartists.org/forum/showthread.php?373956-Wrap-mode-for-Sculpt

If anyone has any idea on how to do that he is wellcome anyway^^.

Seriously thinking to try to write my own plugin, unluckily I'm totally new to Blender python API


Vertex wont snap to edge I'm trying to get a vertex of one object to snape to the angled edge of a different object, and even though I have the snap feature turned on, and the snap feature set to edge, the vertex just passes by the edge.  I've tried both including the second object in edit mode (as seen in the gif) and not including it while in edit mode, but it doesn't seem to make a difference.  It's important that the Z location not change, so I'm moving the vertex strictly on the X or Y axis.  Since the edge is angled, there no easy way to know the precise coordinates of where I need the vertex to end up, otherwise I'd just type it in. Same reason I can't set my 3D cursor there.  Lacks the precision I desire, and right now I'm just eyeballing it which is sending my OCD into overdrive.  Please help!

One thing you can do is select the edge you want to snap the vertex on and then subdivide it, this way you have a new vertex on said edge that you can move to the location you want the snap to happen, then simply snap the two vertices together, and then remove doubles just to be sure you don't have ovelapping vertices.


How to animate the disappearance of a mesh I have this strip on my landscape that I want to make disappear from where the digger currently is, and then following the digger towards the end of the strip, to reveal the trench underneath.

What is a good way to do this? Can I animate an object that removes the ground strip? The camera is static in this scene so I could also imagine using a mask, or doing something in the video sequence editor.

*Cutting out my strip (knife project) messes up the connection with the rest of the landscape (they both have displacement maps). So I think I need to keep both images and animate a mask in the video sequence editor or something.

To get the cleanest result I suggest animated booleans. Since you have flat shading you wont get any shading artifacts, this is probably the textbook example for them. If you have some subsurf and displacement apply them or put the booleans after the displacement.

There will be 2 boolean objects.
- First one is static and will create the hole in the ground (highlighted). Put some edgeloops in the ground object around the trench so this boolean wont segment the whole thing.
- Second one can be just an animated cube and will intersect with first boolean object and the concrete wall inside trench. The bigger the intersection the more ground will be removed and more concrete wall will be shown.


Difference between Shadow pass and Diffuse Direct? What are the differences between the compositor's Shadow Pass and Diffuse Direct Passes in Cycles? I know one is that the Shadow Pass only responds to lamps and not mesh emitters. But even on renders that only use point lamps, it still seems to be different.

What other differences are there?

The Shadow Pass is not as interested in the gradient intensity of the reflected light (like DiffDir) as it is in where the emitted light is not directly reflected back to the camera.  This probably involves a threshold, even though I haven't looked at the code.  From my tests, it seems that once the reflected light falls below a certain point, only then does it become non-white on the shadow pass.  Whereas the purpose of the diffuse pass is to show the gradient direct light intensity:

Also, when you add another type of shader into the scene, the similarities between DiffDir and Shadow continue to diverge since the shadow pass is affected by them as well.  An interesting phenomenon occurs when the Glossy Shader is at 0.0 roughness... it becomes totally black.  This is because of what I said earlier about direct light reflection.  As you probably know, when glossy is perfectly reflective, no off-axis light will be reflected back to the camera.  Therefore, you get nothing on the shadow pass.  But if you give it some roughness, it shows up.  That's because it's reflecting enough directly emitted light to breach the threshold.  The center cube below has a glossy shader applied:


Particle system: hide dupli object I'm using a metaball as particle object, and want to exclude the original object from the render. none of the solutions mentioned in Hiding source of particle instancing (move to separate layer, transparent object material) are working. at least not in the the version of blender that I'm using (2.78.5).

obviously all particles are instances of the original object and therefore also affected...

blend file

While you can't 'hide' the object used to render the particles you can make it invisible by setting it's material to be transparent.

For non-meta objects you can use the Particle Info node to detect which 'objects' are particles and use this to mix between the actual shader and a transparent shader to 'hide' the 'original' object - eg, by using a math Greater Than node to distinguish between those particles with a Lifetime greater than 0 (the particles) and that with Lifetime of zero (the 'original' object).

For Meta objects this is difference since the whole collection of particles and the 'original' object is rendered as a single combined surface so the Particle Info node is not applicable. In this case you can use the location of each rendered point to determine whether to render that surface or not. For example, positioning the 'original' object above the particle system you can use the Object texture coordinates to make the object transparent while leaving the particles rendered :

Adjust the Greater Than node so that the original object is hidden but the particles are not.


Mesh does not move along with bones in pose mode (uses rigify armature) Ver 2.75 As the title says, my mesh does not deform along with the rigify bones in pose mode, even though the bones are in pose, and not rest position. I have already adjusted the weighting, and I know that in the past, it's worked completely fine. I have no idea as to what caused it, though I believe it has something to do with changing the weights on some of my objects.
In the past versions of Blender, selecting multiple vertices in edit mode during this stage would have crashed the program, though that seems to be fixed in the latest version, giving me some hope that this is a mistake on my part, or a fixable bug.
Below is a screenshot of what the problem is like. I've also attached the .blend file in the link for anyone willing to lend a hand.

https://www.dropbox.com/s/hnb7p4zo83a9evw/Natlie_rig.blend?dl=0

I played around with your .blend a little (good you uploaded it...). I realized that the Armature modifire got removed. I dont know how this happend.

Just add the modifire again and you will be fine.
In the picture you can see the needed settings.
I also realized that your armature is scaled extremely big. preess alt + s to reset the scale if this size wasn't intended.
By the way you can delete all the annoying meshes in the last layer. they arn't needed anymore.


Increase Transparency in Animation for all Materials In Blender I have been wanting to create an effect where an object with multiple textures disappears evenly. I have figured out how to do this individually, but I would like to be able to decrease opacity for multiple materials. I have just started with blender, Sorry if this is a stupid question.

Thanks,
John

You can do this fairly easily by using some simple drivers.  Drivers are a way of controlling one property based on the value of another property or properties.  If you have never used them before drivers can seem a bit daunting, but simple driver setups like this are actually pretty easy to set up.

First, add an empty to your scene.  This will serve as a "fader" to adjust the opacity of your materials.  This way you can just animate the movement of the empty, and in turn it will control all the transparency.  (It is not necessary, but somewhat convenient to add a couple Limit Location constraints to the empty to only allow it to move in a straight line like a real fader.)

Next, right click on the opacity setting for your material and select Add Driver.  This will make the field turn pink, indicating that it is now being controlled by a driver.

Now jump over to the Graph Editor and select Drivers under the Mode selector.

Now find the driver on the hirearchical list on the left and select it.  (I am using the Cycles render engine, so yours may be a little different than mine if you are using Blender Render.  Basically it will just be at the bottom of the hirearchy.)

Now look at the panel on the right side (if it's not there just hit N) and scroll down to the Drivers rollout.  Near the top here is a field called expr, this is the expression that determines the actual value of the driven property.  Just type "var" here, as that is the default name of the default variable and it will work fine for us (in more complex situations when you are dealing with multiple variables it is usually good practice to name them something more useful).  Now go down to the variable named "var" and select the empty you added for the Ob/Bone field and select Y Location for the type.

Now as you move the empty up in the y-direction the opacity of all your materials should change accordingly!


Cycles, Mitsuba, Lux - Speed by Necessity - The Correct (non-subjective) Answer I know stackexchange frowns on "suggest this software" questions that can be subjective, but I do believe there is a correct answer (non-subjective) to this question.

I have to render for speed and quality and can (for these particular projects) do without the excessive control that cycles offers.

I've seen Luxrender and this if I am not mistaken is much slower than cycles. Mitsuba might be faster, but I read it has some limitations.

Which of these renderers can give speed and quality even if some sacrifices must be made?

There is an old adage from the industry:

“Time, Money, Quality; Pick Two”

The gist being that you can only have two points of that triangle, at a cost of the one you do not select.

It has held true long enough to become a trope.


How can I spawn a moving object in BGE? I know how to use the Add Object actuator to add an object while the game is running, but the angular velocity is not affecting the mesh. Is there something else I should have done as well? Workarounds that access the mesh and assign a velocity after creation are fine as well, but no python would be preferred.

I am using Blender 2.72, the objects are added correctly when I press the button, and the added objects also respond to physics when colliding with each other. Just the initial velocity is not working.

Here is my current Logic setup:

You can simply add this logic on to your object that will be added via the Edit Object actuator.

All you need is a Always sensor triggering a Motion actuator. Set the motion to be local, with the L button.


How to remove "missing script files" warnings in add-on prefs? Background
I have an issue periodically with my add-ons staying around somehow. This mostly happens on add-ons that I work on (occasionally when I keep reloading them), but also on others such as the pie menus add-on.
Problems

"missing script files" warning in user prefs
add-on path cannot be found so I can't see where to remove anything from...(i.e., I receive this warning when I try to run bpy.ops.wm.addon_remove(module='ui_pie_menus_official') from the python console window)
the modules stay around on some add-ons after I remove them

Question
How can I remove these modules so they will stop giving me these warnings?

I had the same problem in Blender 2.83.
I suggest that you load the Blender Add-on factory settings by going to the "Edit" menu, Select the "gear" icon to get to "Preferences..." and after that, click on the lower left corner button besides "Save Preferences*" (it shows 3 horizontal lines through it).
Then, by re-enabling the Add-ons one by one, you'll easily spot the culprit for the missing scripts.
Usually, an updated version might have been already published if you do a search for the defective Add-on.
In the case of the Blenderkit being the one giving you problems, go to this answer provided by SHA:
https://blenderartists.org/t/blender-2-8-blender-kit-addon-install-error/1173445/12?u=pierregagne98
Hope that helps!


Background image is not displaying in rendered mode how to make background image sequence displayed in render mode in the 3D view? I made a 3D tracking and I want to see the original video as a background.

This is what i mean:
In "material mode" I can see the background

But not in "render mode":

In the Properties window on the Scene Tab under the Film section check the transparent box:

Otherwise your background will be the color set in the Properties->World->Surface settings.


Audio not included in rendered file I'm using the "Video Editing" feature and have created a rough cut of my project in a new Sequence.

I have included other Sequences there, and put an audio track on top of it. When I play it back in blender it works fine and the audio is playing. When I render it, there is no audio.

I've enabled audio in my Output section, for both, the scene with my 3d objects (although that scene doesn't contain any audio, but I wasn't sure if that was necessary) and the scene in which I'm doing the video editing:

I figured it out. I opened the MPEG-4 in VLC to see whether it might just be a compatibility problem and VLC played the file with audio! So it appeared to be a container or audio codec compatibility problem with Quicktime and Apple preview.

Switching the audio codec from MP3 to AAC worked.


Pivot point won't move I've done this before fine but I had scaling issues so I restarted my project. I created a bezier circle and moved the points around in edit mode to what I wanted. I set the 3D cursor to one of the points in edit mode that I wanted to be the origin. I went in to object mode selected the circle and then I used set origin to the 3D cursor in the Shift + S menu and it does not move.
It isn't a visual bug as the object rotates around the origin in its original place. Is there anything I've missed?

As John Eason, set origin is not available in the ShiftS pop-up menu, you need to go in Object mode and right click > Set Origin > Origin to 3D Cursor.
Or enable the Transform Affects Only > Origins option and in that case you can use the ShiftS > Selection to 3D Cursor as in that case it will move the origin:


Images Crashing Blender I have a late 2013 Macbook Pro running on High Sierra but any time I try to open an image file on any part of Blender it crashes. I can't open an image texture, background image, etc. I've tried different images but they all give me the rainbow wheel of death. I'm guessing this is an issue with storage/hardware but I have no clue at this point. Any help would be great.

The version of Blender I was using was old. I updated to version 2.79b and that appears to have fixed the issue.


Keyframe or parent separate meshes in same object? I know I can use keyframes and use parent-relations in meshes in individual objects. But is it possible to keyframe or use parent relations to separate meshes in the same object (maybe when I use vertex groups)?

Yes.

Use vertex groups and armatures.

If an armature can move an attached hand of a human body mesh then it can also move disconnected sub meshes of a Blender Mesh Object.

Parent the mesh to an armature.  Use weight painting if necessary.  Armature need not to be connected. Think of the armature as a collection of controllers and not a mechanism to control an organic mesh model.


How do I set point density node for smoke? I’m trying to make this animation , I’m using particles from an emitter to create the smoke and force fields to give them the direction I want .

The problem is I’d like to shade the smoke as it was very much heated in the center , where the particles flows is , so it looks pretty much like a lighting bolt .

I knew of a function named voxel data in the textures that would allow to achieve this result , but I can’t find it in the new version of blender . Does anyone know what I should do , once I got the smoke from the particles emitter ?

Q: I knew of a function named voxel data in the textures that would allow to achieve this result , but I can’t find it in the new version of blender . Does anyone know what I should do , once I got the smoke from the particles emitter ?

Texture > Voxel Data is feature until Blender 2.79
Since Blender 2.83 you can use a new type of object Volume

For more see Blender Manual (plus properties


Futuristic water tower—seemingly simple shape, but how tackle a clean topology? I’m trying to model this—looks fun, right?

So I’m having issues (perhaps as you’d expect) where the two pipes seamlessly flow into the main hull of the thing—but I got close.

I took two cylinders, connected them at the top with a semi-circle “bridge” you see in the center, and then used edge loops to connect it to the body.

It’s almost fine, but the topology is a little lumpy and I can’t seem to smooth it out. I’ve tried manually adjusting the vertices.

It’s especially noticeable as I up the subsurface.

Can anyone help me either fix this or, better yet, help me see a more “correct” way of going about this type of shape?

Thank you.

John

Use simple shapes and pump up the subsurf subdivision

I would suggest to model your object with simple shapes (e.g. cubes for the pillars, an octagon for the top) then add the subsurf modifier and start tweaking the geometry with the modifier activated.

Let the subsurf modifier do the work for you. Use the minimum amount of vertices in order to easily control the shape and let the smoothing flow.


What does the "unused" output on the Vector Math node do? The Vector Math node has two output sockets, Vector (vector type) and Value (scalar type).

Most of the vector operations (Normalize, Cross Product, Average, Subtract, and Add) result in vectors, what does the Value socket output when one of these operations is selected?  Likewise, what does the Vector socket output when Dot Product (which results in a scalar) is selected?

The answer can be found in the source which isn't hard to follow.

For add and subtract the Value output is the average of the absolute vector values. That is:
$$
\text{value} = \frac{\left\vert v_x\right\vert + \left\vert v_y\right\vert + \left\vert v_z\right\vert}{3}
$$

For average, cross product and normalize it is the length of the vector output.

For dot product the vector output is set to zero.


Dynamic paint does not work on canvas in paint mode EDIT!.. Ok my problem is now very small as i appear to have figured everything else out so far.

I dont seem to be able to use any object as a dynamic brush on any other object setup as a canvas. I can use the wave mode just fine... but paint seems to be completely unaffected. I can even use particles a brushes in wave mode.. but i just wont respond to color change.

Any ideas??

OLD,,,,,,,
Im pretty new to the particle system in blender and I am attempting to follow at tutorial on using particles as dynamic paint.

I have two issues.. the first is that my particles show simply in the viewer but never appear in the render.

the second is that I have confirmed the particle settings and the dynamic paint settings (brush and canvas) several times..

The particles are to move from left to right across a text object which has been converted to a mesh. Gravity is set to zero and the text as the emitter. The particles behave as expected and travel for 65 frames from left to right... but they do not affect the object nor do they paint it as a canvas.

Any pointers would be fantastic guys!

EDIT: I setup a whole new simple scene with a plane sub div to 100 and a UV sphere above emitting the standard amount of particles. If I use the particles as the brush i can treat the plane (canvas) as a wave.. however.. when I switch the mode to paint nothing is happening. I also can NOT see the particles during a render at any time. Please help guys!

I had this same problem, then stumbled on the solution after watching ~10 tutorial videos.
Solution: The "+" button needs to be pressed, next to "Paintmap Layer" item, under "Physics > Dynamic Paint > Output" menu.
Before:

After:

Also make sure that you have an "Attribute" node feeding into "Base Color" in the Shader node tree for your canvas object, with the name of the the "Paintmap Layer", like so:


Weight paint and mesh are mirrored, weight paint color seems right, but vertices are left behind Right now I'm weight painting my mesh, so I can rig it correctly. However, the forearm isn't behaving the way it should, the left one at least. The right one moves the mesh correctly, but the left one leaves a line of vertices behind, even though they are weight painted and the same as the right side. Here's some screenshots:

Weight painted left (uncorrect) side:

Mesh deforming uncorrectly on the left side:

Weight painted right (correct) side, it was mirrored from the left one:

Mesh deforming correctly on the right side:

Any idea of how I can solve this? I've tried erasing all the painting and doing it again, but the result is the same. The weight of every individual vertex seems to be right. The mesh is mirrored and there's no unnecessary vertices inside it. All fingers and hands worked fine.

Ok, looks like it was because I had wrong weight painting in the pelvis bone. Not sure how it ended up painting the right arm, but now it's fixed.


Apply filmic color management to an EXR file - post processing in photoshop I am taking EXR files to photoshop for post processing, but I want the filmic color management applied. Is there a different file format I should be using, or is there a way to apply filmic color management to an EXR file?

Photoshop and other software of its ilk are display referred imaging applications. While PS will load an EXR, it does not possess the quality of controls one requires to properly manipulate scene referred photographic imagery.

To deal with a strictly display referred application and suffer as little quality loss as possible, save to a display referred format such as a 16 bit TIFF using the Filmic Base Log Encoding. It would then be possible to sculpt your own 'S' shaped curve to adjust contrast, or convert the Filmic set to the limited LUT format that Photoshop can understand.

DaVinci's Resolve has the granularity and more industrial tools to properly manipulate EXRs, although it will require a proper chain of nodes to do so. For further explanation along these lines, feel free to check Filmic's issue tracker where some help has been offered regarding the details of such an implementation.

https://github.com/sobotka/filmic-blender/issues/40


How to make eyeglass lens material I am trying to make a pair of eyeglasses but am having trouble with the lenses. I can't seem to make the lenses look right. I tried using the glass shader but it made the lenses look more like a mirror. I also tried the transparent shader but it just made the lenses invisible. How can I make a material that looks just like a glasses lens?

Go to the Material Properties panel and set Blend Mode to Alpha Hashed under Viewport Display -> Settings.
Alternatively, you can switch render engine to Cycles under the Render Properties panel.