Selection not visible I'm working on a project in Blender 2.8. Somehow after importing a few OBJ into the scene (not sure if it's related), my selection outlines etc disappeared. On the attached picture I'm in edit mode and the 2 stretched polygons are selected. They should be orange, but they're not. Selection outline also doesn't work in other modes. In viewport shading outline is set on. Is there any other place where I could've turned it off by mistake?

You disabled Display overlays.

To enable Overlays you can use Alt-Shift-Z by default.


Modeling a Space Battleship Yamato I'm modeling my favorite anime of all time. The space battleship yamato or Uchuu senkan yamato(japanese).
I'm having some problem on how to model this ship, from the middle part to the front. Especially the front part with those curved and rounded shapes. I've already modeled some beginners and a bit of intermediate objects so I've decided to give this a shot. Any advice would be a big help to me :)
I'll attach my progress pic as well as a reference pic. Thank you in advanced. Stay safe all :)

I'd suggest to limit the numbers of vertical loop cuts to the same number of vertical lines along side the Yamato hull.

Start with a low poly general shape of the main hull.
Then start to split / separate the parts as new objects.
Parent everything to the main hull
Hide the main hull and start to develop the other objects into their proper shape.
Some details will be external objects placed along side the hull so don't worry in attempting to model the whole ship from a single mesh.

For the Wave Motion Gun you can use a small cylinder and then Joim the mesh with the main hull, bridging edge loops and creating faces when necessary


How to move the 3d cursor in blender 2.8 This question may have been asked already, but I couldn't find it. So, my question is pretty straight forward. With the new movement controls in blender 2.8, I can no longer move the cursor using left click. How would I move the 3d cursor without having to change the controls, since I rather like the new mouse controls compared to the old ones.

On a computer: Shift + Right Mouse Click


How to turn off or 'uncheck' Render->Lock Interface Problem:  I simply cannot find a way to uncheck the "Lock Interface' checkbox under Render
Using Blender 2.83.4
Clicking it (left, middle, right) or combo key click (shift-click, shift left click, etc), nothing works.
My renders tend to take a while so I do like to move around the use the interface for simple tasks.
Is there a setting somewhere I'm missing?

I don't know why you can't disable the option by just clicking on the box, but you can always use the python command for most operations in blender.
In the python console (Shift + F4) type:
bpy.context.scene.render.use_lock_interface = True

and press Enter.


How to fix final render causing issue by having pixelation using cycles? This is a fbx file imported to blender originated from C4D and having an issue with Cycles render. Just like what you see on the below, preview looks fine but the final render has this weird pattern shape. All the other parts are okay but only the faceplate is having a problem. All I did so far is added new materials and changed color. Is there any possible way I can fix this? I am new to blender so it would be graceful if I get some help with this. Thank you!

Welcome to Blender Stack Exchange!

This looks like an issue known as Z-fighting. What that means is you have some geometry that is very close together, so close that the camera doesn't know which one is on top, thus you get a mix of both.

From your images it looks like there is a blue shell that overlays the white body of the controller.

To fix this, a possible option is to remove the part of the white body that is under the blue shell. This will get rid of the geometry that is too close, and also make it faster to render since there will be less geometry.

Another possible (and much easier) option to try is changing the Clipping settings in Camera tab of the Properties Panel on the right. Try increasing the start value (to something like 1) or decreasing the end values (to something like 30-50). Typically adjusting the start value will be more effective.


Always render the visible objects I am using Blender for some scientific-related visualization. As such I guess my needs are much more modest than those of the average animator, and the decoupling of the visibility and renderability of objects (i.e., the fact I can set some object to rendered although it is not visible in preview) only causes problems for me, when I change what is visible but forget to also set it to be rendered, only to come back 15 minutes later and see that I had rendered the wrong scene. Is there some way to "couple" visibility and renderability, i.e. only whatever is set as visible is also set as renderable?

You could also do this with Python!

To do so you could run the following  code, manually, before rendering:

import bpy

for obj in bpy.data.objects:
    obj.hide_render = obj.hide

A better solution would be to somehow run the code automagically before rendering, which can be  done as follows:

import bpy

def unhide(self):
     for obj in bpy.data.objects:
          obj.hide_render = obj.hide

bpy.app.handlers.render_pre.append(unhide)

To make the script run every time you open up the blend file, name your text block with a .py extension and check Register.

Note that you must run the script once;


Is it possible to rotate two textures on the same object in opposite directions using the same Empty? I'm trying to animate a texture on an object. I've got the material set up on the object, and the node setup uses the Texture Coordinate node with an Empty plugged into the vector socket of the texture (and then into a Color Ramp, but that's not really important) so that when I rotate the Empty, the texture rotates. That works perfectly.
What I'd like to do is essentially duplicate that setup, and use a Mix Shader node to combine them, but have it so that the second instance rotates in the opposite direction.

So if I rotate the Empty 90 degrees X, Texture 1 will rotate 90 degrees X but Texture 2 will rotate -90 degrees X.  I know I could just create a second Empty and use that and then animate them separately, but I'm trying to avoid that, and it just seems like it should be possible to do this.
Anyway, I'd really appreciate any help.
Thanks :)

After much fiddling with nodes and materials, I couldn't get the direction of rotation to change. What I ended up doing was creating an empty and adding inverted copy rotation and child of... constraints as shows below. The primary control is "CTRL_TextureRotation" and then the material is setup as you have shown, with one texture coordinate driven by the empty and the other by the controller.


Issue with Camera-to-view hotkey? (ctrl+alt+num0) I'm having a strange issue where when I add a camera to my scene and press CTRL + ALT + NUM0 to set camera to view, the actual view gets shifted over a little bit. Please check out my screenshots below:

No camera added yet

2. Added camera at world origin/3d cursor

3. After pressing CTRL + ALT + NUM0

4. Camera location in 3D space is moved

This isn't the intended behavior, right? Can anyone replicate this?

It looks like everything is working as correctly to me.
Your original viewport view isn't centered. It may look like that to you because the cube is near the center of your monitor, but it's actually down and to the right of the actual viewport itself.
To center your view on an object (or any number of selected objects), press "." on your numpad, then align your camera. That should resolve the issue :)


Why when clicking on numpad_0 or only 0 i don't see anything with the camera? The camera is viewing the city.
I scaled the camera made it bigger.

Then i click on numpad_0 and see

But if i will make a new project with only the cube in the start and will click the numpad_0 it will lock and show the cube.

Why it's not showing the city ?

This is due to your far clip setting under: Camera Tab -> Lens -> Clipping -> Far.

Adjust that to a ludicrous number and you should see your buildings, but I'd suggest adjusting your scenes scale since this gigantic scale may cause other problems down the lane.


Adding Borders to a Video (Letterbox Effect) This is my first post, so please forgive me if I make any mistakes regarding tags.

I've been attempting to add a letterbox border to a video in order to give it a more "cinematic" look, but I've been running into issues where borders only appear on one side of the video.

Example of what I'm trying to achieve:

Example of what I'm getting:

It may be a little difficult to see, but the borders only appear on the left and bottom of the video. I achieved this after following instructions from a video which recommends using the offset command. In the video, the instructor had an option to add this effect to both sides, yet I'm failing to see that option here.

I checked a few more tutorial videos and noticed that their version of Blender seems quite different than my own, with some of their available commands being different than my own.

Regardless, I feel like I'm very close to figuring this out, but I need some assistance. I think that what I need to do is "center" the video so that it appears in the middle of these borders I'm trying to make, but I just can't seem to figure it out.

Any advice would be greatly appreciated!

I figured it out - I just needed to whip out a pen and notepad to write down the general idea of the instructions I was getting and then improv with what I had available.

For those interested in creating a letterbox effect for their video in Blender, follow these steps and you'll achieve your goal.

If you haven't done so already, drag and drop your video onto the timeline.
Select your video clip
Select the Strip option (should be on the top or bottom of your timeline, depending how your UI looks).
When you click Strip, you'll see a menu. Look for an option to Set Render Size. For me, it was hidden behind the Movie Strip menu.
Look for a menu that shows your video's dimensions (for me it was to the right of the video preview box)
Add however many pixels you'd like to the X and/or Y axis (I personally went with 60 for both sides)
Now look for a menu that shows an option for Offset (for me, that menu was directly beneath the menu where we just punched in our resolutions).
Click the checkbox for Offset and add HALF of the number of pixels you added to each axis in the previous menu. For example, if you added 60 pixels to your resolution on the x-axis, add 30 to your offset.

Congratulations, you should now have a letterbox effect on your video! The checkerbox image you see around the video should default to black once you publish your project. If you'd like a different color than black, you can select Add, which should be near Strip, and then simply click the color option. Expand the color block to equal the length of your video and place it on a lower channel of the timeline so that it doesn't overlap with the video. Select your video and find the Blend option to switch it to Alpha Over so that the video rests above the color.

(By default the color will be black. Simply select it on the timeline and find the Color option in the same menu you found the offset option for the previous steps. Change to a color of your desire).

Thanks and hope this was helpful.


How to project a texture on objects in an (fSpy-imported) scene? With the amazing tool fSpy I wanted to reconstruct the interior of a house. I was able to import the fSpy project into Blender, do some basic modelling and UV "Project from view" seemed to work fine.
However, some parts of the image are not correctly UV projected, see image below. The corner of the table in the lower left is not projected to, which is to be expected outside the camera view, but not within camera boundaries! Additionally, when looking at the tray on top of the table, the background image does not align with the UV projected lower portion of the tray.

Question 1: In the 3D view (right), why does the UV projection not line up with the preview in the UV editor (left)?
Question 2: How to make it work?

Edit: I was able to answer the questions myself, see below. After some more trial and error I found an even better solution than described below. I will notes on that later this week!

Additional notes
I suspect this UV coordinates that are off boundaries (x<0 or y<0) are somehow being automatically translated somehow, but I don't really know.
I made two small additional changes to better see what's going on. Cutting out those changes did not solve the problem.

In the shader nodes editor, I have set the image texture from Repeat to Clip, so image on the right the problematic area is black and not couch-coloured.
For the table object I added a subdivision modifier set to Simple (not Catmull-Clark). Without it the deformation on the table-top would be based on two triangles with even works deformation.

Related questions

UV unwrapping problem with image mapping
Project from view so that the UVs match the background image
Why am I getting UV distortion on a flat surface?

I was able to solve the problem after projecting more objects in the scene. The UV coordinates are mapped correctly into the scene from the point of view of a flat surface (like the table top), but because of that not from the point of view of the camera. It does not have anything to do with coordinates being "off bounds".
Imagine a ladder lying on the floor. The rungs have equal distances, but seen "in perspective" the distance between two rungs is getting smaller the further away they are. This non-linearity in perspective causes the linear UV projection on the table top to stretch unintendedly for big faces.
The problem can be solved by having more UV vertex information, i.e. more vertices in the mesh. This way Blender will not stretch the image on a projected face linearly, but follow the non-linearity specified by the additional vertices. Technically this will still stretch the projected image linearly for each face (i.e. not as intended), but this won't be noticable, if the faces are small enough.


Reducing the size of shadows I am looking to reduce the size of the shadow being cast on the mesh in the background..

I have only one light which is a sun lamp with ray shadow on, the mesh i have receive, receive transparent and cast buffer checked and no matter how near or far i put the light I cannot get the size of the shadow to change.  Can anybody help. cheers.

You have something like this (Blender Internal)

Sunlight lamp only lets you change the angle of the light-source and not the distance of the light to the scene objects. Test this by moving the sunlight closer or further away from the objects, compared to rotating the sunlight. If you want smaller shadows, don't use a sun lamp on its own. When you only have one light-source like a sunlight on default settings, you will get sharp shadows.

You can fake ambient light by adding Ambient Occlusion or Environmental Lighting, or add a few weak lights to give you more control.

adding Ambient Occlusion would give you this:

or adding Environmental Lighting for this:

You could also mess with the shadow settings of the sunlight lamp: (softsize & samples & shadow colour). But on its own that still doesn't produce a nicely illuminated image.

The trick really is to add more lights, but make them weak so as not to saturate the scene. If you are serious about lighting I recommend you read this classic post by Ben Simonds about lighting techniques.


Best settings to reduce cycles memory consumption I'm trying to render a very complex scene with blender and it seems to be using too much memory. I've already tried using tile size as a multiple of total resolution and spatial bvh splits.

Can anyone recommend any settings that can reduce memory consumption of the scene?
Note, I'm talking about a still render.

Here are some hints for better memory usage.
Though with only general info its hard to give a good answer.

Avoid floating point textures where possible - typically EXR, HDR.(includes 16bit PNG, TIFF, JPEG2000 which are converted to floating-point), these use 4x memory.
Avoid displaying textured objects in the viewport (OpenGL-GLSL), this will load textures into memory which is not shared with Cycles - so the textures get loaded twice.
Use instanced objects where possible.
Take care using subsurf, curve-render subdivision levels.

The only other suggestions would be to reduce memory use from the rest of Blender.

Render in background mode. or...
Reduce undo steps (undo can use a lot of ram), you could even dissable undo.

There may not be a whole lot you can do, if you already checked that you don't have excessively high geometry or high-resolution textures, perhaps you just have to render less complex scenes or buy more ram.


How should I make a move point of 0.1 instead of free move I basically want a set amount of move size like 0.1 instead of 0 which is free move. Also when I try using arrows to move points sometimes it moves it if I were to press g. How do I move it only on the xyz angles.

You can move an object along its local axes by pressing G, Axis, Amount.
For example GY2

You can an object along it three axis by pressing G, X Amount, ↹ Tab, Y Amount, ↹ Tab, Z Amount.
For example G↹ Tab5↹ Tab3↹ Tab4.

You can move an object perpendicular to the view, by creating a camera (which starts aligned to the view), rotating the camera on the view plane, and moving the object along a cameras axis.

 RMB select the object and snap the cursor to it ⇧ ShiftSCursor to selected.
⇧ ShiftA > Camera, to add a camera.
R to rotate it.
GXX0.5, to move it 0.5 along its local X axis.
⇧ ShiftS > Cursor to selected, to snap the cursor to the camera.
X to delete the camera.
 RMB click to select the object.
⇧ ShiftS > Selection to Cursor


Blender 2.8 image texture node and color space As of release of Blender 2.8 version the Image texture node has changed, before we had only "Color Data" and "Non color data".
Now we have that drop down menu titled "Color space" and various types to choose from.

My question is when we use which type of color data (do we still use "Non color" for normal maps, roughness etc or do we choose one of new ones)?

In short:

Use "non-color" for inputs that are supposed to be spatial (3D) vectors or simple factor values.
Use one of the others (depending on your needs) for what is effectively a color.

More details:

I've dig a bit into Blender code and into OpenColorIO (OCIO) documentation and my (very young and superficial) understanding is the following.

Blender uses a processor component to handle image data. This processor can be based on OCIO or be a 'fall back' one if OCIO is not present (I don't know why it could be absent... maybe to allow Blender to run on some low level hardware?).

The main goal of OCIO is to allow to transform image data into device rendered image data which fits the best to human eyes perspective as (for instance) our perception of light intensity is not linear (so intensity can be coded or manipulated linearly, as it is, but rendered differently). But more globally, OCIO can process image data transformation 'the way you want'.

OpenColorIO is a set of libraries (programs) that are provided OCIO organisation and these libraries are open source.

From that, when an image is processed (in our case for texture nodes) it is given to OCIO to do it. And OCIO is based on a configuration that can be found in 'Your installation path\2.8\2.80\datafiles\colormanagement'.

In this directory, we can find a file called 'config.ocio' (describing the possible configurations) and two subdirectories 'filmic' and 'lut' (containing data tables used by these configurations).

LUT stands for 'look up table'. For image calibration it has been defined by Academy Color Encoding Specification (ACES). Linear ACES is one of the possible option for the texture node.

Filmic is another calibration approach. The best is to read this answer from troy_s to know more.

The general principle of OCIO configuration seems to be giving a range to the input data and apply a transformation table to it. Transformations can be direct or reverse.

Concretely, what about 'XYZ', 'sRGB', 'Raw', 'Non-color', 'Linear ACES', 'Linear' and 'Filmic-Log'?

XYZ

'XYZ' is not 3D vector (x, y, z).

CIE XYZ is a calibration and its result is analogous to the LMS color space which corresponds to the cones response of the human eyes.
Y is the luminance. Z is nearly the blue. X is a mixing factor. The response value for them is defined in the OCIO configuration.

This is a transformed data.

sRGB

Stands for Standard RGB and is the "default color space for byte image" as defined in 'config.ocio'. It also has a transformation table defined in it.

This is a transformed data.

Raw

'Raw' is the image encoded data as it is. There is no transformations for it.

This is not a transformed data.

Non-color

This is similar to 'raw' from the calculation point of view. But it is semantically different as it is for things we know to be 'non color'. The comment in config.ocio says "color space used for images which contains non-color data (i,e, normal maps)".

This is not a transformed data.

Linear ACES

It is transformed by OCIO. The configuration is linear (as said in it name) and is done from a table giving parameters of this operation for each color channel.

This is a transformed data.

Linear

Correspond to Rec. 709 (Full Range) and is commented as 'Blender native linear space'.

This is a transformed data.

Filmic-Log

Again please refer to this answer. It is commented as 'Log based filmic shaper with 16.5 stops of latitude, and 25 stops of dynamic range'.

This is a transformed data.

A link to OCIO configuration in the Blender repository.

Note:

When using an image texture node, the color space information is given by or set to the image texture itself. This is not a node property. So that, if you set the color space in one material, this will affect all the others that are using the same texture.


Customizing trackpad behavior I'm using a track pad. The settings I had for moving around, zooming, etc. were two finger pinch for zoom, one finger touch and drag for moving around.

Now I can only scroll up and down to zoom! How do I change the setting back to how it was? It was fine an hour ago. Maybe I accidentally pressed something.

Firstly, I'm assuming that these are blender settings.

To fix your problem, I would start with load factory settings. Loading the factory settings will reset every thing to the default settings. You can then customize from there.


Stop creating new collection if there is one with the same name already in the scene I have a script that creates a new collection but if I run it again it adds a new collection named "Personal Collection.001" and so on, what I would like to tell to the script is that if that collection name is in the scene then don't make a new one.
import bpy

myCol = bpy.data.collections.new('Personal collection')
bpy.context.scene.collection.children.link(myCol) #Creates a new collection

for myCol in bpy.data.collections:
    if myCol.name == "Personal Collection":
        print ("Collection found in scene")

Cheers,
Juan

Check it exists and is linked to scene.
IMO Two tests required here, one to test if collection exists, and secondly if it is linked at any level to the current scene.  A quick test for the latter is to see if the scene is a user of the collection.
import bpy
context = bpy.context

# name of collection
name = "Foo"

scene = context.scene

coll = bpy.data.collections.get(name)
# if it doesn't exist create it
if coll is None:
    coll = bpy.data.collections.new(name)
# if it is not linked to scene colleciton treelink it
if not scene.user_of_id(coll):
    context.collection.children.link(coll)

Related
How to get all collections of the current scene?


Blender 2.8 - Wireframed objects not rendering Must have accidentally gotten into some kind of ghost mode for 2 out of hundreds of objects. They show as black wireframes, are editable, but only show as wireframe in every shading mode, and don't render. Regardless of hide / render settings in the object list to the right. Tried flipping normals, recalculating inside/out, everything..
What happened? How do I get the objects back? Snapshot shows the wireframed objects.

Freaky, somehow "Object/Viewport Display/Display As" was set to "Wire" instead of textured AND all "Cycles Settings/Ray Visibility" were unchecked (for only two objects)! I've never even opened these panels before..


Python Save MultiLayer EXR BUG? I am currently writing a script that should render out each render layer via:

bpy.ops.render.render(layer=“InsertRenderLayerNameHere”)

and then save the resulting image. The problem is that when I do:

bpy.data.images[“Render Result”].save_render(“InsertFilePathHere”,scene=bpy.data.scene[0])

and I have the scene file format set to OpenExr Multilayer, the image still only gets saved as a normal/flat openexr file. This is probably a bug right?

The even weirder thing is that then I open a OpenExr Multilayer file in Blender and then go:

bpy.data.images[“OpenExr_Test_File.exr”].file_format

python outputs : “’PNG”

Thanks in advance for any answers

You can add a File output Node, then add as many sockets as you need in your multilayer EXR, and connect them to your renderlayer sockets node:

renderlayers_node = scene_tree.nodes.new('CompositorNodeRLayers')
outputfile_node = scene_tree.nodes.new('CompositorNodeOutputFile')
outputfile_node.format.file_format = 'OPEN_EXR_MULTILAYER'  # 'OPEN_EXR'
outputfile_node.base_path = base_path
outputfile_node.file_slots.new('Z')
scene_tree.links.new(renderlayers_node.outputs['Image'], outputfile_node.inputs['Image'])
scene_tree.links.new(renderlayers_node.outputs['Z'], outputfile_node.inputs['Z'])


How would I go about making these seem more like planets? enter image description here

So I recently created this images in blender using some mapping and some planet maps I got online. My question is how would I go about making these planets appear more realistic. Currently they look like circle no matter which way I angle the camera. Thanks in advance.

For the Internal renderer:

Add a direction light and give your sphere a new material. Turn the Specular -> Intensity down to 0.

And add your texture. Result:

For the Cycles renderer:

Add a directional light. And give the material a diffuse shader like this:

In the Image Texture node you can put your texture. (Don't forget to UV unwrap your spheres)
This is the result without a texture:


Problem with keyframes and IK can somebody help me please? I just started animating in Blender and I've been walled hard by something I can't seem to be able to fix. I've looked and looked around forums and youtube to no avail, I still cannot fix it.

I created a rig, joined it to a mesh and set 4 IK bones (for hands and feet). Everything works perfectly so far. Until I try to animate it... I tried animating without IK first and it works perfectly, everytime I select all the bones and create a keyframe, it works. But when I use IK, the IK bones ALWAYS stay in the same place. They change the starting keyframe and everything, only the rotation of the bones will be recorded.

I'm attaching a screencap to demonstrate it.

See, the first keyframe had the model in a standing position with his arms down, then I jump a few frames, change his pose, press A to select all bones, I to create a new keyframe and suddenly the first keyframe pose also has the goddamn arm lifted in this position!!! As I said only the rotation changes, everytime I move the IK bone it affects every other frame and the model stays like that.

I've tried absolutely everything, still can't fix it and it's driving me crazy. When I disable the IK, it works, so I'm certain the root of the problem lies there.

GIF:

https://i.imgur.com/4T8kd9W.mp4

As you can see in the first frame his arm is down, when I create a second frame in a different pose and I go back to the first frame, his arm has changed...

If anyone can help me I would appreciate it a lot because I'm getting desperate :(

Thank you very much.

Turns out that you have to select the "Visual" options in the "Insert Keyframe Menu". As in, "Virtual Location", "Visual Rotation" or "Visual LocRotScale". I was just selecting all the bones and pressing "i" twice out of bad habit.


how to find a side total length I have this simple setup:

I'd like to walk this perimeter and find the total length of every side, so as to find which side is longer:

How can I do that with a python script? Thank you
EDIT: added a clearer picture

Co linear Edges

below is a script that returns all co linear edges from a set of input edges. Two edges are colinear if they share a vertex and the edge vectors are parallel (dot product of normalized vectors is one)

The method edge_line_segments(...) takes as its arguments, the bmesh, a list of edges from that bmesh and a tolerance angle for how far from parallel the edges can be.

The return dictionary has a key "segments" which is a list of edges in each line segment.

import bpy
import bmesh
from math import sin, radians

def tag(iterable, value):
    for x in iterable:
        x.tag = value

def vec(e):
    v0, v1 = e.verts
    return (v1.co - v0.co).normalized()

def parallel(e1, e2, tol_angle=0):
    return abs(vec(e1).dot(vec(e2)) - 1) <= sin(tol_angle)

def line_select_extend(edge, v, tol_angle=0):
    edges = []
    while v:
        segments = [e for e in v.link_edges
                if not e is edge
                and e.tag
                and parallel(e, edge, tol_angle)]
        if segments:
            edge = segments[0]
            edges.extend(segments)
            v = edge.other_vert(v)
        else:
            v = None
    return edges

def select_segment(edge, tol_angle=0):
    v0, v1 = edge.verts
    edges = line_select_extend(edge, v0, tol_angle)
    edges.reverse()
    edges.append(edge)
    edges.extend(line_select_extend(edge, v1, tol_angle))
    return edges

def edge_line_segments(bm, edges=[], tol_angle=0):
    ret = {"segments" : []}
    tag(bm.edges, False)
    tag(edges, True)
    edges = set(edges)
    while edges:
        segments = select_segment(next(iter(edges)))
        ret["segments"].append(segments)
        edges -= set(segments)
    tag(bm.edges, False)
    return ret

To use.

Test script below to run in edit mode.  Calls method with  boundary (perimeter edges), sorts the segments by length, selects the edges of the longest segment and writes a report to system console.

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

bm = bmesh.from_edit_mesh(me)
perimeter = [e for e in bm.edges if e.is_boundary]
ret = edge_line_segments(bm, edges=perimeter, tol_angle=radians(5))
segments = [(sum(e.calc_length() for e in s), s)
        for s in ret["segments"]]
segments.sort(key=lambda s: s[0])

for i, (length, edges) in enumerate(segments):
    print("linked segment %d edges length %.3f" % (len(edges), length))

    for e in edges:
        e.select = i == len(segments) - 1
        print("\t edge %d len %.2f" % (e.index, e.calc_length()))


Square Uv map: fill the Uv layout This is my Uv map

My target is to max and optimize my Uv, in particular I would like it matches the whole Uv space. One solution could be scale the whole Uv from x axis and move all until the match will be perfect but, I should watch that corners and slides will match perfectly with the gray square in the background (it looks a "more or less" method).
I'm not sure this would be the best way to achieve the the best result.
My question is:
Is there a way to spread the UV all long the UV space, keeping its topology? Any advice? Or, is there a method to fill the gap of the uv space? Can a feature of Bledner achieve this?
EDIT
My Uv map was created with an unwrap
Thank you so much!

Hopefully your 2D cursor is at the bottom left of your UV layout image area - if not, position it there.

In toolbar area, choose "2D Cursor" as Rotation/Scaling Pivot.

In the UVs menu --> select "Constrain to Image Bounds"

Now select all of the vertices in your UV.

If the island is not flush with the bottom left: grab (G) and move so the edges are flush with the bottom left (the constraint will ensure that you cannot drag the island past the bounds)

Now, scale (S) - you should be able to scale to the image bounds.


Is it possible to do a Rigid Body chain that needs to split at a certain frame? Is it possible to have a Chain made of individual links that is being controlled by rigid body physics to split on an exact point on an exact frame?

I have a chain around a character and in the center of the chain there is a "padlock" type device, I want it to open and let the chain fall mid animation. Can this be achieved in Blender with rigid body physics or does everything have to be animated by hand?

Yes - you can animate the properties of the rigid body constraints to effectively disable the link.

For example, here is a chain of cubes, linked together with a series of Rigid Body Constraints - each set to a Stiffness of 40. At a certain frame the keyframes Stiffness drops to zero, splitting the 'chain' :

The produces the following when animated :


Trouble changing primitive attributes When creating a primitive in blender, the attribute section is greyed out and I can't change anything. I'm using blender 2.8. Is this feature just not in yet or ?

Adding a response, because I came here looking for an answer.

Blender 2.80 (beta), as of 2019-feb-02 nightly build:

The parameters for a newly added primitive are not in the T-side-panel (as previously in Blender 2.79).

Instead they have a pop-up panel in lower-left corner overlaying the 3D-View.

When you first start running Blender-2.80, this pop-up may be minimized (as shown in the first image). Click this to open this panel. It may remain automatically opened for newly added primitives after you open it the first time.


When I rotate A mesh, B mesh will rotate too, but I don't want it, how can i do? I made 2 mesh（cylinder.001 & cylinder.000, separate mesh）, the inside mesh is made by duplicating the outside mesh. After that , when i rotate one of the 2 meshes ,the other one will rotate too. I don't know why? how can I cancel the link between two meshes?

Hope someone can help me to solve this problem ,thanks

You have to disable the Proportional Editing option


Boolean modifier messes up material assignment I have a car that has two materials assigned to it. When I apply a boolean modifier to the car it tweaks all the colors that were assigned to it.

Why is this and what can I do about it?

This is because assigning different materials to a mesh is dependent on the Topology of the mesh.

Adding a Boolean operation changes the topology, so the faces that no longer exist can't have a material, and new faces will most likely be in different positions or shapes.

Blender assigns the first material to new faces created by a Boolean modifier:

A few possible workarounds:

Applying the Boolean modifier and assigning the materials your self, as well as changing the topology to fit where the materials should go.
Using a texture to combine materials with a Mix shader, independent of the object topology.


how to make a rotating hypercube with texts attached to each face? (gif attached) I am trying to make a rotating hypercube in blender but can't figure it out.
I have made one using after effects but the texts can't be attached to each face perfectly, so I started using blender to see if it works.
Can anyone give me some insights into building it? Thank you very much!
link of the animation:
https://drive.google.com/file/d/1j_p-LhzPVkbsshU7r0SR0PnRg6m9pvFq/view?usp=sharing

I Think you can do it with bones:

Create a cube, give it this inner geometry (I've hidden the 6 outer faces):

Create an armature with one bone by horizontal face. Parent the cube With Empty Groups to the armature, it automatically create as many vertex groups as bones, assign each face to the vertex group that has the name of the bone that is supposed to move it:

Move and scale the bones so that they follow what happens in your video:

and so on... which gives:

For the image texture, you need to create an image with 20 squares, each with its text, then select your object in Edit mode, unwrap with the Smart UV Project option, in the UV Editor, select all and UV > Pack Islands, then rearrange all the UV islands so that they match the squares.


Fire simulation won`t be randered Tried to render fire simulation in Cycles, results are above. I added principled volume node to domain cube.
Fire shows up in viewpoint, however does not in rendered image. In viewpoint, fire is shown in both EEVEE, and Cycles. I barely changed output and render setting (only modified solution, folder for rendered files)

Camera render button in view layer window is set to "off".


Blender render issue: rendered images are different from viewport Hi guys.

Can anybody help with this issue? Want to render a circle filled with Voronoi texture and two modifiers but the final render is really different than the viewport render and I want the look in the viewport. Using Evee and same render samples for view and final.

Cheers TORArtist

Subdivision surface and screw have two different parameters for rendering and the viewport:

So to fix it, set render to 3 for the subdivision and render steps to 3 for the screw.


How do I get lit textured materials in Multitexture BGE? As the title says, how can I get Materials that contain textures to work and not be shadeless in BGE that is set to Multitexture mode? I cannot use GLSL.

I need to use materials so I can control the specularity of my objects. If I set the Blend mode for my textures to Mix the object becomes shadeless, if I set it to multiply the object becomes black.

Here are some pics to demonstrate my predicament...

Normal viewport:

BGE running, texture set to mix:

BGE running, texture set to multiply:

BGE running, no material assigned (using UV image texture):

Unwrap the UV texture
Add a material
Check "Face Textures" under Options in the materials panel.

You may now adjust the spec.  Make sure the textures panel is empty.


Some difficulties with hair materials I'm a beginner. Currently I'm modeling a Pikachu. I'm having some difficulties with the materials of my pikachu's hair.

Here's a quick render:

Only the edges seem to be on point.

I'm aiming for something similar to this:

The hair is very subtle and almost unnoticeable unless directly hit by a light source. My approach was to add lots of thin and short particles, but it hasn't turned out well. Any help will be appreciated.

Particle edit - Comb, smooth, etc...

The greatest difference I can tell is probably caused by the lack of editing of the hair particles. They are currently pointing outard the faces normal (the default behaviour) like small spikes.

As you already noticed, the fur look quite short, but in my opinion reducing the lenght can't alone do the job. You'll need to bend it toward the skin by to combing the fur, in the right direction. Take for example the pokemon's forehead fur where you can clearly see that hairs are pointing upward.

Don't forget to add some variance to the children (e.g. with curl, wave, spiral... kink setting). In the following image you can see the same fur ball combed and with a Curl Kink of 0.002.


How I can extrude down? I'm new to Blender and I  have used the extrude tool. But somehow it doesn't go down, like creating a "void", it's like it is copying the same face again.
You can see the circle was extruded, but just don't go down.
I can't insert more images, but I want to get this result on 10:30 on this video

..Hard to reverse-engineer what you've done, but there are a couple of clues in your picture:

The edges in the top surface look a little thick? There are possibly some doubled faces / vertices there. Try X deleting, or H hiding some of the faces, to see if there are more hidden underneath. It's a feature of Blender's extrude, that if you cancel by right-clicking, you don't cancel the extrusion. You cancel the move, so the generated faces remain, exactly over the originals.
The Gizmo indicates that something is being operated on, halfway down the bottle. AltZ go into X-Ray mode, and see if there's a face there, which is the one being extruded, out of sight.


Vertex Paiting slightly hidden parts of the mesh I'm Vertex Painting an object that is has small depressions and bumps. When I make a stroke from some angle, there seem to be a bunch of vertices that don't receive the stroke.

In the following image, I painted a stroke in the top-right panel. It looks a smooth swath was painted, but as can be seen from the other views, many vertices were missed.

Is it possible to configure the brush to avoid missing vertices in a situation like this?

p.s. Not sure if it's relevant, but I'm painting with exact colours (i.e. I set the brush curve shape to constant, to be sure that the colour on my brush is the colour that actually makes it on the mesh).

I think that is not possible to configure the vertex paint brush with the options provided by Blender at this time (2.75a) without scripting yourself the tool you need.

The vertex brush simply cannot "see" the face, probably because it's normal is not facing the brush projection enough...or something like that...
I'm not a coder as you might have guessed, but I can suggest to you two alternatives workflows:

1-Texture paint-->Vertex Color

UV unwrap your model
Create a texture
Paint your colors on the texture
Install and use the Bake Uv-Texture to Vertex colors add-on

By painting with the texture tools you'll be able to access the "Normal threshold" options that make you able to define a custom range for your brush

Than you can extract color info from the texture map through the add-on and bake them to vertex color

Result:

2 - Edit mode, expand and contract selection

Go to Edit mode
Select faces
Ctrl+"+" to expand till filling holes
Ctrl+"-" to reduce selection to the initial size
Go to Vertex paint, set "face selection masking" on to work only on
the selected faces
Shift+"k" to paint the brush color on the active faces

This works only if you are using solid colours, without blending ramps on the border or other features that the vertex paint is able to achieve.

And of course you have to iterate the process for every different colour (and without the possibility to see what you have done before).

Before expanding and contracting selection:

After:

Setting color to selected faces in edit mode:


Image Texture is duplicating itself across the back of the image? I am trying to create an eye. Sounds simple, and it should be simple but I'm having a frustrating problem.

For some reason, when I apply a texture, the UV mapping sends the texture to the back of the eyeball and the mesh itself has a square pupil rather than a circular one.

If I flip normals, nothing happens. If I scale the UV mapping by hitting "S 1", it sends the texture to the front which is great, but duplicates the eye texture like a hundred times along the sides and back of the eyeball.

These are the only nodes I am using so far on the material.

I've tried looking into this for hours with no success. Does anyone know why this would be happening? I don't think it's the the picture I'm using either, I've tried other 3D eye pics and they all have the same issue.

The UV mapping is also huge compared the the original graph, since scaling is the only way I've been able to send the texture to the front of the eye.

I am fairly new to Blender and I appreciate any guidance that'll help me continue growing.

In the unwrapped sphere, the center of the flower pattern is probably where you want the iris to show up.  The "pedals" represent the sides and back of the sphere.  Blender automatically wraps the "pedals" around over the image again if they go off the edge.  On the other hand, if they don't go off the edge, the iris is too large.  Probably the easiest solution is to edit the iris image itself to make the iris smaller and then have more white background.

The original iris picture I used (https://image.shutterstock.com/image-illustration/illustration-blue-iris-digital-artwork-260nw-566777233.jpg) had the white just barely fitting around the iris.  I used Gimp to shrink the iris and make more white margin.

When I used the new iris picture for the texture, it worked.

As you can see, the iris is still huge, but that would have been solved if I had made the iris smaller in Gimp.  You can probably use most other image editors to shrink the iris (maybe even blender, though I couldn't figure out any easy way to do that).  If you have Gimp, I made the iris smaller by selecting the iris and shrinking it with the scale tool.  Then I selected the main (Iris.png) layer and filled the alpha area with white.


how to make an object look wet in Eevee? (blender 2.8.3 at least) I was going to answer here How do I make an object look wet? as it does not specify the rendering engine, but it was closed...
I created a UV Sphere.
Then I used sculpt to make some irregularities to let it shine.
There is 2 lights above, one to the left, other to the right.
Using Principled BSDF (w/o texture).
at Principled BSDF:
Metallic is not what I want, doesnt look wet anyway.
Changing Specular doesnt help, the shine is not sharp/thin.

For a very simple, fast and easy to do effect, I just had to:

In edit mesh mode I used "face/shade smooth", so no need to subdivide the mesh (wouldnt be enough anyway).
change Roughness to about 0.125, even w/o a texture.

It looks good.
Not sure tho if it could cause trouble later to try to apply other effects (not that I am trying to).
It is only visible in "Viewport shading" "render preview" mode.


How to get images to planes objects to receive shadow? I'm following this tutorial where you create a popular illusion using images as planes.
Tutorial: https://www.youtube.com/watch?v=sk87jDzHGKA
However, I can't seem to get the object to receive shadow unlike other objects I've worked with before. It could be that the nodes I've used to get this result is a mix shader that uses the images of the back and front of the illusion with backfacing but I don't know how to get around this.

After some looking around, I found the solution. Since I was using only image textures and a mix shader no shadows would be created. I had to put the images through a principled bsdf node before giving it to the mix shader so shadows could be created.


How to render smooth cuts at different depths Just to preface this, I'm working on an architectural project for an architectural class. Technically I should be using Rhino but I don't own a license for it and I only know blender so I'm making do with what I have.

Goal:
For architectural renderings I want to render out cuts of what I'm working on. My first iteration I used metaballs to build up the forms of my project and lay out the spaces roughly. The problem is I'm using a Mask modifier with vertex groups on metaballs that I've converted to meshes. What ends up happening is the metaballs converted to meshes have this very jagged complex geometry that looks bad when I use the mask modifier.

Question:

1.) Is there a better way to do section cuts? Previously I was using the clipping distance on the camera but because I'm trying to make cuts at separate distances (see attached picture) I can't use the camera clip unless I do multiple renders and combine them.

2.) How do I smooth out the metaballs so that the edges where I'm masking are smooth.

The following images show the problems I'm facing with the current methods. I've tried using shade smooth and laplacian smooth but to no avail. Not sure if my image captions will render but if they don't, the first image shows the problems with using a mask filter and the second and third show problems with clipping. Sorry still kind of new to Blender. Any help would be appreciated.

edit: I realized I don't need to render out the metaballs to meshes which makes the renderings much less jagged. That said I'm still unsure how to cut sections at different depths. Thanks

I'm not entirely sure that's what you want but maybe you could use the Boolean modifier to cut your object. You need to make your boolean object (here a cube) invisible: In Cycles Render go in the Properties panel > Object > Visibility > Ray Visibility and disable everything, and in Viewport Display choose Display as > Wire). Also pay attention to the modifiers stack order: Solidify to give your object thickness if needed, then Subdivision Surface to make it smooth (also don't forget to press W > Shade Smooth), then Boolean (Difference mode) to cut with your cube, then EdgeSplit to have sharp edges on the cut. And of course for your object try to have a nice topology with quads.


Blender to unity track animations I have been banging my on this for a whole week trying to figure it out. But everything I try is giving me the same results.

I created an animation on a windshield and landing hears with track constraints on different objects. The results look really good, and I did not think I would have this much trouble to export to unity.

Here is what the results look like:

I was actually really proud of the results and then decided to see what they looked like in unity.

Here are the results... :(

The last two gifs are kind of fast because they had to be small enough to be uploaded, so the frames are not too many.

But you are still able to see the difference between the first pictures and last.

I know some one might have encountered this before. I need your help please. I don't know what else to try.
Is this kind of animation not translatable to unity? do I need to be using another program instead.?

I don't really know what info would be helpful to give you guys, but I don't think I'm doing anything too complicated here.

I know you guys rock and you will be able to help. Please again, ask if you need more info and I will give as much as I can.

Try to bake action. With selected all objects, that you need to be animated (so without empties) go to Tool Shelf>Animation>Bake Action, choose Only selected, Visual Keying, Clear Constraints, Clear Parents and Overwrite Current Action. For Bake Data select Object and for End Frame and Start Frame appropriate frames on which your animation starts and ends.Animation, that will be effect of that should be easy exportable to Unity.


Assigning shape key to a curve To create a shape key of a curve we need to start with the curve's base geometry and then move the points in edit mode to have the new form, that's assigned to shape key.
Is there a way I can directly assign a curve to another curve as shape key? I can then draw the two curves (or maybe import them from an external file) freely and assign one as the shape key of the other.

Found the answer here:
https://blenderartists.org/t/blender-add-on-to-import-shape-keys-from-youtube/1124990
Here's the add-on that does this:
https://youtu.be/XMimQfQR_ss
As per the suggestion in the comment, here's the brief description:
The add-on descried in the video above imports svg paths directly as shape keys. So if I have a rectangle and circle in the svg file and if I group them with rectangle at the top in the xml group, circle will be imported as shape key and rectangle as the target. Apparently, there are no limitations about the number of nodes, as texts can also be imported as a shape key. There can be many shape keys for one target.
Download link: https://github.com/Shriinivas/shapekeyimport


Ver 2.8 Texture paint works only on a few faces I ran into a problem today while texture painting a mesh. Did it multiple times before and everything went fine but not with this mesh.
Here my steps:

Made my mesh composed of few objects (nothing with weird shapes, just cubes)
Went in Edit Mode, selected all vertices, pressed "U" and selected "Smart UV Project"
Created an image for the UV map
Created a material with an image texture linked to the UV map Image.
Went into Texture paint mode and start painting on my mesh with paint mask activated so i can paint everything or just the faces i want.

Some faces got half painted vertically, horizontally or just a few parts of the face, some not getting any painting while some are good.
Don't know what I did wrong. Please help me!
Blend file link

Your problem probably comes from flipped normals, so select all in Edit mode and press ShiftN, now it seems to work:


How to export a motion tracked camera to 3ds Max? I have motion tracked my camera in Blender and have been trying to import it into 3d max. When I export it as an .fbx, the camera, when I import it into Max,  is facing the opposite direction to what it was in the Blender scene, and the animation that was on the camera, is on the geometry. I tried to change the forward axis of the camera in the export settings but this didn't effect the direction of the camera at all when I brought it into Max.

I tried an .obj, but only the geometry imported and it was all squashed together, and the camera didn't import at all.

So then I tried to export as a .dae, but although the camera is facing the right way, the tracking is completely off and very rough and jumpy, whereas it was perfect in Blender. Can anybody help me out here?

I've been doing this a lot recently at my work. I find the following solution works best:

Create a cube and align it to the camera exactly, one face should point exactly where the camera faces and you should note which face this is
Parent the camera to the cube, so that the cube follows the motion of the camera, then bake the animation of the cube and clear the parent, you should be left with a cube that follows the track of your camera
Note the framerate of your blender file, by default it is 24fps
Export the cube as a DAE file
Open max and ensure your project framerate is the same as in blender, if it isn't the animation will look weird.
Import the DAE file into max and align a max camera to the cube in the same way the cube was aligned to the camera in blender.
Link the camera to the cube then bake the animation of the camera and clear the parent.
script for this found here: http://www.scriptspot.com/3ds-max/scripts/bake-animation
Check that your max camera has the same FoV / Focal length as your original blender camera.


I can't make freestyle to work in blender 2.8 (file provided) I can make freestyle to work when I start a new project. But I can't make it work when I'm working in my scene. I tried reading lots of post everywhere but I can't solve this problem. Please help me.

Here is the file in case someone is willing to help.

http://www.mediafire.com/file/fcf321ap1lntuk8/Test_Anime.blend/file

You overfiltered the line selection.
Here is a working setting:

And HERE is the blender file.


Can I personalize the insert keyframe menu? In my animation I use a lot of restrict render and restrict view on/off.
Can I do something to display those keyframes when I type the I key (insert keyframe menu)?

Yes, it's done using Keying Sets:

Types of Keying Sets
There are basically two types of Keying Set in Blender: "Builtin" and "Absolute".
Builtin are the ones that are always available (context permitting) in Blender. They are the (familiar) ones that show up in the IKEY menu by default - "Location", "Rotation", "Scaling", and friends. All you generally need to know about these are that they are defined using in Python so that they can check the context to see what properties they should act on. This means that you CAN'T add/remove properties from them yourself unless you edit the Python code which determines what they use. If you're curious to add a few more 'builtins' that you commonly like to use, you can find these under scripts/keyingsets/ in your install directory. Be aware though that the attempts at making these definitions quite "modular" may initially be a little confusing for novice/beginner Python programmers, though they should still be quite easy to grasp. The topic of setting these up shall be left as an exercise to the reader and/or a future post :)
Absolute are the ones that you should be most interested in, as they are the "user-defined" Keying Sets, and are stored per Scene (that they are defined for). By setting up and using these carefully, you can improve your workflow quite a bit. Used appropriately, you can insert keyframes for a whole bunch of related properties with the touch of a key (or single click if you like), saving frustration from forgetting to key one of a bunch of properties and saving time jumping around keying multiple things separately. This has significant benefits, especially for the modern character animator working in the standard pose-to-pose full-pose blocking method, where keying every single control on every key-pose at once is the método comodo.

See the documentation written by the developer of this feature for more info:

Getting to grips with Keying Sets
Coding your own "Builtin Keying Set"


Weird shadow at object intersection in render view I Don´t know exactly what is happening, but when I intersect two meshes this strange shadow appears and I can´t find the way to take it out

It doesn't look like a shadow but like a Freestyle Stroke.

Make sure you have that unchecked in your render settings:


How to iterate through a PropertyGroup? I'm fairly new to using Blender's API, and Python for that matter, and just can't find the answer to my question elsewhere so here it goes:

I have a PropertryGroup and I want to write the names and the values of the contained properties into a file. They are mostly floats and 2 booleans.

My PropertyGroup ist for example looking like this:

class ExampleFloatPropertyGroup(bpy.types.PropertyGroup):
   float_a = bpy.props.FloatProperty \
   (
        name = "Float A",
        description = "Contains the value of Float A",
        default = 1.0
   )
   float_b = bpy.props.FloatProperty \
   (
        name = "Float B",
        description = "Contains the value of Float B",
        default = 2.0
   )

Within my operator I'm using it like this:

example_floats = bpy.props.PointerProperty(type = ExampleFloatPropertyGroup)

And so far everything works fine. I can work with it, pass it on to other classes, they can work with it and so on.

Now I tried to access the information that I need by using .items() or .keys(). For example like this example_floats.items().But as long as the values in my PropertyGroup are set to default, I'm only getting a completly empty return looking like this []

As soon as I change one of the values from default to something else, the returns are no longer empty but I only get the values that I did change, but still not the ones that are still set to default.

Also I'm only getting the key and the current value. I would also like to Access the property's attribute name. In this case "Float A" or "Float B".

So as the titles states, how can I iterate the single properties contained in a PropertyGroup, while retrieving the value and the name of the propertie?

I'm sure there is a relatively easy solution, but I was not able to work around that problem after hitting google for quite some time today.

Any help is greatly appreciated!

I am wondering the same thing too, but I found a solution in this discussion: here

After using help() or dir() in that PropertyGroup, you can find out some attributes inside this object as follow:

['__annotations__', '__dict__', '__doc__', '__module__', '__weakref__', 'bl_rna', 'name', 'rna_type' , "SOMETHING", "YOU", "DEFINED"]

Depend on what version of blender you are using, you can iterate these attributes to get what you defined.

For Blender 2.8, since the APIs forced developer to use annotation instead, you can find all attributes(as a dict) you defined in bpy.some.where.thePropertiesGroup.__annotations__ without those inherited attribute from PropertyGroup.

If you want to get those attribute, you should use built-in getattr() method as following:

for key in propsgroup.__annotations__.keys():
    the_value = getattr(propsgroup, key)


Blender crashes on start- "failed to set 44100 hrz" My friend was having trouble with Blender launching. He has tried reinstalling, updating windows, and updating drivers, but always gets the same message in the console before the program closes-

UpdateDeviceParams: failed to set 44100 hrz, got 480000 hrz instead
found bundled python: C:\blender-2.78c-windows64\2.78\python

He also tried installing through Steam and got the same problem. Anybody know how to fix this?

You need to set your sound settings from 44k to 48k, here is how:

Before that, my windows version at the moment is version 1909. Windows settings might be changed in the future.

1)Open settings
2)Select "systems"
3)Select "sounds"
4)
5)
6)
7)Apply and close all windows. launch blender.

If works, you may stop here, otherwise if you are stuck on grey screen in Blender:

1) Windows Key + R
2) type cmd . press Enter .
3) press Windows Key

4)

5) Drag

6) Press Enter and it should work.

That is all I know.
This minor issues happens a lot when you are using old pcs, laptops or old nVidia card as i know, because new apps might use new settings etc.


blender viewport unlink In the 3D view header, we can see a small button that looks like a link chain:

What does this button actually do? Please give me a demonstration.

It is a switch that allows you to show different layers in separate windows. If toggled all views show the same layers.

Read: [How to display different layers in each 3D View?]

(How to display different layers in each 3D View?)


How to get the mirror image of an empty? I have a rotated empty object, and I want to make a mirror image of it, relative to the global X-axis.

I placed the 3D cursor at the axis origin, selected the empty and used Ctrl-M X. But the result is not what I want. As you can see in the image, the empty is merely translated to its mirror image location, and its rotation is unaffected. I expected the new empty to be a perfect mirror image of the previous one.

Is this a bug, and is there a way to achieve what I want ?

Edit: After suggestion by Fweeb, I displayed arrows instead of plain axes. It's sort of transformed, but it's not what I expect from mirroring relative to X-axis.

Edit 2: What I expect is roughly this:

Edit 3: After the answer by Gandalf3, I played with rotations and obtained the desired effect by setting the rot and scale of the new empty manually: scale x = -1, y = -1, z = -1 to obtain a negatively oriented emtpy, then rotX' = rotX + 180, rotY' = -rotY, rotZ' = - rotZ. It is certainly possible to do the same relative to other axis. But I'm still surprised by Blender's behaviour, and I thought it would do this automatically.

It would seem that the only way to do this is by mirroring, then inverting the rotation manually:

Mirror your empty with CtrlM:

Invert the rotation of the mirrored empty by adding a - (or removing it if the rotation is already negative):

You can automate inverting the rotation with a simple python script:
import bpy

ob = bpy.context.object

ob.rotation_euler.x = ob.rotation_euler.x * -1
ob.rotation_euler.y = ob.rotation_euler.y * -1
ob.rotation_euler.z = ob.rotation_euler.z * -1

To use, first mirror the object with CtrlM, then run in the text editor with the mirrored object selected.


Rigging 2D elephant trunk corrupts the mesh I’m struggling hard with a rig for an elephant trunk. I want the trunk to rise up in the air and trumpet. I tried to increase and decrease the vertices, I’ve tried bendy bones and assigning the bones manually via the vertice groups. Which ever approach I choose, it seems that when I exceed a certain angle in bending, the mesh gets corrupted. How should I proceed?

Image of trunk. Slightly modified by reader.  Note the armature could be placed closer to mesh before armature binding.

A tube with an armature as its spine which used Bind with automatic weights.  Image above.

Back up your current work with file save
Create a new quick cylinder with loopcuts say 20. Scale to your tastes and elephant trunk shape.  Keep the cylinder in straight line.
Create a new armature with 20 bones. Keep the original straight shape.
The more loop cuts in the cylinder mesh, with more bones in the armature, will allow a smoother movement.
Move the armature to be located in the cylinder. Make sure trunk is reasonable tight fit to armature. A tube with no fancy shape is fine because the tube can be changed later after binding to armature.  The learning experience will be better.
The above steps will take 8 minutes with practice
Ensure the placement by examining from different angles
Bind Trunk to Armature with automatic weights
You may choose reserve frame 1 for the straight armature shape and insert keyframes for all bones.
Move to some other frame say frame 8
Test the binding by rotating bones of the armature in pose mode. Insert keyframes.
You can create a shape key for the cylinder mesh if you like
You can shape the trunk with more lifelike shape
These above steps are an improvement. If you wind the bones in too tight of a spiral you might not like the results. Bad results such as this can be true of any simple model for Blender Beginners.
Delete all previous work when satisfied.  Your previous work has some new user problems which can be discarded.  A fresh start can be good.
Be aware of the Spline IK constraint which allows a smooth curve to control the armature and may save time once its mastered


Speed up Fluid Simulation for Fluidless Frames In my fluid simulation all inflows are disabled until around frame 620. There is absolutely no fluid in the scene up until this point.

I would have thought that the fluid simulator would quickly process these frames and skip them since it would be trivial to determine that there is no fluid to simulate.

However, during baking these frames are taking as long to process as a frame full of fluid would. It seems like it is going to take blender an hour to "bake" 600 frames with zero fluid.

Is there any way to make blender skip the processing of these frames and only start the actual simulation at around frame 600?

The speedup is possible:

Update based on comment for Blender 2.81a:
(To my best knowledge, as it is a good bit more complex.)

This older version does not use Mantaflow, means it's still using the older fluid solver, which takes it's Time Start and End values as Seconds and not frames.

There is a bit more to the simulation with the old solver:

Time Start and End are values expected in seconds
Using any value higher then 0 as start essentially means the simulation skips the time til then and the result will be like starting in the middle of a movie.
The time between start and end (default 4 seconds) is stretched/squished according to the timeline given Start and End. Lets say start frame 1 and end-frame 200 with 25 fps, would mean the 4 seconds would be simulated over 200 frames.Essentially stretching it as 200/4 is 50 and not 25 fps. So to have the speed correct we would need to set End to 100. If the simulation is set to end at 8 seconds, 200 frames would be right, different fps though can make this equation a bit tougher.
After the simulation is baked, it can be played with an offset, means then you can use a positive offset to start the simulation again somewhere(depending on the frames given) from the middle, or use a negative value to delay the simulation and start it later then it was calculated for. "-25" would make it then start 1 second later at frame 25. (Why at one hand seconds and on the other side frames are used, is beyond me.)
Last but not least, there are 2 other places you may need to visit and adjust:

Making the timeline show seconds as to have a better indicator for how long the simulation may go and

the Output Properties to adjust the "Frame Rate" with it's "fps", as that influences the timeline as well as the calculation you may need to do to figure out what to set the simulation end and later offset.

Friendly suggestion, I'd update to the new stable Blender version 2.82a with Mantaflow if possible, as below shown the setting up became a lot easier:
You may not only have to time the inflow(s), but also set the Frame Start in the domain. See picture below, the frames that will be calculated, be there fluid or not, are set in the Cache Section. All in frames.
Version 2.82a+

While you can always cut off the inflow, the simulation is stubborn and goes through all frames between Frame Start and End when you bake.

Happy Blending


When should I use Quaternion (WXYZ) and how should I handle the W Quaternion Rotation? As I (seem to) know from some comments the use of Quaternion or Euler depends on what we want to animate and that Quaternion can handle very complex animation and avoid problems which sometimes occur in Euler.

But in which occasions (simple walk/run animation, jump/bounce animation, etc.) is Quaternion commendable and are there any advantages using Euler? If yes, which?

I've also tried to understand the usage of the W rotation, but somehow I don't understand it and therefore can't handle it. Let's say, it's recommended to use Quaternion on jump/bounce animations. How should I handle the W rotation? Are there any occasions where I shouldn't change its values via the graphic editor or should I always leave it as it is?

The use of Quaternion rotation is to avoid the gimbal lock problem with the Euler method. Usually if your object only needs to rotate around one axis or two Euler would do the job. Like a wheel or a wobbling top. But when you have to animate a fighter jet that rotate all around your scene you may encounter the gimbal lock. To understand gimbal lock there is a great youtube video here.

https://www.youtube.com/watch?v=zc8b2Jo7mno&ebc=ANyPxKotx5yqp4L-5ns71ub2mroVOiQurhhNglI3Clsz0Ejev6D5cQa628-MDJhSkEYeGL-nj35Kec7Ka1upJrS9ZpoMMMaq_w

There are also gotchas in quaternions, it tends to solve towards the shorter path. Meaning if you were trying to rotate say 270 degree clockwise, quaternions would solve by rotating 90 degree counter clockwise. So to solve this correctly you need to add a in between keyframe to use quaternions properly. As described in this video here.

https://www.youtube.com/watch?v=R7zncPFGYck

DEMYSTIFYING W
WXYZ are interdependent. Therefore we should never modify them in their values entry box individually. To modify the object rotation simply use R and specify the axis you would like to rotate the object in. With that Blender will translate the rotation on screen into quaternions value if quaternions is the selected solving method.

ARMATURE & BONES
When you are working with armature or bones. In edit mode you will firstly be positioning those bones with Euler. When you switch to pose mode and actually animating, Quaternions are used for solving the transformation of your character's limbs. Often in a rig we use IK bones (Inverse Kinematics), and the IK will drive the armature and in turn quarternion will solve the positions of the bone. We will have no need to edit any of the WXYZ values manually.

EXTRA NOTE
Quaternions values are not in degree. Euler uses degree as it's unit. The math behind quaternions are much more complex the 4th dimension (W) allow quaternions method to avoid the gimbal lock of the 3 dimensions that Euler is limited to.


Animate a ballista firing I created a tower with ballista on top and I want to animate it firing and reloading etc. My idea for the animation is to create a cylinder as the ballista bow string as in this image

I found several tutorial about adding keyframes to record the movement of an object as a whole. But in this case I need to record the movement of the middle part of the string only, drag it backward to stimulate the movement of a bow, like this

Maybe my idea here is dump af since I just started Blender for a few month, so any recommendation is much appreciated :D
Thank you in advance!

You could use shape keys.
In Object mode select your object and in Object Data Properties give your object two shape keys. They will be named Basis and Key 1.

Select Key 1 and toggle to Edit mode. Select the middle vertices of your object. Make sure proportional editing is on (o key) and the mode is set to linear. Press g and adjust the white circle so that is covers the string (Mouse scroll wheel). Move the vertices until it looks good.

Toggle to object mode and change Key 1 Value. This value can be keyframed to create animation.

PS. If you use only a little bit geometry in your bow string then you don't even need proportional editing. You can just grab and move the vertices where you want. If you want to edit the actual bow to move while firing then proportional editing is handy.


Object snaps upwards when trying to link with armature I'm trying to link an armature I made for a model to a different model (with a very similar shape), but when I try to link them together (ctrlp -> Set Parent to Bone) the model snaps upward. I thought this might be because the 3D cursor isn't set to the right place so I checked and gave it another try but that didn't seem to work either.

I'm hoping this image describes it well enough. The moment I select Set Parent to Bone, it immediately snaps up. If I could get help that would be really great, thanks!!

EDIT:
thanks for the suggestions. i tried both resetting the armature to its original position and 'Set parent to -> Armature Deform -> With Automatic Weights/With Empty Groups' but the snapping still seems to be happening.
i've added the .blend file below if that helps. i apologise if it's a very noob-y issue as i'm quite new to blender and i've been asking a lot of novice questions.

thank you!

You shouldn't be setting the parent to the bone. You should be setting "Set parent to -> Armature Deform -> With Automatic Weights" or "With Empty Groups" depending on your needs.


Render each strip from NLA editor? I have 20 different strips on the NLA editor, and am trying to render all of them.

How do I:

Render each strip seperately into it's own output folder
Render only active frames/keyframes

Python looks promising, but I was wondering if anyone could give a few hints on the methods needed.

Something along the lines of:

for strip in nla.getstrips()
{
   dopesheet.add( strip );

   active_frames = dopesheet.getKeyFrames();

   start_frame = active_frames.first();
   finish_frame= active_frames.last();

   render( dopesheet,
        range = [start_frame, end_frame],
        outfolder = strip.name()
   );

   dopesheet.remove( strip );
}

Looking at 1. to render each strip into it's own folder we can make a list of each nla strip, here I store the mute setting to restore later and mute each strip as we go through.

Then loop through our list of strips and render the frame range of each one, by setting the render.filepath here each strip can go into it's own folder.

To also achieve 2. you could look at the script in this answer and incorporate it into the rendering loop.

import bpy

output_dir = '//renders/'
scene = bpy.context.scene

# make a list of strips used in the NLA
# strips are found in -
# object.animation_data.nla_tracks[TrackName].strips[stripName]
nla_strips = []
for obj in scene.objects:
    if obj.animation_data and obj.animation_data.nla_tracks:
        for track in obj.animation_data.nla_tracks:
            for strip in track.strips:
                nla_strips.append((strip, strip.mute))
                strip.mute = True

# save to restore later
orig_frame_start = scene.frame_start
orig_frame_end = scene.frame_end
orig_filepath = scene.render.filepath

# render each strip
for strip in nla_strips:
    scene.render.filepath = output_dir + strip[0].name + '/'
    scene.frame_start = strip[0].frame_start
    scene.frame_end = strip[0].frame_end
    strip[0].mute = False
    bpy.ops.render.render(animation=True)
    strip[0].mute = True

# restore changes we made
scene.frame_start = orig_frame_start
scene.frame_end = orig_frame_end
scene.render.filepath = orig_filepath

for strip in nla_strips:
    strip[0].mute = strip[1]


CTRL+ALT+SHIFT+C Is not working for me I have a model I need to rotate around the center. I have put the 3D cursor in the center of the grid. I've hit the hot keys and selected "Origin to 3D cursor" but it does not move. At least not while my current object is selected.

If I unselect the current object it does it, but when I select the object again, it goes way back up into space again.

you dont have to change the origin point to rotate around the 3D cursor,
just change the pivot point in the 3D view header to "3D Cursor"

The Blender Reference Manual covers this here:

https://www.blender.org/manual/de/editors/3dview/transform/transform_control/pivot_point/index.html


Install Addons in Headless Blender Is it possible to install a Blender addon in headless mode? I need the ability to export gltfs from a Ubuntu server instance and the only instructions I can find for installing an addon in Blender is through the GUI.

Is there a command line argument? Or is it possible to unzip the addon somewhere that will work with Blender?

Using python you can install an addon with bpy.ops.wm.addon_install(), you can then enable the addon with bpy.ops.wm.addon_enable() and disable it with bpy.ops.wm.addon_disable(). To keep the addon enabled every time you start blender you save your settings with bpy.ops.wm.save_userpref()
For addon_install you give it the filepath to the addon, this is the same file you would choose if you were using blender's GUI.
To enable or disable an addon you need to specify the module name, that is the folder name installed into the addons folder or the filename without .py for single file addons.
import bpy
bpy.ops.wm.addon_install(filepath='/home/shane/Downloads/testaddon.py')
bpy.ops.wm.addon_enable(module='testaddon')
bpy.ops.wm.save_userpref()

There are two ways you can make this work remotely through the CLI.
Save the steps in a script and run it.
blender -b -P enableaddon.py

Start blender as a python console and type each in directly.
blender -b --python-console
Python 3.5.2 <snip...>
(InteractiveConsole)
>>> import bpy
>>> bpy.ops.wm.addon_install(filepath='/home/shane/Downloads/testaddon.py')
>>> bpy.ops.wm.addon_enable(module='testaddon')
>>> bpy.ops.wm.save_userpref()

Note: For Blender 2.80+, things are slightly different:
>>> import bpy
>>> bpy.ops.preferences.addon_install(filepath='/home/shane/Downloads/testaddon.py')
>>> bpy.ops.preferences.addon_enable(module='testaddon')
>>> bpy.ops.wm.save_userpref()

Use ⎈ CtrlD to exit the python console and quit blender.


How to let people see message in add-on preference? I want to type some message for people to see when they just installed the add-on. I need a message to them in add-on preferences. How can I do it?

Type your text in add-on preference script:
bl_info = {
    "name": "Example add-on",
    "author": "Your name here",
    "version": (1, 0),
    "blender": (2, 92, 0),
    "location": "Your location here",
    "description": "Your description here",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Development",
}

import bpy

class AddonPreferences(bpy.types.AddonPreferences):
    bl_idname = __name__
    def draw(self, context):
        layout = self.layout
        col = layout.column()
        #Type your text
        self.layout.label(text="Your text here")

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

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

Finally I got this


Blender Path Deform Bone Contraint Deforms Mesh I am making a tram model to follow a path, so the "cars" turn naturally. I found this tutorial on Youtube and I have followed it to a "T", but something has gone awry.
When I turn on the bone constraint "track to" to follow the triangle cube thing, the first bone completely distorts the mesh.
I have done it before, using the same copy of Blender 2.84 (the latest "official" release from Blender) and I cannot replicate results. I have no idea what is going on. Is it just Blender being Blender?
The video I am following.
https://www.youtube.com/watch?v=VXheGvyEz3A&t=1086s
I would ask the guy directly, but comments are turned off and no contact info available.
Here is link to my blend file.
https://www.dropbox.com/s/5ygb9u15ibomi3h/followpathdistort.blend?dl=0

There is another method for this kind of purpose, which is better than this one, given here by Batfinger. That said your problem is just that your vertices are influenced by other bones, if I select one of the 4 back face vertices, here is what I see (by the way, Bone is probably your root bone, you haven't disabled its Deform option):

So simply click on the X button to remove these vertex groups, or use the Weight Paint Subtract brush.


Can't snap two objects without space between I can't snap two objects. It's always make space between them. I found this answer, but these 4 steps taking me little long. So i am asking, if there is faster way to do this.

Snap is on vertex and closest.

Are you snapping in Object Mode?  If so, the only snap source will be the pivot point of the object you are moving.

If you snap in Edit (Vertex) Mode, switch the snap settings to target 'Vertices', with the source set to 'Active'. Select all the vertices in the moving object, and Shift right-click the vertex you would like to be the snap source twice to make it active. Now with snap switched on, move the active vertex over the vertex you would like it to match.. it will bring the other vertices along with it.


Problems with extruded curve and solidify modifier I'm relatively new to blender and am having issues with a curve that has a solidify modifier applied to it. I'm trying to 3d print cookie cutters and need to take custom curves, extrude them to a specific height, then give them a thickness, like 1-2mm. I've configured blender to use mm as my unit of measurement and everything seems to be okay. However, when curves are too sharp, as shown, they get these weird overlaps which end up becoming holes in my print.

Image of curve  with weird artifacts:
https://cl.ly/a5cf7eadb762

My solidify settings:
https://cl.ly/b12de88a42ab

The geometry settings:
https://cl.ly/ad8a526e4f17

What it looks like when I bring the exported .stl into tinkercad (for example): https://cl.ly/c4cf484e2872

What am I doing wrong here?

It seems logic that if your angle is very sharp, your Solidify modifier may create a problem, because the thickness profile can easily overlap itself. So I guess what you have to do is either change the Thickness to a negative value (in your case), or convert your curve to mesh and bring some corrections manually.


Need rigging help for a robotic jaw holder So this is what I'm trying to rig, but I'm not too experienced with rigging so I had some problems trying to rig this.

This is what I currently have and it's obviously bad. I want to make it so it would look the way it would act naturally. Basically:

-The wrinkly black tube needs to stretch normally.

-The red "caps" on the small black tubes need to follow the mesh of the tube it stands on.

-The small black tube on which the red "caps" aren't standing on needs to stay connected to the other small black tube. (I'm not good at naming these.)

-The small black tube holders need to move their black and gray front parts so they wouldn't clip with the screen, my problem is not that, but making the small black tubes stay connected with them.

I don't know how to describe this better but I simply want this mesh to react normally to the rig

Anyone know how I can achieve this?

Various constraints can provide the functionality you are looking for.

For the rigid tubing connected to the main column I would add bones in place to move them. To get them to follow the upper arm movement I would add a Copy Rotation constraint, only enable the axes you want to use and adjust the influence so that they rotate less than the main arm. For the lower piece I would use a StretchTo constraint to keep the end attached to the other tube.

For the flexible tubing going up to the arm, create several small bones to deform the tubing and add a curve to match the rest position of the tubing, then use hooks (see below) to deform the curve and use the curve in a SplineIK constraint to move the bones you positioned for this.

Setting up hooks can be confusing and a little awkward, the step are -

Select the upper arm in pose mode.
Shift select the curve (the outliner can make this easier)
Enter edit mode for the curve.
Select the point in the curve that you want to move with the arm.
Press ⎈ CtrlH->Hook to Selected Object Bone

Now exit edit mode and move the armature, the end of the curve should follow the bone. Note that the viewport lags behind with the splineIK but it will be in the right place when rendering. Repeat for the other end of the curve.


How do I get particles to change color over time? I saw a conversation on BlenderArtist.org where someone posted a node setup that supposedly would change the color of particles over time based on the Particle Info node's Index value. This is the graphic they posted:

However, when I tried to duplicate this effect, the particles don't change color over time.

Here is my blend file.

Here is the original conversation

Two Techniques to Have Particles Change Color Over Time

I discovered two ways to have particles change color over time, but they both start the same way:

First, create an object to be the particles for the particle system. I used a sphere in the videos below.
Create an object (I used a plane) and add a particle system to it with these settings:

In the Emission section for the videos below, I have:
Number = 1000
Start = 1
End = 200
Lifetime = 200
In the Velocity section, set Normal to a desired value. I used 7.0 in the videos below.
In the Render section, select Object and then for Dupli Object select the object you made for the particles in step 1.

Now add a material to the particle object. Here is where I discovered two different node tree configurations to create two different effects:

Effect #1: Each particle is a different color & stays that color over it's entire lifetime

For this technique the node tree for the particle object's material is made like this:

NOTE: For this effects, the Divide node's Value must be set to the number of particles in the particle system (here, it's 1000)

This technique was developed by kubo on BlenderArtists.org.

Effect #2: All particles change color over the course of their lifetime

This is the node tree for this technique:

NOTE: For this effects, the Divide node's Value is set to a low number (here, it's 50), not to the number of particles

This technique was developed by Vader and Greg Zaal here on StackExchange.

Previewing the Effect

If you want to see the colors changing in the 3D Viewport, the display mode must be set to Rendered


How Can I make the Camera follow an object but with a delay? I can get the camera to follow the object when it moves, but I would like the camera to be delayed so it moves slightly after the object moves, instead of that ridged movement where it all moves at the same time.

Slow parent needs to be enabled, and then set it to the amount of slowness you want the camera to lack behind. My English is terrible and I can't think of another way to word that.


I have no particle systems in my menu options I am new to Blender. I have no Particle Systems in my menu options.

Is it an add-on I need to download or is there something I need to purchase?

As far as I know, you can't add particle systems to curves. Try another mesh. Cube for example.


Import/Export Rhino's 3DM format to/from blender Is there a plugin to import/export rhinoceros' 3DM files to/from blender?

If there's no plugin yet, would it be possible to write one or are there technical limitations to do such a thing? I suppose somebody would have written something by now...

I'm asking this because I swap files with people who only work with rhinoceros, but most of them only know basic modelling and panic when I start speking about STL file-format.

Thanks in advance

I have successfully imported a 3dm file into Blender on manjaro linux using following plugin : https://github.com/jesterKing/import_3dm


Issue displaying geometry in edit mode I have encountered a display issue that I am not quite sure if it is a problem or a feature.

Everything works ok in Object Mode, but when I switch to Edit Mode, the geometry is displayed with a kind of double-border (I don't know how else to describe it!), as if the geometry was the bounding box of some some inner volume (see screenshot below).

With just the cube this style of display is kind of workable, but when the scene gets crowded, this feature gets increasingly confusing I suspect this is a display feature, but I cannot find its settings anywhere; also, I could not find any information at all concerning the topic (to be honest, I wasn't even sure of the keyword to search); I only found information about the "Limit Selection to Visible" toggle; but I am fully aware of that feature and it works fine. If this display mode is a feature, does anybody know its use and how to disable it to display a solid geometry in Edit Mode?

I am using Blender 2.76b on Windows 7 with 8GB RAM, AMD and 2GB AMD Capeverde.

Can anybody help? Thanks in advance.

Regards,

Sept

Thank you for your help. On reviewing the post suggested, I found the solution.

It appears that the 3D clipping property needs to be within reasonable ranges, otherwise the edit mode display will be deformed; my viewport clipping ranged between 1 cm and 10 kilometers at the time I experienced the problem; when I dropped the end-clipping to 1 km, the problem with the weird display in the viewport disappeared.

It is interesting to note that exactly the same happens with camera view; if the camera clipping settings are outside a certain range, the geometry will show the double-border in edit mode, although only in camera view.

I found that The clipping range 1cm to 1km in metric (or .001 and 1000 in generic blender units) works well for both viewport and camera views.

I hope this information is of use.

Regards,

Sept


Separate actions in export I have several rigs and animations. I want to export only the current action to .fbx; however, I do not want to delete the others. Is this possible?

Actions (animations) and FBX are a bit tedious… Think what you want is 'scene' animation export (as in, only get 'active' action applied to animated objects)? In this case, you should disable 'All Actions' (and probably also 'NLA') options from Animation tab in FBX export settings.


How to create a glass textue with streaks Inspired by Daniel Krafft on YouTube, I wanted to remake the League of Legends Icon with a somewhat 3D look with glass in the middle. (Replacing the blue, streaky part in the middle.) So far I looked on a couple of texture websites but can't really find anything close. I've also tried to use glass shader and color ith using a wave node with a color ramp. Unfortunately, that doesn't really achive the look I want. I appreciate any ideas, but please keep in mind that im really new to Blender and likely wont understand too advanced texturing stuff :).
Thanks

You could try a mix between 2 textures like a Musgrave Texture and a Noise Texture that are used as factor between an Emission and a Transparent node. In Eevee don't forget to choose Blend Mode > Alpha Blend in the Material panel > Settings.


Modifiers array and curve I have curve and plane with modifiers array and curve. I can not get the exact plane guide on the curve, sharp verticles. Anyone help?

Instead of array and curve on a plane, you could use a "straight" simple curve as a bevel object of your main curve, as shown below:

to animate the "shape" to follow the "curve", with all straight angles, you could just animate the start/end bevel factors, es:

subdividing the "path" curve more, in particular near the corners, will give more control on how the tip/end of the shape will follow it.


Is it possible to project a 2D rendered image back to its 3D model? I want to modify a 3D model in a particular way. Render images, modify these images (using a python program), and project these modifications back onto the texture. Is this possible or not?

Yes it is possible and called projection painting. CGMatter has tutorials on this topic that should get you started. Blender 2.8 Texture extraction projection painting (part 1) and Blender 2.8 3D Object removal projection painting (part 3)


Prevent particles from intersecting with a mesh used as a container I am new to Blender 3D and am trying to model a garden stone pavement using a particle system.

What I desire to achieve and what I already did are attached below.

I need to limit the outer volume of the stones so they stay inside the base mesh. As it is unnatural that some parts of the stones be cut by other bounding meshes.

Particles are probably not gonna cut it alone, I'm afraid. I'd go with a rigid body simulation to make it work.

Add a temporary mesh roughly shaped as the final distribution of the stones, but add it some walls to confine falling stones as below.

Turn you stones placed above said object into Rigid Body Active, and the container as Rigid Body Passive.

Adjust details as necessary, in the end remove or hide the container mesh.


Import camera information from Sketchup Is there a way to import Sketchup scenes into Blender as cameras?

I can get the geometry into Blender without any problems; my issue is that I'd also like to bring along the scene viewpoint as a camera.

The data obtained from SketchUP API is like this:

mod = Sketchup.active_model
vue = mod.active_view
cam = vue.camera

cam.eye
> Point3d(240.719, -236.069, 102.276)

cam.target
> Point3d(-285.372, 553.004, -82.0446)

cam.fov
> 35.0

What is a convenient way to convert this into a new camera?

If that's all sketchup gives, then it's a little awkward -- but I think still doable. Maybe something like this. You will have to 'tame' the dimensions yourself.

import bpy

# Data from Sketchup.
cam = {
    "eye": (240.719, -236.069, 102.276),
    "target": (-285.372, 553.004, -82.0446),
    "fov": 35.0,
}

# Create empty to target.
bpy.ops.object.empty_add(location=cam["target"])
target = bpy.context.object

# Create camera.
bpy.ops.object.camera_add(location=cam["eye"])
bpy.context.object.data.lens = cam["fov"]

# Configure camera to track the empty.
constraint = bpy.context.object.constraints.new("TRACK_TO")
constraint.target = target
constraint.track_axis = "TRACK_NEGATIVE_Z"
constraint.up_axis = "UP_Y"


Export Premiere Pro Camera Track Data to Blender? I'm new to Premiere Pro, but I understand that it has a camera tracking capability. Is it possible to extract this data and feed it into Blender, as can be done in After Effects?

Since Premiere Pro is closed-source, you'd have to find documentation on its API or its data format first. Just use Blender's camera motion tracking features instead.


How to refer to an image by it's label name (Python) I want to create a function that will link from a node that has already been created and connect it to one I have just made. In my case, I want to have a Texture Coordinate and whenever I run this function, it will connect the TexCoord's UV output to a new image texture's Vector input.

I can label the node using

<!-- language: lang-py -->
#Convenience variables
nt = mat.node_tree
nodes = nt.nodes

texCoord = nodes.new("ShaderNodeTexCoord").label = "Master Vector"

It successfully labels the node, but I'm not sure how to use that information in order to call it later on.

Also at this point, when I label it this way it stops playing nice with the rest of my code.

Full code:

import bpy
mat_name = bpy.context.active_object.active_material.name
image_path = "E:\\PBRTest Folder\\example_AO.png"

mat = (bpy.data.materials.get(mat_name) or
       bpy.data.materials.new(mat_name))

mat.use_nodes = True
nt = mat.node_tree
nodes = nt.nodes
links = nt.links

# clear all other nodes
while(nodes): nodes.remove(nodes[0])

output  = nodes.new("ShaderNodeOutputMaterial")
diffuse = nodes.new("ShaderNodeBsdfDiffuse")
texture = nodes.new("ShaderNodeTexImage")
texCoord = nodes.new("ShaderNodeTexCoord").label = "Master Vector"
mapping = nodes.new("ShaderNodeMapping")

texture.image = bpy.data.images.load(image_path)

links.new( output.inputs['Surface'], diffuse.outputs['BSDF'])
links.new(diffuse.inputs['Color'],   texture.outputs['Color'])
links.new(texture.inputs['Vector'], mapping.outputs['Vector'])
links.new(mapping.inputs['Vector'], texCoord.outputs['UV'])
#links.new(texture.inputs['Vector'],    uvmap.outputs['UV'])
# distribute nodes along the x axis
for index, node in enumerate((texCoord, mapping, texture, diffuse, output)):
    if node == mapping:
        node.location.x = 200.0 * index
    else:
        node.location.x = 300.0 * index

If that is going to be the only texture coordinate node in the tree something like this might be adequate:

import bpy

mat = bpy.data.materials[0]

tcs = [ node for node in mat.node_tree.nodes if node.bl_idname=="ShaderNodeTexCoord"]
# python list comprehension filters the list of nodes down to the ones that match the right bl_idname

tcnode = tcs[0]
# grab the first node of the one(s) that match the bl_idname