Mix texture and transparent image I've been asked to do a small animation for a multi story ice cream store. I want to have a steel background texture with a transparent image of an ice cream on just the front face of the elevator door. Most solutions I've read through mention unwrapping the face, but that gives me the following message:
"Object has non-uniform scale, unwrap will operate on a non-scaled version of the mesh". The transparent image also applies itself to all faces of the door.

 This is what I have. And this is what I want. How do I go about doing this?

Thanks in advance,

Joe

From what I understand, your unwrapping is the reason. You have unwrapped the faces so that they are overlapping. In the Image Editor, while unwrapping, try moving the faces so that they are not overlapping. Then when you add the transparent image make sure to tweak the Mapping node so that you offset it where it needs to be.
I hope this helps.


Determine if a Python file is running in Blender? My add-on needs to run both inside and outside of Blender (I have unit tests that I run with a headless version of Blender to make sure everything continues to work).

How do I determine in my __init__.py file if my package is being loaded and ran in Blender versus being loaded in just normal Python?

What I've tried:

globals() does not seem to contain anything useful to check at least in a loaded Python file. It has quite a few things in the Python console as well as when running a file from the TextEditor in Blender.
sys.modules[__name__].__addon_enabled__ does not seem to work
try: import bpy work for my case as I have a module in my environment called bpy (headless Blender)

edit: This answer will not work since Blender 2.91 because the meaning of sys.executable changed, see https://developer.blender.org/rB04c5471ceefb41c9e49bf7c86f07e9e7b8426bb3.

I found an example of this on the "Blender as a python module" wiki: https://github.com/TylerGubala/blenderpy/wiki/Caveat---Importing-Addons#development-of-new-gui-addons
Their suggestion is to test os.path.basename(sys.executable) for a prefix of "blender" vs "python", eg.
in_blender = os.path.basename(sys.executable or '').lower().startswith('blender')

(Testing sys.executable is a little better than sys.argv[0]. A script with a shebang line called like ./blender-script.py will have a sys.argv[0] of "./blender_script.py" (giving a false positive), while its sys.executable will still be the path to the python interpreter.)
Another idea is to test that sys.executable is the same as bpy.app.binary_path
try:
    import bpy
    in_blender = (sys.executable == bpy.app.binary_path)
except ModuleNotFoundError:
    in_blender = False


Locking vertices to rotate the object around them When I create an animation, it's always inconvenient to adjust certain vertices so they don't change their location during an animation e.g. if I want to make an animation about a person throwing an axe to a wall (see picture).

Of course, the bones of the upper- and lower-arm change their rotation since the whole body has to be stopped partly by the arm who's holding the axe. But if I change the rotation of one of these two bones the parented axe also changes its place e.g. it goes into the wall which shouldn't happen.

Therefore, I always have to adjust the bones to avoid this problem. And I have to do it for each frame the tip of the axe is on the wall.

Isn't there a solution to lock the vertices of the tip, so the whole axe doesn't go inside the wall (but can rotate around the locked vertices) even when it's parented to the arm which changes its rotation?

When you use forward kinematics, moving the body will move the arm and hand to follow the body motion.

When you use inverse kinematics (IK) the hand can be positioned and will stay stationary while moving the body. Note that a hand using IK will normally pull away from the location if the length of the arm doesn't reach the location desired.

By animating only clive's body you can see that the hand using IK stays still while the hand using FK moves with the body.

If you enable the rigify addon, you can add a meta rig and generate the final rig to get an armature that has IK/FK controls that you can look at. There are also many rigging tutorials that cover IK controls.


Node get from node_tree.nodes don't have copy property How do I copy a node from a node_tree.nodes to another ?
In document, I see the copy property, but when I call it from interpreter, It causes errors :

>> node = bpy.data.objects[0].data.materials[0].node_tree.nodes['Mix.001']
>>> node
bpy.data...nodes["Mix.001"]

>>> node.copy
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'ShaderNodeMixRGB' object has no attribute 'copy'

>>> node.copy()
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'ShaderNodeMixRGB' object has no attribute 'copy'

>>> node.copy(node)
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'ShaderNodeMixRGB' object has no attribute 'copy'

Document : https://docs.blender.org/api/2.79/bpy.types.Node.html#bpy.types.Node

My blender version is 2.79

The copy function really seems to be missing from the Python API. I would suggest to get the bl_idname of the node, create a new instance in the other node tree and then iterate through the default_values of the node's inputs and assign them to the new node.

import bpy

def copy_node(node, target_node_tree):
    # Get the bl_idname to create a new node of the same type
    node_new = target_node_tree.nodes.new(node.bl_idname)

    # Assign the default values from the old node to the new node
    for key, input in enumerate(node.inputs):
        node_new.inputs[key].default_value = input.default_value

    return node_new

For instance, if you would have an active object with two material slots, each with filled with a node based material and you would like to copy the Diffuse BSDF node of the first material into the second one, this could be accomplished by the following code:

if __name__ == "__main__":
    node_tree = bpy.context.object.material_slots[0].material.node_tree
    node_tree_2 = bpy.context.object.material_slots[1].material.node_tree
    node = node_tree.nodes["Diffuse BSDF"]
    copy_node(node, node_tree_2)

This simplified example doesn't check if the materials and nodes actually exist, which should be done in a proper implementation.


How to do a neon light effect inside an object or be seen that way with blender 2.8? I have this scene in Blender where I am trying to have neon lights emit through an object. See the lights inside the object seeping through?

But i'm not sure if that is possible since the object I am trying to do it on already has a texture and an emission nodes.

I'm wondering if there is another way to make it appear like the first image.
My idea:
I thought of making a emission mask just for those spots within the sign and fixing the orginal emission layer in photoshop.
What do you think?

You can use another texture to mix color with your emission texture map:

See the Checker texture "Add" to the emission socket, make it light up as the checker go white. That node is Color→MixRGB in node editor.
Photoshop is another approach if you only want a quick prototype and keep thing simple.


Trying to create Pacman I'm working on making 3d Pacman in unity, and I'm trying to create Pacman himself in blender. I've never used blender before, so this is proving to be seriously challenging. Can anyone help a girl out?

EDIT: I should also mention, I'm not just trying to model him, but make his mouth animation

Pacman is pretty simple to model

Start by adding a sphere: Shift-A>Mesh>Shphere
Hit F6, in the properties window that is provided, change the segments to 24.
Hit Tab to enter edit mode.
Rotate him by 90o on the X axis, RX90
Right Mouse click while holding Alt on The face loops you'd like to delete for his mouth. You may need to select additional faces using the Right Mouse Button.

Use X>Faces to delete

There are a few more steps to add eyes:

Select a face on the one side you'd like his eye(s) to go over

Snap the 3D cursor to it, using Shift-S>3D cursor to selected
Exit edit mode, Tab
Add another sphere.
Use Shift-S>Selected to cursor to position your eye.
Scale it to the correct size using S
Use ShiftC to re-center the cursor
Use ShiftAltC>Origin to 3D curosr to move the origin of your eye to the center
Add a mirror modifier using the modifier panel.

To animate the Pacman, instead of deleting the faces covering his mouth, split them down the middle ShiftV, and then rotate them to alin with the upper lip. You can use this as a shape key. You will then need one with is mouth closed and you're good to go, simply animate between the shapekeys.

If the shape keys don't provide satisfactory results, You can try using somthing like the hook modifer, with an empty for each row of verts.


colored Metal material I did make an xperia XZ mobile phone on blender and everything worked well until I started with materials. I could not make that Metal material with right colores. And when I used a image texture I lost shine effect from glossy node. I want a result as like as the one on pictures down.

Not sure if I am understanding correctly. Also not sure what render engine you are using. If its cycles I recommend downloading 2.79 (if you don't have it already) and use the Principled BSDF shader with the Metallic set to 1 and play with the roughness value until you are happy with the results.

Also keep in mind you need a light source to actually reflect the light. I used an HDRI in this image but you can just use a plane mesh and put an emission shader on it. Then position it how you like best.


What values should I use for light paths? In a relatively simple interior room, what value do I need to use for a good-looking render?

There is no works-for-everybody setting. Basically it's a trade-off between render speed and image realism.

I would suggest to turn down each number of bounces to 0, just so you see what happens then. Then start increasing one of the numbers, and see how it affects your image. The aim is to keep the numbers as low as possible (to get a fast render) while keeping them high enough so that the image looks the way you want it to.


Create refocus effect for a image? I have got this image:

The idea is seperate the image to two using mask in U/V image editor, then blur each one to make it look like the camera changes its focus from the man to the ipod:

I've got the mask. But how I do that in node editor?

Blend file:

Ok I got it here. It's hard to do this in only blender. Using photoshop would simplify this..
    The idea is simple. Open photoshop (or GIMP whatever..) => load the image in => Cut it into two (Each one has a focal point, near and further) => Export them as PNG => Load the two images into Blender => Composite them, blur each one at a time to fake this defocusing effect!


How to make a thick, smooth metal coil using plane extruded along spiral? I'm making a metal coil as per the picture below by extruding a plane along a spiral curve. I've added Fill Caps to make it solid

I need the coil to look smooth but the top and bottom to be sharp so I have added an edge split modifier and Subsurf modifier.

This works except for the ends of the coil which Blender tries to smooth as well instead of treating them as 90 degree angles.

Is there any way round this without turning the curve into a mesh?

I was able to create a spiral as you see here by using the spiral addon.

Note that I used 80 steps.  This is where you get a smooth spiral without using edge split or the subdivision surface modifier.

The bevel profile object was a nurbs circle that I subdivided and changed into a square.  Then I stretched out the square to give me the rectangular shape I wanted.  I can give you more details about how I used subdivide on the nurbs circle to make it into the rectangle if you want.


Landscape topography from grayscale image Trying to do some golf course layouts in 2.73a. Would like to use topo elevation info. Currently have grayscale .jpg of site - top view. How do I get this into Blender as a "lumpy" plane?

Import an image with the Images as planes add-on, to create a plane with the same proportions as the image you want to use on the landscape.

Enter edit mode Tab, and subdivide your mesh.

(On version 2.7 press W)
Start with 100 subdivisions.
The number of subdivisions will be directly proportional with the level of detail for your displacement.

Exit Edit mode (Tab)
Add a displace modifier with the following settings: Direction Normal, Texture Coordinates UV (The UV map has been generated automatically when you use the import images as planes)

Assign the texture to be used with the displacement modifier.

Your plane will deform using the texture.

At this point you can subdivide further or add a subdivision surface modifier for better detail. To control the height on the deformation play with the Strength value on the displace modifier.

But be very careful with the subdivision modifier. It is quite easy to create a very large number of subdivisions, and that might push your system's performance to the edge or make it crash. Read:
Blender render crash when using subsurf modifiers.


Absolute rigging fails as my mesh is distorted Really new to Blender and 3D modelling as a whole but as it's part of my college module I really need to learn it quickly.

Anyway, I was following a tutorial on rigging and I believe I followed the instructions precisely, however when I apply the armatures to the mesh and move them around in pose mode I end up getting some sort of Junji Ito styled abomination. Some help would be really appreciated!!

This is how the model should look with the bones overlaid:

And this is an affront to humanity.

Well from the second image your issue is that not all meshes are parented to the bones.

First off, use the mesh with already applied weight painting. Go to weight painting option when selection the mesh and then see where the weights of bones are applied under Vertex groups (downward triangle).

Go through each bone and if you added automatic weights, edit them by selecting Draw or delete extras with Subtract brush on top left.


animation is not rendered if i set start at 50 when i render my animation the final result is a number of png with no movement (when i edit them in premiere).

Mostly if a set the first frame unlike 0 (at 50 for exemple).

The animation is a particle System hair, with a wind as external force field with a noise to move it. I'm not using keyframes.

Bake phisics animation before render. Press space and find Bake All Phisics:


How calc value of translate with constraint_orientation="VIEW"? I want to translate some vertices in X axis with constraint_orientation="VIEW" but I dont' know how calc the values??...

next code should work but  I don´t know how calc the value in this parameters
    values = (??????)(as vector)

bpy.ops.transform.translate(value=values, constraint_axis=(True, False, False), constraint_orientation="VIEW")

also I tried with bmesh but then I have a lot of parameters with less values

thanks

To calculate the values you convert the original value using the orientation matrix to the world space  :

  values = intended_value * Orientation_matrix

in the script this would be ( moving 1 unit on the X-axis of the view ) :

import bpy
from mathutils import *

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        viewport = area.regions[4]
        v_m = area.spaces[0].region_3d.view_matrix  #orientation matrix
        #vector conversion from view space to world space
        values = Vector((1,0,0))*v_m
        #the translation is done in global orientation without any constraints
        bpy.ops.transform.translate(value=values)
        #bpy.context.object.location += values   #another way to translate
        print(values)

for bmesh operator (the calculation is done inside the operator ) you pass the translation vector and the matrix of the space used for this translation :

import bpy
import bmesh
from mathutils import *

#get the view matrix
v_m = None
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        viewport = area.regions[4]
        v_m = area.spaces[0].region_3d.view_matrix

#create a bmesh
obj = bpy.context.active_object
bpy.ops.object.mode_set(mode='EDIT')
bm = bmesh.new()
bm.from_mesh(obj.data)

#translation
vec = Vector((1,0,0)) #one unit on the X-axis
all_verts = bm.verts  #the vertices to be translated
bmesh.ops.translate(bm, vec =(1,0,0), space = v_m, verts = all_verts)

bpy.ops.object.mode_set(mode='OBJECT')
bm.to_mesh(obj.data)


Mesh is disappearing in Orthographic View? Is there in Perspective view My character mesh is showing up in Perspective view just fine, but completely disappears in Orthographic view, I have no idea why. This is brand new, as I've been switching back and forth. It's not hidden or anything, and it just disappears entirely. Anyone know how to fix it? XD Thanks...

Select your Model
Switch to Ortho (nothing will be shown)
Then choose View Selected from the view menu as shown below or using the Numpad .
Then select View-> Front Numpad 1


Text on a curve with consistent length I have several circle curves that will have different text objects wrapped onto them. Each text object is a string of 64 random characters. The text should exactly fill the size of the circle without any overlap or gap. But different letters are different sizes. Depending on what is randomly put into them, I'll end up with them being too short or long for the circle.

I need a way to keep the text to a consistent length, but the font size needs to stay the same. How can I do this? I suppose if there's a font with all the letters being the same width that would work. But it seems what I really need is for it to adjust the distance between the letters to make sure they fit.

Is there a way to do this? Something like the Fit to Curve option on the Array modifier, but for text?

Maybe what you are looking for are Monospaced Fonts

Monospace fonts are often used in programming, code editors and command line environments and use the same space between characters regardless of the glyph width.

Just pick any monospaced font file for use in a Blender text object and it should solve this particular case.

If you don't have one you can freely download any from the internet.

If all strings will have the same length then it would solve your problem, otherwise you would have to find a way to adjust character spacing on a case by case basis.


Armature pose different in modes. Yes, I have reset the positions As stated in the title, my armature's position is changing slightly from one mode to another. I have reset the location, scale and rotation but i can't get the leg straight. Help would be greatly appreciated. I'm willing to provide a download link to the blender file if it's required.

It's really hard to see a "slight change" when all you provide is two pictures, one on top of the other.

I see you have two green bones, meaning they have constraints on them. May those be "Child of" or "Stretch to"constraints?
In which case, when you make a change in your rig, you need to go in each of these constraints and click either set inverse button for the "Child of", either Reset button for the "Stretch to".

If you don't wanna bother about going through each bone and clicking buttons everytime you change something, I have some python scripts for you.

EDIT: also check the IK's pole angles.


Can vertices around a face be selected without the face selected? Oftentimes I like to make the edges of a beveled object use a separate material than the actual object itself.  For example, the bevel on a table, a picture frame, or a door frame might be different than the material in the center.

When I select the adjacent faces around an object — as seen on the left — the middle face is always selected.  This means that I cannot set the middle face's texture to something other than its surrounding faces.  On the right is an example of what I want, achieved with face-select mode.  Unfortunately, it doesn't work with vertex groups.

I need a straightforward way to set different materials under these circumstances in one object.

The reason it selects the middle face as well is because you are in vertex select mode. To select the outer faces without selecting the middle one, switch to face select mode  and do so (you can cycle through the selection modes with CtrlTab).  To select the loop (the vertices going around the middle face), you can hold Alt while right clicking on an edge.


Using add-ons for commercial use Can I use any blender add-on commercially? I've done some research on the topic, but it seems kind of confusing. Blender comes with pre-installed add-ons which are made by developers and the community. Can I use these add-ons for any purpose. What about add-ons from the web? From what I can gather, once your get the add-on, you can use it for whatever purpose, but I would really like a clear answer.

FAQ — blender.org

Can I use Blender commercially?
Yes you can. Any creation you make as an artist with Blender is your sole property, and can be applied for any purpose you choose to. This also applies the Add-ons and Python scripts you write for Blender.
If you like to distribute Blender itself, you have to be aware of the GPL rules, which basically means you have to make sources for Blender available as well. However, in general it’s sufficient to provide information that forwards to blender.org.

All software nowadays should contain licenses, no exception for Blender. License — blender.org, which the licenses of Blender itself is basically using GNU V2 and V3 but some of the component is a slightly strict license. eg. Cycles: Apache 2.0
If your usage contain any modification of Blender and redistribute it with commercial license, it will probably cause some problem since that's not what GNU wanted. But if your just using Blender to creating content, it will be fine.
And there's also an interest point is that, Sharing Blender or Blender add-ons or scripts is always OK and not considered piracy.


Adding Material to Cycles Material library in Material Library VX addon I want to add a material to the Cycles material library in the Material Library VX addon. But can't get it to work.

I can create a new category. What is not working is to insert a new material then. I press the add button, the status bar above tells me that the material is added. But it is not.

So what is the trick here? What is the exact procedure to add a material to the Cycles material library in the addon? What do i overlook here?

Got it working. It is possible. But a bit tricky. The filter category has to be off. Then it works. The steps are:

Turn filter categories off
Save Blend file with your new material.
Insert selected Material
Select material in the addon list
Switch to the category where you want to insert it.
Click at arrow button
Turn on filter categories
Refresh Library by clicking at the Filter Category button.


Is blender actually useable for engineering? A moving design would be the final goal, but first I need to build complex shapes based on geometry as 3D modeling for engineering.
Does blender have a work tree where you can rearrange the order of actions taken?  How do you manipulate basic shapes like circumference and length of a cylinder?  Can you extrude and revolve or array and mirror?  Are work planes easily defined and inter-related?

TL:DR Blender is a weak app for actual engineering work, it's not a CAD software. - Instead try free CAD apps like FreeCAD, NaroCAD, SolveSpace, DesignSpark Mechanical, OpenFoam for CFD and I am sure many others.
I can recommend Blender for modeling objects to which you already know their design and parameters and you are sure the shape is mostly final (like modeling your living room or a part that broke and you need to 3D print it). Good for organic modeling through sculpting too. Blender is an app designed for animation studios and entertainment industry. Engineering workflow in Blender is slow and full of workarounds. You'll be fine with simple shapes, but not with engineering anything slightly more complex.
The bad:

There are no work planes
The modeling workflow is generally destructive
The procedural stuff (modifier stack, object nodes,..) has big limitations
You cannot easily constrain geometry elements together (parallel, tangent, etc. relationships)
NURBS or parametric surface tools are practically non-existent, so everything will be made from polygons. This can bring whole lot of problems you don't want to deal with.
No easy export into technical drawings

The good:

There is modifier stack providing functionality like Mirror, Array, Revolve, Boolean, etc. The stack itself is like modeling history tree. But some of these modifiers do fail if they encounter non-manifold mesh or flipped polygon normals. It's not exactly fool-proof.
You can tag measurements with MeasureIt addon
Blender is quite capable with 3D printing your stuff with the help of 3D Print Toolbox addon
With Sverchok addon (or Object nodes that are coming into Blender) you can create geometry procedurally - it is similar to Rhino's grasshopper
Visualization of your models is top notch, you can go photoreal


v2.8 beta EEVEE, transparent mask is black instead of transparent I need to apply an alpha texture mask over a texture material in order to be transparent in the viewport. As is, it is black in EEVEE.

How do I modify this file to make the viewport show the mask as a transparent in the 3d view?

For it to work I changed the Blend Mode to Apha Clip. That's all it needed for it to work.

Materials tab> Options> Blend Mode> Alpha Clip


Multiple named animations I am new to blender and I am trying to model, texture and animate a character like the avatar from Minecraft and I am stuck on the animation part.

What I would like to do is to create several animations (Stand, Walk, Kick etc) by using rotation keyframes for the various body parts.

What I can't figure out how to create some sort of group, like Walk, than have several actions inside it.

I thought I was going to be able to use the Timeline to keyframe the body part and then somehow associate and name that in the Dope sheet but I am stumped at this point.

(I am trying to do this without rigging the model)

You can join the parts to a single object and animate shape keys. Not 100% what you asked for, but this could be a good work arround.


Making updates to an environment that I've camera projected I have a question about camera projection that is pretty specific – forgive me if the question is basic, I'm a beginner to Blender having just migrated from Cinema 4D.

I have a photo of an old-timey street I'd like to camera project onto basic geometry to be an establishing shot. I know how to do it up to that point, but for the real shot of course I wouldn't like to use a decades-old low resolution picture. My idea would be to, once I have the projection set up, recreate the storefronts and surfaces with modern image textures, but it also doesn't feel very logical to do so in the original perspective photo when I already have that projected onto geometry in Blender and therefore can create undistorted images for, allowing for more camera movement and so on.

What would be the best way to go about this? Should I UV unwrap the projected texture and work on the unwrapped image in Photoshop, replacing the parts I want to, and then just update the texture in Blender? I feel like this would work but some of the unwrapped textures would be heavily distorted in the unwrap and hard to identify as a flattened image, so I wonder if this is a common process that can be done in a more accurate way.

Thank you!

Sounds like you're on the right track! Depending on how much detail you need to fix, Blender's UV Texture Paint can save some time between Blender and Photoshop. This tutorial goes in-depth about projecting and fixing parts of an image and provides a decent workflow.


Getting msg "could not write image: no such file or directory" This suddenly started today when I attempted to save an image file (save as image).  I have tried different directories, different blend files, and still it will not save the file.  Any suggestions would be appreciated.

Okay, found out it is not a blender problem but a Windows 10 setting.  I changed the Controlled Folder access in the windows security settings to on and that caused the problem.  Changed to off, and problem disappeared!


ON/OFF switch for smoke simulation effectors I'm doing a test on a project with different field effects,"WIND ,VORTEX ,TURBULENCE ... etc." and I would like to try each effector independently of each other without having to delete other effectors in the scene.

Is there a simple on and off mechanism for an effector that will disable unwanted effectors?

This is controlled by the Field Weights section of the domain object's physics panel.

There are dials for each type of field, which you can set to 0.0 for OFF and 1.0 for ON.

Another way is to create a collection and seet the effector collections. Put the active field effector in that collection, all other effectors will be ignored for the purposes of the smoke simulation.  Then swap out the effector when you want to change to another field effect.


Where are my UV coordinates! I'd say the title is pretty self explanatory, but to elaborate:

I'm busy trying, unsuccessfully, to fix a mirroring problem caused by fixing a mirroring problem. Had it unwrapped and needed to fix something and, wouldn't you know it, mirroring the fixes over caused an overlap in the UVs. Now that I'm trying to fix it it says nope and they vanish as soon as I try to manipulate them or shift the view around.

What could make the UVs vanish & become uneditable? How do I get them back?

NEW INFO
It seems that the UV coordinates show & are editable on only one of the six textures present in the blend file. I was giving blender "pseudo-substance painting" a try so maybe the new texture setup doesn't agree with... anything.

I hope someone has had this problem & solved it cause I'm at a loss.

I discovered the problem!

I needed to to undo the tangle of my shader nodes and leave the normal map as the only thing connected to the normal node of the principled shader. Then it stopped freaking out.

So if you have this problem temporarily rearrange your shader nodes to have exclusively the textures you're working on connected.

I answer my own questions a lot I'm realizing.


Boolean and bad topology I am working on a scene with differents buildings, pierced with arch-shaped windows.
Given the number of windows, using the boolean modifier would allow me to do it quickly. But since once applied, it generates a bad topology, it becomes difficult to edit the mesh afterwards.

Is there a way to use the Boolean modifier while preserving the topology? if not, do you have any tips to quickly model these windows without using it?

Go to sculpting remesh is on top or right bar depending on tool aligment. remember to use adaptation this one is useful where you have lot of flats check out quads too


Colours relations in blender? So I was just wondering what all the colours mean in blender.
For example:
Yellow is keyframe relation?

Green  is between  keyframes?

Also seen a purple coloured things, for the lack of a better word, can anyone point me to the wiki if possible and tell me the name of this phenomenon?

I would recommend looking at the themes section of user preferences. There you can not only find out what all the colors mean but also change them.


How to display overall furniture dimensions? This is a follow-up question.  I have enabled "Edge Length" in Viewport overlays, however since the furniture designs I work with consist of many many different parts, enabling "Edge Length" displayed all these parts' dimensions.  The end result was clusters of numbers piled on top of one another.  Please see attachment 1 for visual:
As you can see, the bounding box is not displaying the overall dimensions contrary to my intention.  I used "join" to group all the parts, but apparently, the parts were still treated as individual parts by the "Edge Length" setting.
Is there anyway to get overall dimensions in my scenario?  Please see attachment 2 for my objective.
Thank you very much!

Select the object, and in object mode, hit N to bring up a toolbox. Make sure the "Item" tab is selected, and the dimensions are shown at the bottom.

If you want to change the units, click on the Scene button on the right-hand side, and open the "Units" tab.


Extrude multiple edges with normals I have the following problem:
I have walls with (wood) panels. I want to (extrude?) the blue edges so they look like the red marked one...
When I select all the edges and extrude & scale them, then they will also be scaled on "the wrong axis"...
I'm very new to Blender and have no idea how to do that... a keyword would propably do it, because english is not my first language and i don't quite know how to express myself...

Select your loops
Press 'Spacebar'
Type in: Extrude and Move on Indiviual Normals


How to undo or remove a keep offset on a bone? I want to remove an offset I created for a bone but don't know how to remove it...

Select the child bone, Use shortcut Alt + P then pick the option that suits better your situation.


Object doesn't have surface inside? Why does this happen when I cut off the top of a cylinder?
When I turn it around, it will only show the texture from the front.

How can I get it right? Is it because it doesn't have an UV on the inside? How can I get this best?

This usually happens when you have Backface Culling enabled. Make sure it is unchecked as shown on the picture below.


How do I match the range of a distance driver to the value range of a key shape? I have a key shape of SUSPENSION going from fully squashed to fully stretched.

The key shape is for the suspension of this vehicle rig.

The key shape is 100% weighted to an IK bone.

I've also created two small cubes that are weighted to the bones directly above and below the key shape (the varying distance between these two cubes will be used by the driver).

The maximum distance the cubes will be apart is ¬2.6 blender units.  (Blunits?)
The minimum distance is ¬0.7 blunits.

I put a driver on the Shape Key value, and set this to Sum Values, then selected the two small cubes to provide the distance.

I've moved one of the cubes closer & farther from each other and the driver works! The key shape of the suspension changes.

Now I need to adjust the range of this distance driver so that it matches to where the min + max values need to be in relation to the rig.

...but I don't know how.  Any help would be greatly appreciated.  Thanks!

You need to setup Driver's F-curve. It shows how distance between objects (horizontal)  corresponds to  Shape Key value (Vertical):

So if distance 0.7 corresponds to Shape Key value of 0 and 2.6 corresponds to 1, You need to create a line between this 2 dots in drivers window:


Selecting other vertices connected to a selected vertex of a mesh object As shown in the figure, I want to select the vertices that are connected to a selected vertice. In the left side of the figure, you can see a vertex of a cube is selected. My task is to select the circled vertices as shown in the right side of the figure.

I've tried "Ctrl+numpad+" (Grow selection), that gives me incorrect results as seen in the right figure, it selects some other vertices too (marked as question marks). Please advice me a way of doing the same and preferably in python script as I need to do this for a whole lot of objects.

What you're looking for is the 'select_more' operator under bpy.ops.mesh:
bpy.ops.mesh.select_more(use_face_step = False)

We're using the use_face_step = False parameter, to ensure it only selects linked vertices, not linked vertices via linked faces.

If you don't want to use operators, you can also use bmesh in a slightly longer script:
import bpy, bmesh

# Assuming active object in edit mode (for bmesh.from_edit_mesh)
mesh = bpy.context.object.data
bm = bmesh.from_edit_mesh(mesh)

# Get active vertex (assuming there is only 1 selected)
last = bm.select_history[-1] # history.active doesn't exist anymore...
                             # and last is a list, of one element

# Select all connected edges
for e in last.link_edges: e.select = True

bm.select_flush(True) # will update face selection

# this line is needed to close bmesh and see the result of the selection
bmesh.update_edit_mesh(mesh)


Instant Remesh Blender add-on error in blender 2.91 I'm encountering an error when trying to use instant_mesh_remesh add-on in blender build 2.91. I followed the exact steps in https://blender-addons.org/instant-meshes-remesh/. When I try to use the use it from the object context menu, I get the following error.
Python: Traceback (most recent call last):   File    "C:\Users\Dreamscapes\AppData\Roaming\Blender    Foundation\Blender\2.91\scripts\addons\aa.py", line 135, in execute    subprocess.run(cmd)   File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\python\lib\subprocess.py", line 488, in   run    with Popen(*popenargs, **kwargs) as process:   File "C:\Program Files\Blender Foundation\Blender 2.91\2.91\python\lib\subprocess.py",  line 800, in __init__    restore_signals, start_new_session)   File "C:\Program Files\Blender Foundation\Blender
2.91\2.91\python\lib\subprocess.py",    line 1207, in _execute_child    startupinfo) FileNotFoundError: [WinError 2] The system cannot find the file specified
       location: <unknown location>:-1

Under this addon's settings when you first select the Instant Meshes Executable it uses a relative path. Manually set the full path to the EXE.


shadow clipped when zoom out ( eevee ) I like the shadow here but when the camera zoomed out,
the shadow gone. Is this normal? how to fix this?

I guess you are using a Sun lamp? Have a look at the Max Distance under the Cascaded Shadow Map.


Install latest Blender to Debian I don't know how/where to put the files for Blender. From the repositories the only version available is 2.63, but I want 2.69 of Blender. Downloading the files straight from blender.org gives me an executable program, but how do I place it on the machine as if it were installed through the repositories via apt-get?

Such as shortcuts and everything.

Thanks

On Ubuntu, there's a PPA, so you can run the commands in the terminal

sudo add-apt-repository ppa:irie/blender
sudo apt-get update
sudo apt-get install blender

and you'll have one of the latest builds of Blender (read more here or visit the PPA's website here).  WARNING: This won't be the official stable release, but the most recent version of Blender as of a few days ago.

As for Debian, I believe that Ubuntu PPAs can be used on Debian too.  It seems like a bit of work, so hopefully someone else has a better solution.


Why are the edges of the corners of some of my objects curving off after I render? So I’m making a low res PS1 style scene, and a couple of the objects in my scene have their edges curve off after I render the scene, such as the checkered floor here -

However sometimes it fixes itself after I go straight from edit mode of that object to render mode ? This is how it should look -

Could anyone tell me what’s causing this or how to fix it ?
Thanks !

It looks like you're using a Subdivision Surface modifier with the viewport level set to 0.

When rendered with the Catmull-Clark algorithm this adds extra faces based on the Render setting and interpolates their location.


Is it possible to Highlight all Animation keyframes in the dope sheet and make all frames stick to a specific location, all at once? I downloaded two animations from Mixamo and imported it into blender. Both animations are an idle animation and a random action animation. The action animation starts at a completely different location when compared to idle animation that starts right in the middle location of x,y, and z.
This action animation has over 40 key frames and was wondering if its possible for me to highlight all keyframes of the animation and change all frames of the animation to be in the same location at once. This is so I don't have to change the location of every frame individually. Would appreciate any help.

I'd do as @Policesate suggests, make a backup of the original Blend file, then - Try making a master parent for the model.  From there the included animations should become local to the parent.  Either enter in your desired location for the parent or simply drag it there - keyframe that.
The included animations should stay with it.  If they've keyframed the root bone, and it takes the model somewhere else for the idle state or other action, go into the Graph editor and drag all of that action's X/Y keyframes up or down to drag it back.  Press G Y to ensure you don't drift sideways in the editor.


My trees are being blown too fast and my grass is not affected by my wind physics after a few seconds So I did a massive mistake with my tree and grass, and did not target this problem before rendering. The leaves on my tree are being blown too rigorously, and my grass stops being blown after 2~3 seconds. What do I do to fix this? Can somebody please fix this for me? I feel like it has something to do with the wind physics. (I cannot add a file as it is too large, so please bear with me).

As your file is not added so I cannot tell much but still i can give you some idea. I hope your grass is using a particle system and it it is true then you can just increase the strength of wind on grass instead of increasing it overall and for that just go to field weights in particle(Hair) settings and increase the wind strength to 5 - 10 or as high as you need.
Let me know if this works for you.
If not then comment it down and i will try to give you another fix


Is there a render engine with complete GPU support and Blender integration Is there any rendering engine for Blender that only uses the GPU?

I know that Cycles and Luxrender can do this but not all materials work
In gpu mode. So what I am asking is are there any rendering engines which are able to render exclusively on the gpu.

Octane Render is the world’s first GPU based, un-biased, physically based renderer. Octane Render runs exclusively on Nvidia's CUDA technology.

You can check on Wikipedia:

https://en.wikipedia.org/wiki/Octane_Render


Object is not showing Wires in wireframe mode and turns into invisible type black in Material preview mode I just downloaded Blender 2.83 LTS version and Blender 2.91 and encountered a very weird problem.
When I open Blender and add any object, whether it is any mesh or I import any file, it doesn't show the Wireframe in wireframe mode, and also it doesn't show anything in material preview mode.
It shows the object in rendered mode and that is also only if I switch my render mode from Eevee to Cycles. Everything is visible only in the solid mode in every render setting.
When I am using Blender on my laptop with some old 2 core Intel processor and 2GB Nvidia Graphics card, everything is working perfectly fine but my laptop is not powerful enough to work on.
I checked everywhere on the internet for similar problems but no one posted the solution related to this.
This is how it looks like https://www.youtube.com/watch?v=YtpySO4vK_I.
I changed and tried all systems setting in preferences and switched Blender versions but nothing worked. Moreover, it doesn't show the vertices in vertex paint mode also. Please help
My configuration is:

1950X processor
RX 580 graphics
and Windows 10 Pro

If you turn on High Quality Normals under Performance in Eevee it will fix most of the issues but not all, the Wireframe will still be an issue but at least you won't get that black shadow object.
I bet you have an AMD graphics card, the drivers that work for me are 20.9.2 (late September)


Rigify/Armature - additional bones cause unwanted deformation I made simple humanoid low-poly character/model for testing/prototyping.

Character has extra "weapon" bones attached to palms. The idea is to parent weapon objects to those bones, which would allow me to rotate blades/guns/whatever independently from hands.

However, once I create "rigified" rig, rotating those bones (which show up at FK layer, by the way) cause unwanted deformation of fingers.

I checked mesh in weight paint mode, this is not problem with weight, actual skeleton is being deformed. (It is visible in the last screen).

Why does this happen, how do I fix this, and is there alternative/better way to make "weapon" bone?

I do suspect that "weapon bone" somehow interferes with inverse kinematics, but I'm not sure how to proceed from there.

Model is animated with inverse kinematics, with all FK/IK sliders set to IK on arms/legs.

I created weapon bones by selecting "hand", extruding it twice, then deleting middle connecting bone.

Aside from having extra bones for weapons, it is pretty much stock metarig with slightly adjusted bone positions.

I'm using 64bit blender 2.74 on windows 7.

Here is file with the rig (without geometry/animations). It is saved with weapon bone selected.

Your ORG-palm.0# finger bones (the base ones) have constraints copying transforms from the ORG-weapon bone.

The constraints were probably targeting different bone originally (hand probably).

Delete those constraints or re-target them to ORG-hand.

Why don't you use Child-Of constraining for picking up objects/weapons? I think you don't need the weapon bone, this seems very non-standard.


Particles falling through plane with collider I have particles coming out of an extruded half circle on top of a plane but they keep falling through even though I have a collider on in the plane. How do I fix this?

First thing that comes to mind is that you need to make sure that the emitter and the collision object need to share the same layer for them to affect each other in physics simulations. From your screenshot it looks like you are using at least two layers, so maybe that's it?


Workspace grey blank When I work with 2 split screen, one screen has a blank gray. I don't remember if there is a letter button that was pushed accidentally.

This fullscreen picture

Who knows my friends all have a solution, Thank you very much :)

Look at the top. It says "Back to Previous" -> That's how you get back.

What happened is that you accidentally hit Shift + Space Bar. This makes the current View go full screen. (The one your mouse is over)
Alternatively you can just hit Shift + Space Bar again.

EDIT:

On the other hand, if you have trouble finding the geometry in your 3D view, you can either use Shift + C as pointed out by @HenrikD or, press "." or "," on your Num Pad to center the view on a selected object.


How can I disable symmetry in sculpting mode? I know this has probably been asked before, but I'm watching a tutorial where the guy's sculpting and telling you to disable Symmetry X under the sculpt menu.

The video:

Mine:

Press N to enable the properties window. In the tool tab you will find the symmetry options.

Or they can also be found in the properties tool panel on the right.


Paste x-flipped pose is all jacked up Whenever I try to paste the x flipped pose it gives me a completely distorted pose.

The names are flipped (.R on right and .L on left)

Your .gif doesn't look like it, but if you are following the following procedure:

Select bones
Copy pose
Paste x-flipped pose

Then, you may have a whole mess of mismatched rolls, so:

Select armature and switch to edit mode
Select all bones
Press alt-R to clear roll, or select from the menu Armature/Bone Roll/Clear Roll


Blender 2.79 - Can't find Spiral tools in toolbox This is my first time working with 3D modeling. I thought Blender would be a good one for a beginner. I decided that a necklace would be a good first time project to learn blender.

However, the necklace has spirals, but I can't find the spiral tools anywhere in the tools menu. I've searched for about a half an hour on how to get the spiral tools, but every answer is for an older version of Blender.

If you are completely new to Blender, you really should follow a tutorial. I highly recommend Blender Guru's introductory series.

There are a few ways you could approach your problem. The easiest way would be to extrude(select and press e) and rotate(press r and lock it onto an axis by pressing x, y, or z). If you wanted to be more precise, you could use a curve, and taper it with another circle curve. However, this is rather excessive for someone inexperienced. It will take time to get the hang of Blender.


How do I motion track a camera when the scene contains more than one camera? I'm recreating my house and garden in Blender and as part of the process I'm taking photos from several angels and then motion track them. I've done this on several locations around the property.

As part of a non destructive workflow, I don't wont to delete a camera with it's associated photos when I move on to motion track on the next camera.

How can I choose which camera gets the data from the motiontracker?

Rename the "sets" of photos, so that they are seen as a single image sequence with continuos numbering.

Track specific elements that are common in different "sets" of images.

Use "Join tracks" in places where the tracked items are not recognized, or change placement dramatically, become occluded, or re-appear.

Read the following links: Joining 2D tracking markers with an offset and Motion Tracking objects that go out of frame and re-enter later


Python, blender and weird rotate behaviour after restoring matrix I am trying to save user matrix and set it back later when needed
But after restoring the matrix the rotate function is behaving weird
As if it is 4D instead of 3D. And t seemt the wrong view.
What i did was open a default file and zoomed in. took these matrix values and placed them in VM. After restoring the view looks different.
I tried to search for similar posts but could not find any answer
Code i use is,
EDIT THE CODE ADDED
this is the code
import bpy
from mathutils import matrix

vm = ((0.9077774286270142, -0.4194521903991699, -6.8628960292471675e-09, 1.434309720993042),
        (0.3097465932369232, 0.6703528165817261, 0.6743027567863464, 0.9151758551597595),
        (-0.28283774852752686, -0.6121168732643127, 0.738455057144165, -0.902187168598175),
        (0.0, 0.0, 0.0, 1.0))

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        v3d = area.spaces[0].region_3d
        if v3d :
            v3d.view_matrix = vm
            v3d.view_perspective = 'ORTHO'

Before running script

After running script.

What am I missing here?

In order to use the Matrix class you can either use import mathutils and mathutils.Matrix() to initialize an instance or from mathutils import Matrix and then Matrix().

import bpy
import mathutils

view_matrix = mathutils.Matrix(([0.9077774286270142, -0.4194521903991699, -6.8628960292471675e-09, 1.434309720993042],
                                [0.3097465932369232, 0.6703528165817261, 0.6743027567863464, 0.9151758551597595],
                                [-0.28283774852752686, -0.6121168732643127, 0.738455057144165, -0.902187168598175],
                                [0.0, 0.0, 0.0, 1.0]))

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        for space in area.spaces:
            if space.type == 'VIEW_3D':
                v3d = space.region_3d
                v3d.view_matrix = view_matrix
                v3d.view_perspective = 'ORTHO'
                break


How to enable MSAA on editor I have 1680p display, which makes lines in Blender just horrible. How can I enable MSAA or any equivalent on the editor? I have a GTX 970. I already tried to enable it in Nvidia Control panel but it makes the UI blurry.

Enable Multisample in User preferences > System:

Note that you might have to restart blender for the multisample setting to take effect.


What are "Leaf" bones? (Collada import question) I was wondering - there is an option called "Fix Leaf Bones" when importing Collada format. Do you know, what exactly these Leaf bones are?

Also, if there is some expert able to tell me what the other options mean, Id much appreciate it!

I'm not versed in armatures or rigging, nor an expert in that matter, but a little Google research yielded some results about it.

From the Makehuman bug tracker we can learn that apparently most applications and file formats don't store bone length information. This is normally not an issue, since bone length is rarely a needed information. In most cases it can be extrapolated from child bones.

A bone normally extends from its head until it's child's head, length is implicit and can be calculated from the distance between these two points.

It can however represent an issue for end bones, on the extremities of the armature, where no child bones are present.

On such cases an extra fake dummy bone can be created exclusively to represent the end of its parent, and no other function of its own.

These loose bones at the end of an armature are then called "Leaf Bones" by analogy of a tree leaf, I assume.


How Can I make the World background Material to be checker Texture? I am making a cube whose material is reflective plastic [With Principled Shader], And now I want the background to be checker Texture,So that the cube reflect the texture giving a cool sense, My problem is when I choose the checker texture As a background I didn't know the scale of it to be small ... I tried a very big value and i tried a very small value but the two didn't work,what is the value could i choose to make the background checker texture ? I am using cycles render,blender v2.79

I want this to be my background ...

This is my settings [What is missing ?]...

Use a Checkered texture connected to you world background shader, then just provide it with correct texture coordinates.

From a Texture Coordinate node use the Window coordinate output to get a flat 2D-like background.

Adjust the size with the Checker texture Size parameter, and the proportions with a Mapping node.

They should be relative to the Render Output image aspect ratio you have set in the Render Properties tab. For example if rendering at 1920x1080 you would get $1080/1920=0.5625$


How to organize an extensible and reusable object? I'm modelling an aircraft landing gear. I have currently done the wheel part only, but as it's just a piece of the whole landing gear, I would like to have it as a "base" object that can be used in many configurations. Some examples (not mine) are front landing gear

(source: foundation3d.com)

and wing landing gear

(source: aircraftrecognition.co.uk)

As you can see, the wheel itself is pretty much the same on either, but the part that connects it to the airplane can be very different depending on the configuration.

Should I create the different gear configurations by duplicating the wheel itself and editing? Or are there better methods where I can have only one wheel model (like an array modifier)? It seems to me the multiple objects approach (wheel, gear) is clumsy as I can't control how exactly the wheel connects to the gear.

Alt+d (Duplicate Linked) might be what you are looking for.  By duplicating this way, when you edit one of the instances then all the others will be changed as well.


How do I check on objects Y or X location independent of the other variables? So I am trying to tell if an object has reached a certain point in the X range. I have been checking for position using Code:

Object.localPosition == ([x,y,z])

Then I use this to trigger events. But I'd like it if I can isolate one variable for more control.

Comparing floats
In general I suggest to avoid equal compare (==) on float values. The likelihood to get the exact match is pretty low.
Even when it is very close and visually there is no difference the values are not the same.
It is better to do a range check with < and >.
Components
You might argue that you compare a vector with a list. This kind of compare will perform a compare of the components (content of the container). As the components are float consider the first section (Comparing floats).
Unfortunately you need more range checks right now. Luckily you can reduce the effort by reviewing your requirements.
Comparing position vectors
Position vectors describe a location referred by a shared origin.
To compare two position vectors I recommend to check if the distance between them is below a certain range.
You can do that by calculating the vector between this two positional vectors and check it's length:
import mathutils
import bge

owner = bge.logic.getCurrentController().owner
positionToCheck = owner.worldPosition
positionToCompareTo = mathutils.Vector([1,2,3])

distance = (positionToCheck - positionToCompareTo).length

nearDistance = 0.000001
if distance < nearDistance:
   print("the positions are nearly equal")
else:
   print("the positions are too different")

Comparing single components
Rather than comparing the whole container (with all it's content) you get the component from the container and perform the compare on that component only. As the component is still float consider the first section (Comparing floats).
Example:
if abs(owner.worldPosition.x - 1.0) < 0.000001:
  print("the positions are nearly equal")
else:
   print("the positions are too different")

Be aware this ignores the y and z coordinates completely. Therefore this is a check if the position is near the YZ-Plane at X=1.0.
LocalPosition vs. WorldPosition
I hope you noticed that I defined position vectors as being referred from a shared origin.
A common vector has no position. It can be anywhere. Therefore a vector alone can't describe a position. You always need the origin where the vector points from.
Typically this origin (or reference point) is implicitly provided via context.
When you use KX_GameObject.worldPosition you get a vector that describes the position from the scene origin (0,0,0).
When you use KX_GameObject.localPosition you get a vector that describes the position from the object's parent's position.
This means the vector of worldPosition might be equal (or nearly equal) to the vector of localPosition, but as the origins differ, they do not describe the same point in space.
This also belongs to objects with different parents.
Remark
The origin is not the only context. You need to consider orientation and scale too. This is typically described by the coordinate system or space (scene space, parent space).
Imagine you turned the parent. localPosition did not change, but worldPosition did due to the rotation of the referred coordinate system. The parent space turned with the parent.


Why Won't this Object UV Unwrap? I'm using Blender 2.83.1, and one of the objects in my scene won't UV unwrap. Every other object in the scene is ok, except the one. I've:

Applied Rotation, Scale, Position
Cleaned up the mesh
Removed Doubles (merge by distance)
Set the Origin to Geometry

Every other object in the scene and new objects all unwrap with no issues, so I don't think it's my UV settings. I've removed all modifiers and textures and shaders, but I still can't unwrap it. I know the object in question is one that I could easily recreate, but I'd like to know what happened before it happens to a much more complex object not so easily remade. I'd be grateful for any advice on this!
Here's a link to the file (thanks Batfinger, for telling me about this!):

UPDATE:
Thanks for testing the file, everyone! It helped me narrow down the problem (my nooooobishness) once I knew the file or Blender wasn't corrupt. For all of the other objects in my file, I could mark a seam in edit mode, click "A" to select all, and click "U" to unwrap the object in the UV editor. For this object, I had to click "UV">Unwrap to unwrap this object. I'm not sure why this object was different than the rest, but that's 'cause I a noob. I'm sure I'll learn what I did in time! Anyway, thanks again, everyone! –

Unwrap shortcut U in UV Editor works only if any UV Map already exists.
If in Properties Editor > Data > UV Maps is not listed any, it does nothing.

By default new objects are unwrapped, so if you modeled them and then just updated UV Map it works from UV Editor as well.


Straighten UV Vertices Maintaining Relative Distance I'm creating long, winding strips as in the illustration below and need to make the edges of the UV map straight at the edges of the grid, so that the texture stretches across its width once and repeats height-wise.

I've been going about it in a time-consuming fashion, rotating the windy part at each joint until it's straight, then scaling all the side-by-side pairs to zero on the Y axis as well as each whole side of the ladder on the X. Other than being manually tedious, this also loses the relative length of each segment.

How might one efficiently "unwind" the UV map of such a strip while maintaining the segment lengths so that a texture will look uniformly accurate across its length?

Thanks.

You could try to start with a long rectangle in the 3D view (imagine your shape made flat), then use a curve modifier to make it similar to your picture. Doing that the shape stays straight and allows you to make the UV part straight too (as long as the modifier is not applied).


Script point light strength in cycles I'm working on a project and I want to have a script tell a point light to change intensity at certain times.
What I'm confused about is how to do that in cycles - the sidebar data tab says it uses nodes but I can't find where those output to? When I try light_object.active_material it returns an error saying it doesn't have that attribute. Is there some other way I'm not seeing?
Edit - I was looking in the data.lamps group and I changed to data.objects and now it's not returning an error, but it says there's no active material even though there is?

You can do this by adding an event handler to the frame change event.

import bpy

def my_handler(scene):

    fm = bpy.data.scenes['Scene'].frame_current

    if fm >= 1:
        lampStrength = 100
    if fm >= 50:
        lampStrength = 200
    if fm >= 100:
        lampStrength = 300
    if fm >= 150:
        lampStrength = 400

    scene.objects['Point'].data.node_tree.nodes['Emission'].inputs['Strength'].default_value=lampStrength

    print("lamp strength: " + str(lampStrength))

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

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

if __name__ == "__main__":
    register()

Credit for frame change portion of script here: Running a script for each frame


Why Blender export only exports one object out of a grouped object? I have an object which is a group of 6 cubes.

I grouped them using ctrl+G and I see a green outline around the whole object when selecting it. However, when clicking on a single part, it only selects that part, instead of the whole thing, but they seem to be grouped anyway.

When exporting, I hit 'Z', then 'B', select the whole thing, and then use the export button. It seems only the last selected object gets exported and the rest of cubes shaping the pistol are simply ignored.

Worth noting:

All these objects have a parent object which I used to move around the object once animated (so that it wouldn't impact the over all animation after moving its location somewhere else).
I'm using an add-on to be able to export .mdl files for Quake and this is the export settings I'm choosing.

What is exactly wrong? Is this an issue with the add-on not being able to export multiple objects as a single object? Is there any workaround I could use?

Thanks a lot.

EDIT: this is the extension I'm using - https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Quake_mdl
Using Blender v2.78c.

It turned out that this add-on requires objects to be joined, not just grouped. Ctrl+J did the trick.


Is it possible to get vertex locations (world) from a vertex group? How can I get the vertices location connected to animated bones?
E.g. the vertices of vertexgroup "foot.L" at keyframe 2?

Copy Location Constraint.

From https://blender.stackexchange.com/a/139758/15543

Can leverage the existing behaviour of the copy location constraint, targeted to a mesh, subtargeted to a vertex group.

Test script, run in object mode with mesh object selected. Will add an empty for each vertex group at the mean location (as determined by constraint) of each vertex group.

import bpy

context = bpy.context

ob = context.object
me = ob.data

for name in ob.vertex_groups.keys():
    bpy.ops.object.empty_add(location=(0, 0, 0))
    mt = context.object
    mt.name = f"{ob.name}_{name}"
    cl = mt.constraints.new('COPY_LOCATION')
    cl.target = ob
    cl.subtarget = name

  Thanks, this gives me the center of the vertex group. Is it possible
  to get the location of all vertices (not only the center)?

Or using another slightly updated example from https://blender.stackexchange.com/a/139758/15543

this one adds an empty parented to each vertex in the vertex group.

For vertex group named "Group" containing vertex index 3, there will be an empty object mt named "Group_3" parented to vertex 3.  At any frame the global location of vertex 3 will be mt.matrix_world.translation.

import bpy
from collections import defaultdict
context = bpy.context

vgs = defaultdict(list)
ob = context.object
me = ob.data
for v in me.vertices:
    for g in v.groups:
        vgs[ob.vertex_groups[g.group].name].append(v.index)

for name, vg in vgs.items():
    for i in vg:
        bpy.ops.object.empty_add(location=(0, 0, 0))

        mt = context.object
        mt.parent = ob
        # mt.name = "%s_%d" % (name, i) # for python < 3.6
        mt.name = f"{name}_{i}"
        mt.parent_type = 'VERTEX'
        mt.parent_vertices = (i,) * 3

Note would be a good idea here to jam empties into new linked collection, so they can be removed / hidden easily

Another way is to use one of the solutions outlined here

How do I get a mesh data-block with modifiers and shape keys applied in Blender 2.8?

for a modified mesh. However if you have a subsurf, for example,  will have a lot of extra generated vertices.


Why are there seams all over the mesh when a Normal Map is applied? I am making a game asset, so first I made a high poly model and then Decimated the duplicate using the Decimate modifier. Then I baked the Normals of the High Poly model on to the Low Poly model and gave the generated normal map to the Low Poly model. Worked pretty decent ignoring the fact that there were seams all over the model.

p.s. don't mind the different colours that just texture

In Edit mode below:

*Also incase some of you might be concerned, converting Tris to Quads did not help

I don't know should I Unwrap the mesh again or add more geometry, but it is already 7000 Faces, its already a lot for a game asset.

*The Alpha was checked all along, but the problems still seams to appear.I tried unchecking and checking Alpha, but nothing changes. Also I've noticed that the seams are mostly on the places where my edges in edit mode are, I dont know what that could mean, maybe the Normals map is not strong enough though it is on MAX

Save the normal map externally. Then select "usa alpha" in the texture properties and this gets rid of issues with margins and rendering.


Can't find draw all edges How do I enable draw all edges?  I researched a lot on google and all I got was go to display and check it. However it's not there!

Here is an example of what they told me.

Can someone show me how to do this?

It's in Properties > Object > Display:

Note that this option is only available on mesh objects.


How to exclude hair particles from Freestyle using Cycles? In blender render this is possible by disabling solid and freestyle in render layers. Cycles have use hair and use use surfaces checkbox, but disabling then din't exclude the particles rendering in the layer.
I forgot to mention that i'm using object particles in a scene that contains nature and a house. I'm trying to achieve a scene where the house have Freestyle lines but not nature related objects like trees and its leaves(emitted as particles object).

In the particle hair Render settings, check 'Strand Render':


How do I overlay a photo of a face over a character on a video? I downloaded an 80s cartoon intro (Jem and the Holograms; traditional cel animation) and I want to animate cutout photos of various family members' faces overtop the cartoon faces. Bonus points if I can apply some "worn out VHS tape" effect to the photo faces. Time permitting, I might even like to add some Terry Gilliam cutout jaw movement.

If I set up tracker points for the cartoon characters' eyes in the Movie Clip Editor, how do I get the photo face to follow these points, such that closely spaced markers indicate the photo face should be smaller/further away and vice versa, or approximate the head tilt like the popular "Elf Yourself" Christmas videos that were hot a few years ago? This seems doubly difficult since the cel animation has a lot of quick cuts and scene changes.

Track the element over which you want to overlay the image.

With the tracker selected got to the Solve tab and in the Geometry dropdown, click on Link Empty to Track.

That will create an empty that is parented to the camera and moves with the movement of the tracked element.

Add the picture of you want to overlay one using Import Images as Planes

Parent it to the empty: select the plane with the image and then while pressing Shift select also the empty and press Ctrl P.

Now your image will move with the empty.

You might want to enable the video clip as background image at this point to see the have a reference of the movement.

For elements that change size or perspective you create a Plane Track tracking four points of the video. The instructions on how to do that are here:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.69/Motion_Tracker

and an excellent tutorial by Sebastian König here

When you are done adding all the elements you want, you can render the scene using a node setup like this where you add your scene to the background video.

I'm just going to deal with the tracking part. The texturing should be a different post since it is a different question, and there is enough information  here and here on how to pull that off.


Does Blender no longer support Make Human file format? Does Blender no longer support the use of Make Human file format MHX1?

The file type is changed from mhx to dae and the mhx file type no longer shows up in Blender as a supported file type. I mention this as I see some creators
point out the changing of Blender settings in their tutorial videos that no longer match the current configuration and it makes it more confusing .

The MHX1 format is extremely old and has been deprecated (in favor of MHX2) for many years. MHX1 should not be used, and no modern version of MakeHuman supports it.

Contrary to MHX1, MHX2 is an add-on that needs to be installed. It is not bundled with Blender.

How to get MHX2 support is answered in a MakeHuman FAQ, see http://www.makehumancommunity.org/wiki/FAQ:What_happened_to_the_MHX_export_in_MH_1.1.x_and_later%3F

Quick summary:

In a Blender + MakeHuman 1.1.x setup, you need to install MHX2 from https://bitbucket.org/Diffeomorphic/mhx2-makehuman-exchange/overview
In a Blender + MakeHuman 1.2.x (currently in alpha) setup, both the MH side and Blender side of MHX2 are shipped with the MakeHuman zip.


Can't bend the arm properly i am new to blender and it might be so simple for you but for my is so time consuming, please can someone help me to bend the arm right.

Thank you!

The technique you're using is to organicly bend joints. Since your character is pretty blocky, I guess you're trying to make the joints move in a more anorganic way (like robots, minecraft characters and so on).

I recommend disconnecting the lower arm from the rest of your mesh and assign it's vertex group to the corresponding bone with the value of 1 in the vertex tab. Maybe scale it down a little so you don't have overlapping faces.

If you were going for a organic look to bend joints, the weights are painted too sharp. I recommend painting with the "Average Brush" in Weight Paint Mode to even out the influence of your bones. Once you're happy with the result you can use the "Blur" brush to fine tune the result.


Make a group of objects follow a curve I'm trying to make a railroad of some sort, but i've just hit a wall. When trying to use the array modifier on the object group, I couldn't find it.

I'm linking my objects between different blender files to keep modifying possibilities. And I'm grouping them so I don't have to apply a modifier to 15 different objects.

I can't join the objects, because that messes up my materials. And i've tried to make them parents, but that wouldn't follow from the source blender file to the parent file when dynamic linking.

Is there a way I can make an array of the group follow the curve or a way to link/join/group my objects together while keeping my materials and editing possibility so that I can use the modifiers a single object?

I hope that my problem is clear,
Thanks !

Above are 10 separate objects plus a red square.  10 duplicator objects have [Curve Modifier].  The 10 numbers are parented separately to a duplicator objects.  Duplicators 1-9 have one child.  The 0 duplicator has 2 children the zero and the red square.  For this small example the benefits of repeating elements is not very strong. Carefully planned object heirachy duplication or small Python scripts can make the creation more efficient.

The zero and red square are parented to the same object which are meant to represent a small child parent one level hierarchy.Further hierarchy has not been explored.

The jump is a mistake in the GIF production by GIMP.  The gray ring shows scale.  The gray square indicated movement in the x direction.

The yellow child cylinders have been duplicated by the parent object, the light blue planes.  The circular curve is a simple track.  The yellow cylinders have retained original shape, no deformation.  Click to see larger image above.  Note that some of the info has been pinned locked with the push pin icon, to achieve more information on one screen capture.

Typically a composed train object has parent object.  The train parent object can be parented to a plane duplicator.  You have included no images in your question so it has an mysterious quality to it. Lets guess that a train hierarchy has many cars and a car has many component Blender Objects.  Each duplicator face can control a train car indirectly via parenting. A small Python script may help in this regard.  One suggestion is to use many duplicator objects on the same curve.

Consider the

[Array Modifier] shown above and known in the original question
[Curve Modifier] shown above
[Duplication Panel] shown above ... see https://www.blender.org/manual/editors/3dview/transform/duplication/duplifaces.html
[Path Constraint] not shown

The curve modifier introduces shape changes, or deformation, so you must use another technique to control that if desired.  This can be viewed as good or bad. The light blue planes and red cylinder both have [Array Modifier] and [Curve Modifier].  The [PlaneDuplicator] modifiers are show above. The red cylinders look like seeds as the [Curve Modifier] deformation was intentionally shown to a large degree to emphasize a potential problem. Note the blue [PlaneDuplictor] objects have been deformed to a lesser degree into trapezoids.

Parent Child relationship plays the major role in Duplicator panel.  The parent duplicates the children.  The reverse might seem odd.

The duplication panel for the [PlaneDuplicator] is shown which indicates to duplicate the children objects on [Faces], in this case only a single face is present.

The Yellow Cylinder is parented to the [PlaneDuplicator].  This can be seen in image above.  The [PlaneDuplicator] is not rendered, this is the standard behavior.

Note the parent is deformed.  The duplicated children are not deformed.

Constraints can be copied by menu. Press [space] in the 3DView Window and type [copy] to begin matching.  The regular menu has this option.

By searching here at BSE you can see many questions about the

[Follow Path Constraint]

Note that there is not necessarily 100% coordination between the offset value in the [Follow Path Constraint] and the spacing you may need.


Changing the specular exponent of Principled BSDF with texture when exporting to Wavefront (.obj) I'm making models in Blender in order to export them to Wavefront format. I'm using an image texture connected to the base color of a principled BSDF, and that principled BSDF is connected to the material output. From what I understand, that's the only way to get Blender 2.8 to properly export the material with the texture to Wavefront format.

I'm having a problem though with the specular exponent (Ns) - for some reason Blender exports it as 225.000000, which is too high and messes up the lighting.

I tried changing each and every one of the principled BSDF's numeric values and export to .obj, but the specular exponent remained at 255. Do I need more nodes than Principled to do it?

EDIT: Almost forgot - I use this Python script when exporting to .obj:

import bpy
import sys
from os.path import splitext

target_file_name, _ext = splitext(bpy.data.filepath)
target_file_name += '.obj'
bpy.ops.export_scene.obj(
    filepath=target_file_name,
    use_materials=True,
    path_mode='STRIP',
    axis_forward='-Z',
    axis_up='Y',
)

The roughness of the Principled BSDF controls the specular exponent that is written into the .mtl file.

From the export_obj.py source code:

# XXX Totally empirical conversion, trying to adapt it
#     (from 1.0 - 0.0 Principled BSDF range to 0.0 - 900.0 OBJ specular exponent range)...
spec = (1.0 - mat_wrap.roughness) * 30
spec *= spec
fw('Ns %.6f\n' % spec)

Output for Roughness set to 1.0:

# Blender MTL File: 'None'
# Material Count: 1

newmtl Material
Ns 0.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2

Output for Roughness set to 0.0:

# Blender MTL File: 'None'
# Material Count: 1

newmtl Material
Ns 900.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.0 0.0 0.0
Ni 1.450000
d 1.000000
illum 2


Why can't I loop cut all the way around the object? How to make a loop cuts all around the object? I can select just one side and I need them all at the same time.

Here is what I need.

If the mesh already is triangulated you could use the Knife tool (K) in Cut Through (Z) and Angle Constraint (C) Mode when you are in a side orthographical view. This will let you add edges regardless of the topology.

But most of the time it's better to just un-triangulate it manually by Dissolve edge or with Tris to Quads (Alt-J) in the face menu (CTRL-F).

If you have ngons you can find them with the Select All by Trait/Faces by Sides and set the number of vertices to Grater than 4.

You will find it much easier to work with quads.


How can you change the rotation of a mirror modifier? I am trying to use the mirror modifier on a cylinder I rotated and edited, but when I apply said modifier it mirrors based off its original angle rather than the new one. How can I fix this?

This is not a direct solution to your problem (that really sounds like an "Apply rotation" problem), but it is a work-around that might allow you to achieve what you want.

Remove the Mirror modifier and instead add an Array modifier.
Add an Empty at the location of the original object.
Set the Empty as Object Offset in the Array modifier.
Rotate the Empty until you get a desired rotation.


How to fix the pulling corners on a smooth surface? As you can see the part around the handle is pulling really bad. Was it not enough divisions from the very beginning? How do I fix this problem without starting all over? Thanks a lot!

The main problem is that the handle is extruded from the middle of a face instead of from a proper "edge looped" one. Your model ends up with non quads just above the handle and subdiv modifier does not like that.... At this point you might be better off starting again from a cylinder with enough subdivisions for one face to match the size of the handle. Check out the difference in topology between the two models below. The left one started from a 10-face cylinder, the right one from a 20-face cylinder:


Creating a glass like material without it being transparent Any tips on creating a material that will be easily reconized as glass, without it showing anything behind it? (0 transparency). I'm making a vehicle that has glass windows, but I don't want to make the interior, so I need something glass like that will not show what is behind the glass.

You may achieve it using the Backfacing output of a Geometry node as a factor for mixing the Diffuse and Glossy nodes.

Set up the material nodes as pictured below.

Remember to set the Diffuse shader color to pure white and the Glossy shader Roughness value to 0.000. In the .gif above I added a blueish tint to the Glossy shader's color to make the glass plane visible, but if you want to recreate the look of the Glass shader set up the color to pure white.


Lossless 10-bit colorspace (yuvj420p) video output Using GoPro footage which are in 10-bit color space (yuvj420p), and using Blender as a video editor, the output seems to always be in 8-bit color space.

How can I preserve the 10-bit color space?

Tried:

Output: AVI RAW
Output: H.264 + Encoding Format: H.264 + [X] Lossless
Output: H.264 + Encoding Format: AVI + Codec: H.264 + [X] Lossless
Output: H.264 + Encoding Format: Quicktime + Codec: H.264 + [X] Lossless
Output: H.264 + Encoding Format: AVI + Codec: HuffYUV
Float color space in sequencer

No matter these, in the end ffprobe always shows it's not anymore in yuvj420p but in yuv420p (or what should be another 8-bit color space format). This results in washed out colors visible on HDR monitors (barely noticeable on older monitors).

Similar questions without good answers yet:

Lossless compression for video with audio
What setting should I use to keep the same quality of video file?
⚓ T44827 Video sequencer does not recognize pixel format 'yuvj420p' correctly

Note: Input video file format (from ffprobe):

Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], 8217 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)

You can't.

When working on footage, it is always most prudent to operate on the frame level, with controlled decoding to the file format you choose. Codecs always have been and always will be an awful choice.

Currently in Blender, all codecs via the VSE (and otherwise I believe) are decoded using the FFMPEG call that converts them to an 8 bit buffer.

So, decode outside to a suitable 16 bit container such as TIFF, then properly linearize the results via a controlled transform.

Also, “8 bit” is not a colour space, nor is “10 bit”, nor is “float color space”.


How to properly scale image in uv editor Hello to anyone who come here and help out or read. I have an issue with the uv editor, I have been trying to make an proper eye. The issue is that I can't figure out how to scale this correctly.

Is there anything I can do to make the eye colors or texture?

You don't need the eye in the whole eyeball, so select only the faces that you want the image on.
In the case of a UV sphere it's easier to do this in top orhto view.
Then do project from view (bounds).

Use that UV map to map thimage on a material for the iris,
then assign a different material for the rest of the eye.

Note that the second material would not be necessary if the original image had an alpha channel filling the image around the iris instead of just white, then you could use the alpha to have better control on the placement of the texture.


Undesired Gradient Shading I am getting this undesired style of shading which gives a high contrast gradient across panels on a mesh object and even shows up in solid viewpoint mode:

What I'd like is a much flatter shading style, like it is on other objects in the same project, like this:

Not sure what is happening to create the undesired shading, because the object appears to be setup and lit exactly the same as other objects within the project. Help Appreciated.

This is happenning because you have smooth shading applied, to solve that you have to give your model 'Edge Split' Modifier.


Python API; immutable Object I’ve got an add on for making objects parametrically.  What I want is a way to specify that the mesh is immutable and thus can’t be edited.
Currently I do this by generates a new .blend file - linking the object into your scene and the addon checks every second to see if the underlying file has changed.  It’s really inefficient, you can’t change the materials etc and there’s an annoying lag.
What I really want is either a way to signal blender that the file has been updated (without needing to poll) or better yet, a way to indicate that the mesh can’t be modified/edited (I’m guessing prevent creation of a Bmesh)
Is there anyway to do that in a plug-in?

I've found a few solutions to this.
The nicest is the create the mesh in another .blend file, then link that in and attach to a local object.  This gives you a linked icon in the outliner (for the mesh) and prevents mesh changes - downsides are you need to work with multiple files.
@HikariTW's suggestion of Collection instancing works; though doesn't give quite the experience I was looking for.
The other solution is to just watch for mode changes and block them.  This seems to work pretty well; something like this works
import bpy

def restrict_edit_mode(object, data, unk=None):
    # XXX: check if bpy.context.object to see if it applies
    # remove the move into edit mode; so you can't undo into it
    bpy.ops.ed.undo()
    # make sure we're always in object mode, without this you can
    # end up in the wrong mode by undo/redo combos
    bpy.ops.object.mode_set(mode='OBJECT')
    # XXX: do something instead

# registering on a per oject basis seems unreliable
# but doing it for everything works pretty well
handle = object()
subscribe_to = bpy.types.Object, "mode"

bpy.msgbus.subscribe_rna(
    key=subscribe_to,
    owner=handle,
    args=(None,),
    notify=restrict_edit_mode,
)
'''


Align vertices into a straight line I moved one vertex in but now I have a kink in my surface.
Is there a clever way to move the second edge so the kink disappears?

To straighten vertices to a line:

Set pivot to 'Active Element'

Select the 2 vertices at the ends, and create a Custom Transform Orientation from them. (The little '+' in the header's Transform Orientation dropdown)

With all 3 vertices selected, and one of the ends selected last, so active, and the new transform orientation active, hit S Shift Y 0, scaling to 0 in all dimensions, except 'Y', the one along the line between the end vertices.


Loop cut (ctrl+R) and space cuts in the same operation I am wondering if Blender has some hidden function or anything that can make even space between edges when adding new edge loops with ctrl+R. Or even space after adding them, like if it was a mirror effect of the selected edge, so that the other edge moves the oposite way if you know what I mean.

I made a GIF from 3ds max that shows the method I am looking for:

https://imgur.com/iDdWdEz

Figured out with help from Blender discord community that I can select my 2 edges and scale with Z, but this only works if the axises are perfectly alligned. What if I got something bent with different size like a cone, the vertices of the edges would not follow the edge with this method :(

Any ideas?

Use the Bevel operator after loop cutting.

Make a single loop cut were you want the symmetrically spaced loops to happen, then bevel with zero segments.

This will virtually replace the single centered loop with two evenly spaced loops. The advantage is it works well in non axis aligned faces, uneven loop widths and allows adding more loops.

Also see related How to slide a vertex group to make new edge loop? and How to outset from edges/vertices?


How to get distance of vertices from an arbitrary plane in Python? I have an arbitrary oriented plane and an object "above" it.
I would like to calculate the distance from the plane for each vertex in that object.

Hopefully this screenshot illustrates the idea (the purple line would be the distance of one of the vertices):

I suppose some kind of a transformation of vertex global coordinates to the local orientation of the plane would be the way to go, however, I'm too new to Blender to know even what to search for (I did try searching for mentioned keywords but didn't find something I could figure out, unfortunately).

I know how to iterate trough vertices of an object and get global coordinates, no problems with that.

Edit:
As Chebhou suggested I tried using the mathutils.geometry.distance_point_to_plane(pt, plane_co, plane_no) but cannot get it to work.
For testing I'm using a 2x2x2 cube at (0,0,1) and 6x6x6 plane at (0,0,0):

The code is this (shortened for clarity):

point_location = thecube.location

planepoint_location_w = theplane.matrix_world * theplane.data.vertices[0].co

plane_normal = theplane.matrix_world * theplane.data.polygons[0].normal

distance = geometry.distance_point_to_plane(point_location, planepoint_location_w, plane_normal)
print("point_location = ", point_location)
print("planepoint_location_w = ", planepoint_location_w)
print("distance = ", distance)

The result for the cube and plane location as in the pic is OK (the point is 1 unit above the plane):

point_location =  <Vector (0.0000, 0.0000, 1.0000)>
planepoint_location_w =  <Vector (-3.0000, -3.0000, 0.0000)>
distance =  1.0

However, if I move the plane on Y axis to (0,1,0) the result is this (but should be the same as before):

point_location =  <Vector (0.0000, 0.0000, 1.0000)>
planepoint_location_w =  <Vector (-3.0000, -2.0000, 0.0000)>
distance =  2.1213202476501465

Obviously I'm doing something wrong - but what?

You can use the dedicated function :mathutils.geometry.distance_point_to_plane(pt, plane_co, plane_no) were you supply the plane normal and one point from it, and the point you want to calculate the distance to as in the following example :

import bpy
import mathutils

plane = bpy.context.scene.objects['Plane']
p1 = plane.matrix_world*plane.data.vertices[0].co
p2 = plane.matrix_world*plane.data.vertices[1].co
p3 = plane.matrix_world*plane.data.vertices[2].co
plane_no = mathutils.geometry.normal([p1, p2, p3])

obj = bpy.context.object
mat = obj.matrix_world

for v in obj.data.vertices:
    pt = mat*v.co
    d = mathutils.geometry.distance_point_to_plane(pt, p1, plane_no)
    print(round(d, 4))


How to hide the alpha of image planes? (Images as Particles) I'm at the point where I need to add node materials to my leaf branches to make the colors diverse and react well to the lighting. However, whenever I add the mix shader nodes, the blank transparency or the alpha map of the images are exposed.

I was hoping to achieve something like Dragos Matkovski's stylized work in Unity but i'm having a hard time trying to reproduce the same output in blender with the png's alpha showing. I'm using cycles 2.83.

Edit 1: here is my node setup for the images to which the alpha shows.

Edit 2: The answers below helped a ton. Went for a translucent shader + emission instead since the glossy was too strong.

If you want to mix in another (non-principled) material this way, you would have to add transparency to it separately. You could do this with a Transparency material and another mix node, controlled by the image's alpha channel.
However, in your use case, I don't see why you would need another shader, especially not a glossy one - I see nothing like that in the reference image, and it wouldn't be physically accurate. Instead, I would recommend you decrease the roughness of your existing shader if you want more shine.
(Alternatively, you can use the clearcoat settings - these may work well for the natural fats that cover leaves, or to simulate wet leaves.)


Rotate an object but do not rotate its alpha image texture mask I am making an animated graphic showing oceanic upwelling. Here's what I have so far:

The viewport shows three circular sets of arrows -- each is on a separate mesh and is a PNG with alpha.

The UV Editor shows an alpha mask, also PNG with alpha. The node editor shows my arrow mesh material thus far.

The mask fades the arrows in and out as expected, but when used as I have it connected in the node editor, the alpha mask rotates right along with the arrow image texture... so I do not get the arrows fading in and out. The desired effect is for the arrows to fade in from transparent and appear at the bottom of the rotating wheel, and to disappear by fading out to transparent at the top.

The question: How can I not rotate the alpha mask as the arrow "wheels" rotate?  The arrow meshes rotate on Y, and I am sure there must be an elegant way to counter animate or driver the alpha so it actually stays in place, but I have not found it.

EDIT: And I guess the other way to ask this is: I want a circle of arrows to fade in at about 6 o'clock in rotation and fade out at about 12 o'clock rotation. What's the right way to do this?

EDIT2: Adding a sample file containing the sample mesh, material, arrow PNG and
mask.

EDIT3: Rumen's answer is correct, although it took me a while to figure it out. I have posted a resolution file showing how I did so.

All input welcome.

best
rg

Change texture coordinate to "Object". Then Change Extension from "repeat" to "clip". And adjust location and scale like in the image below. Now Z rotation works like you need.


How to set the default duration of imported images in the VSE Currently, when I import an image into the VSE, the duration of the strip is 27 frames. I would like to change this to be 72 frames by default.

The trick is to add all the images in one go using the Shift+A (Add Image) and Shift+Click each picture or press A if they are all in the same folder.  (Drag and drop doesn't seem to work the same way.)  Once you've inserted the images you will have a strip of one image per frame.  Select the strip and then press 'Y'.  You can then enter a number of frames to use for each image.  The result is a sequence of strips, one per image, all of the same length.  Make sure you have enough space on the current strip to the right of the insertion point to accommodate the new strips before pressing Y.

I'm unaware of any setting for this default value although mine was 26 frames so maybe there is a way.


BGE register new Action I wanted, for a game with level editing capabilities, to create an Action (animation fcurves) from scratch and assign it to an existing Action actuator.

However, when the Action is created at runtime (or at least in the same script and in the same use of it), it will not be recognised as existing when its name is assigned to the actuator's "action" variable
Does anyone know how to register the action in order to make it usable?
Thanks in advance

You can't create actions with the BGE. Animations needs to be present in the blend, a linked blend, or loaded blend (via LibLoad).

Background

You used bpy - which is the API to Blender. Be aware Blender is only available when you run your game session embedded inside Blender. Typically you do not deliver Blender with your game.

When you run the game session embedded inside Blender creating an action, it is only present in Blender (-> bpy is talking with Blender, not with the BGE). The running game session will not know about it. Any change made by Blender will not be recognized by the game session, as everything is loaded already.

For better imagination:

Imagine your game session is a car the player is driving.
The BlenderPlayer is the factory that creates a new car from a blue print.
The .blend file is the blue print.
Blender is the construction office that created the blue prints.

When you modify the blue prints while you are driving the car the car will not change. You will need to create a new car from the modified blue prints.

So you stop the car you are sitting in. Then you let the factory create a new car and start that one.

Back to the BGE: You stop your game session and start a new one. Then you see the modifications.


Weird artifacts only in rendermode? I've ran into some troubles while rendering transparent materials. These issues only occur when using
rendermode (F12). All render settings are default. I'm rendering on a GPU (Nvidia GTX 1070).

In viewport previews seem to be just fine and don't have the triangulated white faces

Here's the outliner and the shader used, maybe that could help solve the issue.

The schrinkwrap modifiers are disabled in viewports but not for rendering: