Is there a way to add a custom Pie Menu in 2.8? Is there a way to make a custom pie menu in 2.8? I'd like to add one for switching between trackball and turntable navigation. It gets very annoying going into preferences when you just want to use trackball for sculpting and turntable for other things.

there are two ways to add custom pie menus.

get the Pie Menu Editor addon (paid).
code it yourself, its not that difficult, you can use my pie menu addon as a starting point, if you have never coded you might want to learn about python first or just copy the code below and put it in a file that ends with .py go to the Add-ons tab and click install, chose the file that you made with the code below.

This is a basic addon that should do the job, the default keymap is Ctrl + D
import bpy
from bpy.types import Menu

bl_info = {
    "name": "S.Simple Pie Menu",
    "author": "Syler",
    "version": (0, 0, 0, 1),
    "description": "Adds Pie Menus",
    "blender": (2, 80, 0),
    "category": "3D view"
}

addon_keymaps = []

def add_hotkey():

    wm = bpy.context.window_manager
    kc = wm.keyconfigs.addon

    if not kc:
        print('Keymap Error')
        return
    # object Mode
    km = kc.keymaps.new(name='Object Mode', space_type='EMPTY')
    # here you can chose the keymapping.
    kmi = km.keymap_items.new(
        VIEW3D_OT_PIE_template_call.bl_idname, 'D', 'PRESS', ctrl=True, shift=False)
    addon_keymaps.append((km, kmi))

def remove_hotkey():
    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)

    addon_keymaps.clear()

class VIEW3D_MT_PIE_template(Menu):
    bl_label = 'S.Menu Navigation'
    def draw(self, context):
        print("test")
        layout = self.layout
        prefs = context.preferences
        inputs = prefs.inputs

        pie = layout.menu_pie()
        pie.prop(inputs, "view_rotate_method", expand=True)

class VIEW3D_OT_PIE_template_call(bpy.types.Operator):
    bl_idname = 'sop.sm_template'
    bl_label = 'S.Menu Navigation'
    bl_description = 'Calls pie menu'
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        bpy.ops.wm.call_menu_pie(name="VIEW3D_MT_PIE_template")
        return {'FINISHED'}

def register():
    bpy.utils.register_class(VIEW3D_MT_PIE_template)
    bpy.utils.register_class(VIEW3D_OT_PIE_template_call)
    add_hotkey()

def unregister():
    bpy.utils.unregister_class(VIEW3D_MT_PIE_template)
    bpy.utils.unregister_class(VIEW3D_OT_PIE_template_call)
    remove_hotkey()

if __name__ == "__main__":
    register()


Display frame rate (FPS) of imported video/movie Is it possible to see inside the Blender user interface what the original frame rate of an imported movie (video file) is, so that one can quickly decide which frame rate to use for the rendered animation, without having to consult 3rd party software or non-cross-platform operating system/file browser functions?

No, Blender cannot currently expose the frame rate of Loaded movie media.
Perhaps it is something that python scripting could access via the internal implementation of ffmpeg (the media decoder inside Blender).

When you import a movie into Blender there is an option on the import panel to "Use Movie Framerate".

This will change your current scene's frame rate to match the imported footage. Otherwise you will have to look at the mismatched length of video to its audio, then alter the scene frame rate until they match up.


bpy/file browser: get selected file names Is there a way in bpy to get a list of all selected files from the file browser?

I have this code, but it is only for the active file selection:

selectedFile = ''
for screenArea in bpy.context.window.screen.areas:
   if screenArea.type == 'FILE_BROWSER':
        params = screenArea.spaces[0].params
        selectedFile = os.path.join(params.directory, params.filename)
        break

If you take the TextEditor Templates -> Python -> Operator File Import

add from bpy.props import CollectionProperty
and add this special property  in the ImportSomeData operator

inside the importer class

class ImportSomeData(Operator, ImportHelper):

    # edit for brevity

    filename_ext = ".txt"
    files = CollectionProperty(type=bpy.types.PropertyGroup)

Then self.files, with 3 files selected, gives you

... <bpy_collection[3], IMPORT_TEST_OT_some_data.files>
>>> self.files[0]
... <bpy_struct, PropertyGroup("filename_mine2.txt")>

Then to get the fullpath of those files you use the self.path dirname

import os
dirname = os.path.dirname(self.filepath)
for f in self.files:
    print(os.path.join(dirname, f.name))

.../home/zeffii/filename_mine2.txt
.../home/zeffii/record_label_ep2.txt
.../home/zeffii/splines.txt


Adding rivets to an object for 3D printing I have an object which is going to be 3D printed to which I would like to add lot of small rivets, and to do this without losing its manifoldness.  The way I've decided to do this (stupid it may be) is to place spheres in the appropriate place so that a portion of sphere is sticking out, the spheres being separate objects to the thing they are "riveting":

However, keeping them as separate objects is kinda risky (one false move...) and so I'd prefer to incorporate them into the main object.  But I need to do this without destroying my manifoldness. I've tried a Boolean Union but that leaves stuff hanging over on the inside of my object, which makes it non-manifold.  Is there a way to achieve my aim, or maybe an entirely different rivet strategy which I should adopt?

You could model this, if you're starting with  a topology something like the  one illustrated here:

With Pivot set to 'Individual Origins'

CtrlR add three edge-loops
AltP poke the two middle face-rings
Select a couple of consecutive rivet-vertices (not necessarily just one apart)  on the central loop - use CtrlShiftNumpad+ to select the rest, and then CtrlShiftB bevel those vertices, in 'Offset' mode
Space .. look up the 'Circle' operator, and use it on your newly created faces. (They should still be selected)
perform whichever series of insets, extrudes, and scales create the kind of rivets you want.

I don't know whether you're sub-d modelling, but this is the result after putting on a level of subdivision.

You could use the Loop Tools add-on > 'Space' option at the vertex stage, in various ways, if you want to improve the distribution of rivets.

Although the result is not all quads (before subdivision), it's in the flat, for printing, and is not expected to deform, so that's probably OK?


Vector displacement along Z axis So I'm trying to make a mineral texture for November, and I want to use vector displacement. But I can't get it to go just along the Z-axis, nor will the texture Be shown.
In the setting of the material I have displacement and bump on, and I'm using cycles. I have subdivided the plane too.
What am I not doing?

With the 'Separate XYZ' node, you're extracting the Z value of the Generated texture-space of the plane. That is 0 for all the plane's shading points, since the plane has no Z dimension.

When plugged into the Vector input of the Voronoi node, that is implicitly cast to the vector (0,0,0).

The Voronoi function is therefore being evaluated at (0,0,0) for all shading points in the plane, and returning the same value at all points.

Knock out the 'Separate XYZ' node, and you should start to see some results which depend on the shading point's (XY) location in the plane's Generated texture space.

If you haven't already, I would recommend installing the shipped 'Node Wrangler' add-on. One of the things you can do with it is quickly preview the output of any node on the way down the tree by sctrl-hift-clicking on it. With your current set-up, for example, you would be able to ctrl-shift-click on the Voronoi node, and see that its output is a blank, uniform color, or even put a little reroute in the Z output of the Separate XYZ node by shift-right-dragging across the noodle, and ctrl-shift-click on the reroute, to see that the Z is 0 everywhere.


Screw modifier problem Im having trouble using the screw modifier to create a screw cap on a lightbulb.  Ive been trying to follow this guys video for it but cant seem to get the screw modifier to do something even vaguely similar to his.  It about 45 seconds in:

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

I created the same sort of edge loop but when I add the modifier it loops in on itself weirdly.  Any help with this?

Tutorial version edge loop

Tutorial version screw modifier

My edge loop

My screw modifier..

The object origin should be in the middle, not on the thread. Because the object origin is what the modifier uses as a reference for rotation.

If you look at the first screenshot, you can see how the object's origin is at the center line of the bulb, surrounded by the translation widget. Only the edges are left.

In object mode with only the object selected, set the cursor to the object using SHIFTS "Cursor to Selection". That will make sure the cursor is on the same plane as the object. Then place the cursor on the symmetry line of the bulb and use "Set Origin" >> Origin to 3D Cursor from the tools panel on the left.

You might need to adjust the axis that the modifier uses in its settings.


Deleting the insides of model/ hollowing it Hi i'd like to ask if i can delete all the faces and vertices from in side my model,

Here's my model, it looks fine, but there's problems, like some parts of it have two faces so it sort of glitches. (near the back of the foot)

And also, i used ALT + E to extrude individual faces, that made all of inside of it just horrible, and i want that the whole model to be hollow in the inside, like so

This is a cube

And this, is inside of my model,

So, my question is, can i delete all this messy blocks inside of it without any noticeable changes on the outside?

Also, i'm sort of new to blender so please tell me what you mean and how i would do it. Thank you.

You can use the Select Inner Faces operator,  and then delete then. To do this, in 3D view space, go to the header, then Select, then Interior Faces. Then you can press X > Vertices.


Modeling flat surface shapes on a cylinder I started making one of these fun little posing dolls for a project, figuring that it would be an ultra easy task and a little bit of fun with rigging.  I've run into a problem with the basic modeling.  If you take a look at the pelvis piece, you'll see it is essentially a cylinder with a flat area on the front.  Creating this flat area has proven to be a challenge, or I'm just missing the very obvious.  I tried to draw the arc using the verticies and then scale all evenly on that axis, and it sort of works but looks very sloppy.  How would you go about creating this little puzzle?  Here is a picture of the area in question... I know I'm probably missing something obvious.

https://gyazo.com/35b7a85d7a7f217eb6fbdeb1281eb9a7

A possible solution is to use a boolean modifier

Starting with your round shape:

Create a cube and rotate it in the angle you need for the flat surface:

Then place the cube where you need the cut:

On the pelvis object add a boolean modifier, usnig difference mode ans selecting the cube as object:

To view the results just move the cube to a different layer or make it invisible (H) and unrenderable (CtrlH

The advantage of this method is that you can still adjust the angle and placement by moving the cube, and when you are done you can apply the modifier.

The disadvantage is that you'll end up with some n-gons

Other way to do this is with the knife tool, in wireframe mode choose a side view for the cut and press K along with the Zkey to greate a straight cut:

Then you'll have to do some cleanup to get rid of unwanted vertices.


having trouble getting rid of unwanted vertices reworked my model and now can not get rid of stray vertices ,how do I get rid of unwanted Vertices on a model?

If they're close to useful vertices you can try remove doubles, if not you can select an useful vertex, then press Ctrl L (select linked) then press H to hide them; if the mesh has more useful parts go on and hide all useful vertices, then A to select all (unuseful) and X to delete.


Removing facets inside another object when they intersect (pictures included) I'm looking to remove the faces from inside one object where another object intersects it.

So, what I'm looking to remove would be the plane inside the small box from the big box.  This is just an example, so these objects will be complex.  I can't find a boolean that will do this for me in Blender.  My friend who has Maya says Boolean Union using Normals instead of faces does exactly this, but with Blender's Union it drops the bottom of the small box (and the plane inside the small box).  I would love to be able to do this programmatically as well and without intersecting faces as this will be something that will need to be done a lot in a step of a computational engineering test bed, but I'll try not to get too greedy here.  Please let me know if I am unclear on anything.

For anyone trying to do the same thing as I am here is my hacky way of solving it.  I first did a difference as quiliup suggested, and then did a union with the original small cube, and finally removed duplicates.  If anyone knows a more concise way to do this though I'd be happy to approve your answer.


Normals messed up after applying transform I have a simple cube that I'm using to make a wall. I had already duplicated the cube to make more walls and cut some doors and windows into them before I realized that the normals are getting messed up somehow. None of my other cubes have the problem, but I'd rather not repeat all of my work if it can be avoided.

The problem comes when I try apply the rotation and scale to the cubes so that I can use the bevel tool on the door hole. It happens on all the walls, even the one that doesn't have any modifications other than scale. The incorrect normals are visible if I switch to smooth shading, I'll see a diagonal shadow line going across the wall where the triangle would be if it were triangulated. I tried recalculating normals, but that didn't fix it.

If I view the normals before and after applying the transformation, I can see the problem. Before applying it, the vertex normals come straight out in the same direction as the face normals. Smooth shading works fine in this case. If I apply the transformations, the vertex normals change and come out at an angle instead of coming out straight. Nothing I do seems to be able to fix them.

The geometry is fairly simple, as I said one of the walls it happens to is just a scaled cube. It's only got 8 vertices. So there are no duplicate vertices, or hidden faces, or anything else I can think of that might cause the problem.

Is there something else I can try to properly rebuild these normals or am I going to have to model all my walls over again?

EDIT: I rebuilt the walls over again and the one that is a plain cube is no longer having the issue. Maybe when I was moving the vertices around for sizing I accidentally added on somewhere or something? The ones with the door cutouts are though. In this screenshot the whole thing is set to smooth shading. An edge split modifier only fixes it if I take the angle all the way down to 5 which no longer smooths the door frame. If I set the wall to flat, and individually set the door frame vertices to smooth, the problem goes away in shaded view but comes back in both Blenders textured view and when imported into Unity (whether I let Unity calculate normals or use Blender's)

Edit2: I just realized that I never applied the transform to the plain cube wall. When I do, the problem comes back. It looks just like the one in the screenshot except the messed up normal goes all the way from the top left to the bottom right.

Edit3: I've added the blend file for those asking about it. When the wall is set to flat shading and view mode is set to solid, the problem doesn't appear. But it does appear pretty bad in Unity whether it is set to flat shading or not and it's slightly noticeable in Blender when set to textured mode as well.

Blend file

The problem can also be caused by manifold meshes that have other issues, such as non-uniform normals. I ran into this issue just yesterday. I extruded a single plane into a prism, without realizing that the plane had preexisting issues with its normals.

As an aside: faces don't actually have normals. Each vert has a normal and a face's normal is calculated from its associated verts. One of my verts must have been upside-down, making the plane's normal... weird. As odd as that is to consider, it can happen.

The tricky part was that the resulting prism looked perfectly fine. The problem manifested in OTHER parts of the same object (as invisible faces), but that were not connected to the prism, even though there was nothing actually wrong with the part of the mesh where the issues manifested. It took me FOREVER to figure out, because I thought it was a non-manifold edge somewhere. Once I recalculated the normals on that prism, (because I'd tried EVERYTHING else) everything was fine.

All of which is to say, the problem may actually be in a part of your mesh that looks totally fine.


Can't get transparency right for God Rays I want to get a Hologram effect like in the image uploaded here:

I need to place the hologram over a real video clip, so lots of transparency. Works perfectly, following this guy's advice here.
Now I like to have some God Rays to it (realistic hologram needs a projection light cone). High-energy-spot with volumetric scattering (material node of a cone just outside the spot light cone).
So far, so good.
Now: whatever I try, I do not get the light rays' background transparent. Black works. Looks nice

But I need to place the whole thing on top of a real video clip and I do not get some black streaks out of the light rays - however I try and adjust any nodes with whatever Alpha effect.
And to make it worse, I had it all, five years ago, and just can't remember how I did it...
Could anyone just get me God Rays with a perfectly transparent background for me; to place them onto a video clip?

Holograms are essentially like reflections, which are purely additive light without any occlusion.
Try using the set alpha command to your image with zeros occlusion set in the alpha buffer. The RGB will then end up becoming a pure emission when composited with an Alpha Over.
Note that using proper camera encodings will take the effect even further along.
Good luck.


Stencil image appearing extremely low resolution Stencil image appearing extremely low resolution. The original image is 16000 px... why is the resolution so low when painting a stencil image ?

Stencil has to be a power of 2 image, with dimensions of
8,16,32,64,128,256,512,1024px, etc in width or height (512x512, 1024x1024,
2048x2048 or 1024x512, 2048x1024 or 512x1024, 1024x2048, 1024x128, 128x4096 - and so on, as long as it can be doubled or halved by 2) that way Blender will display it correctly. It's a general rule for any 3D texture, actually.

I know it's an old question, but a lot of people asked me about this lately and they found no direct answers online. So I figured you can never be too late with an answer. :)


Blender not using selected compute device I have 2 GeForce GTX 750 Ti GPUs in my system (no SLI), the first has 3 monitors on it and the second has nothing connected. Under the system tab in user preferences I selected the second GPU to be the only compute device. However, when I click render it doesn't seem to be doing anything on the second GPU, only the first.
My situation is similar to this question but it didn't provide me with an answer.
Multiple graphics cards. Is there a way to designate one as compute device only?

Here's a screengrab of the preferences and the GPU load using TechPowerUp GPU-Z while a render was going. The monitor is showing that there is no load on the GPU when there should be something.  I've tried switching which GPU was selected, even selecting both and got the same result, it never uses the second GPU.

Is this expected behavior or maybe a bug? Is there another setting I need to look at changing?

Thanks for the help.

It shows GPU core clock at 135MHz. There is something wrong with that. Usual clock speed of GTX750TI is 1020MHz. It could be that for some reason the driver crashes and it switches to some sort of a safe mode. Updating drivers would be first thing to do. I would try using it just after rebooting the PC. If it works just after a restart then it will be clear that the problem is indeed with the driver crashing. The GPU could be overclocked too much or it might be overheating or it might not be able to get enough power.


What's a good strategy for designing a room with multiple objects in it? I'm getting into blender and am at the point now where I can model simple objects and do some rigging without too much trouble.  Now I'm trying to figure out the best strategy to model an entire apartment, but am finding it much more difficult than just modeling a single object.

First of all, the walls and ceiling are making it very difficult for me to look into my apartment.  I can hide them, but it's hard arranging the furniture with them missing.

What's the best way to create the furniture?  I'm modeling the couch, chairs, potted plants and similar things in the same file so far, but having so many overlapping objects makes the editing difficult.  Should I put these in separate files and reference them in?  Should I move them to separate layers?

Any good general tips for modeling rooms?

Room modeling tips

Transparent objects

It's often handy to make some objects such as the walls transparent for the viewport. For render they're still fully visible of course:

Furniture creation

It's good to keep the pivots of the furniture in the bottom, so that you can snap them to different surfaces with Face Snapping. You can easily rotate them around their local axis with R+ZZ (or XX or YY depending on the case):

Managing lots of objects

Sometimes it's good to make some objects non-selectable, like the walls. Layer Manager is a great addon for managing objects if you have them on different layers.

Alternatively, parenting them to an empty is an easy way to make them non-selectable. Use Ctrl+Left click to affect all the children of a parent in Outliner:

Rendering

Sometimes it's necessary to place the camera outside of the room and mark the front walls as invisible to camera. Hiding them is not encouraged, because the light that comes outside the room makes it look dull. The light needs to bounce from the insides of your front wall:

room.blend


How can I smoothly transition between two UV maps? In the "UV Maps" section in Context, it is possible to switch between two different UV maps.

Map 1:

Map 2:

I would like to be able to transition smoothly between these two UV maps, so that I can animate the eyes moving smoothly.

How can I achieve a smooth transition between UV Maps?

I'm with Ray on this. It sounds like the wrong solution for the problem at hand.

Anyway, you can't really "change between" UV maps, but you can transition between them at shader level.

Since UVs are vectors like RGB values, you can work around it by using a Color Mix node to "mix" between two UV layers.

UVWarp, or UV Project may be more adequate solutions


Creating "sharp" chamfer in blender fast This is pretty common way of chamfering hard edges in CAD modelling different product casing.
I was wondering is there an addon, script or blender function out there that i don't know that can automatically make sharp corner chamfering like that?

usual chamfering with bevel in blender
chamfering with sharp corners that i want to do automatically

How this particular type of chamfering is called? I struggle to find info on it without the name. Maybe there reason is it's not that common after all...

This is a four main way it can be modelled by hand.

For Cube like shapes through inset with equal thicnkess\depth

For most non symmetrical shapes with 3 edges - with a help from Tiny Cad.

addon: tinyCAD Mesh tools. Included in blender by default.

For shapes with radial symmetry. Again with tinycad.

The longest way for any possible shape with boolean.

addon: booltool. Included in blender

When modelling for close-ups Ngons \ chamfer planes created through this process needs to be flat, so just beveling\chamfering in several stages won't do.

DISCLAIMER: If you want faces, created by chamfer to be flat, this won't work for you.

As far as I know, there isn't any way integrated into Blender to do this, but you can do it really simply yourself.

If you have three edges coming together, select two of them and do a regular, one segment bevel (Ctrl-B) and remember the offset value (0.2 in my case). Then, select the third edge and do the same bevel, with the same offset to it. If you want, you can get rid of the excess edge with Delete > Edge dissolve.

A gif of this: Imgur

The chamfer on the cube was done in 2 steps and the one on the pyramid was done in 3 steps (without dissolving excess edges).


Decimation glitch for ratio < 0.2 I'm having trouble with decimation.

I have a mesh of a head. I wish to decimate to 10%, whilst keeping the ears at 100%.

So I create a Vertex group for each ear, and a third vertex group called foo for the remaining vertices.

It is this foo group I wish to decimate:

So far this is good, but if I lower the ratio below 0.3 it goes wonky:

Well, I almost have what I need. If I apply the same decimation again, that should reduce the detail sufficiently.  i.e. 30% * 30% = 9% ~ 0.1 which is what I was after.  But applying it twice, the second application gives another wonky picture the same as the one I posted.

Also, I shouldn't have to be sidestepping around weird behaviour I don't understand. Is it a bug, or am I doing something wrong?

PS I guess I can manually create a new Vertex group and decimate that...

The ratio on the decimate modifier doesn't refer to level detail, it refers to the number of faces. From the wiki:

  Ratio: The ratio of faces to keep after decimation, from 0.0 (0%, all faces have been completely removed) to 1.0 (100%, mesh is completely
  intact, except quads have been triangulated).
      As the percentage drops from 1.0 to 0.0, the mesh becomes more and more decimated until it no longer visually looks like the original
  mesh.


How to seperate displacements for different parts of the object? I want to have voronoi displacement only on one checkers, others should remain without application of this texture. How to make this 'mask' seperation. Adding picture.

You're close! But I think this is more what you're after.

Essentially you've got to think of the Checker Texture node as being a 'master-mask' which is used as the Fac input when mixing the other textures together. The black part of the checker will be the top input of the MixRGB node, and the white will be the bottom.

When working with the Displacement node, middle-grey (a value of 0.5) will be no-displacement. This means that you can add the Voronoi Texture to either the top or bottom inputs of the MixRGB node, and as long as you set the other input color to be the middle-grey, and add the Checker Texture mask to the Fac input, then the Voronoi texture will only affect either the white, or black, sections of the mask.

^ Here's a screenshot comparing the difference between applying the Voronoi Texture to the bottom and top inputs of the displacement's MixRGB shader, while using the Checker Texture as the Fac input.

Hope that helps!


get newly created keyframe in python I would like to get a reference to a keyframe when I create it. Alas, keyframe_insert() returns a bool indicating success, not a handle to the keyframe.

In my application, each keyframe may need a different interpolation mode (or other parameter) so it seems good to do this at creation time.  Consider doing the following for an object where dataset has many elements:

ob = bpy.context.active_object
prop='["MyParam"]'

for interp, value, frame_time in dataset:
    ob['MyParam'] = value
    ob.keyframe_insert(data_path=prop, frame=frame_time)
    # interp = LINEAR or BEZIER or ...
    # set this one appropriately:  How?

The only thing I can see at the moment is seems complicated:

get the fcurves from ob.animation_data.action.fcurves
ask the fcurves collection to look for the one with the right data_path,
go searching the fcurve for a keyframe with the right values

This seems to look like:

# go looking for it
curve = ob.animation_data.action.fcurves.find(prop)
pts = curve.keyframe_points
# pts.find(key) what is "key" other than "the identifier for the collection member."
# do I need a foreach() loop here?

What would the key parameter be?  Is there a better way?  This multiple-search step seems like it would get costly fast.  Any hints/clues would be welcome.

The find curve by path and insert the keyframe is very common in Blender.

You may not need to find the any keyframe in Blender by key.  You can iterate through them and update a value such as curve type if the frame matches the frame in your inventory by frame number.

If you have potentially extra items you can remove(delete) the entire curve.

Your concern about time efficiency ("costly") is good yet now may not be the time to optimize.

There is the [add] method documented here.

https://docs.blender.org/api/current/bpy.types.FCurveKeyframePoints.html#bpy.types.FCurveKeyframePoints


Graph Editor - Active curve name? I often have tons of keyframes for tons of things in the scene. Sometimes I have a key selected in the graph editor but I just don't know which object this key belongs to. Any idea how to check the active key object name fast? Scrolling the object list on the left shows nothing, if there is any highlighted name I can never find it.

As generally we select the object we want to edit, and then operate, this seems a non-well implemented function.
This is the fastest way I've found:
Box select all the objects in the graph editor list, press numpad + three times (until every channel is expanded, press - to collapse).
Select the point you want to edit and press shift H to hide everything else (Alt H to unhide).
The corresponding channel will be the only one with the eye icon active.


Single Transformation Modifier? Is there a way to use modifiers in Blender to do things like apply translations, rotations and/or scaling without actually applying it?

The use case here is that I have objects built up over several modifier steps as follows:

Draw circle
Change origin
Screw Modifier without screw to create curved tube
Apply Screw Modifier
Set cursor to base of tube
Copy and rotate 30 degrees in each direction about Z axis
Array Modifier about different center point using empty for rotation

I'd like to do this without having to apply the Screw Modifier and changing origins around, because doing so loses the ability to go back and change it later without resorting to Boolean operations and lots of manual merging of vertices.

For reference, this is the result of the actions described above along with the final modifier with EmptyInner sharing the same origin shown in the image.  This is after applying the screw modifier and changing origins around.

Add Object Constraint has

Copy Location, Copy Rotation, Copy Scale, Copy Transforms

which may assist you.

Please search here at BSE for more constraint information and see Blender Documentation which is amazing.


Script fails after 4th iteration I am trying to write a basic subdivision script that does exactly the same thing as "simple subsurf modifier" does. (Subdivides triangles to 3 quads, quads to 4 quads and Ngons to n quads). I will develop it later to create different subdivision methods like Catmull-Clark.

The script below works fine on a cube mesh and the subsequently generated subdivided cubes for 4 times. When I try to run it the 5th time, the script gives error.

I'd appreciate all the help. Thanks in advance.

import bpy
import bmesh
import mathutils

# Duplicate and Get Mesh
bpy.ops.object.duplicate(linked=False)
mesh=bpy.context.object.data

# Create BMesh_Now
bm_now=bmesh.new()
bm_now.from_mesh(mesh)
vertices_now=bm_now.verts
edges_now=bm_now.edges
faces_now=bm_now.faces
loops_now=bm_now.loops

# Create BMesh_Next
bm_next=bmesh.new()
bm_next.from_mesh(mesh)
vertices_next=bm_next.verts
edges_next=bm_next.edges
faces_next=bm_next.faces
loops_next=bm_next.loops

# Number of Vertices, Edges and Faces
vertex_count=len(vertices_now)
edge_count=len(edges_now)
face_count=len(faces_now)

# Remove Edges and Faces from  BMesh_Next
for edge in edges_next:
    edges_next.remove(edge)
for face in faces_next:
    faces_next.remove(face)

# Add new Vertices to BMesh_Next
for edge in edges_now:
    verts=edge.verts
    mid=mathutils.Vector((0.0, 0.0, 0.0))
    for v in verts:
        mid+=v.co
    mid=mid/2
    vertices_next.new(mid)
for face in faces_now:
    verts=face.verts
    center=mathutils.Vector((0.0, 0.0, 0.0))
    for v in verts:
        center+=v.co
    center=center/len(verts)
    vertices_next.new(center)

vertices_next.index_update()

# Create new Faces
facecount=0
for face in faces_now:
    verts=face.verts
    count=len(verts)
    vertexlist=[]
    for v in verts:
        vertexlist.append(v.index)
    edges=face.edges
    edgelist=[]
    for e in edges:
        edgelist.append(e.index)

    for i in range(count):
        newfacevertices=[]
        v=vertexlist[i]
        newfacevertices+=vertices_next[v:v+1]
        e1=vertex_count+edgelist[i]
        newfacevertices+=vertices_next[e1:e1+1]
        f=vertex_count+edge_count+facecount
        newfacevertices+=vertices_next[f:f+1]
        e2=vertex_count+edgelist[(i+count-1)%count]
        newfacevertices+=vertices_next[e2:e2+1]
        print(newfacevertices)
        faces_next.new(newfacevertices)
    facecount+=1

# Copy to Mesh
bm_next.to_mesh(mesh)
bm_now.free()
bm_next.free()

print("Done!")

A couple of things

You are not freeing your bmesh s with

bm.free

you need to call the free method

bm_now.free()
bm_next.free()

Also consider replacing bpy.ops.object.duplicate(linked=False) with either:

newobj = bpy.context.object.copy()
newobj.data = newobj.data.copy()
bpy.context.scene.objects.link(newobj) # link it to scene
bpy.context.scene.objects.active = newobj # make it context.active_object

or quite simply

mesh = bpy.context.object.data

to not have subdivided dupes.

Not using operators will avoid adding the state to the undo stack, and running out of memory.

Making these changes lets me get to 8 on default cube, (9  crashes my blender), which is passable  given 6 is the max for modifier.


Cycles mist pass does not appear in reflection I'm having a problem with reflections of objects in cycles, where the standard mist pass does not seem to be properly reflected. In the image I have uploaded you can see that the mist obscures only the three nearest cubes, but in the horizontal reflective plane many more cubes are visbile going much further back, whereas in reality the visibility should be the same. I've tried switching to volumetric mist but I'm doing a long animation and it takes far longer to render.

here is the setup for the mist pass - very simple and following tutorials

The mist pass is not going to get the results you are looking for. It will only output the distance from your geometry to the camera and won’t respect your shaders’ reflectiveness.  That’s why it renders so much faster than the right way to get this look, the volumetric shader for the world.


Solidify thickness doesn't correspond to specified scale although scale of object is applied I have the same problems as described in this thread, but the object to which I'm trying to apply "solidify" to has it proportions all set to "1"

What is causing this ?

Immediately after posting this question, I realised my problem.
Hopefully it might help someone else, in the future (or in the past)

The object was parented to a dummy object (this project is full of it, I think I didn't import this drawing the right way), which wasn't scaled properly, affecting the scale of the child-object.

I remember now that it appeared strange to me that the object (a technical drawing of a MAN NG272 Public Transport Bus, wasn't scaled properly,
but as an afterthought I think it was, but the empty (empties) wasn't (weren't).

So, instead of removing the dummy parents, I just scaled the whole drawing  to what I thought was right, hence a number of problems later on ...

So the actual solution was to remove the parent of the object, keeping the transform (Alt-P) and then re-apply the scale, after which the solidify parameter works as expected.


How to remove empties without messing up the model? I downloaded a model that has empties in it. I am not a fan of using empties and wnt to delte them but it messes up the armature. How do I successfully delete the empties without messing up the armature? (I looked up empties on the Blender Manual but still don't understand what they are.)

Empties are used for rigging and every empty will be having it own vetices to modify or rig. If you will remove them your model will go to its original state which a look a bit messy and filthy, They are nothing but just objects which don't contain any vertices data but just support to modify other meshes just as a lattice object will. It mean that you can't remove them but you may hide them by selecting them all and pressing h(alt+h will inside them) and you will not able to see them.
Or you can move all the empties to a different empty layer where there is nothing and hide that layer.


Mark seam breaks other uv island I would like if someone had same problem.
after editing Uv and made some separation, I found I need another seam to make the island to be straighten.

But if I mark new seam, It breaks other UV island which I arleady made...
I hope to know how I can avoid this problem. thank you.

I guess what you need to do is pin your UV map:

Let say you've made your first unwrap with a seam. Select all in the UV Editor and press P in order to pin.

Create your second seam.

In the object, select the part you want to unwrap again, in the UV Editor remove the pin for this part with AltP.

Unwrap again. In the UV Editor, it won't affect the pinned vertices, it will only affect the non-pinned vertices.

Move and scale the new islands wherever you want in the UV Editor.


Hat not texturing properly I have created this top hat, which has 3 main parts: the base, the band and the top.
Originally, I created the hat incorrectly, I used materials instead of textures. I now want to use this as a textured Roblox hat for a game, but I can’t paint it to look like the original because when painting the band, it also paints the rest of the hat, like in the video below. How would I get the hat to look like this:

You can:

In Edit mode, select the part you want to paint:

Switch to Texture Paint mode, enable the Paint Mask option:

Paint:

It should work:

If it paints on unexpected parts it may be because the margin between the UV islands is not large enough, in that case go into the UV Editor then UV > Pack Islands and in the Operator box on the bottom left increase the Margin:


Rearrange uv where i want i would like to know how to rearrange uv maps to where i want, without messing vertices. For example putting a couple UV on top of e.a other because they have the same texture. Im having a problem doing that because when i try to grab, other vertices come as well.

Make sure proportional editing is disabled, then enable Keep UV and edit mode mesh selection in sync and enable Face Selection mode.

Then you can select the faces and rearrange them as you want.


Issues with normals to create more depth I wanted to create a displacement to create something like this. I have a existing metal texture applied to the object.

This is how it looks like now

I have included my shading editor for more information

UpdateThis is with the displacement.

You can get there using Displacement on a higly subdivided mesh.
Bump and Normal maps are faster, but will only get you so far.

Choose either Displacement only or Bump only depending on your needs.


How can I place objects over the surface of HDRI? I want my objects to be perfectly aligned with the HDRI as if the object is sitting on the ground. when I set an environmental texture to blenderworld, the objects float in the middle of nowhere. So I want to know, how can I fix this issue ?

as you can see in this image the object is perfectly lining up with the HDRI.

create a plane under your object and keep it as shadow catcher... Search on Youtube for Shadowcatcher


Reverse objects order in group I am trying to reverse the order of the object listed in a group using Python Console.
I do the following:
 1. Create a group from few selected objects as normal in Blender.
 2. In python console I create a list from the objects in the group.
 3. I reverse the list
 4. Create new group and add the objects from the reversed list.
When testing the group in the console the objects seem to be added in reverse order as expected. But after I save the file and reopen it the order of the objects in the "reversed" group was reset to the order of the original group.

So my question is - Is it possible to have two groups with the same objects but arranged differently in both groups?

ID property sortkey

Test script to demonstrate adding an ID prop as a sort key.  Creates two groups from scene objects "Group1", the second,  "Group2", in reverse order and adds a sort key  add_key(group)

Saving and reopening the file and group.orderred_list returns "Group2" still in reverse order, as created.

import bpy
context = bpy.context  # for testing

def add_key(group):
    # simple integer key
    key = 0
    # add an IDProp key for each group object
    for o in group.objects:
        o[group.name] = key
        key += 8

    return None

def sorted_group(group):
    def key(obj):
        # key is groupname prop if set else 0
        return obj.get(group.name, 0)

    g = [o for o in group.objects]
    g.sort(key=key)
    return g

bpy.types.Group.orderred_group = property(sorted_group)

# test calls
scene = context.scene

obs = [o for o in scene.objects]

for name in ["Group1", "Group2"]:
    print(name)
    group = bpy.data.groups.get(name)
    if not group:
        group = bpy.data.groups.new(name)
        if name == "Group2":
            obs.reverse()
        for o in obs:
            group.objects.link(o)
        add_key(group)
    elif name == "Group2":
        sl = group.orderred_group
        # reorder by unlink link
        for o in sl:
            group.objects.unlink(o)
            group.objects.link(o)

    print(group.objects.keys())


Animating a growing low poly tree How should I go about animating a growing tree?
Just using scaling and shrinkwraping does make it look kind of like it's "growing" but it's not how a tree really should grow.
My idea is, to have the tree go from a single twig as a sapling, then adding on new branches and "leaves" as it grows further. If I just scale it, then a fully grown tree looks the same as a sapling, just bigger (duh) so it doesn't really feel like it's growing.
I can't get shape keys to work, as I would need to increase/reduce the amount of vertices and also, I'm using the skin modifier, but I can't get the vertex radiuses to animate to make the branches thicker/thinner.
Is there an easier way than just manualy animatin every single vertex? Maybe if I make intermediate models and transition between them if that's possible?
Also as an extra, would it be also possible to add on bones as the tree develops, as to add wind effects and other interactions?

So I'll just post this as an answer but if anybody has a better suggestion feel free to share!
So I managed to get it to work thanks to moonboots's comment

As suggested I made an armature and just scaled down each branch seperatley and then rotated it so it's hidden inside the mesh. It looks fine from a distance but not so great up close


Export .obj with normalized UV coordinates I want export .obj files from Blender. I export them with normals and UV Coordinates. I then import them into an OpenGl application. In UV Editor i am able to display the coordinates of the cursor normalized. My Problem is that i need to export them normalized cause OpenGL needs them that way. Is there any possibility to do this or do i have to write and application which converts them manually?

I found the problem. The output was normalized but blenders coordinate system starts in the lower right. My coordinate System in OpenGl has (0|0) in the upper left.


motion trail effect on video in VSE Can Blender VSE do something like in this video ?

I have been looking on the net for motion trail effect, ghost effect, but cannot seem to find a way to do this.

Would I have to use a script to achieve this?

If so can someone please give me some pointers.

Kind regards,
Reggie.
Addition) I've found this, with linked script. Could this be modified in some way?

Rather than doing this in the VSE you can create this effect using a feedback technique similar to How to do this type of trailing effects where the previous frame is held over to include in the current frame. The only real difference is in masking out the current frame so as to overwrite all but the background each time.
The setup of the scene is the same (ie, a camera pointing at the plane) with the following material on the plane :

Here the feedback is handled by the bottom branch - with the Image Texture pointing at the location of the render result, offset by 1 frame to pickup the previous frame. The top branch injects the video (filed infront of a black background) with the Subtract used to darken the image (this was used as a crude way to remove background artifacts since my video background wasn't perfect) with the Less Than used to detect the 'foreground' so that the feedback can be cut out wherever the new image is above a certain threshold. The images are combined and the Emission with a value less than 1 effects the fade out as the trail ages.
This produces the following result :


How to reset OpenGl for Solid lighting? I read the original Reset OpenGL lights, I understand, but I don't do Python.
How would I "reset" my settings as shown?
I've had trouble with these forever, so my Solid lighting as I work is bizarre. Even with a new startup they're kaflooey.

Added bonus: How to "put back" the settings I have now if I screw up?

You can print the current settings to a console with a simple script:

import bpy

def round_vec3(vec): return tuple(map(lambda c: round(c, 3), vec))

solid_lights = bpy.context.user_preferences.system.solid_lights

for i, light in enumerate(solid_lights):
    print()
    print("Light %i:" % i)
    print("  Use:", light.use)
    print("  Direction:", round_vec3(light.direction))
    print("  Diffuse Color:", round_vec3(light.diffuse_color))
    print("  Specular Color:", round_vec3(light.specular_color))

Based on the settings for solid lights in startup.blend, here's a script to reset your current settings to the defaults:

import bpy

lights = [
    {
        'use': True,
        'direction': (-0.892, 0.3, 0.9),
        'diffuse_color': (0.8, 0.8, 0.8),
        'specular_color': (0.5, 0.5, 0.5)
    },
    {
        'use': True,
        'direction': (0.588, 0.46, 0.248),
        'diffuse_color': (0.498, 0.5, 0.6),
        'specular_color': (0.2, 0.2, 0.2)
    },
    {
        'use': True,
        'direction': (0.216, -0.392, -0.216),
        'diffuse_color': (0.798, 0.838, 1.0),
        'specular_color': (0.066, 0.0, 0.0)
    }
]

solid_lights = bpy.context.user_preferences.system.solid_lights

for s, l in zip(solid_lights, lights):
    for k, v in l.items():
        setattr(s, k, v)

If you don't want to deal with Python, just install this addon version of the script and click the Reset Solid Lights button in the User Preferences header (where the Save settings button is) while you are on the System tab:

bl_info = {
    "name": "Reset Solid Lights",
    "author": "CoDEmanX",
    "version": (1, 0),
    "blender": (2, 65, 0),
    "location": "User Preferences > System",
    "description": "Reset OpenGL Solid Lights to factory defaults",
    "warning": "",
    "wiki_url": "",
    "category": "User Interface"}

import bpy
from bpy.types import Operator

# OpenGL solid lights settings like in factory startup.blend
lights = [
    {
        'use': True,
        'direction': (-0.892, 0.3, 0.9),
        'diffuse_color': (0.8, 0.8, 0.8),
        'specular_color': (0.5, 0.5, 0.5)
    },
    {
        'use': True,
        'direction': (0.588, 0.46, 0.248),
        'diffuse_color': (0.498, 0.5, 0.6),
        'specular_color': (0.2, 0.2, 0.2)
    },
    {
        'use': True,
        'direction': (0.216, -0.392, -0.216),
        'diffuse_color': (0.798, 0.838, 1.0),
        'specular_color': (0.066, 0.0, 0.0)
    }
]

class WM_OT_solid_lights_reset(Operator):
    __doc__ = bl_info["description"]
    bl_label = bl_info["name"]
    bl_idname = "wm.solid_lights_reset"
    bl_options = {'REGISTER'}

    def execute(self, context):

        solid_lights = bpy.context.user_preferences.system.solid_lights

        for s, l in zip(solid_lights, lights):
            for k, v in l.items():
                setattr(s, k, v)

        return {'FINISHED'}

# Add button to user pref header (conditionally)
def userpref_button(self, context):
    if context.user_preferences.active_section == 'SYSTEM':
        self.layout.operator(WM_OT_solid_lights_reset.bl_idname)

def register():
    bpy.utils.register_class(WM_OT_solid_lights_reset)
    bpy.types.USERPREF_HT_header.append(userpref_button)

def unregister():
    bpy.utils.unregister_class(WM_OT_solid_lights_reset)
    bpy.types.USERPREF_HT_header.remove(userpref_button)

if __name__ == "__main__":
    register()


Why are extra faces deselected when deselecting vertex groups? Subdivide a cube and assign 4 faces to a vertex group.
Assign the whole cube to another vertex group.
Select the whole cube with a click on vertex group 2.
Try to deselect the 4 faces with a click on vertex group 1,
but a lot more faces are deselected.

This is because they are vertex groups, not face groups.

Deselecting a vertex group will deselect all the vertices in that group, which will also deselect any faces which those vertices where a part of.

Think of it this way: For a face to be selected, all the vertices which make up that face must also be selected. So by deselecting a single vertex in the subdivided cube example, you actually deselect four faces:

If you deselect the vertices in your group manually, you'll get the same result as clicking the deselect button on the group.

What you want are Face groups, however unfortunately there is no support for these yet. There is a proposal though.


Forces field Wind does not affect hair everytime I try to add wind in my scene the hair is still static. Only if I move the wind object the hair is moving.
But if I dont do that the hair goes in the right direction but doesnt move. I have this problem in Blender 2.80, 2.83 and 2.79.
I have a simple plane with a hair particle system. I have this problem with Vortex and the Turbulence too. Same problem with hairs on characters.

I hope someone can help me.

A wind force field makes a steady, laminar stream of wind. This is not desirable because that way all the hair moves in the same direction. In order to fix this, add a turbulence force field in front of the wind.

The turbulence force field will disrupt airflow. However, this disruption is still constant meaning that the hairs will shift a little, but will remain in the position. However, if you press G to move the turbulence, it will change the appearance of the hairs.

In order to make the turbulence dynamic, select the force field and keyframe animate its rotation. Please note that only animating X and Y rotation will work, and not Z.

I hope this helps!


How to change inflow velocity attributes randomly while animation Hey I'm new at blender physics. I want to make a fluid animation,  made some tutorials about fluid but need to change velocity attribute randomly during the animation. Thanks for you helps

You can do this with F-Curves

Insert keyframe for inflow (press I hovering over the attribute).
Open Graph editor.
Add the F-Curve Modifier: Noise (Shift+Ctrl+M).

Or a little more complicated with a Driver

Add a Driver to the Attribute (Ctrl+D hovering over the attribute ‣ Add Driver ‣ Manualy Create Later)
Open Graph editor
Go to Drivers Mode
Select the Curve of the Attribute you want to Animate
Go to Drivers Tab in Toolshelf
Set the Driver to noise.random()


How can I best combine different objects in a way that reduces vertices and edges? New to Blender. Let's say I have a cylinder and rectangular prism that intersect each other along their long sides, like so:

I want to merge these shapes in a way that eliminates the intersecting edges but preserves their external geometry, something like this:

What is the best way to do this?

The Boolean modifier should work perfectly for this purpose.

First, split the separate parts into individual objects (P with everything selected in edit mode).

Then, add the Boolean modifier to either of the objects, set it to Union, and select the other object. You can further edit the mesh by applying the modifier (⎈ CtrlA).

After applying the modifier, you will be left with two objects: the joined mesh and the target object of the modifier.


How to Close Orthographic Scene Collection How to Close Orthographic Scene Collection. It split into 4 windows and I can only use the User Scene window. How do you close it?

Blender calls it  Quad View and it can be toggled with CtrlAltQ, or (Header) > View Menu > Area > Toggle Quad View


Fill extruded spline I would like to fill this extruded spline. In 3ds Max you extrude the splines and it automatically adds a cap. I would like to reproduce this in Blender.

Any help would be appreciated. Thanks.

After the spline is extruded as you have it above, you choose (in object mode) Object>Convert to>Mesh:

Then fill in the faces (choose vertices and hit F):


How are you meant to use the middle mouse button? I am switching to Blender from Maya, I was really happy when I heard about the 'industry standard' keymap, but there are many tools missing in there so I thought I would try out the blender keymap, but it feels quite uncomfortable panning around with the middle mouse button, how are you meant to do it? Do you have three fingers on the mouse and use the middle one for the middle mouse button? or just two fingers and the index finger switches between the left and middle buttons?

I use my index finger and switch between the left and middle buttons. You won't need to use both buttons at the same time. If you want you can use three fingers on the mouse, but it's not necessary.


Make Mist pass skip semitransparent objects I am having problems with the Mist pass. I have search other questions but didn't find the answer.

As you can see, I got an ocean (left) and a "river" (right). Don`t mind about the river disappearing towards the right, I need that way but doesn´t affect my problem (but I wanted to keep the settings as I have in the big project).

When trying to get the Mist pass, both objects are semitransparent, as you can see here:

Also the Z pass gets crazy:

I think is because they both have glass and transparent material, and also volume absorption.

The sun is 0.8 in size and 5 Max bounces.

So, the question is: How can I get the Mist pass "skip" the transparency settings of both objects?

Thanks in advance!

Create a new render layer in which the material is overriden by some material that has no transparency, and enable mist for that render layer. Then use the mist pass from that layer to combine over the other layers.

(click on the image to enlarge)


How to specify number of cuts for subdivision modifier in python I'm working on a custom panel in Blender. I can add a subdivision modifier with python like this:

subsurfMod = self.layout.operator("object.modifier_add", text ="Add subdivision", icon="MOD_SUBSURF")
subsurfMod.type='SUBSURF'

However I want to also specify the number of cuts. Something like this doesn't work:

subsurfMod.levels='3'

What do I have to use instead?

There is an operator that sets subdivision level for an object and adds the Subsurf modifier if it does not exist:

bpy.ops.object.subdivision_set(level=4)

You can call it with a button like any other operator:

self.layout.operator("object.subdivision_set", text ="Add subdivision", icon="MOD_SUBSURF").level=4


Camera cutting objects For some reason I cliked on something I shouldn't click and don't know how to undo it. Only happens in shading viewport. On Layout, it looks perfectly fine.

How to undo this?

The Clipping Region works only in Wireframe ans Solid shading modes.

Shortcut Alt+B for toggle


Rigify Store Selected Handles somehwere I'm new here. I'm using blender 2.8a on Pc.
I have a rigify rig (not mine), often I need to select specific "handles" of the rig (for handles I mean the circle or squares or boxes that allow you to move the bones, see picture attached).
Is there a way to save this "selection" somewhere in a blender? so next time that I need them I don't need to re-select one by one, and is quite a time consuming, any suggestion?
thanks in advance

You can create a New Bone group (adding it to the existing ones), or move them into a single layer.


how to add texture to an object import in .stl format Extreme blender newbie here..

Is it possible to import an object in .stl format and add a texture to it?

I seem to be able to do it fine with any object I create inside blender, but when I import an .stl it will not give me the option to do so.

Could anyone please tell me the steps?

Thanks!

An image or procedural texture is used by a material to control the color over the surface of the object.

Using blender render, a texture can only be added if a material has been assigned to the object. Also note that the texture panel has sub-sections, you will want the material textures option to be selected. After importing an .stl file, there may be no material, so first create the material and then add a texture.

Also there are differences based on the render engine chosen, cycles uses a nodes based system that allows textures to be incorporated at different stages of the material.


How to fix polygons occupying the same space I'm very new to Blender, coming from Lightwave and Modo. I have a hard time solving an issue, that I came across several times. It's multiple faces created in the same space and sharing vertex. I can't even select them as you will see in the video. And even then, how can i solve the problem.
Here is the video showing the issue:
https://youtu.be/K7_GI7R9Sn0
Thank you very much.

If I understood well your problem, just select all vertices pressing A, then select "Mesh" -> "Merge" -> "By Distance" as in the image.

If you need you can then adjust the threshold in the redo panel.


Using Blender to investigate the cast of shadows from an object onto a specific point in space I think that Blender might do what I have in mind, but I am not a Blender and Python guru, so I am looking for directions.

I need to determine if a point in space is obscured by an object, i.e. does it cast the shadow over it (there is one source of light, the sun). This has to be done for:

many different objects of different shapes but of similar size: they are fairly simple with just a few surfaces (e.g. a collection of cubes of slightly different sizes and orientations). Each is stored in one OBJ, so there are many OBJs. The analysis should be done one by one.
a collection of many points that need to be tested, each has different 3D coordinates. For each point it should be determined if a shadow is cast over it or not, so the result is binary.
for a different position of the sun (e.g. 100-200), to mimic the variable position of the sun during the day and throughout the year.

I am interested in two things: how to automate this, and is there a function in Blender that determines if a point is obscured or not.

What I have so far is shown below. For the simplicity of the approach let's assume that all points that need to be tested have the same Z coordinate (i.e. they are planar).

for each OBJ:
    +Load the OBJ
    +Place a plane at the Z value of the points to be tested
    for each position of the sun:
            +Render the image so only the plane with the extent of the shadow is visible
            (option Cast Only, and the camera is orthogonal and has a top view.)
            +Export the image
            +Import the image with an image processing library in Python
            for each point to be tested is a shadow cast over it:
                            +Find the pixel in the image that corresponds to
                            the position of the point
                            if the pixel value at that point is dark:
                                   it is obscured
                            if not:
                                   it is not obscured

Is there a better method for this? Please note that the points might have different Z coordinates, so my method is not optimal (it would require multiple planes).

I would like to point out that the blender python has an API for ray_casting objects so you don't have to manually loop over all the faces of the object your self.

http://www.blender.org/api/blender_python_api_2_63_8/bpy.types.Object.html?highlight=object.ray_cast#bpy.types.Object.ray_cast

import bpy
from mathutils import Vector, Matrix

SunObj = bpy.data.objects['Sun']
sun_mx = SunObj.matrix_world

Surface_Object = bpy.data.objects['Test Points']
surface_mx = Surface_Object.matrix_world
for v in Surface_Object.data.vertices:
    v.select = False

#here some simple test objects
test_names = ['Torus', 'Suzanne', 'Cone']
test_objs = [bpy.data.objects[name] for name in test_names]
test_mxs = [ob.matrix_world for ob in test_objs]

#we get the sun location from the world matrix
sun_location = Vector((sun_mx[0][3], sun_mx[1][3], sun_mx[2][3]))

#Test test points are stored in object data
test_points = [surface_mx * v.co for v in Surface_Object.data.vertices]

hits = 0
for ob, mx in zip(test_objs, test_mxs):

    imx = mx.inverted() #ray_cast happens in local space
    for i, pt in enumerate(test_points):
        loc, no, indx = ob.ray_cast(imx * sun_location, imx * pt)

        #simulate shadow with selection of the test vert
        if indx != -1:
            hits += 1
            Surface_Object.data.vertices[i].select = True

print(hits)

a sample blend
https://www.dropbox.com/s/004eu6aaqxg6zxy/ray_cast_sun.blend?dl=0


How to select all objects in a scene? How do I select everything that is inside of my scene OBJECT wise? I have too many objects in my scene for me to select them all with Shift + RMB

To select every object in the scene press A. This makes to select / deselect everything depending on whether something was already selected. So if there's something already selected press A twice.

Note that there can be hidden objects in the scene, which won't be selected without unhiding them. You can do that by pressing Alt+H to unhide and then proceeding to select. See hiding / unhiding everything but selected objects; also toggling visibility of object in Outliner.

If you'd like to select everything in scene depending on some category then you should use Select Grouped menu which can be accessed by Shift+G when in Object mode. To select only meshes select one, access menu and choose Type entry. Same with any other type of objects.

See more about selecting in selection tools wiki


copy custom object properties to multiple objects blender 2.9
I have a custom object properties that need to be copied to ~1000 objects. I have done some research and using the script editor I am able to assign IDs to all of the objects and get a list of the properties I need to assign, however, I am a novice to python and I am stuck there.
Of course if there is an better way (addon?) to copy custom properties to multiple objects
Any help would be appreciated
Here is the script I used to assign the ids:
import bpy

objs = bpy.context.view_layer.objects.selected

numb = 1000

for obj in objs:
    obj["ID"] = str(numb)
    numb = numb + 1

for obj in bpy.context.view_layer.objects.selected:
    obj.select_set(state = True)

These are the custom properties I need to add:
Shake_Influence - 5.0
Shake_locX - 1.0
Shake_locY - 1.0
Shake_locZ - 1.0
Shake_rotX - 1.0
Shake_rotY - 1.0
Shake_rotz - 1.0

There is already a solution to copy custom-properties to and fro objects?
https://blender.stackexchange.com/a/24004/123064
import bpy

ob_sel = bpy.context.selected_editable_objects
ob_act = bpy.context.object

try:
    props = ob_act["_RNA_UI"]
except KeyError:
    pass
else:
    for ob in ob_sel:
        if ob == ob_act:
            continue
        for p in props.keys():
            print(p, ob_act[p])
            ob[p] = ob_act[p]

Note: I am not sure if you are trying to create custom-properties additionally from a script or just trying to transfer them.


Put Armature Rest Position to T pose I have an animated armature found in the .blend file found here where I want to set the rest position to T pose so I can parent a T pose easily with it. How this can be done?

You can change the rest pose in Pose Mode Editor and using the menu Pose > Apply [Ctrl+A] > Apply Pose as Rest Pose.

HOWEVER, you will destroy your animation: this "rest" pose is the base for the animation data, all transformations are made using this bone orientation.

EDIT:

As @batFINGER wrote above (about a similar thread: https://blender.stackexchange.com/a/53981/15543), I got the procedure working (with Blender 2.78a) in the following way:

Pose your model to the new rest pose (without keyframing);
Run the "script 1" (retarget_pose.py) to generate UI buttons (under Properties Editor > Object Data Tab);
Click "New Rest Pose to Rig" (it will duplicate the bones - inside the same armature - with the new rest pose);
Click "BVH action to new restpose rig" (it will correct every keyframe of the animation);
Manually delete the original bones (as I could not make the "script 2" - the one posted in the thread - work);


How to make a race track join to terrain I'm making a racing game. I am able to make a track with kerbs easily:

I can create this road with an array and curve modifer, however I'm struggling to join it flush with/add surrounding terrain so my car doesn't just drive off the edge. I dont just want the road to be perfectly flat, I want there to be hills and terrain etc.

I have tried just filling in the gaps but that takes ages and I cant do it in a nice way. I also tried cutting a track sized hole in a plane with boolean, but I cant get it to work. Any help or methods to do this would be great!

You can do this using the shrinkwrap modifier. Add a Shrinkwrap modifier to your road, set it to Project mode, limiting the axis to Z and checking Negative under Direction. You will need some offset to keep the road from overlapping with the terrain. There will be a gap that can be filled by extruding the entire road downward on the Z axis or using the Solidify modifier if you want to do it non-destructively.

While doing this I noticed that with any kind of steep terrain the road looks weird because it's ungraded, following the terrain too closely. If this is a problem you can shrinkwrap the road to a smoothed copy before solidifying it. Create a copy of the terrain, add a Smooth modifier, limit it to the Z axis, set the intensity to about .5 and the iterations to around 20. Play with these settings until you get something that looks right in your case.

My example graded road has to stick out the ground to avoid overlapping with the terrain and it's a little taller than I'd like. To get it any closer the underlying terrain has to be smoothed where the road will be. To do this, manually select the vertices under the road using circle select, assign them to a vertex group, add a smooth modifier to the actual terrain and set it's vertex group to one you created. You can use similar settings to the ones above. Now the graded road can be moved further down. In some cases we won't need a second terrain and can just shrinkwrap to the partially smoothed terrain, but by using both we get fine control over how the road and terrain meet each other.


Rendered image suddenly unsharp I baked a smoke / fire simulation and then created this animation. After that I rendered an image of one frame and that image looked ok. After that I wanted to render some other frames and each time the rendered image was unsharp. I am not aware that I changed something and I also did not Free Bake. how can this happen ? This is one of those unsharp images.

I think you're referring to the motion blur. Your scene has motion blur enabled which is what you want for smooth animations. But if you just want to render a still image and you want it to render sharp (without motion blur) then you'd just disable motion blur for that one shot.
The amount of blurriness depends on the strength of the motion at any given frame, so you should not be suprised that some frames render with less motion blur than others (depending on your animation).

Motion Blur is not enabled by default but is recommended to use for animations so that movements are perceived as smooth, but if you're rendering at very high fps (60+) you don't need it. You can also use it for stills in order to depict rapid movement. (Take for example a render of a racing car moving fast on the race track: if motion blur is disabled then it would appear as if the car was just parked on the street since everything is rendered sharp and thus no sense of motion is transmitted).
As a final side note: As far as I can tell cycles does not support motion blur for the fire simulation per se, but in this case applies the motion blur from the rotation animation.


2.63a texture bump in nodes I can only use versión 2.63a due to system limitations. I'm following a tutorial and noticed that in 2.66 there's an option for texture bump in the nodes section. How can I manage a bump in nodes in version 2.63a that mimics or equals that of 2.66?

thanks in advance!
Cam

Newer versions of blender (added in 2.65) allow you to feed normal data (bump maps) into the shader nodes allowing the shader to adjust itself to the altered surface of the model. Also the normal Map node was added that gives us more control over how the normal map is applied.

The closest alternative you have in 2.63 is to connect your bump map into the displace socket of the Material Output.


Render with artifacts and errors (sharp teeth in the shadow area) for basic paint texture I seem to have had some basic problem and there's a simple solution, but I can't find it and understand it. Help me understand what kind of mistake I'm making with the renderer.

After saving the file, I have a render with artifacts and errors (sharp teeth in the shadow area)

I know I made a simple mistake in setting up materials or tying textures, but I can't figure out where I'm making it.

Please, help me.

this looks like eevee. these things can happen in real time engines, they are called Shadow Acne. you seem to have a very pixelated shoadow map.
Look in to the shadow tab on the poperties bar to see what shadow map resolution you have (default 512px)

but they can have multiple solutions and causes, I suggest you read this article to understand more about them.

https://learnopengl.com/Advanced-Lighting/Shadows/Shadow-Mapping

but after i watched the video you sent in it seems more to be some sort of a bug with blender itself. using a different verson migth fix the issue


Mesh inside soft body - Mesh Deform not working I am trying to make a mesh inside a soft body following this post:
make soft bodies stay inside another soft body

It creates artifacts when it moves, and i dont know what the problem is :

The problem is with the Mesh Deform modifier. The Mesh Deform only acts on those vertices that are within the Container mesh. In your case you have applied a subdivision surface modifier and this has resulted in some vertices that are outside the container mesh. This means that those vertices are not deformed to follow the softbody simulation and so they are left behind.

To resolve the issue, identify the vertices that are outside and move them within the container and re-bind the Mesh Deform modifier.


Blender 2.8 How do I fix the gloss on this mesh? I’m using normal maps here, Is it the faulty map or something else that’s causing this strange effect?

How would I turn this into something like this:

 Sort of a matte effect

Some of the point:

You can change the strength of normal by using normal map node
The second wood of your picture seems to have a clearcoat on it, there is an attribute to do that effect too
The roughness change how light reflective

Try it your self, and most of the time you will get specular or roughness or smoothness(?) image map as well. You can use those images as input


How to texture a beveled curve without stretching I would like to texture my trees without converting them to a mesh. I use the use UV for mapping option in the curve menu, but it is dependant on the distance between two "path points". How can I get a nice mapping without such stretching/squeezing :

The curve has same amount of edge loops between control points in the U direction of the curve (the setting you can set in the shape panel). UV space maps linearly to this, and changing this functionality would be hard if not impossible. Usually it's the desired functionality, preventing the textures sliding around if the curve is animated among other things.

You can however work around it by using two curves, one of which is just a straight line and holds the materials, textures, and resolution and bevel settings used for rendering. This curve then uses a curve modifier to copy the shape from another curve, which is used for just defining the shape of the final object. That way the rendered curve has uniform distribution of edge loops.


My mouse is displaying even though I made it invisible? So I am making a game and have been on this one for about a week now. And just now am dealing with this issue. I know how to make a mouse appear and disappear as I wish it to on the game engine. However, just recently, I press P to play the game to test it out and the mouse is on the screen.

Even if I look through cameras or not, it is showing. So here is what I already did to try to fix this issue. I made sure no scenes were overlaying with the mouse visible. I made all cameras that will be used have and invisible mouse. I even googled as much as I could possibly find and only found that on the right panel, under render it can have the mouse active... And it wasn't.

Also, when I am playing the game, not only is the mouse in the middle of the screen but as I rotate the camera around with the mouse. The Screen mouse gets huge. Which can cause a huge issue if you are playing a game.

So I did a little more digging on this. And realized that is was an issue that should have never been an issue in the first place. A few days ago I made a pause scene and had an invisible mouse actuator connected to an always Sensor I had to delete those two connectors for the mouse to not show up. This seems to be a glitch so if anyone comes across an issue similar to this. I would check your mouse actuators you made a while ago....


How to copy a surface of an object just simple and quick question, is there a way to make a plane object like text to copy surface of another object, like in the picture?

One mesh can be projected onto the surface of another, by adding a Shrinkwrap modifier to it.

  The Shrinkwrap modifier allows an object to “shrink” to the surface of
  another object. It moves each vertex of the object being modified to
  the closest position on the surface of the given mesh (using one of
  the four methods available).

  It can be applied to meshes, lattices, curves, surfaces and texts.

For your example, the shrinkwrap modifier should probably be set to project, with the X and negative options checked.


Can't animate location of characters in text individually Here's the blend file: http://pasteall.org/blend/index.php?id=44670. If you keyframe the location of the letter "I" at a different location and then move the greenbar the rest of the letters will follow its origin. I've been looking for answers on the internet and can't find a solution.

All the letters have strips in the NLA Editor which share the same action:

But this action contains nothing so it looks like the letters aren't animated. For this same reason you can use Remove Emtpy Animation Data option to remove all the empty strips:


A Tree that shakes off its Leaves I'm trying to create a very low poly, 2D tree that uses square pixels as leaves. I have animated the tree and I'm now adding leaves. I'd like to make the leaves shake with the tree's animation and then, gradually, fall off.

I've tried doing this by attaching an emitter to an armature, but I can't make the emitted objects follow the movement of the bones. Any advice on this? Maybe I have to do this through another method entirely.

I've found a solution that's pretty simple with the help of this video: https://www.youtube.com/watch?v=lPCs4XbGth8

Basically, create a controller particle system that manages other particles systems. Then create the first (1) particle system which keeps the leaves tracked onto the tree, using No 'Physics'. Then, create a second (2) particle system in the same position, which uses Newtonian physics and Brownian motion.

In the controller cube, the first key should be attached to (1) and second key should be attached to (2) and you can use timing to set how long you want the leaves to stay attached.

It's an alright start: https://imgur.com/a/I6dVId5

One problem is, the leaves fall off all at once. The Brownian motion can hide this and make it look like some leaves stay attached for a bit longer.


How do i change the pivot point of the "Rotate" text fields in the Transform panel? I've already figured out how to set a pivot point for the normal Rotate tool in the Toolbar, but whenever i try to animate something rotating, it always ends up rotating around the axis (in this case the Y axis) instead of rotating around the pivot point that i previously set it to. Keyframes seem to look at the "Rotate" text fields in the Properties panel instead of how i actually rotate it using the Rotate tool in the Toolbar, which is why the title is phrased like that.

When you rotate an object around an origin other than the object's origin, it changes both the object's rotation and location.  As a result, when you set your keyframes, you'll want to use "LocRot" rather than "Rotation."


Combining UV Maps for a Single Object I have a single object with two different UV Maps because it is a complex object and I wanted to unwrap different parts of it separately. I do not want to separate my object into pieces and recombine them because the object will be using bones, and I want the mesh to stay together. How do I combine the two UV maps for the single object?

I am assuming both UV maps are associated with the object?  You can create duplicates of all of your materials.  One material, let's call it A, will use UV map A; material B will use UV map B.  They will otherwise be identical.  You can set the UV map for the material using the "UV Map" input node.

You then need to define which vertices/faces are associated with each UV map.  I suggest using vertex groups to do this.  So you'll have vertex group A and group B.

Finally, you need to assign the right materials to the right vertices.  In edit mode, use your vertex group A to select all of the A vertices.  Then go to the material tab, select your material A in the slot list, and click "Assign."  Do the same for vertex group B/material B.

You'll need to repeat this process for each base material used by your object.


Using 3D Bezier Curve but having different shading I used 3D Bezier Curve to create a 3D model. However, it kinda has different shades. I don't know what I did wrong. Could anyone please tell me what I did wrong? Thanks.

Is your curve made from a single continuous segment, or does it have multiple separate segments?

If it has multiple separate segments some of them may have a different direction, yielding inverted normals. You can either:

Invert the curve direction of the affected segments in Edit Mode, by pressing Switch Direction button in the tool shelf, or
Tick the Calc Order in the Screw modifier to make them consistent automatically

If you already converted it to a mesh or applied all modifiers just enter edit mode, select all faces and press Ctrl+N to recalculate normals.


Blender 2.80 not working on AMD Radeon HD 6470M GPU I'm not able to open Blender 2.80, it tells me that it requires OpenGL 3.3 Core

So i wanted to make sure that the problem is from my GPU and not from blender itself,

so i wrote a simple OpenGL application using OpenGL 3.3 core profile that renders a simple textured cube, and also check my GPU's driver supported OpenGL version

and here is the result

it looks just fine to me.

it's also not just a static render, you can move around that little cube, and OpenGL didn't complain about my GPU not supporting GL 3.3

i'm i missing something here?

is the problem from my GPU, or is it a bug in blender itself (which is likely since it's just a beta release)

and how to fix it (if possible, of course).

Edit: It's working when i run it in 640 x 480 Resolution.

I managed to resolve this issue by:

1) Updating my driver to the latest available version (i should have done so from the beginning).

2) Downloaded opengl32.dll file from here and copied it to the blender's root directory.

Now Blender 2.8 is working without any issues :)


My Armature rig slows Blender down When selecting small groups of bones in Edit Mode it runs fine, but using Pose Mode and trying to move a part of my character or trying to move the rig or character in Object Mode it lags the program a lot. I used the Rigify add-on to add in a Human metarig and the lag arose when I parented it to my character.

I fixed the issue. It lagged because my model had WAY too many tris. I heavily lowered the tris, restoring the original speed.


Why does assigning a second material to part of an object appear to delete that face? I've been trying to assign a second material to the same object. After selecting the face and clicking on the assign button, it only deletes the face instead of assigning the new material. What am I not doing right?

All, after trying too many options and non worked, I had to uninstall version 2.82 which I was using and installed version 2.80, that solved the whole puzzle. I'm back on my project again. Thanks to all of you that contributed in one way or the other to help me solve this problem.


Do I have to unwrap the cup again? During the tutorial, We unwrap a cup and cut off the handle and the circles. That worked fine. You take UV squares and turn the unwrap into a grid of sorts. That worked great also. Now I am supposed to go into UV Editing and change the grid on the water drops. My unwrap grid is gone. I watched the video again but do not see how Andrew Price is pulling that grid up on top of the water jpg.
Do I have to unwrap all this again? The first pic is what I get when I just go into UV Editing. The second pic is what happens when I start pushing buttons at will trying to bring back the grid.

Screenshot 1 To see the UV maps do the following...

select the object in the outliner. You can select more than one object if you want to unwrap them on the same UV map
switch to Edit Mode
make sure you have selected the correct UV map
select the faces you want to see. Press A to select them all and it should reveal the whole UV map. You can unwrap the object(s) with U. The Unwrap operation requires seams (the red lines). Smart UV Project does not need seams.
in the UV editor you can see the UV islands now. If you select only a few faces in the viewport then only those are shown here. You can drag them around and they will become separated islands. This way you don't need a seam.
if you're looking for a specific face you can activate the UV Sync Selection mode. In this mode, any face you select in the UV editor will be selected in the viewport and vice versa. Tip: Use Face Selection mode (3). In this mode, vertices of connected islands are automatically selected. Turn sync off, if you want to move a UV island.

Screenshot 2

here in the section Object Data Properties > UV Maps, you can select the UV map that you want to edit. The camera icon specifies the map that is used for the render. In this list, you can also add more UV maps and delete unnecessary ones.

In the Image Editor on the left, you can select an image that is displayed for the UV map.


how project onto itself works?(snap) I cant think of projections that how it works own my own I don't know why projection needed in snapping I want to know how projection works in snapping.

When Project onto Self is disabled, you can only snap to geometry of other objects.
It's useful when you go to Edit mode with multiple objects at once.
Notice I can only snap to the other object's vertices unless I enable Project onto Self.


Is there any documentation or tutorial on how to replicate the Blenrig 5 spine? or Rig an Armature controlled by its hips? I would like to create a rig that is mainly controlled with the pelvis like Blenrig.
I've tried to reverse engineer a portion of the spine, so I have an understanding of how it works.
However I can't pull it off correctly.
Does anyone know whether there is a course, documents or tutorial on rigging a spine like such?

I've completed the spine.
I basically ripped the blenrig bare started with 1 set of bone groups and tried to link which bones were used and which weren't.
I now have a working spine controlled with the hips. image of it below.
Where i was going wrong was that the bones weren't parented to the correct bone and the torso master needs to be connected to another bone or you'll get the constraint glitch thing.


"Funnel" or "perspective" scaling? Say I have a square and I want to make it into a trapezoid, I then scale down one of it's sides right?

Now what if instead of a square I have a very complex square-like object with lots of subdivisions? Is there any way to perform a similar operation? The one that will change the overall shape of the complex square-like object into a trapezoid-like object?

In Photoshop, when usint freeform transform tool this type of scaling is called "Perspective".

Add a Lattice and position it so that it encloses the object you want to deform.

Select the object to be deformed and add a Lattice Modifier to it.

On the modifier select the lattice that will be used.

Select the lattice, enter edit mode and change its shape by moving some vertices, the object will deform along with it.


Convert Particle System to Object With Unique Faces I've been trying to find info around converting hair particles into a mesh, but with "unique" faces. I'm able to convert the particles into the mesh, which creates a number of linked objects under the Outliner window.

Once complete, each object (object.001, object.002 etc) is linked in so much that selecting a face on one selects that same face on all the others. I can't work out how to unlink them so that each face is its own unique face, and not linked to the rest. When trying to unlink it just removes it from the scene.

I've so far tried a few applications, (make instances real) etc, but I'm not sure how to combine it all into single object.

Any help is appreciated.

You can do it by going to Object > Relations > Make Single User.


Modelling Round Curved Edges I'm trying to make rounded off inner edges on a mesh. But I'n not on the right track, (I'm avoiding to use the Boolean.) I'm trying to achieve it using correct geometry. It does look a little bit decent, but that's after bumping up the viewport subdivision,and I've added way too many loop cuts. What would be the best modelling approach?

Thank you.


poll() failed, context incorrect? - Example: bpy.ops.view3d.background_image_add() I keep on getting context errors in the Blender Python API.

I don't understand the issue of the context in the API, how do I know which is the correct context?

Thanks!

The context members available depend on the area of blender which is
  currently being accessed.

See bpy.context

  Many operators have a “poll” function which may check that the mouse
  is a valid area or that the object is in the correct mode (Edit Mode,
  Weight Paint etc). When an operator’s poll function fails within
  python, an exception is raised.

See Operator.poll()

More about using Operators and why you experience poll-fails (mouse not over right screen area or wrong mode / other pre-condition). Also see the Gotchas section of the API docs about that.

You can either:

Run an operator via spacebar menu (see bottom of the section) in Blender 2.7x or using F3 as of Blender 2.8x from the proper Area (bl_options must not contain 'INTERNAL')
Specify the right execution context for the operator call (this fixes the context error only for some!)(API docs, example)
Use an override to pass the required context arguments
Change the Area.type temporarily
Use "low-level" API functions to achieve the same result without context worries

Override

Doesn't seem to work for this operator?! It adds a background but without name / texture.

import bpy
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        override = bpy.context.copy()
        override['area'] = area
        bpy.ops.view3d.background_image_add(override, name="BG", filepath=r"image.png")
        break

By the way:
You can pass an empty dict (like bpy.ops.example.operator({})), which usually prints warnings to the system console about the context members missing. You need to pass these members and repeat until it doesn't complain anymore. But beware of certain operators, which require scene bases - if you don't provide a reference to them, Blender will crash to desktop before you even find out they are needed.

Change Area.type

area = bpy.context.area
old_type = area.type
area.type = 'VIEW_3D'
bpy.ops.view3d.background_image_add(name="BG", filepath=r"image.png")
area.type = old_type

Low-level

Similar to the override, you need a 3D View instance, in this case its space data (because this is the place where backgrounds reside). The following code takes the first 3D View of the current screen layout (if there's one), adds a new background and sets the image to an image datablock:

import bpy

filepath = r"C:\path\to\image.png"

img = bpy.data.images.load(filepath)

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        space_data = area.spaces.active
        bg = space_data.background_images.new()
        bg.image = img
        break


Shrinkwrap addon conflicting with curve bevel I have made a grid curve which I beveled for a final result which looks like this:

I am making an animation out of this, which will make the grid object wave like a flag. To do so, I have shrinkwrapped the grid object to a moving wavy plane, so that the result looks like this:

Now, the problem is that not only did the curve get shrinkwrapped onto the plane, but also the bevel. Which makes the whole thing flat, as can be seen in the GIF. How can I fix this?

One solution I can think of would be to "bake" the waving animation onto the curve so that I don't need the shrinkwrap addon anymore, thus letting me bevel the curve independently. Unfortunately, I do not know how I can do this.

Thanks for reading!

I think you may be over complicating

Shrinkwrap modifier is used to project one flat surface over the another, not really very fit for complex animation, nor projecting non-sheet-like objects with volume.

Also curve objects are not really very fit for deformations (a least not in the Z axis), they will inevitably lead to artifacts due to their triangulated nature, lack of proper subdivisions, and non quad based topology.

You should use a base mesh object instead, which also widens the choice of modifiers available, and possibly use a Wave modifier instead, unless you need a very specific or precise wave shape.

Only then on top of the Wave deformation modifier (or whichever other you choose) apply a Solidify to add thickness and a Bevel to chamfer or fillet the corners.

That way you will guarantee that the thickness and bevels are not distorted as much by the Wave, nor squashed by the Shrinkwrap.

You may optionally add a Subdivision modifier set to Simple on top of the stack, so you get a smoother mesh with less bevel distortions


Can't see anything outside pyramid I can't remember what keys I pressed, but for some reason I can't see anything of model outside of this pyramid. Any help on how I can get rid of it and see my model again would be helpful. Thanks.

You have set a Clipping Border - probably by pressing Alt+B. Simply press that same key combination again to clear it or go to the View menu and select Clipping Border.


How to draw line between intersecting meshes in Freestyle? Is it possible to draw a line between intersecting objects? With my current setup, it won't draw anything between them.

As of 2.76, blender freestyle still does not detect edges at intersections, see docs:

  No edges at face intersection are detected yet.

A workaround is to create some extra edge (small face, invisible in the final render) on top of the actual intersection. It's not clean, but it somehow works. (note that the edge in the image below is a bit exaggerated. It can be much more subtle.)

Depends on what you want to achieve.

Another idea is to use the internal edge capability of Blender via Render->Post Processing->Edge. If you're rendering out a still image, you can then mask out areas with edges you don't want in the compositor, later.


How to save a physics animation? I have a file I want to play around with and it takes a long time preview physics animations like rigid body and cloth interactions. However, I hit the play button and after waiting 5 minutes for it to buffer, I like the result. The problem is that if I close the file, blender deletes the rendering of the physics for no reason. How can I save it for the next time I open the file but still modify it?

You have to  bake it. What you did looks probalby like this

But there  is  a better way to do it. Go to the physiks panel and go to cache.

Now you have to bake it till the frame that you want it to have.
Now you have a blue that looks like this.

Now you can save the object and when you open it again, it will stay as it is.


A way to see a mesh in object mode while editing UVs? I have to adjust some UVs positions and I want to see the effect immediately on the mesh.
But when I edit UV map, I'm in edit mode and the vertices are selected (all is covered by the yellow part due to the selection)... so I cannot see clearly the impact of what I do directly on the mesh.

How to avoid that? Is it possible to see the mesh in object mode while editing the UV map?

If this helps, you can change the color & transparency of that editing mode, adjusting it to let you see what's below.

See in User preferences Themes settings

If it's a temporary change, just don't save user preferences, and it will be reset at next program start, or new file.

Edit:
I'm adding a screenshot of the alternative setup I suggested in the comments:


Object becomes invisible after I join them So I joined 2 objects together and now they are invisible. You can see them in edit mode and in Texture painting but they become invisible in object mode.

Change display type from Bounds to Textured under Properties editor > Object Properties > Viewport Display > Display as ...


Extracting vertices data after transformations I'm using few rotations and scale changes in a model and then export the location of the vertices after the change, but when I do so, the vertices extracted are those of before the transformations and not after. How can I extract the new vertices?

An example for a transformation:

bpy.data.objects["Main"].pose.bones["finger5-.L"].rotation_quaternion[1]=random.uniform(0, 0.4)

And the code for extracting the vertices:

mesh = bpy.data.objects["Main:Body"]
vertices = mesh.data.vertices
for vertex in vertices:
    vertex1 = vertex.co[0]
    vertex2 = vertex.co[1]
    vertex3 = vertex.co[2]
    row = [vertex1, vertex2, vertex3]
    with open(os.path.join(vertices_output_path, 'vertices.csv'), 'a') as csvFile:
        writer = csv.writer(csvFile)
        writer.writerow(row)
        csvFile.close()

Please search here at BSE for

matrix_world

as in

worldc = o1.matrix_world * vertex.co


Node won't appear even when I search for it I am following a tutorial on YouTube that is about materials and the guy in the video states that there is a denoise node that can reduce the noise of an image. However, when I searche

I believe the AI/NN-based Denoise Node is new in Blender 2.81. Blender 2.81 is still in Beta / experimental development, so if you have the current stable version of Blender (2.80), you will not yet have the Denoise Node. You can download Blender 2.81 Beta under the experimental builds download section of the Blender page, if you'd like:

https://builder.blender.org/download/