Run modal timer depending on a condition I have a button for a modal time operator, when I press on it the modal time operator starts and the button is dimmed/disabled (as I wanted, depending on some conditions in the poll function) and everything works fine. But if I saved the file (with the button dimmed) then closed blender and opened it again the button will still be dimmed (As I wanted in the poll function) but the modal time is not running. How I can get it running? There is a certain condition in the poll function which is when it's True I want the modal timer to starts even if the button is dimmed. Any advice please?

Below is a sample code:

class modaltimeoperator(bpy.types.Operator):
        """Start modaltimeoperator"""
        bl_idname = "wm.modaltimeoperator"
        bl_label = "Start modaltimeoperator"

        _timer = None

        @classmethod
        def poll(cls, context):
                # depending on some conditions in my scene the visibility
                #  is turned on/off. One of these conditions satisfies the
                #  modal timer to be run again

                return on_off

        def modal(self, context, event):
                scene = context.scene

                if event.type == 'LEFTMOUSE' and event.value == 'RELEASE':
                        print('entered correct event')

                return {'PASS_THROUGH'}

        def execute(self, context):
                print('entered execute')

                wm = context.window_manager
                self._timer = wm.event_timer_add(0.1, context.window)
                wm.modal_handler_add(self)

                return {'RUNNING_MODAL'}

        def cancel(self, context):
                wm = context.window_manager
                wm.event_timer_remove(self._timer)

Running timers based on the file you have open can be done by defining a handler on bpy.app.handlers.load_post.

This handler can check the state of the blend file and start executing based on this.


Red Line Indicator in Pose Mode In opening an older model in 2.81, a couple of the bones show a red curve in pose mode:

As you can see, it happens to conform with the positioning of this bone's tip when rotating 180 degrees to the left and upward, in the axis perpendicular to this view.

The bone previously had an IK on it; the red line remains even after removing such. Other than that, comparing all properties between it and other bones, I see no other explainable differences.

Curiosity has me. What property displays this indication curve in pose mode?

Thanks.

It's probably because when you assigned it an IK, you also gave it a rotation limit, you'll find it in the Properties panel > Bone > Inverse Kinematics. As you can see if the Limit X rotation box is still activated, it is just greyed because the bone doesn't have any IK constraint anymore, and the red line still appears on the 3D view.


How to bend two parts of a flat objects on two different axis? Hi guys, I already posted this on reddit blenderhelp but I think it kinda became a meme, and even though I fixed a few things my problem hasn't been solved.

I tried the bend tool and simple bend modifier with no success because it didn't give me enough control on the bend trajectory, I then tried the bezier curve modifier, I applied a bend on the X Axis, to have the wrist part curve, then a second bend on the Z axis to have the top part curve down too.

My problem is that I want the top part to be flat on the X Axis, because after a 180° Z Bend, the top part of the object now moves away from the X Bend trajectory, as it is now mirrored.

I tried applying Vertex groups on the bottom half so that the top wouldn't bend on the X Axis, but blender doesn't make a smooth transition between flat and bent parts, I get weird connection polys instead of a fluid twist (or untwist in this case).

Is there any simple way to bend an object in two different directions ? A bit like so https://blenderartists.org/t/c4d-like-bend-deformer/1146668

You could go with the Bend, using limits and Axis/Orientation Empties in the modifiers, but IMO, you would get finer control over the curves using Curve modifiers throughout?

Excluding the flat region from the circular curve modifier

In order to keep the end of the folded-over region flat, it must remain unaffected either by the mapping of the entire object into the curve, or the subsequent deformation. The first is achieved by arranging origins.

The circle's origin is placed at its first vertex, and at World 0.
The object's origin is placed at the center of its X dimension, at its minimum Z
The object is then translated in X (effectively rotating it around the circle under deformation) until the part of the mesh we want to remain stationary is directly above the circle's origin.

The second is achieved by weight painting:

The circle Curve modifier (deforming in X) is aimed at a vertex group - it does not affect the unweighted region:

The bottom is curved, the top remains flat, and in place.

Adding a second curve modifier to fold over a section.

The folding curve modifier deforms in Z, its curve can be anywhere you like in X, but here shown with its origin in the same place as the circle curve.

You could flatten more or less of the flap with weight-painting.


How can I get physics objects to for a tight container? Now in Blender Game Engine in 2.79, and previously in other components, I've frequently encountered situations where a seemingly closed container still lets other physics objects through. For example, in this model, I made a number of intersecting planes that are static physics objects. There are no gaps between the edges or at the corners. Indeed, with the overlap there is extra plane overhanging the edge of the box. I've also tried specifying collision bounds, including a larger margin. Nonetheless, other objects keep going right through the box.

How can I make a closed container in Blender?

Thank you!

Very fast or small objects seem to miss the collision detection. Keeping objects bigger and slower manages this issue.


Why are objects rotation rotated a little bit when they are set to 0? I have a simple python script that tells me an objects rotation (a property reads the rotation). I have a static object with its rotation set to (0, 0, 0); however, when I load up the scene, the property reads a long decimal with a value very slightly higher than 0. This shows that the object has very little rotation. Is there a way to fix this other than changing the objects rotation with a script? In other words, keep the rotation at 0 at scene start? Thanks!

All terms of the orientation matrix are expressed in float values (floating point numbers). These numbers have a specific precision. This means when you calculate with them you get very small, but existing deviations from the "ideal" number.

This is especially noticeable around zero. Therefore you might print something like -0.0. This seams illogical but it means you have a number that is smaller than the precision of the formatter.

Unfortunately you did not include any further details such as what term you are reading and what the value is or what your code is.

My own investigation shows me:

<Matrix 3x3 ( 1.0000, 0.0000, 0.0000)
            ( 0.0000, 1.0000, 0.0000)
            (-0.0000, 0.0000, 1.0000)>

The [2][0] value is indeed -0, but it has no further consequences. You will not notice that in your scene.


How do I rotate a face around an axis in normal orientation in Python? I have a set of vertices for a BMFace that I'm trying to rotate around the x-axis but in the face's normal orientation. Currently I'm doing:
c = face.calc_center_median()
T = Matrix.Translation(-c)
rot_angle = 0.25
rot_axis = (1, 0, 0)
bmesh.ops.rotate(
    bm,
    space=T,
    matrix=Matrix.Rotation(rot_angle, 4, rot_axis),
    verts=face.verts
)

My guess is that I can get the normal x-axis through face.normal but I'm not sure what to do next or how to best formulate the question to learn more. There are an infinite number of possible x-axes orthogonal to face.normal, aren't there?

After some reading I managed a solution, but I'm not sure how robust it is:
tangent = face.calc_tangent_edge_pair()
rot_axis = -face.normal.cross(tangent)

The tangent is one of the other normal axes and from that the last axis is calculated as its cross product with the face's normal.
This seems dependent on which edges are the longest (the documentation for BMFace.calc_tangent_edge_pair says: "Return face tangent based on the two longest disconnected edges."), so I imagine there's a better way to approach this!


Why my Render has black outlines? Im noob here. I tried to make a sci-fi car but when I render it, its like this(see photo).

I dont want these black lines

You have accidentally activated Freestyle which is a non-photorealistic render engine for drawing line art. It can be deactivated by unchecking the Freestyle option in the Render tab.


How can I get an object's previous location with Python? I tried to store the offset between the old and new position:

import mathutils

ops.ed.undo()
bpy.context.view_layer.update() #to update data
oldLoc = context.active_object.location
ops.ed.redo() #to return obj back
bpy.context.view_layer.update()
newLoc = context.active_object.location
offset = newLoc - oldLoc

The first time the code works as expected, on the 3rd and 4th time it returns strange values.

The reason why the script doesn't work as expected is that you're keeping a reference to the object's data followed by a redo. This causes the reference to be invalid. Blender's Python API provides access to the underlying functionality implemented in C (or C++), which is why some precautions are necessary to avoid undefined behavior. Basically you're dereferencing a pointer to freed memory. The freed memory may still contain the old values, which is why in some cases you're still getting the correct result. However there is no guarantee for that since it's undefined behavior.

The problem is explained in the Help! My script crashes Blender section in the Gotchas of the manual.

  TL;DR: Do not keep direct references to Blender data (of any kind) when
  modifying the container of that data, and/or when some undo/redo may
  happen (e.g. during modal operators execution…). Instead, use indices
  (or other data always stored by value in Python, like string keys…),
  that allow you to get access to the desired data.

  Ideally it would be impossible to crash Blender from Python however
  there are some problems with the API where it can be made to crash.

  Strictly speaking this is a bug in the API but fixing it would mean
  adding memory verification on every access since most crashes are
  caused by the Python objects referencing Blenders memory directly,
  whenever the memory is freed or re-allocated, further Python access to
  it can crash the script. But fixing this would make the scripts run
  very slow, or writing a very different kind of API which doesn’t
  reference the memory directly.

Your script can be fixed by creating a copy of the location.

oldLoc = bpy.context.active_object.location.copy()

Another possible issue could be that you're developing and running the script in Blender's text editor which is also part of the undo history. Editing the script appends a step in the history which is why the second time the script is run, you're not seeing the original location as in the previous run. Instead it's the "new" location, which was the current location when you were editing the script.

Putting the code in a function and executing it multiple times will show the same results for each function call.

import bpy

def undo_redo():
    bpy.ops.ed.undo()
    oldLoc = bpy.context.active_object.location.copy()
    bpy.ops.ed.redo()
    newLoc = bpy.context.active_object.location
    print(f'newLoc: {newLoc}\noldLoc: {oldLoc}\n---')

for i in range(3):
    undo_redo()


Smoke not rendering in cycles render I'm currently attempting to use a smoke effect to create an animation. the effect is working fine in solid mode but when I go to render view the smoke does not render. I'm not sure why this is, and would appreciate some help on rendering the smoke. Below is the blend file I am working on:

In your Domain's object settings, Ray visibility channel, check the Camera option:

I don't know why you unchecked this, but this options basically determines whether or not the object is rendered in the camera's eyes. So you never uncheck this on something you want to see.

By the way, you may want to check that related question as well: Rendering Smoke in Cycles.


360 world based on different pictures We are modelling interiors in Blender one can walk through in the browser (three.js). You can get close to windows, but can't go outside. We are struggling with getting a good experience of the outside environment.

We basically use fisheye pictures as input, taken from each window. In three.js we now create one sphere around the full building on which we position the fisheye pictures so that they can be seen from the corresponding windows. In Blender this corresponds to a World with one 360 background picture.

There are multiple problems with this:

It is first of all difficult to manually position the pictures correctly for each window on that one background image.
Some views overlap each other. When positioning the fisheye pictures correctly at a window they overlap with the picture of a nearby window. One would need complex algorithms to merge these pictures.
Some views have a gap. This is the opposite of the previous problem. At some windows, one can see beyond the edges of the fisheye picture.
The shift in perspective when looking at a window and moving backwards is bad. Especially at windows starting at floor level. Nearby objects move away too much.
You get the feeling that the house is floating / positioned too high. This is caused because the house is centered in the sphere.

Using a sperical shape positioned around each window could possibly solve issues 2 and 3. It might even be more straightforward to create, thus solve problem 1.

But for problem 4 and 5 we think we might need a different shape than a pure sphere. Something that is more flat at the floor level, but spherical further away/in the sky. The challenge here, again, how does one convert fisheye pictures to this custom shape?

We are looking for some basic guidance/experiences here. How did you tackle this? Maybe a complete different approach?

Try an HDR background image. You can get several from here.

This is a single, 360º background image that also has the nice advantage of being able to light your scene!

An example:

This scene used absolutely no lights, just the background image. The shadow on the ground is provided by a shadowcatcher plane. (The particular HDR I used is public domain and can be found here.)


Cannot duplicate selection I am doing this Blender Guru Tutorial  How To make a Beer. At about 18:30 minutes Blender Guru is making a duplicate of a selection (that has to become the beer in the glass).

I am trying to do the same but somehow I cannot make the duplicate.
Here is my blend file. Can someone help me?

You have proportional editing on (the blue icon in the 3d view header) with a large proportional size (a large circle that appears when you try to transform) so when you try to move the duplicate mesh it moves the entire object and thus appears to have no effect, toggle it on/off with O or by going to the menu and choosing Disable.

After that to duplicate and separate, use Shift D, confirm with left click and then press P > Selection.


Vertices are not showing I am following a tutorial where I've created a single vert object and am now trying to a subset of the vertices. However, I only two vertices are selectable as shown below the tutorial's example. Perhaps, I have accidentally hidden the vertices in the 3d Edit mode, but I couldn't find where to toggle that feature. Thanks in advance!

Do you have any modifiers active? If so try applying them to see if that helps!


Transparent background not working with smoke domain I hope this is a simple question; I'm in Eevee trying to make an explosion of sorts, but when I render it with transparent turned on the image doesn't show the smoke domain (it shows when transparent is turned off though). Please just tell me if you need pictures.

There is a chance that this is because your smoke material's density is too low and the pixels of your render only have rgb values but no alpha value, which is why the smoke can only be seen if transparent is turned off.
You can check to see if this is the case by unchecking use alpha in the composite node, and see if there is any color.


How to stack/multiply objects or meshes in blender I just wanted to know is there any way to multiply objects, for instance in making rice on plate. you know how they are, random in all direction and piled up at the center, i tried the particle effect and almost all settings, didnt help.

I think you need to create a mesh, which looks like the 'pile' object. And then on the surface of the mesh, you apply the particles, as a single or grouped rice meshes. Using some randomness in the parameters.


Any simple(ish) way to warp a .png? new to Blender but really enjoying it. There is one specific effect that i've used a fair bit in After-effects & fusion which is grid/mesh warp. Basically the software adds in a predefined number of mesh/warp points, & you can drag them out to create interesting effects.

This is a simple animation I made using grid-warp to give the impression the tree was swaying gently in the wind.

https://www.harrisonillustration.com/animation/hjhxcsgb01tiqjhj9i2d1ob0fgmpvx

Attached is an After-effects screen grab.

I've imported an alpha channel .PNG into blender as a plane, but have been stuck for days as to an easy way to warp it.

Any help much appreciated.

Ok that sounds hopeful :) ..any links to tutorials?....since posting the question I've got as far as using ‘loop cut’ in edit mode to make a grid, & this can be deformed, but there doesn’t seem  to be a way to keyframe the deformation..

I guess one of the easiest way will be to use shapekeys, but it requires a bit of knowledge (I would personally prefer bones but it needs to know a bit of rigging). If I make it short:

Create your tree image. Save it as a PNG with transparent background. Import your image as a background, create a mesh and roughly follow the tree shape.

Unwrap your mesh, open the UV/Image editor and put the UV map over the tree image. Give your mesh a material with the image tree as Image Texture. Use the Image Texture Alpha socket as a Factor in a Mix Shader that will mix the Image Texture node and a Transparent node, so that the object is transparent.

Select your object in Object mode, go in the Properties panel > Data > Shape Keys, create 2 shapekeys. Go in Edit mode, select the second shapekey, move your object vertices to deform your tree the way you want.

Back in Object mode, keep the second shapekey selected, play with its value to make the tree move. To animate through time, create keyframes: put the cursor over the value and press i. Open the Dopesheet to move the keyframes if necessary.


How do you make a wallpaper texture? I want a tan wallpaper with small blue polka dots, something "ugly". How could i make something like that for a texture?
Trying to make the wallpaper on the left.

Go to the Texture Paint workspace and do the following:

Create a new texture by pressing on + New button near the top.
Choose what ever settings you like.
Draw your texture of choice. Press N to see properties. Or right-click to get brush settings quickly.
After you are done go to the Shading workspace.
Select the object you want this texture on.
Choose a material for this object.
Create a image texture node. shift + a >> Texture >> Image Texture
Click on the Image Texture file drop-down. And choose the texture you made.
Connect the Color to Base Color.
Done!

Note: To view your changes in real-time as you are creating the texture you could do steps 4-9 right after you create your texture(before 3)


Modelling Realistic Paper Poster With Curl? I am a 2D Illustrator with basic 3D skills using SketchUp, Fusion 360, an Keyshot.

I need to render some realistic images of what my poster designs will look like on a wall once they've been printed.

I am going for something like in the image below.  I'm trying for photo-realism, so I would like the curl to happen slightly on 2 axes at the same time, and not be perfectly symmetrical.  I am not familiar with Blender, but I am wondering if there's a way to weight paint and add a modifier for this effect to a plane that has the illustration mapped to it..?

Any suggestions?

Thanks!
Keith

I'll expand my comment above, to post an example.

As I said, if you literally mean "like the picture below", well that paper is perfectly square and not bent in any way, imho.

This is a typical fake effect for 2d apps or web sites. The shadow is simulated as if the surface below was detached from the paper in the upper and lower part, but the paper is not curved as the shadow "visually suggests".

It is more like if the below surface was a bit curved, like a cylinder, if you wish your "paper sheet" to be perfectly square and flat, as in the image, you need to curve the surface, not the paper, and use a light source not perfectly centered, to avoid shadow symmetry.

Here is a possible setup, in the image below ( the render was with slightly grey paper, I just later changed the paper color to blue, to make it stand out in the setup on the right side).

But if you really need the paper to be curved, and the surface flat, see other answers.


Why can't I render 16K? (Cycles crash) I'm trying to render an image at 16K resolution (15360 × 8640) but Blender (version 2.81) keeps crashing after rendering a few tiles. 4K animation (over 5 hours rendering) and 8K static images render just fine without crashes.

Both CPU and GPU render mode has the same behavior (I'm in supported feature set). I thought it was maybe a ram problem but the scene is about 3gb and I have 32GB of RAM installed.

Does anyone have a clue what the problem might be?

I'll have the same problem with a small 200mb scene. If I use more than, say 200 samples, then the scene will crash. If it actually was a memory problem, then Blender would give you the error: Out of memory. A few things I have uncovered that help me with this is using less samples, denoising, and using smaller size tiles for rendering. (CPU). Using larger tiles for your GPU may also work. Blender will also crash if your CPU is slower than the minimum speed for processing a huge render. One last thing that might help is to use more CPU threads. More threads will use more of the CPU, so that more of the CPU is used for rendering. This may help Blender to not crash. I compared rendering a scene on one thread as opposed to 250, and there was a big difference. The downside to using more threads is that the rest of your computer may run slower. These are just some options for rendering, but I hope at least a few help.


How to make a Dr Strange portal How would I be able to make the the sling ring portal. The best I have been able to  to looks quite bad and I don't know what else to do.

The file

There are three core ideas to recreate the portal VFX from Dr. Strange:

Motion blur
Rotating the particle emitter
Asymmetry in the particle emission

The look of flying sparks can be achieved by using motion blur in combination with an emissive material for the particles. The particle emitter should be a circular mesh. It's also important how the particles are emitted, since in the movie they fly away from the circle in a tangential direction while seemingly unaffected by gravity. This can be achieved by spinning the emitter, setting the normal velocity to zero, setting the tangential velocity of the particles to a suitable value and deactivating gravity. A more subtle effect in the movie is that even when the portal is fully open the emission intensity and particle distribution wobbles slightly. This can be achieved by removing segments from the circular particle emitter. The amount of wobble depends on the speed of the emitter's rotation, lower speed results in more wobble.

You can download the project by clicking on the link below:

A quick breakdown of how a scene with the portal was filmed for the movie and the result with the added VFX can be seen in this video.


How to join 2 overlapping planes I create 2 rectangular planes. Then I align it together. Now I want to join it to become one mesh. How?

It is likely that there are easier ways to achieve the effect you want. However, here's how you can combine the two planes:

1 - Select both of the planes and join them (ControlJ). The two planes are now one object, but we need to take care of the overlapping ends.
2 - Enter edit mode (Tab)
3 - Select the vertex editing option:

4 - Move the two inner points towards the other planes:

5 - Select the two vertices and merge them (AltM + Enter)
6 - Merge the outer corner vertices the same way.

You should now have this:

Note that merging the planes in this way is a bit tedious. Consider using another technique to model your object that does not require joining.


See background image through solid shading in edit mode I am modeling a person's head and face using front and side reference images. I have set the reference images as Background Images for the "Front Ortho" and "Right Ortho" views, respectively. For the most part this is working well except for one odd issue. On the "Front Ortho" view, when I select solid shading mode, the mesh surface shading is semi-transparent, so I can still see the background image behind it. However, when I select solid shading on the "Right Ortho" view, the mesh is fully opaque - so I must switch to wireframe mode to see background image. Aside from the "Axis" and "Source Image", all the Background Image settings are the same between the two. I'm just trying to understand the difference I'm seeing between these two views.

I can see both presentations being useful depending on what you're trying to do/see, so I guess I'm looking for a way I can switch between the two behaviors. For what I'm trying to accomplish right now, I'm mostly interested in being able to see through the mesh in solid mode in "Right Ortho" view.

You must change the view from Back to Front. See the screen shot:

You can change to Opacity of the image, if it makes your mesh to hard to see using the slider.


Change emission without affecting material color though glass I know that I can change the emission value of a material without increase the brightness of the object using "Is Camera Ray" socket of Light Path node, but how do I change it when the light is coming to camera through a glass?

This above is the result I get when both emission values are the same.

But then, when I increase the emission to 100, the area where there's no glass it's fine, but through glass the Light Path node doesn't work.

How can I make the glass doesn't interfere on the brightness of the material?

You can use a math node to add Is Camera Ray to Is Transmission Ray.

In this example the cube emits red rays for the camera and trough transparent materials, but emits green for all other rays.

Note also that for the light to go through the glass shader you might need the following node setup:

as described in this link:How to illuminate the darkness inside glass objects in Cycles?


How can I randomize object instance's rotation? i made one rotating cube.

and i set the cube to object instance node.

and i turned off "remove animation data" in item tab.

so the instanced cube rotates same as original cube.

what i want to do is let them rotates randomly.

i wish for if someone gives me advices.
thank you.

It's pretty straightforward once you get ahold of the fcurves, which is the data used by Blender to animate properties.

This node tree works only for animated rotation, but you can easily expand it to take into account scale or location animations, by accessing the other fcurves.

First, add a group which we will use to extract each fcurve data at a given frame, and add an offset to it, with an integer as a parameter to randomize it for each individual cube.

Important :

Set the "Random Number" node to min =  - your max frame number (in my case -100) and max = min frame number (here, 0)
Set the "Repeat time" node to loop above your max frame number.
Set the "Evaluate Fcruve" node to Absolute

Then, simply loop over each object and gather the result of each fcurve, then assign it to your object's rotation :

Note that the rotations are in Radians.

My main tree looks like this :

Result :


How do I properly use core matte to keep green section of shirt on using green screen keying? I have some footage shot with a green screen and stupid me didn't pay attention to the shirt I had on which on the center of the shirt has some green. So naturally, I have a hole in my chest when keying. My solution was to create a mask around it and then feed it to the "core matte" input on the keying node. While this does work, it changes the color of the part on my shirt.

My question is: How do I prevent color change if this is the correct way to fix it?  If it is not I'd like to know the best solution.

Thank you so much in advance for taking the time to help!

Hard to tell without seeing your setup, but my guess is :  the mask plugged in Core Matte always output a 100% value, while the rest of the shirt output a lower value ; ie, there is some green in the shirt and the keying node make it a little bit transparent. Nothing noticeable at first, but noticeable by contrast with the mask.

You can verify that by compositing the output of the Keying node on a grid, or on a vivid color. Or plug the Matte output to a Viewer, and make sure there is only black or white areas, no gray. That will make obvious if some areas aren't keyed correctly. If that's the case, adjust the parameters of the keying node.


Decimate vs. Retopology I'm about ready to finish my high poly human model, and I was wondering why I see so many people using reotopo tools for reducing poly's on meshes as opposed to decimating. Using a decimate modifier seems so much easier and in the Youtube videos I've watched decimation performs comparably when accepting normal maps. Am I missing something?

If you do not intend to pose, animate or add subdivision to your low poly, then decimate should be fine. The topology that decimate produces is generally unsuitable for any of these tasks. Some software has automatic retopology (e.g. 3dcoat, zbrush), however even this is imperfect and an ongoing area of research.


What causes the screw modifier to fail and create black 2d slice from a bezier curve? I am trying to create a plate using a Bezier curve as the profile then use the screw modifier to create the full outline as in this video tutorial, when I apply the screw modifier to the curve that I have created it makes a black 2d horizontal slice instead of the full 3d plate outline.

This shows the bezier curve I have drawn

This shows what happens after the screw modifier is applied
I tried using a line drawn with Nurbs Curve and was able to apply the screw modifier to create a 3d object.

I am not sure what it is that I am doing wrong, any help that you can give will be greatly appreciated.
Edit -

I suspect you've scaled the curve to 0 in one dimension or another, in Object mode, to flatten it. If the object carries that transform, it still will, after being modified. Ctrl A > Apply the scale of your curve.
Think twice, every time you scale in Object mode during modelling. Prefer to do it in Edit mode.


Is it possible to write a script which opens Blender's existing FBX exporter window? I'm wondering if there's a way to programmatically open Blender (2.79)'s FBX exporter UI with Python script.
Basically, what I'm trying to make is a script which, when ran:

Modifies all the UVs for each selected mesh.
Opens the existing FBX exporter and allows the user to export the modified mesh.
Once the user closes the FBX exporter window, for the mesh to revert back to its original state prior to running the script.

I know there's a way to export FBX in script using bpy.ops.export_scene.fbx, but I was wondering if it was possible to open the UI's FBX exporter instead.
Thank you so much in advance!

Use bpy.ops.export_scene.fbx('INVOKE_DEFAULT').
More info about "Execution Contexts": https://docs.blender.org/api/2.79/bpy.ops.html?highlight=invoke#execution-context
I'm not sure what the best way to run something after the operator is complete is though. Maybe try: Running code after a modal operator finished its job


Is there a way to have default mesh objects come with premarked UV unwrapping seams? I was thinking it might be useful to have default mesh object such as cubes, cylinders or other objects like the platonic solids etc from addons to default to come with premarked UV unwrapping seams when added to a scene. Is there a way to do this, perhaps with the startup file? Here is an example of what I was thinking about:

Is this what you're looking for?

This creates a UV layout for an object on creation and is a feature in 2.77. You can download RC2 from the institute now.


How To Get Reflections On A Smooth Surface? I have downloaded a blend file from the internet. In that, on a smooth surface, a house image is reflected. but no house is in the environment. How to do this?
See this image:

Click to enlarge

You are in a preview mode known as "material preview". This mode uses a hidden HDRI image to provide reflections and lighting. If you look at the top right of the 3D viewport, you will see there are 4 little circles - these are the preview modes (from left to right - wireframe, solid, material, rendered). You have the second from the right selected (material preview).
Pick the one on the very right (rendered preview) to see your object with your own lighting setup. You can also press Z in the viewport and select rendered from the pie menu that appears.

If you want to see the image, click on the arrow on the right and increase the World Opacity from the menu.
If you want to set up your own image so the reflection shows but the image doesn't, in your World Shader, combine your image (Environment Texture) with a Background node with the color of your choice by mixing them with a Mix Shader, using the Is Camera Ray output of a Light Path node as the Mix Factor:


Is there a way to write along a shape? I´m making this scene by Space Jam and wanted to know how I could make the name of the planet orbiting around it.
Thanks!!

add text
object -> convert to mesh
add sphere
add curve -> circle
add modifier "curve" to text
choose "circle" from 3)
animate location x of text

result, if you rotate the beziercircle a bit:

better explanation by video tutorial: https://youtu.be/tcKOR9TZHcA (please be patient - my internet is not that fast - is should be uploaded in 30 mins)


How do I get image handles and click&drag things around in Blender Compositor? I'm not new to Blender but I was wondering how to use the Blender Compositor the After Effects away or like any other compositing or video editing software, meaning I'd like to click onto an image or layer and move it around. It's slow and complicated to move things around with the trasform node parameters, especially if I want to do it precisely

Do it in the 3d view?
import videos into emission shader planes and animate them.
I know it's stupid but I think it's the only way you can work graphically.

I wish that in 2.9 the Video editor thing will become Good!


Cycles ignores smooth No matter how much I smooth my mesh in the render it alway has this sharp edges in the cup

Ctrl1 adds a Subdivision Surface modifier with one subdivision, Ctrl2 with two subdivisions and so on. However, adding the modifier this way only changes the number of subdivisions used in the viewport, and the number used for the render gets its default, which is 2. Go to the Modifiers tab and change the Render value in the modifier to the same as or higher than the View value. The idea behind this is to get an idea what the subdivision does even in the viewport, without making it too computationally demanding until it's really needed, which is, of course, in the final render.


How do I find words in Blender online manual? Looking for a manual that I can search and find words.
A big pdf book.  Or instructions on how to find words within the online manual. Or maybe   I have visited the online manual many times now and used search and found nothing relevant.
Does the online manual for blender have an index someplace.   Can anyone recommend a nice book that has a large searchable pdf file?

The bad news: The Blender manual does not have an effective search function - also in parts it has gaps and in parts information can be improved.

The good news: If you can find your way through the menu's it is actually packed with tons of useful information. [or use google as has been suggested]

I still use the manual for refence, but mostly rely on the internet and sites like this. There are some good books out there - for example Packt Blender Books, but the problem for most books is that a new version of Blender has come out by the time they are published.


Imported video is in slow-motion I imported a video file (an interview with a person, mp4) of 60 fps into the Video Sequence Editor. The idea is to superimpose a Blender animation that has 24 fps. Unfortunately but not surprisingly, the video (not its audio) plays in slow motion.

Too much work has gone into the animation to convert it to 60 fps. Can Blender convert the video file from 60 fps to 24 fps? Or any other solution?

You can use HandBreak to transcode your footage into the needed framerate, or you could render your animation alone and edit it together in a dedicated video editor like Premier, Kdenlive, etc. Blender can be used to transcode but its not the most convenient way.


"Object has no attribute" in Blender Game Engine i have a problem with this code,i want to create a custom mouse cursor in bge
i use blender 2.77
but i have something wrong like this

can't anyone can solve this code?

cont.sensors["mouse"] instead of cont.sensor["mouse"]


Why is my mesh not smooth? I am new to 3d modelling and blender and I am confused with why my mesh colour looks different to the one in DARRIN LILE's video.

This is mine, but it looks a bit metallic or something compared to his which looks smooth. Im not sure wats wrong.

Your model is showing faces and edges, called Flat Shading, while the video shows a Smooth Shaded geometry.

Go to Object Mode, look in the Tool Panel on the 3D window (left hand panel, press T if hidden) and find the Shading buttons. Press Smooth.

It will now look like the video.


how to change the value of various custom properties at the same time? I have a bone with various custom properties and I want to change the value of all of them, from 0 to 1 at the same time (pressing a button).

Have a look at the operator simple template in the text editor. Replace main(context) with this

def main(context):
    #active pose bone
    pb = context.active_pose_bone
    # all custom properties on bone
    for key in pb.keys():
        #ignore _RNA_UI
        if key == '_RNA_UI':
            continue
        pb[key] = 1
        # insert a keyframe
        pb.keyframe_insert('["%s"]' % key)

and the poll method to

def poll(cls, context):
    return context.active_pose_bone is not None

to  make sure that there is an active pose bone selected.

and change the idname from  object.simple_operator to something meaningful like posebone.set

Then have a look at the panel simple template and

row.operator("posebone.set")

will give you a UI button.


Script for hexagonal distribution I need to create a cube that contains spheres of the same diameter with hexagonal distribution, I know that with particles we can do it, but for me I want to create with python script, the data are: the number of sphere and their radius, Can you create this script.

First create a prototype of your cannonball and name it "prototype".

Here is code which will stack cannonballs for you:

import bpy
from math import *

def construct_cannonball(mesh, x,y,z):
    scn = bpy.context.scene

    obj = bpy.data.objects.new("ball", mesh)
    scn.objects.link(obj)

    obj.location = [x,y,z]

def mission1(mesh, r, xyz1, xyz2, construct_cannonball=construct_cannonball):

    dx = 2*r
    dy = sqrt(0.75)*dx

    dz = sqrt(2/3)*dx   # thank you, CRC Concise Encyclopedia of Mathematics

    w = 0
    z=xyz1[2]
    while z<xyz2[2]:

        v=0
        y=xyz1[1]
        if 1==w%2:
            y += dx/2 * tan(pi/6)
        while y < xyz2[1]:
            x = xyz1[0]
            if 1==w%2:
                if 1==v%2:
                    x -= dx/2 / cos(pi/6)
                else:
                    x += dx/2 / cos(pi/6)
            if 1 == v%2:
                x += dx/2
            while x < xyz2[0]:
                construct_cannonball(mesh, x,y,z)
                x += dx

            y += dy
            v+=1

        z += dz
        w += 1

def purge(scn, prefix):
    for obj in scn.objects:
        if obj.name[0:len(prefix)] == prefix:
            obj.name = "discard"
            scn.objects.unlink(obj)

purge(bpy.context.scene, "ball")

mission1(bpy.data.objects['prototype'].data,
         1, [-5,-5,-5], [5,5,5])

You can see a copy of the code at http://web.purplefrog.com/~thoth/blender/python-cookbook/cannonball-packing.html


Cannot get rid of the yellow lines By accident I booleaned and stuck another object to this one. I couldn't separate them so I deleted vertices, edges and faces few at a time and managed to get rid of the object. but i think that yellow lines are base of the object joined. I can't get rid of them. With the mouse i can point the vertices and sides. i can even make a face but can not delete at all. Please help me with this. Thanks.

Ctrl + Tab is your friend here. Got into edit mode and switch to Vertex selection. Select the vertices you want to delete, hit x, and select "Delete Vertex." Delete has several options, and some of them are selective. My guess is that you have been selected "Delete only faces" or something like that.

Another trick: select 1 vertex of the item you want to remove and hit the L key, which will selected all linked geometry. Usually it'll select the whole object you're wanting to delete.

Also make sure that you've applied or removed any modifiers when you have mesh geometry issues like this—will save you a headache later on.


Snap group of vertices into one vertex individually Instead of snapping each vertex individually, is there a fast way to snap multiple vertices into 1?

This way doesn't merge. It involves pressing keys, but you do have to tell the application what you want, somehow.

Keyboard . (period) set the pivot point to 'Active Element'
Make your selection, ensuring your target vertex is active, for instance by selecting it, and Box/Circle selecting the rest.
Hit S0


Where is Enable 3d manipulator option in user preferences? I didn't find the Enable 3D Manipulator option in User Preferences > 3D View > 3D View Global in Blender.

Thoughts?

Check User Preferences > Interface tab > Manipulation: option and dropdown.

Note that you can also disable/enable it in the footer of the 3D Viewport.

On:

Off:

Lastly, as metaphor_set points out, you can key Space to open the Search menu and search for Enable 3D Manipulator.


Running code after a modal operator finished its job In my add-on I execute a modal Blender operator, namely

bpy.ops.transform.translate('INVOKE_DEFAULT')

After a user finished moving a Blender object, I'd like to execute some code.

Is there a trick how that could be done?

The question could be probably reformulated in the following way: is there a trick to get notification when a modal operator finished its job?

One way to do this is to create a macro operator, with the transform operator being the first component, and a second custom operator for running your finalizing code, once the modal operator is finished.

Unfortunately the macro API is barely documented, so here is a minimum example script:

import bpy
from bpy.types import Operator, Macro

# Our finalizing operator, shall run after transform
class Finalize(Operator):
    bl_idname = "test.finalize"
    bl_label = "Finalize"

    def execute(self, context):
        print("DONE!")
        return {'FINISHED'}

# Macro operator to concatenate transform and our finalization
class Test(Macro):
    bl_idname = "TEST_OT_Test"
    bl_label = "Test"

# Note that we have to register classes first before populating
# the Macro operator
bpy.utils.register_class(Finalize)
bpy.utils.register_class(Test)

# The important bit: populate the macro operator with a sequence
# of existing other operators
Test.define("transform.translate")
Test.define("test.finalize")

You can run this script and then test it in the viewport via the spacebar menu.

One more note: if the transform operator is cancelled, so is the macro operator, i.e. in case of cancelling the second operator will never run. If that is necessary for some reason you could make a wrapper around the existing transform operator, which then implements own behavior in the cancel(self, context) function.


Cloth simulated hair inside of an Armature? Is it possible to have a cloth simulation inside of an armature?

The head on the left doesnt have an armature

The head on the right has an armature but now the hair wont simulate.
I think the vertex group that holds the hair to the bone is
messing with the simulation

any advice?

There should be no problem with such setup. Follow this to make sure everything is fine:

Mesh is bind to the armature with weight paint:

Here the whole plane is fully weighted to the bone.
Create a new vertex group for pinning. Here I pinned 2 corner vertices:

Use this pinning group for cloth simulation. Also make sure the cloth simulation is after armature deform in modifiers so it takes as input the posed mesh:

Now the simulation works on top of armature as expected:


How do I turn off environment/world lighting in Blender Cycles? Here is the manual on Environment Lighting

My version of Blender does not have a widget for environment lighting under the world tab.  I've disabled all lights in my render, but it's still not pitch black.

How do I disable the default environment lighting?

You can set the background to use nodes and then remove the link.


Voronoi map in the compositor I just saw this on codegolf and thought it would be an increadibly cool application of the Blender compositor for NPR.
Perhaps coupled with a blur shader this could make a nice painterly effect.
Is there any way of creating a Voronoi map effect in the compositor?

This is the effect (from the codegolf topic above):

There are multiple things happening in the algorithms presented in the link you shared, but the most important thing that's happening is not possible in Blender's compositor.

Converting an image into a fixed of points
transfering that set of points as a parameter into a hypothetical "voronoi" node. There is no such data type
using a vornoi algorithm to fill in polygons with sampled colors from a set of points

Now, in theory you could reduce that set of instructions into just one step

a python compositor node

but to do that is no small chore

There are plenty of clues in the codegolf post on how to process the image, how to find edges, how to make that bitmap into a set of points, how to process the points into polygons, and how to fill them.

I'd like to offer up the code for a python compositor node that just does all that for you, but it would just take a terrible amount of time. An onerous amount of time. Enough time that the short answer to your question is "no."

On the other hand! If you're also interested in exploring the general effect and breaking out of the compositor-node-constraint, there are other things you could explore. (in your comments, it seems you're only interested in voronoi specifically, but i'll try anyway)

Here's an image that was made with a "lens" made from a box, one side heavily subdivided, displaced with a cloud texture, and then decimated. The lens is using a glass texture with 0.02 roughness to generalize the colors coming through each face. If the displace filter was made to transpose over time, the facets would change and shimmer.

While it's not exactly what you asked for, in my opinion, it falls into the non-photo-realistic category. I think you could go quite far with it -- especially with render layers feeding into the compositor.


Adding custom split normals enables sharp on edges between smooth faces? So i have been playing with split custom normals. I figured out that i have to add an array of normals to get started. And i also figured out that i have to use zero vectors as placeholders where i do not want to have custom normals.

so:

tgt = bpy.context.object
zv = (0.0,0.0,0.0)                 # my zero vector
normals = [zv]*len(tgt.data.loops) # the array of normals
tgt.data.normals_split_custom_set(normals)

The code above seems to work but i get 2 strange issues:

1.) When i call this code while the object is in edit mode, then actually nothing happens (no split custom normals are assigned to my object)

2.) When i call this code while the object is in object mode, then the array is assigned to the object, but in addition all edges between smooth faces are marked as sharp.

Here is my object before i add the custom split normals:

And this is right after i called the code snippet from above:

I expect to see no changes at all (because the entire normals array has zero vectors). So i guess i have forgotten something to setup. But i have no idea what i am doing wrong.

It turned out that this actually was a bug in Blender. This Bug has been fixed and the fix will be in Blender 2.75 Then my initial code snippet will work as expected.


Exporting from blender to unity I'm planning on selling asset's in unity and they need to be in .fbx or .obj form and cannot be in .blend. When i export the project in .fbx their scale is different, in blender the scale says "1" and in unity the scale says "100" and when i export the project as .obj the all of the models merge into one.

And when i export it as .obj it merges all the models.

Any help is appreciated, thank you.

There are a couple ways around this:

Split your .blend files: This is probably the best thing to do anyway, since you seem to be using Unity's automagic importer.  This will allow Unity to conceptually separate your meshes into their own discreet thing, and if you change them, the changes will propagate correctly.
Split through prefab:  You can take the multi-tree model, delete all the meshes down to one tree, and save those changes as a separate prefab.  This has issues though, mostly because if the file change noticeably, you will need to redo the prefab.

Scale is mostly arbitrary, but you can change Unity's import scale by clicking the model in the assets browser, then going to the inspector and playing with the Scale Factor (top line).


Color into Alpha - Nodes and Vertex Paint As a way of easily blending materials together on a single object, and to allow me to do so on arbitrary parts of the model (without needing to segregate a specific part of the model's UV map or duplicate the material*), I've started experimenting with using vertex painting.
By vertex painting greyscale, I've managed to mix between two textures (on arbitrary parts of the model) by using the greyscale as an alpha for other textures. But, to get more textures, I'd need to be able to use different colors. How can I use this vertex paint color information to drive the alpha channel of various other textures within the material?

If someone knows a better way of doing this process, I'd be keen to know it!

* e.g., putting a dirt patch on a long wall model sharing one texture: doing so would usually change the texture an every repeat of the texture, where vertex painting directly onto it and using that as an alpha for other materials allows me to do only a specific part.

Image here is example of what I mean. The red parts become white, the rest becomes black in the first, the yellow parts become white and the rest white in the second, and so on. These various black and white channels can then be used as an alpha for other textures. However, it shouldn't be limited to just pure red, green or blue, I'd like to be able to mix potentially a dozen materials in one place.
Also, to be able to mix them with varying levels of opacity, could the brightness of the color itself be used to give transparency? In a way, a specific shade of red would be one texture, but a darker red of the same shade would give less transparency to that area of texture, allowing the texture underneath to show through more.
Just my thoughts on what I'm trying to figure out.  Again, if someone knows a better way of doing all this, let me know. Thank you.

Plug it into a color ramp and then make the white color transparent (Set the alpha to 0)


Normals not working? so im making this skull/brain thingy. i make the skull and imported the brain. and as you can see are the faces on the brain much darker. i fixed the normals and imported it to unity where i could se all the faces but the brain was still "wierd". i cant seem to figure out a way to make the brain and skull look the same look. notice the shadow on the brain in unity looks kinda metalic

It can happen somethimes that the tool to correct the normals (Ctrl+N, normals_make_consistent)  puts all the normal inside. It is usually linked to a bad topology.

A quick way to fix that is to flip all the normals (they are consistent, but all in the wrong direction).

To do that

go to edit mode
select all vertices
press space and search for "Flip normals" Or hit ctrl+f and chose Flip Normals


Extruding along an area I'd like to extrude a profile along the edge of an area. Furthermore, this profile should always stay in contact with the edges adjacent area.
Imagine a ribbon that twists. The resulting area(s) are where my profile should extrude along with.

Profile (orange)

Extrusion path (orange)

Edge of Profile (white) which is in permanent contact with the paths adjacent areas

End of profile (orange)

Thx in advance for every info on how to solve this problem.

You can recreate it using a Bezier curve.

Add a Bezier curve, and use the Tilt Tool to adjust the tilt.
Create the profile shape (It needs to be a curve too). The origin point position is important.
Set the profile shape as a Bevel for your curve. It will align based on it's origin point.

Add a Bezier Curve and tilt the control points. Add more control points if needed.

Create the profile shape and set it as a Bevel object. If it's a mesh object, you'll have to convert it first.


.OBJ doesn't export correctly I am new to blender and 3D modeling completely,  I am trying to export a OBJ I created but when I do, certain faces dont show up unless you look at it from a certain angle.

Ive been looking around for a solution but can't seem to find one,  Any help would be greatly appreciated.

Thanks.

Outcome:

In Blender:

I figured out what I did wrong, I had the faces backwards and had to flip them.


How to animate a propellor? I need some help with a propellor animating. I tried and the result was the propellor moving forth and back. Thanks for answers.

If you want to animate it rotating, you move your time to specific frame.
Press I to set a key frame, select rotation from the pop-up window.
Move to another frame (15 frames after the previous frame), rotate the object around it's axis, press I again to set another key frame (select rotation again).

This will cause it to 'spin' for 15 frames.  Without more details regarding your goal, this is the simplest way to animate.


Bad shading on icosphere set to smooth I used an icosphere to model a part of a building, I have autosmooth enabled with custom sharp edges but I can't fix the bad shading. In Eevee it looks perfect, but in cycles I get weird shading that follows the edges of the tris instead of working like it should. Is it a problem from lighting (I'm using an hdri), from normals or should I just avoid using triangles and use quads? I already merged by distance so there aren't any overlapping vertices and all the normals are facing the right directions.

Terminator effect, only way to make it work is using more geometry.


Get Location of Particle Keys with real unit size I get my location of all particles with this script.

ps = bpy.data.objects["Cube"].particle_systems["ParticleSystem"]
ps.particles[0].hair_keys[5].co
-> Vector((0.4008302092552185, -0.8442497253417969, 1.4897942543029785))

The location is not in Unit Scale centimeter 0.01. How can I use and calculate the unit scale?

With a function like this one:

def get_unitscale(scene):
    unit_settings = scene.unit_settings

    if unit_settings.system in {"METRIC", "IMPERIAL"}:
        # The units used in modelling are for display only.
        # Behind the scenes everything is in meters.
        return unit_settings.scale_length
    else:
        # No unit system in use
        return 1

By multiplying with the scale value, you get coordinates in meters:

scale = get_unitscale(bpy.context.scene)
co = ps.particles[0].hair_keys[5].co
# Assuming the unit system is set to meters
co_in_meters = co * scale

By the way, there is also the co_hair() method for getting hair coordinates:
https://docs.blender.org/api/2.79/bpy.types.ParticleSystem.html?highlight=co_hair#bpy.types.ParticleSystem.co_hair

And if you want to retrieve coordinates of the hair with final render settings, you will have to call set_resolution() first:
https://docs.blender.org/api/2.79/bpy.types.ParticleSystem.html?highlight=co_hair#bpy.types.ParticleSystem.set_resolution


How to applied texture to selected object? I tried following tutorial on youtube

link:  https://www.youtube.com/watch?v=bHLT5Xh_tzQ&list=PLWYj1pF7QxoR32dK6425Dd2I0BFgUt0E_&index=19

at 4:20
the texture different from what i got (link: https://imgur.com/a/FzFpSEm )
how to applied texture on selected object (vertical pole)and not all object?

Is there any proper way to texture properly?
Blender version i used: 2.81a

The original UV of a model is dependent on how you modeled your mesh, it's expected that a UV can look different from your tutorial at the start of UVing.
Also, before UVing a mesh it's a good idea to apply any transformations, they can stretch or have weird effects on you're UVs if you ever get that issue.


Neat topology from messy model I'm hoping for some solid advice on how people sort out their topologies like they do on turbo squid.

For example on the image below (top) is a model I made a couple of years ago with some quite frankly hideous topology. The image below that (bottom) is just a random boat I saw on turbo squid with some absolutely top notch beautiful topology.

How is this done? Is this purely done from being tidy at the start of building or is this using another program such as meshlab / modifications in blender itself?

How would you go about creating something like this?

If the purpose of doing a model is learning, start from scratch. Plan your topology carefully. Add detail where is needed and keep it simple where is supposed to be simple. Try as much as possible to keep your topology as
 quads. You will spend less time in a carefully planned model than trying to fix something that is poorly put together.

Adding to what @DuarteFarrajotaRamos said, topology should not be an afterthought or some form of wrapper, but the model itself.


Most efficient way to create these hairs I am trying to make a pipe cleaner but I am having some trouble to create the hair strands on it. I also want the strands to be translucent from the top part to absorb some of the light.
The hair strands are bunched together and then the bunches are spread across the metal wire.
I have tried multiple particle systems and also tried to fake it with a mesh but nothing seems to be working since I require good detail. So what would be the most appropriate and efficient way for it?
Thanks.

Just a thought, but could you model one bunch of strands with maybe a cluster of image planes, get that bunch to look correct, and then apply it as the render object for a particle hair system?


procedural wood texture shader i have found a realy good procedural shader tutorial to learn and use it on my model... but the set up nodes are to big and with the 2.81 is more harder.... i reach to a part that i´m stuck and can´t find the 2 nodes to complete it, the stain and grooves icon, i search evreywhere and i cant find them in blender did they disapeared or move or changed names?
this is the shader tutorial im folowing https://www.blendernation.com/2017/10/20/procedural-cc-0-pbr-wood-shader/

Those look like they're just Invert Nodes (Add > Color > Invert). You can right click a node and rename it to whatever you want - I'm assuming that's what the person did in the tutorial.


how can i make light pass through an object in blender? (V. 2.92) i want to make a sun, but wen i put the light point on it, the light don't come out of the mesh.
before:

after:

what i can do?

You should increase the radius of your point light until it's the size of your star (which will produce more realistic shadows) and then increase the shadow's clip start to make sure the star's surface doesn't occlude any light, but not too much so that other objects can cast shadows:


How to fix Imported SVG from inkscape with wrong fill I have imported this image from inkscape SVG. One of the characters have wrong fill in the letter. I am fairly new to blender. Is it possible to fix it?

Clean up your drawing, the SVG file is not properly sanitized, there are overlapping segments and residual segments in your spline

There is a small circle overlapping the inner part of your R letter, it is causing letter fill rendering to fail.

See my answer here for more details


Bokeh or defocus in Blender's default render engine? Is there a way to do Bokeh or defocus or anything of the sort in Blender's default render engine?

If you select your camera, and go to the camera tab on the properties bar, there should be a Depth of Field tab.

You can change the object that will be the focus point, or you can input a distance instead. Change the value of F-Stops to achieve the Depth of Field/Blur effect you're going for.
As for Bokeh, tick the High-Quality box and you can change the number of blades to whatever bokeh effect you're trying to achieve.


How can I find the selected metaball elements in Edit mode with Python? If you have an active object you can find the currently selected sub elements; e. g. in an active mesh you can find the selected vertices while looping over them and check the property bpy.context.active_object.data.vertices[i].select.

In an active armature you can achieve the same with bpy.context.active_object.data.bones[i].select_head (or select_tail).

But for metaballs I cannot find a property
bpy.context.active_object.data.elements[i].select or something like that. How can I retrieve the selected element(s) in a metaball object?

Background: In Edit mode you can add additional metaballs to a metaball object. I want to move the selected elements via Python.

That one's not easy. I checked the Outliner to get the path to the elements:

I haven't been able to find the full selection yet, but the active ball can be found and moved:

import bpy
bpy.data.metaballs["Mball"].elements[2].co.x += 0.1
bpy.context.active_object.data.elements.active.co.x += 0.1
bpy.data.metaballs["Mball"].elements.active.co.x += 0.1

I hope somebody can prove me wrong but it might not be exposed to the API. Metaballs don't get a lot of limelight. In which case it would be worth to find the right dev to implement it.

Only workaround I can see is to keep the metaballs separated, select them in object mode, manipulate them there(they still merge anyway) and use that selection and join them afterwards. Depends on how many you need to move.


How can I trim an object by an exact mesure? Is it possible to trim an object by 1mm from each side?

Scaling isn't really an option, because I don't exactly know the factor. I just want the model to be 1mm narrower from each side (each vertex should be "pushed" inside by 1mm).

You can modify the size of the object with the x, y, and z size spinners the toolbar on the right of the 3d view.  All input fields can accept simple mathematical expressions so if the current size is .5m you can type “.5-.002” (.002 not .001 because you want 1mm off each side) and it will scale the object accordingly.


How do I convert this FK leg to IK without getting rid of animation I have this character here that has motion capture on him but I want the legs to be put into IK instead of using FK without getting rid of the motion capture I got from Mixamo. I've tried "baking" but I don't know how that works, lol.
On a similar note does anyone think that I could just upload the character to Mixamo with an IK rig instead of having to change it at this stage?
Thanks for reading my post, here is the blend file if you need it.

You can't use an IK rig on Mixamo, you have to convert it at this stage.
This is the procedure:

In edit mode duplicate the foot bones (shift D), and put them in a different bone layer, for easier manipulation.

Clear their parenting (Alt P)

In pose mode set a copy transform constraint, in world space, targeting the respective Mixamo foot bone.

go to menu - Pose - Animation - Bake action, and check all preferences buttons

change the parenting of the toe bones from Mixamo feet to new ik feet

select the mesh and change the name of feet vertex groups from Mixamo names to new bones names

Delete the Mixamo feet bones

set an IK constraint on the calf bones, pointing at the Ik feet, setting the chain lenght to 2.

Now you have  working IK legs, without toe roll controls. To control the toe is a bit more complicated, but the basic concept is the same.


Editing phone videos with blender, audio is async? I edited a video from my phone with Blender (changed colors + added text synced with the audio). But then I saw that later in the video, the text is not synced with the audio (for example a text comes from the top on a new beat)
Using ffmpeg I saw that the video has variable fps (which I think is normal for phone videos). Is there a solution where I can sync the text, or should I convert the video to constant fps with ffmpeg first? (I don't want to render twice, x1 with ffmpeg and x1 with blender which uses ffmpeg)

Most NLEs needs footage which is not VFR, so you're right, you'll need to encode it to constant fps.
Velvet Revolver can be used to batch encode a folder to an intermediate files("lossless" with constant framerate): https://raw.githubusercontent.com/tin2tin/blender_velvets/master/Blender_2.80/velvet_revolver.py
Info:
http://blendervelvets.org/en/velvet-revolver/


source code for node [Object Input] Where is the source coded located for the node [Object Input]?
Even a search brings nothing up:

Some nodes have similar "brothers", so a single py file that deals with all the "family".

It can be the same kind of node, but for several data types or slightly different operations. Usually, it is allowed to later switch to another type or operation inside the node or in the advanced panel (or hit U).

specifically about object input:

generic\data_input.py is used for any input.

...\animation_nodes\nodes\generic\data_input.py

other generic nodes are found in eneric folder, but not only:

mix data and animate data deal with all float, vector etc types
in list you have create list and combine list (all list nodes switch type by connecting sockets etc so it's more obvious)
some nodes like math also can be directly searched or called as Add, Substract etc.
others too have "search tags" so that you can bring them by searching for slightly different name or bring them with a certain setting already on.

For example, rotation/convert rotations has several types of conversion, (euler to matrix, quaternion to axis angle etc) so in a search you can  already say "matrix" and see matrix to euler and it will bring the node with that specific setting on.


Python 2.8 - deleting .001, .002, etc I found several threads on this subject but could not distill a solution.  I am trying to delete .001, .002, etc.

The code should delete these, but every time I rerun my code it is as if nothing was ever deleted; the count is now >0.250 and is rising rapidly.

Full disclosure:  The solution below is inefficient; it is the culmination of several efforts to solve my problem and represents my final "brute force" approach.

Thanks in advance for your suggestions:

def delete_object_iteration(objname):
    for x in range(1, 999):
        xs=str(x)
        on2=objname+'.'+xs.zfill(3)
        try:
            bpy.data.objects.remove(bpy.context.scene.objects[on2], do_unlink = True)
        except:
            pass
        delete_object_instance(on2)

def delete_object_instance(objname):
    try:
        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
    except:
        pass
    try:
        bpy.ops.object.select_all(action='DESELECT')
        bpy.data.objects[objname].select_set(True)
        bpy.ops.object.delete()
    except:
        pass
```

Finding with re

Alternatively, find all objects that match a pattern using active objects name.  With object "Cube" active a simple re could be

regexp = r'Cube.\d+'

any object with a name starting with "Cube." and ending only with digits past that point will match.  Need only iterate over scene.objects, or any collection containing objects eg all in blend  bpy.data.objects, and see if they match, as opposed to finding if any of each of a  1000 exist.

There are other ways without re, eg split or rpartition on "." and test if part is numeric.

>>> "Cube.001".rpartition(".")
('Cube', '.', '001')

Test script finds the matches.

import bpy
import re

context = bpy.context
scene = context.scene
ob = context.object

rexp = f"{ob.name}.\d+"

matches = [o for o in scene.objects if re.fullmatch(rexp, o.name)]

print(matches)

Ok if we have matches, can iterate and delete from blend.

while matches:
    bpy.data.objects.remove(matches.pop())

Or with the operator, passing a context override.

if matches:
    bpy.ops.object.delete({"selected_objects" : matches})

There is a lot of over zealous hoo-ha re not using operators.  If you had 1000s of matches above, the operator is still called only once... IMO this is Ok.

but Don't!!!! do this

for o in matches:
    bpy.ops.some.op(....)

and call the operator 1000s of times.

Python performance with Blender operators

Why avoid bpy.ops?

Please also note that bpy.ops.object.select_pattern(...) has similar functionality, and this could be a 2 liner.

bpy.ops.object.select_pattern(pattern="Cube.*", extend=False)
bpy.ops.object.delete()

Which will delete "Cube.001.001" also.


Background Green Screen Refuses to Render I tried a few threads already on Blender Stack Exchange:
How to render a background image in 2.8?
How to render a background image correctly?
why the background image I add not show in render?
I'm using 'Images as Background' add-on. I've tried the 'Film' 'Transparent' recommendation. The render icon is on in the outliner. I've messed with the nodes all day. Nothing seems to be working.
I made an animation in 2.79, and I opened the file in 2.83,(I checked the box to not load the UI thing) so maybe a few bugs from the old one got into the this file because I tried loading up a new 2.83 file and the background rendered just fine with no modifications.
I am using HitFilm 3 Express as my video editing program, I am more comfortable with it than Blender's internal video editing software. So I'm rendering out a greenscreen for the program to use.

So immediately after writing this post, I had a realization. Sometimes objects don't show up in the 3D viewer, so you increase the distance you can see by hitting 'N' and going to 'View'. However I can already see it in the 3D Viewer, but then I thought that there were different properties set to the camera than the 3D Viewport.
There is a post that deals with this, which makes my post a duplicate.
How do I increase the render distance?


Does the Blender Game Engine Support Texture Nodes? I have a nice procedural dirt texture made up for a sphere, but when I play the game with an object that utilizes the texture, it will only show the color of the defuse and completely ignore any textures.

Even when I switch back to the Blender Render mode, the renders will not display the texture.
Hopefully this image will give you some context.

If you are using GLSL shading mode, and the Nodes option is checked in the render tab of the properties window (by default it is); then the BGE supports material nodes. However procedural textures, and generated texture coordinates are not supported.

To be able to use your procedural material, you will have to bake it, then use the resulting image in a new material in the game.


Modeling a smooth curve in hard surface object How would I go about changing the first object shape in to the second? At the moment I just seem to be going around in circles with subdivide and smooth but not actually achieving the desired result.

This is Blender 2.76 on Windows

From an 'L' shape, I would remove the top and bottom faces, use bevel ⎈ CtrlB to get the two round corners, use the  Wheel to add some segments, you only want a couple of segments on the curves or you'll have too much work filling in the top.

Then fill the top with an n-gon face F and use inset I to get a clean edge loop around the top.

Then extend the edges from the curves to the outside to get an all quad mesh. Some more loop cuts can be made through the larger sections to get a more consistent face sizing over the mesh.

Now a subsurf modifier can be added to get a more rounded finish. If you want the outer corners to stay sharp you can add a crease to them ⇧ ShiftE and add an edge split modifier.

Here is an example to look at


Unity or Unreal Engine with Blender? Im interested in creating low poly mesh and exporting them to a game engine. Which game engine is better to use, Unity or Unreal?

Either one of them. This are the 2 most used game engines and Blender can easily export mesh, textures, animations, for each one of them.


How do I distribute objects along an edge loop? I am modeling a leather chair with a curved back. It is like a chaise lounge.  I hame modeled the wooden frame and the curved leather cushion.  I modeled the cushion and on the back side created an edge loop then extruded the leather band for the tacks and created another edge loop on this bad extrusion for the tacks to align.  I have modeled the tack as an object and need to distribute them along the edge loop.
I am moving from 3DS MAX to Blender 2.8. And can not figure out a way to get this to work.  Any suggestions would be appreciated.
I thought about converting the edge-loop to a curve, but I cant find any way to convert it.  I trued painting on a path but the tacks end up way offset from the surface. It seems there should be a simple way to do this.
I seldom find myself completely stumped but this is one of those times.

This can be done using Instancing and an Array and Curve modifier. and also by instancing a loop and a mesh object.
Curve method

In Edit Mode select your edge loop (Alt select an edge or vertex) and duplicate it: press Shift + D, hit Esc and separate it By Selection by pressing P.

Go into Object Mode, select the loop and press Alt + C to Convert it, choose Curve from Mesh/Text.

Add a Plane object, move it to the location of your tack object and scale it roughly to the size of your tack object. Then parent the tack object to the plane: Shift select the tack and the plane, in that order, and press Ctrl + P and choose Object(Keep Transform). After that select the plane object and go to Properties > Object Properties > Instancing and click on Faces. Make sure that the box next to Render Instancer in unchecked.

With the plane selected go to the Modifier Properties tab in the Properties window. Add an Array modifier to the plane and (later) change the values per your preferences. Change Count for number of tacks, and Offset value for the distance between them. (Best to already put some values in the fields, so you have something to work with.)

Then add a Curve modifier to the plane object, and as a target Object choose your edge loop curve object. Move your plane/tack array to your curve object and move it around until it looks relatively fine and in position.

If thing are moving in a weird and unexpected way, make sure the axis of the Offset value of the Array modifier is the same as the Deformation Axis of the Curve modifier.

Why the plane and the instancing? Why not put the Array and Curve modifier directly on the tack object? It would deform your tack object if you change the position and/or rotation of the array, curve, and the vertices of the curve. Beneficial sometimes but possibly not in this case.
Some fine-tuning:

If your tack object is to far away form the curve move it closer : ). Or alternatively scale the curve a bit bigger in Edit Mode.

You might have to simply move the vertices of the curve if tacks are to deep, not deep enough, or misaligned.

What if some (non spherical) tacks are facing the wrong way? Select your curve, go into Edit Mode, select the vertex or vertices near these tacks and press Ctrl + T to change the tilt of the vertices, and consequently rotating the nearby tacks.

If there are more vertices in your curve then you like to handle and you want to simplify things you can easily reduce their number. Select the curve in Edit Mode, press F3 (the default search hotkey), type "Set Spline Type" and choose Bezier. (Or click on Curve in the header to do the same thing.) Then hit F3 again and type "Decimate Curve" and enter a value between 0 and 1.

A sloppy execution might look something like this:

EDIT:
If your tack objects are spheres for instance and their orientation does not matter at all you can do something similar but a little easier.
As mentioned above, with Instancing you can show a child object for every face of the mesh of its parent object. But also (if you choose the Verts instancing option instead) for every vertex of the mesh of the parent.
Mesh method

In Edit Mode select your edge loop (Alt select an edge or vertex) and duplicate it: press Shift + D, hit Esc and separate it By Selection by pressing P.

Go into Object Mode, select the loop and press Alt + C to Convert it, choose Curve from Mesh/Text.

Press Alt + C again to Convert it back, choose Mesh from Curve/Meta/Surf/Text.

Why this back and forth with conversion? It will cause a somewhat even distribution of vertices along the length of the loop. (there are other ways, but i think will do in this case.)

After that select the loop (which is now a mesh object, not a curve) and go to Properties > Object Properties > Instancing and click on Verts. Now make the Tack object a child of the loop object: select the tack and the loop, in that order, and press Ctrl + P and choose Object(Keep Transform). The tack should appear for every Vertex in the loop mesh.

Fine-tuning:

What if the tacks are to close together? Select al vertices of the loop in Edit mode. Do Select > Checker Deselect, press X or Del and choose Dissolve Vertices.

What if the tacks are to far apart? Select al vertices of the loop in Edit mode. Press F3 (default search hotkey), type "Subdivide" and add a value for Number of Cuts in the bottom left properties panel (or hit F9).


UV Distortion on Helicopter I'm currently modelling a low polygonal model for a game and just finished unwrapping and organizing my uv map. I'm not very knowledgeable about uv mapping, so I was wondering if the distortion in these screen shots is acceptable enough to move on to texturing.

As you can see, I mirrored the chopper down the middle to conserve space, but it seems that there's some distortion around the center areas. Is it okay to leave it as is or is there something I should do to fix this?

as long as no complex textures need to be there (and they shouldn't if  you want to be able to see from the cockpit) it should be perfectly acceptable to have a material that is basically uniform.

  Disclaimer; I've been called sloppy on this before, but never had bad results.


blender timeline in seconds instead of frames I would like to have the time line and key frames be in seconds instead of frames. When I animate something at 30 fps and then decided to change it to 60 fps the animation will play at twice the speed.

Press Ctrl + T with your mouse inside the timeline. This toggles that view. Do that and the timeline will depict parts in frames instead of seconds. This is useful for if you want it to be in seconds.

It can also be accessed via the view menu.

Of course, there are times when one is preferable over the other.


Adding picture to moving 3D Viewport environment I'm very new to blender so just trying to find my way around. I'm looking to be able to add a .png image to a moving 3D environment. I've run a short video sequence (which consists of a walk down a short corridor then turning a corner into another room) through Voodoo Camera Tracker Program then opened the sequence and python tracker script in Blender. I can now play the sequence and see the camera move through the corridor and view the trackers move with the tracking points. My goal is to be able to add a 2D .png image of someone sitting on a chair at the end of the sequence. I've got so far as importing the image as a plane and I've moved the plane to the coordinates on the chair however when I play the sequence and view through the viewport I cannot see the image that I've uploaded.

Sorry I know my lingo must sound very basic.

Any help would be greatly appreciated.

Cheers
Andy

Use a camera image to view the video in the background.

The camera image will show on camera view. Note that this image is for reference only and will not render.

To make the image renderable, just add it as background on the compositor.


Optimal way to fill terrain between roads TL;DR: Need to fill inside and around the roads with mountains and landscape, using a single mesh, don't know how to do that most efficiently.
I've made a road around an A.N.T. Landscape generated mountain with array and curve modifiers, applied them, got the road.
Now it looks like this:

Is there a way to add inside and outside of the roads some landscape mesh without having to do everything manually?
Every way I try, there is something that seems to be an unsolvable problem:

I could cut out the place for the road from the landscape with the Knife Project tool. problem: I don't know how to actually merge vertices from the road and the terrain next to it, without having to merge them all one by one.
I could fill the in-between parts with faces somehow (which I've done in a rather disgusting fashion):

I could shrinkwrap the inside part on the landscape mesh, but problem 1: I haven't found a way to apply shrinkwrap modifier to only a certain part of a mesh, and I do not want to shrinkwrap the road.

I could just create a landscape out of the green parts with sculpting but problem 2: I don't know how to apply sculpting only to a certain part of the mesh, so sculpting will deform the roads as well, which I can't have.

In the end, it doesn't matter how it gets done, I just need roads and landscapes in the same mesh, with both having appropriate topology. If there is any other technique and I'm way off, please let me know.
I need to achieve something like this:

You could:
Create your road with Array and Curve modifiers:

Extrude the outer and inner borders of the road and AltS to scale. Fill the inner face, create a plane all around:

Make the road invisible with H

Create a second object, a plane that you subdivide and that you put over your road, delete the faces only:

Go in the top orthographic view, select the grid, shift select the road, use the Knife Project tool to print the grid on the road object. Unhide the road vertices, here is what you should get:

Now you can shrinkrap the object to another surface. If you don't want the road to shrinkwrap, create a vertex group that you exclude from the Shrinkwrap modifier. You can also sculpt the object, if you want to keep the road flat, hide it before switching to Sculpt mode.
Edit:
How to make the square plane around the road: Extrude the vertex, F to fill between two vertices, F to fill the whole face:


How can I render all render passes to files in Cycles? How can I render all render passes for all of the frames of an animation in Cycles to different files or a file with multiple layers? I'm going to do the final compositing in another compositing package and I need to have access to the passes.

Render OpenExr Multilayer for Blender, Nuke and Natron. Go to the Scene Tab, enable all passes  which key for compositing and set the Output Format in the Render Tab to OpenExr Multilayer.

Blender automatically writes all enabled passes and layers as single channels to the EXR as expected.

For After Effects and Fusion I'd suggest render single EXR's. For more information on rendering passes and layers as EXR's, see: Save all render passes to a single EXR image.

Note: If you want to use Index Passes (IndexOB or IndexMA) see this answer: How to use index passes in other compositing packages?


Normal map on only part of the material I'm trying to apply a normal map on a plane with two textures painted on it,
but in a way that it's only applied to the second one. It's a really simple
scene of a crossroad going through a field (for testing the normal map).

The thing is that I can't figure out how to apply the normal map so that
it uses only the road texture and not the whole plane. I have done my researches
about this problem with no luck, so I'd really appreciate any help.

Not sure if I'm using correct terms to describe this but here's a figure and
link to the .blend file to give you a better idea what I mean.

.blend: https://drive.google.com/folderview?id=0B4NHszZHPR_1TFlfdThBMjF6MzA&usp=sharing

There were a couple of things I changed with your file, so here's my edited version: Edited .blend

First off there were a few things you did wrong with your normal map:

When using an image for the normal map you have to set the Texture node to non-color data mode.
Then, you don't plug the image texture into the Displacement input of the material node(only takes B/W data), but instead into the Normal input of your respective shader.

Now that we've covered that it becomes very easy to achieve what you want:

You plug the normal map only into your pebble shader, so that only the pebbles get bump mapping effects, and the mask you already created does the rest. For that I added a second vector input to you group nodes so that they can receive normal mapping data as well.

Also, if you are using only one UV map, a single UV map node is usually enough.


Saving a 16 bit PNG using script I'm trying to bake displacements using script but need to save the result using a 16 bit image format (such as PNG-16). How can I change the color-depth setting using script?

Example code

img = bpy.data.images.new(name="depthmap", width=imageSize,height=imageSize,alpha=False, float_buffer=True)
img.colorspace_settings.name = 'Linear'
# bake() #implemented in separate function
img.file_format = 'PNG'
# need to set to 16-bit here
img.filepath_raw = "my_new_bake.png"
img.save()

You can not directly assign the color depth on the image. However, you can make a scene and set its render.image_settings.color_depth. Then use save_render() with that scene to save the image with the color depth.

import bpy

# Create new scene to set color depth on it
scene = bpy.data.scenes.new('scene name')
settings = scene.render.image_settings
settings.color_depth = '16'
settings.file_format = 'PNG'

# Create new image and save with scene
img = bpy.data.images.new('name', width, height)
img.save_render('filepath', scene)


Animating, exporting from multiple angles Is there a way that I can export a walking cycle of a character from many different angles?

Basically what I would like is to have 12 frames export from a characters walking cycle than have the character's base bone turn 45 degrees and than have the walking cycle export again.

The way I'm currently doing this is by coping the whole animation of a character 8 times. This is extremely difficult when a character animation is hundreds of the frames long and one single little change will force me to copy it all over again.

Is there perhaps something similar to the AE's " loopOut("cycle") ".

This character in the image has 12 frames per side and 16 sides. If you will notice ever 12 frames I rotate the base bone so that the character turns 22.5 degrees. This way I can export the whole character while I do other things. This saves me a lot of time. The problem is that now I'm working on characters that will have hundreds of frames and 8-32 sides. I need a better way to do this. Is there any way to make an animation loop?

After some searching I have found the answer myself, and I would like to leave it here for others.

Under the F-curves select the animation and just add a Make Cyclic Modifier by pressing Shift+E. This works just like the loopOut() script in After Effects.


Select inner edge of solidified mesh I am following this tutorial, but I just can't get past step 10. No matter what I try I cannot select inner vertices.

Here is my mesh after hitting A-KEY, it looks like the inner edges are not selected. They are not bright orange like the outer edges even after doing a select-all.

Blender ver: 2.68

Any idea what's going on?

You will have to apply the Solidify modifier. This will generate the inner vertices.

Or you can do this without modifiers. Select your mesh, go into Edit mode. Select all the vertices you'd like to solidify and do one of the following:

hit Space, then type "Solidufy";
or press Ctrl+F > Solidify.

After execution of the operation you can adjust the thickness either pressing F6 or opening bottom of the N panel, where 'Last Operator' scroll located.


How to connect a mesh vertex groups with an armature bones I have this mesh and armature found in this blend file. What I want to do is to connect the bones with the created vertex groups. And I don't want to use automatic weighting option as this will create different and new vertex groups. I want to use the vertex groups I manually created in the attached blend file.
Please if anyone could please advise.

Rename the vertex groups so they have the same name as the bone you want to deform them. Add the armature modifier. Make sure "Vertex Groups" is checked (it is by default) and you are done.


Select object by dimension I'm trying to select objects that meets certain criteria in this case their dimension (not the scale) but I'm unable to figure out the proper way to make it work.
I have a over simplistic script which doesn't work although the context is the right one in the python console.
import bpy

for obj in bpy.context.scene.objects:
    if bpy.context.object.dimensions[2] = 2.0:
        obj.select_set(True)

Here is the final working code following the suggestions:
import bpy
from math import isclose

scene = bpy.context.scene

for obj in scene.objects:
    x = obj.dimensions[0]
    y = obj.dimensions[1]
    z = obj.dimensions[2]

    if obj.type == 'MESH':
        if (isclose(y, 2.1, rel_tol=1e-3)):
            obj.select_set(True)
            bpy.context.view_layer.objects.active = obj
        else:
            obj.select_set(False)

Allow for precision errors.
In addition to @Secrop's answer, it is a good idea to allow for precision errors when testing equality of floats, ie 2.000001 is probably close enough to 2.
A commonly seen test to see if a value is within a tolerance TOL of 2
if abs(value - 2) < TOL

or in the case here, using math.isclose
import bpy
from math import isclose

context = bpy.context

scene = context.scene

for ob in scene.objects:
    ob.select_set(
            isclose(ob.dimensions.z, 2, rel_tol=1e-6)
    )

which is  setting the selection of all objects in the scene to the test result.
Using
if some_test_is_true:
    ob.select_set(True)

will make no change to selection if all where selected beforehand.
Can extend a selection using or.
    ob.select_set(
            ob.select_get()
            or
            isclose(ob.dimensions.z, 2, rel_tol=1e-6)
            )

or, as shown in your answer, add other specs with and eg ob.type == 'MESH' and ...


Joining two cylinder at 45 degree angle I'm trying to join these two cylinders together. I tried the pipe joint mesh but the diameter will not go small enough.
Equally, is there is a way to extrude the face of the top cylinder vertically downwards at an angle but that the face is level?
I am new to Blender so realise this seems very simple but any help would be appreciated!

To make a pipe bend the quickest way is to use the Bridge tool: Select both the 2 rims vertices and right click (context menu) > LoopTools > Bridge (you may need to activate the LoopTools addon before), or in Edge Select mode, CtrlE > Bridge Edge Loops. Then in the Operator box, set the bend as you want.

If you want to create a pipe bend but want to keep a sharp edge, the new (2.8) Mirror modifier allows you to do it easily: Create your cylinder, create an empty, give your cylinder a Mirror modifier with the empty as Mirror Object, choose (in my case) Axis > X, Bisect > X, Flip > X, move and rotate the empty until the cylinder and its mirrored merge the way you want (keep pressing Ctrl during the rotation if you want it to be 10° by 10°).

The Shear tool also allows you to create sharp bends but it's not convenient if you want precise angles or if your object is not perpendicular to the axis.


How to move vertices into normal angles I have a model that I am working on and I want to cleanup before I start adding details. I have a few angles that I want to make 90s that are really really close but aren't right. Is there something simple that I can just select 3 points and force them to create a 90?

You can create a Custom Orientation from the edge you want to square to. That's the little '+' in the header's Orientations dropdown. If you have to do this a lot, I would recommend creating a shortcut for it, and/or adding it to your Quick Favourites menu.
(You can also set Custom Orientations to be used after creation, and to overwrite previous creations, to avoid clutter, in the F9 'Adjust Last Operation' panel.)
'Y' then becomes the direction along the edge. If you set the Pivot point to 'Active Element', it's quite quick to select the vertex to be moved, then the vertex to square to, and SY0. (Scale the vertices to 0, along Y, to the active vertex.)

However, the result is only one of the possible edges in the plane at right-angles to the target edge.
You can use the same strategy to flatten vertices onto a plane of your choice. Select any 3 vertices to define the plane's direction, and again, create a Custom Orientation from them. Select any set of vertices, with  a vertex lying in the the plane you want to flatten to active, and this time, SZ0.


CPU Rendering in Blender 2.76? Ok so I've been trying to render Halo particles in Cycles Render but I don't have the 'device' option to change between GPU and CPU, is there a way to fix this or add it to 2.76?

You have to go into User Preferences > System and select CUDA or OpenCL, and then select your GPU to enable you to choose the GPU Rendering option.


Can the focal length be changed while animating? I would like for the focal length of the camera to shift from 20 to 200 as the animation progresses.  Is this possible ?

Thank you!

Yes, you can. The Focal Length field can be keyframed with the I command just like any other field. Hover the mouse over the field and press the I key to insert a keyframe at the current frame of the timeline.


How do I display the ~bounding box~ of a Render Border that is already created? A beginner's mistake, but it's driving me crazy. How do these bounding boxes work? Sometimes they appear, sometimes they do not. I can not figure out how to enable them in order to resize manually the Render Border that is already created.

How Render Border is usually:

How is it when the bounding box accidentally appears in the Render Border:

What is the trick? How do I display the bounding box?

Thank you.

I figured out. Simply select the active camera for the bounding box to appear. :D


How to add missing faces? Accidentally deleted 3 faces and didn't notice that. How should I properly restore it now?

There's probably a far more elegant way than this (I'm not that experienced with the mesh editing tools) but I would simply select that middle edge and E to extrude that down to reform that middle face. Then simply select each set of 4 vertices, hitting F to create each of the side faces.


avoiding light through a glass How do we avoid light through a glass slab from the world,  materialized with just the default material in blender?
Using an hdr just for lighting the scene is ok, and suppose you want the world to render in a transparent and so under the render panel, under film subpanel we check transparent, but looking the world from the interior- through the glass slab - we can still see the world being rendered. How do we avoid this still retaining the ability of the glass that subtly reflects the interior of the scene?

(click to enlarge)
What I mean here is to avoid the image from the world through the glass slab whilst retaining the subtle reflections of the glass slab from the surrounding.

I believe you need to rethink what you are really looking for. If you want the refraction part to be actually transparent in the image (have a lower alpha value), you can leave out the glass node entirely. Instead, mix a transparent shader with a glossy shader using a fresnel type of factor. This isn't a physically correct phenomenon anyway, so no need to get all crazy about how to set it up: just something that looks decent is needed.

(This image is plenty high-res enough to see everything clearly even though it doesn't show up correctly here for some reason. Just open it up in a new tab in your browser to see all of the settings or refer to the .blend file.)

In this blend file, the "transparent" looking areas are actually transparent in the render.

Here is the file that I used for the demo: