What signals does Blender respond to? By "signals" I mean the age-old unix signals like SIGSTOP, SIGQUIT, SIGPWR, SIGALRM, SIGUSR1, etc.

Which ones does the Blender process not ignore, and how does it react to each?    I'm curious about signals sent to Blender by the operating system, user, or other software.

I don't recall seeing mention anywhere in any documentation.

Here are the signals Blender currently uses.

SIGINT (Ctrl+C in the terminal) is used to cancel renders.
SIGFPE can be enabled by passing --debug-fpe to Blender, we use the for finding errors while debugging.
SIGSEGV writes a crash log in the temp directory, unless --disable-crash-handler argument is passed.


How to set custom vertex normals for certain vertices using python? I am struggling to set custom vertex normal vector just for certain/selected vertices in an object with python. I searched through the documentation and forums but nothing really helps so far.

This question/answer answers only to how to set split normal to a whole object. However, I want to set custom normals to just some parts of the object. See the picture below:

Q: How can I add custom normals just to certain vertices in and object?

Would be helpful if someone could share something simple as possible.

Example of assigning custom normals based on vertex selection. It's just a slight modification of the code given in this answer and assigns a custom vector to vertices in selection.

Run the script in Object Mode and enable show_split_normal property in Edit Mode:

import bpy

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

me.use_auto_smooth = True

# Normal custom verts on each axis
me.normals_split_custom_set([(0, 0, 0) for l in me.loops])

# Set normal for selected vertices
normals = []
for v in me.vertices:
    if v.select:
    # if v.index in (0, 1, 4): # Alternatively you can ask for certain indices
        normals.append((0, 0, -0.5))
    else:
        normals.append(v.normal)

# make csn's all face up.
me.normals_split_custom_set_from_vertices(normals)

#me.free_normals_split()

Note: As of 2.8x show_split_normal property is part of the Overlays menu:


How could you draw a box.menu visually like an box.operator? How could you draw a box.menu visually like a box.operator.

The menu only shows up as text and works only with pie.menu but not with box.menu.

       #2 - BOTTOM
        box = pie.split().box().column()
        row = box.row()
        box.operator("view3d.snap_cursor_to_selected")
        #box.operator("wm.call_menu", text="Snap Menu").name="VIEW3D_MT_snap"
        box.menu("snap.more", text="Select Linked/Loop")
        box.separator()
        box.operator("transform.mirror")

You cannot, .menu() entry is always drawn borderless. To make a border around you can only place it inside a box:


how to create fake reflections on objects? i am designing a logo for my local esports team.

this is what i have accomplished till now , learning from tutorials and ebooks

and i wanted to make it similar to

this image.

as you can see by comparing the images , i am nowhere near that.
to get the something like a reflection, i UV mapped an image on to the letters it does look better but still looks bad

i want it to look as close as it can .

So when you have created your shape in Illustrator or whatever application you use for SVG.

You create a new scene in Blender, delete the cube and put the render engin to Cycles

After, just import your svg file

You should have your tiny svg file appearing in the scene, select all parts that will have the same material (Shift + B) and join them

Go to your material panel and click on use nodes

To ease the process, change the viewport color to white

We're ready to work on the extrusion and the bevel, so go to the curve panel and play with the settings to have something that suits you.

Now the material part, go to the node editor

And add (Maj + A) a Glossy Shader, a Mix Shader connect everything as the image below

Time to add some light, create 2 planes, that you'll place in order to have good reflections, you'll have to play a little bit with it so the render suits you

The we are going to create the material for the planes, so go back to the node editor and create a Emission shader, set the strength to 15

And last but not least, the glowing corner. Select the part that you didn't join during the first steps, and create a node setup as this one

Set the camera and hit render, you should get something like this:

It is not perfect, but with some tryouts, and a little bit of compositing you should reach a good result.


Particle system doesn’t align hair object to assigned vertex group Hair is giving me grey hair! I’ve been trying this and failed on several models in the past, so here’s the latest headache I’m encountering…

The selected vertex group for the top eyelashes is above the eye’s opening (seen here in orange)...

and the vertex group is assigned in the hair particle system…

…and I’ve subdivided the area before creating the vertex group, I also applied rotation, scale and location to both the eyelash (on the second layer) and the mesh with the eyelids.

And yet here we are, looking at the Frankenstein monster’s eyelids :)

I’m not sure what I’m missing, and I always get stuck at this point with particle hair systems. Every answer or help I’ve found online retraces all the steps I took for better results.

Your particle system is correctly setup, and your particles are being correctly emitted from your chosen vertex group.

There is only one eyelash particle being emitted though, I am guessing you will need more than one.

What your are seeing are Particle Children which are instanced from the parent one around a predefined radius. This radius is far bigger than the area you would want eyelashes to emit from.

Either reduce the radius, or disable children completely and increase the number of actual particles instead.

Turning off Rotation and emitting from Vertex instead might also help achieve a more tame look.


High Poly Mesh UV Mapping I am still in the learning stages of Mesh modeling, but I've just sculpted two well looking Mesh Sci-fi helmets and I wish to have them textured by a Friend. I tried to UV map both of them but they both froze after clicking 'Unwrap'. Im positive it must be too high polly, and if so how could I fix this problem? Or how could I get a viable texture map a different way?

Since, it is not possible to unwrap a highpoly sculpted mesh (i am thinking about 500k polys) in blender. You are left with few choices.

duplicate your highpoly mesh, add a deciamte modifier, decimate and apply the modifier. Turn your Triangles to Quad and then unwrap it. You can always get Details by baking normals. (Worst idea in my opinon, but fastest).

or

Retopologize your model (best option) , unwrap retopo and bake normals, ao, cavity maps.
(retopo is good too , when you want Hard surface and edges too).

By the way, There is no point in giving highpoly mesh to your friend for texturing, as it wont be usable in game, but render only.


How to make part of the model not be subdivided？ I would like to create a standard square groove in the plane, just like this.

But when i switch to object mode, it just almost disappear because I used subdivision.

Same example:

Becomes:

The solution is:
1. Select the edges you don't want to be subdivided

In the right bar (Press N to show it) set the "Mean Crease" value to 1 (it sets how much the selected edges don't react to subdivision smoothness Edit: note that the face is still subdivided but the subfaces created by subdivision mantain the original position. No smoothness.). They'll become violet.

Turn back to Edit Mode and enjoy


Outlines display option "visible layers" does not work. How to fix it? When i select display mode of "Visible laters" only in outliner, it still shows objects that are on other layers, that are currently not visible. Even when current layer is empty.

How to fix that?

In the 3D view that you want the outliner to update on depending on what layer you're on, click the square with a link in front of it.


How to fill the selected UV island with colour when texture painting? I am trying to color parts of the UV map below with the paint function.

My problem is that I don't know how to select the square in the UVeditor so to be able to fill it simply with the desired color instead of having to paint it by hand as you can see here:

My goal is once again to have the upper left square in the UVeditor, which corresponds to a face of the cube, completely colored.
How can I tell blender to fill with a desired color a part of the UV mapped mesh? I need to have a clear distinction between the colors of the faces and with the coloring procedure by hand this is quite impossible, especially for more complicated meshes...

Go to edit mode
select the faces you want to paint on
Turn on texture painting, in the header of this window turn on the button named "face selection masking for painting", an icon with a cube with a face red/white
choose the "fill" brush
clic on a face
done!

Use "shift" key to select/deselect faces without entering edit mode


Make meshes simulate like water? What I want to do is, instead of using water with water simulation, I want to make lots of cubes flow like water (like the water simulation does with the mesh). Remesh won't work, because I want to be able to edit the cubes afterwards to make some of them different.

You can approach it like this:

Make simple fluid sim, low resolution will be enough:

Create a plane and subdivide to get your blocks "resolution", position it very high above the water. Add Shrinkwrap modifier to project it onto the simulation:

Parent a little cube under the plane and set dupli verts:

Render it with plane transparent:

Add an ground plane and make column of little cubes from just 1 little cube (to fill holes in water):

As this is based on a voxel simulation you don't get data how the cubes move inside the volume (or on the surface), they are just stationary. To do that you would have to base it from particles. Thats for another approach, this is super fast to setup and simulate.


The Multiresolution modifier doesn't work as expected So when I'm sculpting with the multi-resolution modifier, the changes I make change when I'm scrolling through to look at it from a better perspective (the middle mouse button and rotating it).  The tutorial I was following didn't have such a case. Is that expected?

This is the Fast Navigate option.

  Fast Navigate
  For multiresolution models, shows low resolution while navigating in the viewport.

It is a viewport optimization, which is useful if your high poly model is slowing down Blender. To disable it, go to the Tool Options in sculpt mode, then navigate to the Options section and disable Fast Navigate.


Do .blend files store information on which version of Blender they were created in? I'd like to know if a .blend file contains information about the version of Blender it was saved from. I have couple of old files and I'd like to open them in version of blender they were originally created in.

Open the .blend file in any text editor, the first few characters will be something like this (followed by a lot of unreadable binary data which you can ignore):

BLENDER-v267

That's the version number right there, this file would have been saved with Blender 2.67.

If it's not there, that probably means you are looking at a compressed .blend file. In that case you can rename the file to have the extension .blend.gz and decompress it. Note that resaving from Blender doesn't work because the version number would change.


How can I select part of a mesh and make it seperate? I want to make the teeth a separate child object from the mouth. I want to know the best way to do this.

I have tried going into edit mode with Tab and trying to select all the vertices but that doesn't move the teeth. Is there an easy way to select just that part and make it a separate child mesh to the rest of the mouth?

Splitting your mesh in to separate pieces is easy, just two steps.
First you have to select the part you want to separate.

There are many ways to select part of your mesh. Depending on how you modeled it, assigned materials, the way the geometry flows, and other factors will determine how you best select the part of the mesh.

Select Linked
Hover over the part and press L. Or select any part in the desired portion and press CtrlL. Both shortcuts are Select Linked, it selects all the connected geometry. Meaning if you have separate pieces (the teeth are not connected to the mouth) it will select that part.
Here in this gif I demonstrate the select linked tool. First by pressing L with mouse over the part I want to select, then withCtrlL.

Select by material
If you have more then one material on your mesh, you can select by material. Head over to the Material tab of the Properties window and with the correct material active (highlighted in blue) press the Select button.

"Normal" selection tools
Sometimes there will be no quick and easy way to select the part you need, then you are going to have to do it my hand. Good thing is blender has a bunch of great selection tools.
AltRMB  will select loops, edge, vertex, or face loops depending on what selection mode you are in.
CtrlAltRMB  will select rings, again edge, vertex, or face rings depending on what selection mode you are in.
A select, or deselect everything. (Sometimes it is faster to start at the opposite and work backwards.)
B Border select, draw a box around what you want selected (or deselected). Useful to be in wireframe or have Limit selection to visible turned off.
C Circle select "paint" what you want selected. Do note that you can not rotate the view while using this tool.
With one point selected, Ctrl on a second. Or with two points selected, go to the 3D view header click on Select > Shortest Path. Both will select the shortest line connecting the two points.

After you have your part selected simply press P > Selection. That will brake the selection out of the current mesh and put it in a new object (with its origin at the same location as the original's).


Adaptive subsurface not spherical I have a basic cube with the adaptive subsurface modifier attached.

I am getting this in my render:

I was expecting the displacement to be more uniform over the cube.

Here is my material and other related settings:

Here is the .blend file I used:

The problem is that you're using a one-dimensional "Fac" output from the noise texture to produce a scalar displacement.  This is interpreted as a multiple of the vector (1,1,1) and so displaces the cube along the diagonal.  Take the "Color" output of the noise texture to get a three-dimensional noise from (0,0,0) to (1,1,1) and use some Vector Math nodes to center and scale it, like so:

Alternatively, you could take your one dimensional noise and pass it to the "Height" input of a "Displacement" node to get a proper displacement output:


edges visible in object mode This is probably a simple one, but it keeps bugging me.

On some objects I can see the edge lines even in object mode like on the tea cup in the picture. I can't figure out how to get rid of them. I compared the object settings to the other objects and couldn't find anything. Any idea? It's got to be simple.

Here is another video. It shows that the wireframe settings in the object properties work as expected on the bowl, but not on the cup and saucer. As I said I only ever had this phenomenon on models I downloaded from somewhere else.

video edge lines

Once I am at it, I'm uploading the Blender file as well.

Blender file

This is probably due to viewport display settings.

Select the concerned object and in its properties panel,

go to 'object properties' tab
then 'viewport display' section
and uncheck 'wireframe' check box


Can't convert the Ruler/Protractor into any Geometry type So I clicked on "Ruler/Protractor" button, drew a 3-meter line, and tried to convert it into a curve or poly but no joy. The options are inactive before you go into Ruler mode, and when you actually go into the Ruler mode and draw the actual line, the mouse cursor changes into a crosshair shape and does not allow you to click on any button in the UI. And when I hit enter, I'm out of Ruler mode, the line disappears, and the "Convert to Geometry" 3 drop-down menu options are inactive again.

Is that a bug in Blender or am I missing something?

This isn't a bug. Once drawn ruler gets saved into a Grease Pencil layer specifically created for it. However this layer will be hidden so that's why it seems that ruler disappears. With it visible converting a ruler into geometry is the same as for converting GP strokes into curves.

After hitting Enter to store the ruler, open Properties shelf with N, scroll it to the Grease Pencil layers rollout and enable visibility for the layer with the ruler/-s (it should be called something like "RulerData3D"). Make sure to select the layer itself. Then options in the Toolshelf > Grease Pencil > Convert to Geometry will become active.

Note that as Store ruler is used after drawning it to pass it to Grease Pencil and then - to geometry, if you press Ruler/Protractor to draw another one, the one you drew before will be still there (it is saved as ruler regardless).


How to remove all unused material slots from all objects? Is it possible to remove all unused material slots from all objects? I am aware of "Remove Unused Slots" option when one object is selected ("Remove Unused Slots" affects only the active object).

Via a script.
Removing unused material slots is akin to
Delete all materials that aren't assigned to a face?
ie remove any slot not associated as a face material, then consolidate.
Similarly to https://blender.stackexchange.com/a/7164/15543 can loop over all selected objects and run the operator for each.
With 2 selected objects each with 3 unused material slots, can call the operator once in python console and it cleans all unused material slots from all selected objects.
>>> bpy.ops.object.material_slot_remove_unused()
Info: Removed 6 slots
{'FINISHED'}

Which has different behaviour to that when using the button in the UI, which as noted only cleans the active object.
Similarly, without   altering  context object or object selection. Example below removes all unused material slots from all objects in scene.
import bpy

context = bpy.context

for ob in context.scene.objects:
    if not ob.material_slots:
        continue
    bpy.ops.object.material_slot_remove_unused(
            {"object" : ob}
            )

or better still, to only run the operator once  Python performance with Blender operators
import bpy

context = bpy.context
scene = context.scene

bpy.ops.object.material_slot_remove_unused(
        {"object" : scene.objects[0],
        "selected_objects" : scene.objects
            }
        )

Note that after running script above there could remain a number of unused materials. (zero user orphans).  These are purged by default on save / reopen. Keep this in mind.
Unused slots vs Unused materials.
IMO big difference between "unused materials" and "unused material slots"  For example if a new material is added to the material slots and never assigned to a face, it is an unused slot, but becomes a used material, since the object becomes a user via the material slots.
This would suggest that Cleaning unused Material Slots in Blender 2.80 Beta was closed under false pretenses.


Leaf Particles falling through plane So I have a plane and leaf which I used as a hair particle. But the leaf is passing through the plane. What should I do?

Enabling or disabling rotation doesn't change anything.

These are the leaves used as collection

No rigid body or collision is set up since I don't know how to set that up.
The leaves are stationary and no animation is made with the leaves...

Because hairs usually stand upright, the particle system is doing what it is supposed to do.

In the 3D Viewport of the image below you can see a similar setup to yours. Some of the planes in my collection are rotated though, but I did not Apply the rotation.

In the second Viewport I did apply the rotation.
Object > Apply > rotation.
Note how the upright planes in my collection (blue) are flat as particles, and the flat planes in my collection (orange) stand upright as particles.

You can rotate the leafs in your collection so they will stand upright, and then apply the rotation, so the leaf particles will be flat. Like the blue planes in the bottom picture.

If you want the leafs to be higher from the ground (because they might still clip through the ground plane) then you can move the individual meshes of the leafs away from their origins in Edit Mode, as seen in this (3rd) image below.

EDIT:
It wasn't apparent to me when I first answered this question (i think someone may have hinted to it in a comment but not clearly enough I'm afraid), but there is another, if not a better way to do this. It is a bit hidden though.

In Particle Properties check the box Advanced, and then the box Rotation. Under Rotation you can change the particle Orientation Axis.


Is there an Addon that positions 3D cursor at the origin of non selected object by clicking it in 3D View? I've been watching tutorials and trying Addons, that led me to install Sensei Format addon, I didn't like how it changes many of the shortcuts that I got used to, yet one feature grabbed my attention, when clicking to set the 3D cursor in 3D view, if I click on an object, the 3D cursor location will snap to the object's origin. While reviewing Sensei Format, I found out that it's basically a personalization of features that already exist in Blender and in other Addons, for instance I managed to call the create object menu in 3D view by double right click instead of Shift +  A. Is there an Addon, or a way, to activate the 3D cursor snap to object origin in 3D view?

You don't need an addon to do that, you can achieve it with Blender's builtin key map editor.

If the default Shift + S > Cursor to Selected is not enough for you, then you can set up any desired key combination to call that operator for you in the key map editor. The operator you are looking for is view3d.snap_cursor_to_selected.

With this you can go to Blender user preferences with Ctrl + Alt + U > Input Tab > 3D view > 3D View global and add a new entry there with the Add new button at the bottom of the list

In the operator field to the left enter the view3d.snap_cursor_to_selected now assign any mouse action or key press as desired.

Depending on which mouse button you use for selecting I found out that using the same mouse button plus some modifier key can work very well.

For example I use Left Mouse button for selection, since in object mode the F is not bound to any action by default, I assigned Mouse Select > Press + F as modifier key to view3d.snap_cursor_to_selected so when I am selection objects all I have to do is press F key and click on an object and the cursor will snap to all selected.

Edit Check out the example image


Why the middle mouse button in Blender 2.80 changes the orthographic view to perspective? If I choose an orthographic view by using the numpad and then try to orbit the geometry by clicking the middle mouse button Blender goes from orthographic to perspective. Why is that the default now? Wouldn't it be more logical if instead of that Blender kept the orthographic mode?
In other words: Why Auto Perspective is turned on by default?

It seems that you have Auto Perspective enabled, which causes the switch to perspective projection once you're changing the view from the top/front/left/right/bottom viewpoint. Open the preferences (Edit > Preferences) and disable Auto Perspective in the Navigation tab.

The defaults for Blender 2.80 where discussed in the design task T54943. Currently I haven't found any reasoning behind the changed default for Auto Perspective on developer.blender.org, bf-committers or devtalk.


Why do I have problems with unwrapping and AO baking? I have created a rough model of a corrugated iron roof. I need to unwrap it, and then create some shadow maps. However when I DO unwrap it, it looks, extra weird. Just pieces all over the place in the UV image.

And the lamp stops casting any shadows when I set ambient occlusion in my environment.

I followed this : https://community.secondlife.com/t5/Mesh/Ambient-Occlusion-for-Blender-tuts/m-p/2876281#M30051

And it did not work for me.

What do I do ?

Two questions here :

Concerning the UV map it is normal that you obtain "pieces all over the place" when you choose to unwrap with "smart uv project". Some simple explanation are given in this answer : How to UV unwrap complex models?

For the ambient occlusion, it is also normal that AO checked here in your tutorial
makes your shadows lowered or inexistant.

AO will illuminate the environment and make so cavities are darker but also the parts most exposed to the environment lighter. Think about it as if the environment light was stronger than your lamp light.

As Second Life shading works differently from Blender shading, I suggest that you mix your textures (shadow, AO and diffuse) in an image editor tool (like Gimp or equivalent) and import the combined result directly to SL as a diffuse texture.


Extruding without breaking edge loop I want to model a shape with only quads.
I created a circle shape and wanted to extrude some vertices away from the curve to form a keyhole.
I am able to create the shape, but all extruded vertices are not connected to the circle shape anymore and I can´t select the Edge loop via shift-alt-LMB.
I wanted to select the keyhole in an easy way to add a bevel.

Here is how you make a keyhole with all vertices connected.

1) Create a circle (say 32 vertices)
Stay in Edit Mode

2) Create a plane (also with 32 vertices)
Both the circle and the plane are a part of one object now.

3) Select both loops and connect them with Edge->Bridge Edge Loops
4) Almost done. All inner vertices are now connected into one loop.
5) You can now model you keyhole.

Summary: Edge loops work. It’s all quads.


How to create basic lighting for presentation images I just finished my 3d model and I want to sell it. I want to light my scene to make the presentation images. What I want to say, is better to  use a HDRI or lamps for this kind of renders? (presentation images) I want to show my model in the best way.
(I created a small object-a pickaxe and textured it with PBR textures)

I watched a few tutorials and all were focusing on creating an artistic look. I want just to show my model as it really looks.

HDRI is the best option if you just want to present objects. you can also use Lookdev mode in Blender 2.8 for fast previewing.


Cut is not as expected So, I'm making a building and I'd like to make a molding around it on the top, so I press Ctrl-R to slice it and this is what appears. `

But instead what I want the slice to look like is like this (the slice is in purple):

[Answer added for completeness.]
⎈ CtrlR initiates a loop cut and a new edge loop intersecting the chosen edge.
To cut through a number of edges, which are not connected by edge loops, use the Knife Tool.

Go to an orthographic view (front view).
Press K to enter the knife tool, press Z (to enter cut through mode) and C (to constrain the angle). Then draw a poly line with two  LMB clicks. Press ⏎ Enter to confirm.

The options you activate while the tool is selected.

Cut through Z
Allow the Cut tool to cut through to obscured faces, instead of only the visible ones.
Angle constrain C
Constrains the cut to 45 degree increments.


Using Anaconda Python 3 in Blender Winx64 I have been in the hope of finding a way to use awesome Anaconda Python in Blender in Windows 7 x64, as I was inspired by several articles including the one described here on why using Anaconda is advantageous. I have tried many suggested potential solutions, as summarized below, but unfortunately no success:

Calling 3rd Party Python Modules in Blender Scripts
SpaceBlender
Using 3rd party Python modules
ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL's are there

I truly would love to be able to utilize Anaconda. I particularly want to be able to import many packages including h5py for reading HDF files, which are larger than 2GB. Because of the C library dependencies of h5py, it is impossible to build them in Windows from source. Could the community help me find a practical way of using Anaconda3-4.0.0-Windows-x86_64 in blender-2.77a-windows64? I don't mind completely replacing Blender python with Anaconda (although I copied them in blender folder and did not work).

I succeeded using the following solution:

Install anaconda2 x64(I use python 2.7 usually, so I installed it.).
Install Blender 2.77a x64.
Create py35 environment for blender by command conda create --name py35 python=3.5 anaconda.
Rename C:\Program Files\Blender Foundation\Blender\2.77\python to _python.
(a) Copy & Paste the folder from C:\Anaconda2\envs\py35 to C:\Program Files\Blender Foundation\Blender\2.77\python.
(b) Or, alternatively, create a link to the anaconda installation. This way any updates will automatically be available: You need to run cmd as administrator (use right click on the item)

D:\Blender Foundation\Blender\2.77>mv python python_old
D:\Blender Foundation\Blender\2.77>mklink /j python d:\Anaconda2\envs\py3
Junction created for python <<===>> d:\Anaconda2\envs\py3

Try import bpy, import pandas, import numpy, import scipy, import sklearn, ...etc. on Blender python console.

Console, Text Editor both worked fine for me.


Pinpoint the area light to object I've made an object and put an area light on scene.
I want that area light points toward the object.
I tried to put constraint and PARENT TO OBJECT but that doesn't rotate the light in that specific direction.
How to do it?

To point a light to an object use a "Track to" constraint.

Set the target to the object you want.

Set

To= -Z

Up = Y

Now the light will always point to the target object.


Modify panel's row after panel has been created I have an addon which creates a panel with properties on Blender startup:

class OBJECT_PT_runcamera(bpy.types.Panel):
    bl_label = "Some Name"
    bl_space_type = "PROPERTIES"
    bl_region_type = "WINDOW"
    bl_context = "render"

    def draw_header(self, context):
        layout = self.layout
        layout.label(text="", icon="MESH_GRID")

    def draw(self, context):
        layout = self.layout
        row1 = layout.row()
        row1.prop(context.scene, "myCustomPropertysName")

Now, after the panel has been created, I want to change the row's enabled value when user clicks some specific button -- ie, some properties (shown in rows) in the panel will be disabled/enabled by some function called from another property/button.

I've tried different ways to write the command but nothing worked.

bpy.types.Scene.show_row = bpy.props.BoolProperty()

row1.enabled = context.scene.show_row

And your other function will just set the show_row property. Thats it.


Convert a circle face to a square? I don't know how to make that transition from a circle to a square. Any ideea ?

I guess you are talking about more topology question, if so see the attached i have quickly put together a basic example, Its about gradually change the shape over a certain amount of edge loops with supporting loops.


The zoom function with the mouse wheel sometimes zooms uncontrollably I do not believe the reference question about zooming to a point and refusing to zoom further relates to what I experience.  When I open a file, one click either way on the mouse wheel zooms + or - approximately as much as one click on numpad+ or numpad-. After working with the file for a while, zooming with the mouse wheel is no longer useful: one click of the wheel changes the image from microscopic to huge or the reverse. Numpad+ and numpad- continue to respond properly. It is especially bothersome when I depress the mouse wheel to inspect an element in 3D mode. It is hard to depress the scroll wheel without rotating it a little.  Just a little rotation makes the selected element almost disappear or become huge.  I'm using Blender 2.72b.

I recently had this same problem in Blender 2.72 with no apparent answer. However, I found that by pressing Shift - C re-centered the Viewport and then I switched from User Perspective to User Ortho with NumPad 5, and everything returned to normal. I too experienced uncontrollable zooming that led to unquantifiable Location coordinates, but this method worked for me, I hope it solves your problem.


masking a video to show underlying still I have a video - think Invisible man - I have created and animated 3 separate masks to show the background beneath which appears to work on the rendered window but do not work when I animate to the final movie clip as mp4.
I went into the composite window to set the nodes up.
What am I doing wrong?
I'm sure I've done this before with success.
Please help, it's driving me crazy

I was using mix nodes to join the 2 layers. I order to do this you should use an Alpha Over node. My thanks to CGCookie for their posting on YouTube
https://www.youtube.com/watch?v=1eQst8SAVRE&t=3s
it is version 2.8 but did the trick for me. An added bonus was the multiple masking technique they showed.
I can't add a picture at this point as when posting it seems I overwrite the text so I'll comment afterwards with the screenshot.
Many thanks.
Rob.


Animating a plane in the graph editor with local transform orientation I want to animate a plane using the graph editor.
Its rotated on the Z aixs a little, but in the 3d view i can use the local transform orientation to make it go foward even if its rotated.

So I made some keyframes and the plane moved on its y axis as intended.

But when I go to the graph editor I see this

I see its global X and Y position changing but id like to edit the local Y axis...

How can i edit the local positon of an object??

Thanks in advance!!!!!!!!

You cannot manipulate keyframes in local transform, they are stored and displayed in global transform only.

But you can parent the plane to an Empty and orient the plane through it. The plane's global animation is then transformed into local space of the Empty. This might be useful for simple short movements, but non-usable for larger animations. With more complicated movement you could have multiple empties and a dynamic child-of constraint to influence the plane only on sections of the animation. How to setup that is covered here:

How can I build a versatile camera rig which can both orbit around its focus and pan?


What is the difference between coloring a model with materials vs textures? I'm watching tutorials and I noticed that they always use textures and uv to color the models, but I like using materials to color them, is that wrong?
P.S. I only do low poly models

Texture
Textures give you the pattern. This can be an image or a computer generated pattern. It can have colors or it can be black/white. It just simple pattern without any additional information. It doesn't know how rough the surface is. It doesn't know if it's metallic or not. It doesn't know if it emits light or lets it pass through. Just plain picture. In node editor you can manipulate textures with converter nodes and they output different texture.

Material
Material is what you get when you combine all the properties that the surface has. Material can have textures in it. The pattern is still there but there are so much more. There is the pattern but also in the pattern there are bumps that reflect light. There are areas that are metal. There are areas that are see through and there are areas that are mirror like.

Before Principled BSDF shader you had to use multiple shaders to create your material. Now you can do quite well with just a single shader. You can think of Principled BSDF as a combination of multiple shaders. Basically you have textures and you feed them into shaders. In some cases your textures may just be black or white (0 or 1) if you want the whole material to be uniform. For example the whole material might be metallic and the metallic value would be 1 everywhere.
You then combine your shaders and feed them into material output. This is the material that you have.
If you don't use textures then your material has the same property everywhere. If you want to have different properties at different parts of your material then you have to use textures.


Get the list of objects on a layer in python I would like to get the list of objects on a specific layer with python.
When it can be done through iterating bpy.data.objects[].layers with True value, are there any built-in ways to get what is on a layer?

There is no special property or method to retrieve all objects on a certain layer in Blender. There is a context member visible_objects, but multiple properties affect it (visibility of object, visibility of layer).

Thus, you should use a plain Python list comprehension:

objects_on_2nd_layer = [ob for ob in bpy.context.scene.objects if ob.layers[1]]


Save a series of images from a video? I'm doing a film where I'll be adding drawings on top of a film, so I need still frame of the film. I've found how to just save one image, but is there a way to say save an image/screenshot of a film every quarter second so that I have a series of images to work off of?  Did that make a lick of sense?

Thanks!

Edited to add: m.ardito solved it for me.  I'm doing the drawings in corel painter so I just needed images to use in there.  Thanks for all the help everyone. :)

Have a look at camera tracking in Blender. BlenderGuru and BlenderNation have tutorials on this. Note that this is different from camera mapping.

Yes, this does not answer the question posed directly above, but I believe it poses the motivation behind the question - how to create a 'drawing' that follows the film.


Different animations for different scenes for a linked armature I have a simple scene containing an object that is parented to an armature.
I made a copy out of the scene by choosing the "link objects" option, because I want to be able to edit one scene and have the change automatically reflect in the other scene.

The problem is figuring out a way of giving the same armature different animations in each scene.  If I animate the armature in scene 1, scene 2 will automatically have the same animation. I tried to link a different action to the armature in the action editor, but the action changes in both scenes.

Is there a way for me to link an object from a scene while still animating it individually? Proxies don't seem to work if I'm simply linking from another scene in the same file.

When you link an Object from one Scene to another all changes are transferred from one Scene to another, even animations. That is because the same Object and Armature are used. There is a quick way of fixing this for your case: Add a new armature object in each scene, then select each one of them and make sure they use the same Armature. You can make the selection here:

All changes to the Armature in Edit Mode will be transferred to all other scenes but changes made in the Pose Mode will be Scene specific.


High poly mesh slow in blender? trying to animate highpoly mesh about 1 million polygons even slower when I try to apply physics like softbodies is there a way around this?seems like I really got to lower the polygons in order to run smooth.

You may retopologize your model and then bake normals from the high poly model to the low poly one. This will save all the details but the geometry won't be as dense, so it will be more animation friendly.

First you have to retopologize your high poly model (take a look at these answers: How to easily make mesh retopology? and How to convert from high poly to low poly).
There are two models pictured below. The high poly one with a very dense geometry on the left and low poly one with a simple retopologized geometry on the right. With your retopologized model you'll be able to bake the details from the high poly model to the low poly one.

Here's how to do it. First unwrap your low poly mesh and create a new texture with the desired parameters.

Next select (with the RMB) the high poly model, then select the low poly one.

Go to Render data header and under Bake panel change the mode to Normals, check the Selected to Active checkbox, then press the Bake button. After Blender finishes baking save the image to your computer.

Now give your low poly model a material, go to Texture header, open your previously saved image and set the settings as pictured below.

To see the normal map in action change the viewport shading type to Rendered and set the GLSL option in the Shading panel of Properties Shelf (N).


Wierd shading of nomals Ok I have no idea what is happening here. The back side of my faces shine through the face in front. I activated "show face normals" so it is better to see. First I thought my typology is mto bad, but it even shows up on a simple cube.I may change something I'm not aware of...
I would appreciate your help.

Just in case someone gets the same problem. I've got the reason and solution.
The shading issue is caused by a very low clip start value of the viewport while beeing zoomed out. Sub-D and Solidify making it even worse.
So nothing crashed just keep the setting high enough if you want to zoom out^^


White line across my blender sample render? A nasty white line runs horizontal across my sample render and I can't seem to find what's causing it! I'm using blender internal render.

Blend File: http://www.filedropper.com/grass

Thank you! :)

Thanks to @Cegaton, the line is now gone! He suggested I resize my background image, as the line coincided with the bottom of the image. Now that I resized the image so that there are no edges within the camera view, the line is gone! Thank you Cegaton!!


Grease Pencil in 2.8 can you link or reuse mouth shapes I'm using Blender 2.8 Alpha and I was wondering if in Grease Pencil there's a way that you can use a link instead of coping drawings (shift+d) for mouth shapes in the dope sheet. So if I have 10 mouth shapes that cover the basic phonemes and I do an animation that uses those shapes I have to copy each shape in the GP dope sheet to the place I would like to use it. if I finish my animation and find I want to change one of the phonemes shapes I could change the original but I would have to find each occurrence of that shape in the dope sheet and replace it. It would be great if there was a way to only have to update the original. I didn't know if this is already in GP or not.

maybe you've already found the way, but just in case: If I understood it well, yes. You have to create the phonemes as a grease pencil object whit all shapes as a frames in a separate blend file. Link the mouth object via "file> link>object" in the destination file. place your instance and edit frame phoneme order as you want. Go back to the original file whenever you want to edit one of the phonemes. Save and the edited shapes would update.


Sculpting Cursor Form The shape of my sculpting cursor is elliptic on my cylinder. I don't understand as in edit mode, my cylinder is pretty subdivided.

Any idea where that comes from?

Thanks in advance for the help

The object has been scaled in Object Mode.
Apply the scale through Ctrl+A > Scale and the cursor will be evenly scaled as well.


Face Selection Masking for Painting overlaped by the texture Doing the Piero Course, when it comes to paint the textures in the model direct in the Texture Paint mode, when setting the Face Selection Masking for Painting, the overlaping wire frame won't show. Some regions like the eye and the fingers of the model show white lines that resembles the wire but only in these regions:

Is there a additional configuration that I'm missing so I can paint with these wire outlines? The .blend file is in this link.

Edit: Packed .blend file with textures and updated the link.

I'm sorry, but since the Blender 2.73 version release you can't display the wire outlines while painting.

''Paint mask selection now only shows selection boundary (so you can better see what you are painting)'', as you can read in this manual: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.73/Painting


Should i parent the eyes to the mesh or join them? I want to rigg and animate my character and my question is if i should parent the eyes to the body or join it, which way is better? Does parenting things work in games?

Parent the eyes to the head.

Joining meshes is a lot more complicated. Their modifiers join up and often their cursor is lost. Also, joining eyes in games often makes them glitch.

To set parent to the eyes, first select the eyes, then the head, after that press "ctrl P" and select "to object".


Decimate multiple objects at once I have a scene containing a few hundred objects (meshes). I can decimate one object at a time by selecting it in the scene and add modifier->decimate. Doing this for all objects separately would of course take forever.

How can I decimate all objects at once?

Start by selecting all the objects you want to have the same modifiers applied to.
Add the decimate modifier to the active object. The active object is the one that is highlighted in a lighter colour than the others, it is also the one that you can alter in the properties window.
Press CtrlL and select modifiers. This copies the modifiers from the active object to all other selected objects.

If you want more control there is an addon called "Copy Attributes Menu" that you can enable (it is included with blender) that allows you to copy selected modifiers.

If you then want to apply the modifier to all objects you can use AltC and select Mesh from Curve/Meta/Surf/Text, it may sound odd to convert a mesh to a mesh but it applies all modifiers to the selected objects.


How to delete one side bones With the Blenrig addon

I dont want to keep the mirror or symmetry option both side. I delete the half side (hand) but it deleted the other side also. Is there any option to control just to delete the half part and keep the rest.

In the Tool panel (displayed with T) > Options, you must have enabled the X-Axis Mirror option, disable it.


How to increase shadow strength in Shadow Catcher? I am using the New Shadow Catcher from Blender 2.79 and would like to know how do I leave the most intense shadows? I'm trying to adapt my model, as close as possible to the background image...

This is my setup scene...

And i'm only using a Point Lamp with this configurations...

Dont have problems/bugs, I just want to increase the strength of the shadow in the scene.

EDIT: The problem has been solved by adding the Color Ramp! Now my shadows grew more intense. Thanks!

You have rammed into a common issue compositors are facing. Actually there are two of them:
1) Your footage has been graded already
However that footage had been taken, may it be a simple iPhone camera or some advanced Blackmagic thing, judging from the look of the footage some kind of intensity mapping has already happened here. Keep in mind that if you're using the .jpegs the camera provides you for convenience always have some sort of intensity mapping applied, and it's a different one for each camera maker. That's why some images look Canon-ish and some are Nikon-ish. When compositing, ideally you work on the RAW footage, which hasn't been mangled that way yet. The values the camera had recorded, including the intensity of the shadows, has not been altered in RAW yet. In that case, Shadow catcher and scene would play nicer together, you could merge the layers and then apply the desired Grade. Again, in your case, I believe you don't have this option.
2) You don't have a clue about the lighting intensities on the original set
Judging from the shadows, you rightfully have seen that there is multiple light sources. However, how would you know how bright they were, and at what distances they were located? Both information is crucial for the shadows to be correct. Even the objects that were on the set caused light to bounce and therefore shadows to change. You won't have that either. You had no other choice than guess something together. What happens then is that one light source brightens the shadow another light source had cast. Also carefully watch your World material, as it also brightens the shadows.
So you're missing two keystones of proper compositing, and are stuck at guesstimating a fix. At least, there's a trick that might help you out.
possible workaround
For starters, here's a .blend file:

As mentioned here, the Shadow Catcher creates the look in the Alpha channel only. The shadow color is defined by the RGB channels, and those are pitch black already. It won't get any darker than that. So one option to change that look is to mangle the Alpha.
Let's have a look at the composite as you might have it right now:

We use an Alpha Over node to merge foreground and background. The result is a somewhat bright shadow, because in my .blend I had used a World (intentionally, to create the issue). Now, work on the Alpha by throwing in for example a ColorRamp node like this:

By doing that, you basically change the factor in which foreground and background are merged together. The solution isn't ideal as it will create Alpha fringes, but you might get away with it.
Another option would be to use the alpha as a factor for a node like HSV, to dim the composite down locally, but that requires you to separate shadow from object, like in the question linked above.


Blender Texture Paint applying to incorrect object I have an object in Blender, and have disabled visibility of all other objects in my scene. It is already  UV mapped and set up with a material. However, whenever I go into texture paint mode, any strokes that I place get applied to the incorrect image (one for another object), even though that object has dissapeared

Here's the interface

However, whenever I try to paint on it, it gets applied to a completely separate texture.

Go to the Slots tab of the tool shelf in texture paint mode.
Now there are two Painting Modes here Material, which I will talk about first, and Image.

When set to Material (as in the image above), all Image Texture nodes in the selected material are displayed as Available Paint Slots. All you have to do is choose the correct "slot" or texture, and paint.

Note that the Image Texture node does not have to be connected to anything, and it does not even have to be the active node anymore. (yeah!)

Now when the Painting Mode is set to Image, materials no longer matter, only the images. The image field under Canvas Image, is where you select what image to paint on. If you don't have on, there is a button to create a new one.

Having said all that, your problem is that you are no painting on the image you think you are.
Just the way you describe how it show up on other objects meas that, you are painting on an image that some other object is using.
Check the painting Slots as I explained above.


Addons: Only some .zips will install Why is it that if I go to install an add-on from User Preferences > Add-ons > Install from File... and choose a *.ZIP, some add-ons will install, while others will return me to the User Preferences with nothing having happened (as far as I can tell)?

Is there a specific file structure required in the .ZIP? I get many add-ons from GitHub, using the Download Zip button, and even there installation of the actual Zip file only works some of the time.

You can install from zip directly if the zip is either:

a zipped single .py file

  addon_name.zip
       |
       addon_name.py

a zipped folder, important that it's not a zip that contains a folder first.

these will work because the folder structure is at the expected level. The __init__.py is directly inside the zip ("top level").

https://github.com/nortikin/sverchok
https://github.com/JacquesLucke/animation_nodes

  addon_name.zip
       |
       addon_foo.py
       __init__.py

this will also work

  addon_name.zip
       |
       addon_name_folder
              |
              addon_foo.py
              __init__.py

for instance: this zip will fail, because the add-on folder is nested too deep, there's another folder inside the zip:

https://github.com/zeffii/TubeTool  (this is a link to a branch that first has an extra level of folder nesting)
Github will generate a zip from that repo that looks like this:

  repository_name.zip
       |
       repository_name_folder
            |
            first_folder_in_repo
                    |
                    addon_foo.py
                    __init__.py

Zipped add-ons with a structure that doesn't work with the install-from-file feature may or may not have a good reason for being that way.


Blender input and shortcuts error This error just happened. I can't rotate my viewport using mmd. I have reinstalled it but nothing changed. Not only mmd, I also found that when I press S, the "insert keyframe" menu showed up. It must be shows up when we press I, right? Not obly S, but I also found errors on another, like A, Z, and much more. Can anyone fix my problem?

Just go to File menu in blender > Defaults > Load Factory Settings
This Can Work For You But if This Does Not Works then I have Another Idea for you if you are having windows operating system
you should uninstall blender first then before reinstalling it you should go to your c drive or the drive where your operating system is installed then let us suppose it is in C drive so try searching for blender in your file explorer in the c drive
now delete all the file relating to blender except your project files
also you should go to c drive > program files > Blender Foundation

  Delete this folder (Blender Fondation)
  now there should not any system file related to blender and then you should re-install it again
  hope this will work !


How do I make a sphere out of a spiral? How do I make a globe into a hollow sphere made out of a spiral?
In other words, how do I make a spherical spiral, or a spiral follow a spherical shape?

Okay, modifiers enthusiasts, let's have a good one.

Add a plane in the center of the world. Go into Edit mode. In the Mesh menu, choose Merge > At Center.

Now we have a unique vertex on $0,0,0$

Add a Displace modifier. Set its direction to X.
Add a Screw modifier, set axis to X. Set the steps to 8, angle to 0 and the screw to 0.5.
Right-click on the Screw value field, choose Copy as New Driver. Right-click in the Displace modifier Strength field, choose Paste Driver. Right-click again there and choose Edit Driver, change the driver type to Scripted Expression and set it to - screw_offset.

Now we have a line with $9$ vertices centered along the X axis.

Add a Screw modifier. Set Angle to $0$, axis to Z and Steps to $32$. Set the Screw value to $10$.
Add a Displace modifier along the Z direction.
Right-click on the previous Screw modifier value field and choose Copy as New Driver, right-click on the last displace strength field and choose Paste Driver. Right-click again, choose Edit Driver, change driver type to Scripted Expression, set - screw_offset.

Now we have a band centered along X and Y axis :

Add a Displace modifier, set the Direction to Y, Strength to $2$
Add a Simple Deform, set to Stretch 0, along Z, with a factor  of $-0.40$

Add a Simple Deform, set to Twist, along Z, with and Angle of $360°$
Add an Empty in the origin.
Add an Array modifier, set the count to $6$, uncheck Relative Offset, check Object Offset and set your empty.
Right-click the Array Count, choose Copy as New Driver. Go to your Empty's transforms, right-click the Z rotation and choose Paste Driver. Right-click again and choose Edit Driver. Set driver type to Scripted Expression and type 2*pi/count so that the angle is in radians.

We have so far some sort of pinecone. Tweak the first Screw offset so that there is no overlapping mesh when you add a lot of array count.

Add a Cast modifier, set it to Sphere (default), set the Strength to $1$
Add a Subdivision Surface modifier, set the strength to $2$
Add a Solidify modifier, thickness to $0.1$
Add a nice shiny material to it.

Final result:


How to toggle Xray in viewport with Python? From the interface you get this command (which return a failed context error when run from the console):

bpy.ops.view3d.toggle_xray()

On the manual there is unfortunately no tooltip that would give any help (search page for xray with ctrl+F):
https://docs.blender.org/api/current/bpy.ops.view3d.html

Has anyone successfully toggled xrays with python?

Often the UI code gives clues

Turn on developer extras in user preferences and can right click and view source of most UI elements.

Do this over toggle xray button and It takes us to the draw code, in text editor,  of the operator button in 3d view.

In space_view3d.py

    row.operator(
        "view3d.toggle_xray",
        text="",
        icon='XRAY',
        depress=getattr(
            shading,
            "show_xray_wireframe" if shading.type == 'WIREFRAME' else
            "show_xray"
        ),

Trecking up we see  shading is a pointer property of the SpaceView3d  This is context.space_data in the 3d view, but not in text editor or console.  A reason for the failed context error.

-- remnder: post like to codemanx's override context answer, or easier still See Merlin's answer --

We could simply find the area and space and other required members and pass as an override dictionary to the operator, however we may be able to simply toggle a property of the space.. much easier.. off to the python console to investigate

get all the 3d view areas in the context screen

>>> views3d = [a for a in C.screen.areas if a.type == 'VIEW_3D']

iterate over them and see what the values are using code above as clue. The space from an area is area.spaces.active

>>> for a in views3d:
...     shading = a.spaces.active.shading
...     shading.type
...     shading.show_xray
...     shading.show_xray_wireframe
...
'SOLID'
True
True

Hmm ok let's see

>>> shading.show_xray = False
>>>

and bingo, toggles shading. I'll leave you to decide on how to handle show_xray_wireframe based on shading.type


How to select and separate same vertices as current selection on copied, very similar geometry My main goal is to separate multiple geometries the same way by vertice selection. All the objects differ only a little bit in their vertice position, because they only are deformed by already applied shape keys originating from the same origin object (amount and distribution of vertices are the same).
My current strategy (corresponding to the bpy script below): Starting with a selection of vertices on the initial geometry, I would like to additionally import multiple very similar ones. By saving the vertice selection, the separation should be applied one object after another. (edited)

Please see my code below. Since it did not work to directly compare vertice objects, that initially have been stored to a list (previous version), I now try to compare list indexes.

Unfortunately, my example code only separates one object in the two geometrical parts:

import bpy
import os, glob

# script to separate same edit mode selection on multiple imported .fbx files in directory

class Import(object):
    def __init__(self):
        pass

    @staticmethod
    def import_fbxfiles_from_dir(path = "C:\\Users\\user\\Desktop\\test_parts\\"):
        os.chdir(path)
        for fbx in [f for f in os.listdir(path) if f.endswith(".fbx")]:
            print ("imported file: " + fbx)
            bpy.ops.import_scene.fbx(filepath=fbx, filter_glob=".fbx;", axis_forward="-Z", axis_up="Y")

class Separate_test(object):
    def __init__(self):
        pass

    def separate_initially_selected_verts(self):
        obj = bpy.context.scene.objects.active  # active object
        mesh = obj.data
        self.selected_vert_list_IDs = [key for key,v in enumerate(mesh.vertices) if v.select]
        print("selected verts:", self.selected_vert_list_IDs)

        bpy.ops.object.mode_set(mode='OBJECT')  # exit edit mode

        obNr = 0
        for ob in bpy.context.scene.objects:
            if ob.type == 'MESH':
                print("-- Object:", obNr, "/", len(bpy.context.scene.objects))
                bpy.context.scene.objects.active = ob

                # set to edit mode
                bpy.ops.object.mode_set(mode='EDIT')

                # select verts from list
                count_select = 1
                for key_ob,v in enumerate(bpy.context.scene.objects.active.data.vertices):
                    if key_ob in self.selected_vert_list_IDs:
                        count_select += 1
                        # print("vertices separated in obj: {0} of {1}".format(count_select, len(self.selected_vert_list_IDs)))
                        v.select = True

                bpy.ops.mesh.separate(type='SELECTED')
                bpy.ops.object.mode_set(mode='OBJECT')  # exit edit mode
            obNr += 1

if __name__ == "__main__":
    Import.import_fbxfiles_from_dir()
    separate_obj = Separate_test()

    separate_obj.separate_initially_selected_verts()
    input("press return to quit.")

Perfect candidate for bmesh

Script to run in edit or object mode with "basis" mesh selected.

For each mesh object having same amount of vertices add a split by selection object.  Selection: Default 'SELECT' uses selected vertices in basis. 'LOC' tags all verts within a tolerance of basis.

Set this up as a class such that it can be instanced with the basis object, and called with another.

import bpy
import bmesh

class diff:
    def split(self, scene, ob, select='SELECT'):
        me = ob.data
        bm = bmesh.new()
        bm.from_mesh(me)
        if select == 'SELECT':
            select = self.tag_select(bm)
        elif select == 'LOCATION':
            select = self.tag_same_loc(bm)
        else:
            print("Error.. not in SELECT, LOCATION")
            select = False

        if select:
            obcopy = ob.copy()
            me = me.copy()
            # remove selected from one
            bmesh.ops.delete(bm, geom=[v for v in bm.verts if not v.tag], context=1)
            bm.to_mesh(me)
            obcopy.data = me
            scene.objects.link(obcopy)

    def tag_select(self, bm):
        for v0, v in zip(self.bm.verts, bm.verts):
            v.tag = v0.select
        return any(v.tag for v in bm.verts)

    def tag_same_loc(self, bm, TOL=1.0e-3):
        for v0, v in zip(self.bm.verts, bm.verts):
            v.tag = (v.co - v0.co).length < TOL
        return any(v.tag for v in bm.verts)

    def __init__(self, scene, ob):
        me = ob.data
        if ob.mode == 'EDIT':
            bm = bmesh.from_edit_mesh(me)
        else:
            bm = bmesh.new()
            bm.from_mesh(me)
        self.bm = bm

if __name__ == "__main__":
    context = bpy.context
    scene = context.scene
    ob = context.object
    d = diff(scene, ob)
    shapes = [o for o in scene.objects
                if o.type == 'MESH'
                and len(o.data.vertices) == len(o.data.vertices)]
    shapes.remove(ob)

    for s in shapes:
        d.split(scene, s)


Why is part of the object a different color than everything else? So today I got on blender for the first time in a long time and decided that if I was every going to get better I would need to start practicing modeling and such. I decided I would model a Pagani Zonda to see what I could do. One of the mirrors on the car is a different color from everything else and I would like to know why. I haven't started texturing yet (though I'm not sure if I will because the model isn't that good). I wish I could describe it better. Is there a way I can post the file? I don't know how to do that sorry. I'm pretty bad at computers. Thanks in advance!

Update I figure out how to add an image at least. It's kind of hard to see but the left mirror is a weird color and I don't know why.

The normals are inside out. You need to flip normals. Press CtrlN in edit mode.


Bounding box like object stuck in viewport I've used Blender for 4 years, off and on, yet I've never come across this before. I've attached two images to try and make it clear. It looks like a bounding box, it's not an object I've added and I cannot find anyway to get rid of it. Wasn't there last night.

Can anyone tell me the "Kick myself" short cut to get rid of it please? As I've not the foggiest.

Thank you!

[

Thanks to Mr Zak's links, the answer-for anyone else stuck, unable to find a good Google phrase to find it-is in the Object->Display menu.

You get it by hitting Shift-T by accident!


Body and Armature A-Pose / Clothes T-Pose I am new in Blender and I downloaded fully rigged body meshes and this was A-Pose.

Since I had some troubles when I reset A-Pose to T-Pose, All Rigging were broken, so I just changed through Pose mode.

But real problems happened after Armor modeling, when I transfer weight Armor result was Pic 4.

Is there any way to change Armor static mesh, like especially posed arm T-pose to A-Pose?

The goal can be reached having all 3 objects (Armature, body and armor) in a T-pose as Rest Pose.

This can be a procedure:

Move in pose mode the armature using FK (while it is deforming the body only) until you get the desired T-Pose; then adjust the IK controls so that there is nearly no difference between IK and FK.

Select the body and Apply its Armature modifier.

Select the armature, turn on all its bone layers, select all bones and click "Apply pose as rest pose" from the menu "Pose - Apply".

At this point you can parent the armor to the Armature, add a new Armature modifier to the body and set  the Armature as object.

Don't forget to move the new Armature modifier on top of the modifiers stack, and check its "Mantain volume" option.

This procedure doesn't affect any premade weight assignements.


Why does my UI look different Ive been watching some tutorials on how to do fancy shaders and stuff and ive been finding them very hard to follow as their UI is very different to mine. This is what i want my UI to look like, however i cannot find anything on the internet that suggests there are different UI settings in blender.

This second image is what my UI looks like at the moment
I am also using blender 2.79

These are two completely different versions of Blender.

You are using 2.79, the current stable official version, the tutorial you are following is for the upcoming 2.8 version, a major refactor of the application, currently in release candidate phase.

You can download both from the Build Bot, but have in mind that 2.8 is not ready yet and is not advised for production. While backwards compatible, both versions are also considerably different, so it is unadvised to switch between the two with the same project.


How to clean weight groups by script? After transferring weights from one object to another vertices might get multiple groups with very low weights. In weight painting view there is a tool 'Clean' that allows to remove all the groups with low weights.

To automate the process I am trying a script like

for obj in bpy.context.visible_objects:
    if obj.name[-2:] == '-l':
        obj.vertex_group_clean(group_select_mode='ALL', limit=0.005, keep_single=True)

In this snippet I go through visible objects, and if their name ends with "-l" I
want to run vertex_group_clean method, but the script fails with AttributeError: 'Object' object has no attribute 'vertex_group_clean'

What do I do wrong?

I did come up with a solution, but probably not the most elegant one. The vertex_group_clean method is an accessor to a menu, it is not a method to an object. So in the solution I select and activate an object, then switch to weight view, select all the vertices, do cleaning, and switch back to object view.

def active(obj):
    bpy.ops.object.select_all(action='DESELECT')
    obj.select=True
    bpy.context.scene.objects.active = obj
    bpy.ops.object.mode_set(mode = 'OBJECT')

for obj in bpy.context.visible_objects:
    if obj.name[-2:] == '-l':
        active(obj)
        bpy.ops.paint.weight_paint_toggle()
        bpy.ops.paint.vert_select_all(action="SELECT")
        bpy.ops.object.vertex_group_clean(group_select_mode='ALL', limit=0.005, keep_single=True)
        bpy.ops.paint.vert_select_all(action="DESELECT")
        bpy.ops.paint.weight_paint_toggle()

It does the job, but I hope there is a better way to write this :)


Geometry Nodes: How can I make some instanced object disappear when they reach a Z-scale of zero? I have a geometry nodes setup that adds instanced cylinders across a circular plane - I'm using a vertex proximity modifier (driving attribute "Displacement") and a sample texture node to control the scaling (driving attribute "Disp") - I'm doing this by mixing between an attribute fill that has a z value of 6 (first attribute in the chain, "scale"), and an attribute fill that has a Z value of c (second attribute in the chain, "scale2"). Right now there is flashing when an instance reaches z scale = 0 because the top and bottom surfaces of the cylinder are fighting between one another. They are also flashing because they are fighting with the surface the the entire geo nodes objects is on top of.
Is there a way to make instances that reach a z scale of 0 to disappear completely? If not, is there a more efficient way to drive the z-scale of the instances, rather than the way I'm doing it (mixing between "scale" and "scale2" attributes, "scale2" having a z scale of 0) Thanks in advance for any advice

Yep, you can.
Use point separate to split points into 2 groups by height:

Group with 0 height you should not use, second one will have only points with height > 0


How to add equally wide border to a plane? Is there any way to non-destructively add an equal width border to a plane mesh? For example:

By non-destructively, I mean that editing the shape of the rectangular plane should also adjust the border automatically. Preferably, this would be done with modifiers, but modifiers aren't necessarily required.

For this specific case, this is my solution using Hooks & Vertex parenting.
I am not sure whether there is an easier solution but this should work.
I made 4 empties, each is parented to corresponding corner-vertex.
Then for the border object, I made vertex groups also for each corner and used Hook modifiers to link them to empties.

Here is a version with copy rotation constraints to fix the rotation issues:


How to mirror or flip duplicates in edit mode? I'm currently trying to create a duplicate of the character's shoe with the shift + d method but I'd really like to know if I can flip/mirror the vertices selected so it'd look like I have a left shoe, not just two right shoes.

Normally what I would do is duplicate the model, then delete everything I need however for some reason this stops the shoe from following the rest of the model(and that's after I've rigged the new shoe, weight painted and everything) so I'd like to know if there's a way to just flip/mirror only the vertices I have selected in edit mode? Similar to how you van horizontally flip an image in Microsoft paint.

Here's a basic image of what I'm trying to do:

I'm sure there must be a way to do something similar in blender, it seems like something that would be part of the program, any advice would be greatly appreciated :)

There is an easy way to do that. Set the 3D cursor in the middle between leggs (it would be probably a characters pivot point) then, set pivot point for transforms to 3D cursor and Shift+D to duplicate, then Enter or right click, then CTRL+M and choose axis on which you want to mirror the shoe by pressing X or Y. After that you should have mirrored shoe on the other side of the cursor.Like this:


How to use cell fracture add-on to break only part of the mesh? When applying cell fracture add-on, the whole object is broken into small pieces. If I would like to keep part of the mesh to be unbroken (remain a big piece of object), how can I do that? Or do I need to use other things beside cell fracture to finish the job?

Thanks in advance.

You can use Bisect followed by V (not sure what the function is called but it duplicates the vertices selected effectively creating loose parts). The use Fill then Separate to split your object by loose parts then apply the cell fracture on the piece you want.


Delete or dissolve face keeping edges Let's say I have a plane, is it possible to delete the face only without touching the edges or vertices? I plan to apply a skin modifier later but don't need the faces.

Can this be applied to any mesh?

If I understand your question correctly, yes, it's in the options when you press X for delete: Faces Only


Visibility ON/OFF in the BGE via Python I'm trying to make a simple Asteroid game with the BGE, using Python when necessary. I want to make 'visible' the ship trails when I press 'W' to increase the speed and make them 'invisible' if 'W' is not pressed. Where is the error? I'm very new with Python scripts.

You can do:

own['trails'] = trailsObject
own['trails'].visible = True
own['trails'].visible = False

or as i can see in the image:

cont.activate(trails) # to activate the actuator
cont.deactivate(trails) # to deactivate the actuator

Also visit the BGE Documentation.

Next time please take a moment to copy your code as text and format it.


I can't understand Inverse Kinematics So I am relatively new to Blender, and while figuring out the process that is rigging, and applying Inverse Kinematics to my armature, I came into contact with a weird problem, Normally, inverse Kinematics should look like this:

However, that's when I disable weight, which turns into a problem when animating, as weight should be on. This is what happens when I turn on weight:

I'm not sure what I did or what I'm not understanding, but it doesn't make any sense to me. Maybe someone with more experience could help me out?

So after I worked at it for a little bit, I got it to where most of the armature is normal, however, the lower leg is still broke, it turns into a thin like and is unable to function properly. Any help?

I honestly don't know what's going on exactly with your process, but I've followed this video myself and works just fine:
https://www.youtube.com/watch?v=Pt3-mHBCoQk

Hopefully this helps!


Cannot connect vertices I'm trying to create an edge between vertices. But when i press F it grabs them like I'm pressing G. Any help would be appreciated

It looks like you are trying to join vertices from different objects. In order to bridge those vertices, you will have to join the objects together by going into object mode and selecting both objects and hitting Ctrl+J.


Can we use the poll() required operations without a context I was trying to use Blender from external python console using RPC. I was able to establish the connections and some basic operations. But, I cannot change the mode of an object, it is showing poll() error, context is incorrect. I know that these operations requires a context to run. Since it is running from external, current context is None. Is there is an alternative option to do so?

As in the docs, some operations requires context to perform (For example: To select edit mode: bpy.ops.object.mode_set(mode='EDIT')) When we try to run blender from external console, we won't get the corresponding context results the error is thrown. To avoid these types of error, we need to override the context.
For this example, the required context can be obtained using the following code:
override = bpy.context.copy()
    for window in bpy.data.window_managers[0].windows:
        screen = window.screen
        workspace = window.workspace
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                override['window'] = window
                override['screen'] = screen
                override['area'] = area
                override['workspace'] = workspace
                override['active_object'] = bpy.context.view_layer.objects.active
                break
bpy.ops.object.mode_set(override, mode='EDIT')

IMPORTANT
For every operation, the context would be different. So, you need to find the correct context for every operation in a trial and error method. The above context can only be used in the case of changing to edit mode


SubD creates a crease in an edge I have an issue with my SubD model which seems to be creating a crease on a random edge. I checked double vertex but it's not that. And there is no Crease applied on this corned as you can see. Do you know how to get rid of this creased edge?
I am using Blender 2.83.5

This can happen when your normals are flipped on part of the mesh.  Pretty common with Mirror operations.
The problem is that the Subdivision Surface Modifier is interpolating between the inside and the outside of the mesh, at this point, so for the vertices in between they are returned to their original positions.

To diagnose problems like this you can check face orientation overlay in this menu.

Typically you want the blue side facing the camera.  If you see any red you can tab into edit mode, select all your mesh and press Alt+N or go to the menu Mesh -> Normals -> Recalculate Outside.


Cycles Error: Cuda failed to find version number I am using Blender in Ubuntu with irie ppa. I've installed Nvidia-cuda-toolkit from irie and bumblebee, then I try to render using cycles but I keep getting this error in the terminal:

CUDA version 4.2 detected, build may succed but only CUDA 5.0 is officially supported

After getting this error, I downloaded Cuda 5 from Nvidia website and tried to install it, but instead got this error:

Unsupported compiler: 4.7.2

Then I tried to install with

sudo ./cuda*.run -ovveride compiler

Cuda 5 installed correctly, but when I tried to render again with Cycles I got yet another error message (again)

/usr/local/cuda-5.0/bin/nvcc: 2: /usr/local/cuda-5.0/bin/nvcc: Syntax error: Unterminated quoted stringCUDA: failed to find version number in:
CUDA nvcc compiler version could not be parsed.

I removed the Cuda files and tried to install (again), but before installation I tried to choose gcc-4.6

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
update-alternatives: using /usr/bin/gcc-4.6 to provide /usr/bin/gcc (gcc) in auto mode
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
update-alternatives: using /usr/bin/gcc-4.7 to provide /usr/bin/gcc (gcc) in auto mode
sudo update-alternatives --config gcc

and select gcc-4.6 as compiler. After that I try to install Cuda (again) with

sudo ./cuda*.run everything is fine, installation succes.

But, when I try to render my model with Cycles I get the following error (again)

CUDA: failed to find version number in:
CUDA nvcc compiler version could not be parsed.

Can anyone help?

Run nvcc on the command-line with option --version. It should show some version information similar to:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Tue_Sep_25_09:18:50_PDT_2012
Cuda compilation tools, release 5.0, V0.2.1221

The most important part is the last line Cuda compilation tools, release 5.0, V0.2.1221. Cycles looks for the first part Cuda compilation tools, release. If this cannot be found, then Cycles gives up with the error you pasted.

If it is different (and based on your output the entire version string is even empty), then you need to contact the package creator to report a bug.


How can I connect the armature to my mesh without blender crashing? I am trying to make the armature the parent to the mesh with automatic weights but every time I try blender stops responding and has to be closed? Am I doing something wrong?

I'm running Blender v2.76 on the cycles render

Try to remove subsurf modifier on you mesh before you apply the armature.

Else the armature will use the subsurfed model (much more vertices).


How to set origin points of multiple objects to a corner of their bounding boxes with Python? So, I’m new to scripting in Blender but I do have a project which requires me to change the origins of all the meshes to minimum X, maximum Y and minimum Z coordinates of their bounding boxes so the left-down corner. A project consists of several meshes and it’s really repetitive. If it’s possible I would love to know how.

First member of bounding box coordinates

The local coordinates of the 8 corners of the bounding box can be found via

bbox = [Vector(b) for b in o.bound_box]

ordered such that the bottom left hand corner is the zeroth element.

Python console code on default cube

>>> bbox = [Vector(b) for b in C.object.bound_box]
>>> for i, v in enumerate(bbox):
...     i, v
...
(0, Vector((-1.0, -1.0, -1.0)))
(1, Vector((-1.0, -1.0, 1.0)))
(2, Vector((-1.0, 1.0, 1.0)))
(3, Vector((-1.0, 1.0, -1.0)))
(4, Vector((1.0, -1.0, -1.0)))
(5, Vector((1.0, -1.0, 1.0)))
(6, Vector((1.0, 1.0, 1.0)))
(7, Vector((1.0, 1.0, -1.0)))

Test script run on selected objects in edit mode (v2.8)  Subtract the LHC from all local coordinates. Globally move the object to reflect the change in origin.  Note on re-reading your question, might want to use index 3

Edit.  Made this a lot more robust. Since any or all of the selected mesh objects may share the same mesh, only want to set the origin of the mesh once, and globally shift each object using the adjusted mesh. For this a collections.defaultdict is used with the mesh as a key, and a list of objects using that mesh the values.

import bpy
from mathutils import Vector, Matrix
from collections import defaultdict
context = bpy.context

meshobs = defaultdict(list)
for o in context.selected_objects:
    if o.type == 'MESH':
        meshobs[o.data].append(o)

for me, obs in meshobs.items():
    o = obs[0]
    bbox = [Vector(b) for b in o.bound_box]
    lhc = bbox[0]
    T = Matrix.Translation(-lhc)
    me.transform(T)
    for o in obs:
        o.matrix_world.translation = o.matrix_world @ lhc

Related

Setting mesh's origin in python (2.8)

Set origin to bottom center of multiple objects


How can I render the entire video in Blender VSE? I'm making a video project in the VSE.
My video is 3 minutes long however, when I render it I only get up to 10 seconds or less.

It only reaches up to that part of the video.
What can I do?
Do I need to select any specific settings to get the entire video to play it or am I doing something wrong?

You need to change the End Frame in the render settings.

If you are rendering at 24 frames per second, and since you have a 3 minute video you will need to set the End Frame to 4320.

You also will want to change the render Resolution (it is right next to the frame range), now you have it set to 960x540, full HD is 1920x1080 but with the scale set to 100%.
Read the video Encoding section of the blender manual for more information, or the 2.79 manual page.


Create and manipulate height-map, save as greyscale texture I need to create a height-map and pass it into a custom shader in Unity3D.

I can pass it into the shader as a greyscale texture.

I believe I can create a height-map in Blender by starting out with a 100x100 (say) grid, restricting movement to only the vertical axis, then I can use stock tools to mould the surface.

But now is there any tool that can export the resultant height-map as a greyscale texture?

Would I have to write my own using Python?

You can use Displacement baking.

Create your base grid/plane, create a new blank image and UV unwrap the plane onto it, then duplicated it.

Model/sculpt the plane (if you are using sculpting and not using dyntopo, you may want to use the multires modifier. See below).

Select the sculpted/deformed plane and the duplicate (still just a flat plane), so that the flat plane is the active object.

Enable Selected to active in Render settings > Bake and set the bake mode to Displacement. If your sculpted plane goes more than half a BU above or below the duplicated plane, you may want to enable Normalize.

Press Bake. Note that currently have BI selected as the current render engine to bake textures, however this is will be available for cycles in 2.71.

Result:

Multires
If you are going to use sculpting, you could also use the Multires modifier. See This post.

Add plane, create image, UV unwrap, and add multires modifier in simple mode.

Sculpt details

Set the Preview subdivision level to zero, then bake with Bake from multires enabled:

Cycles baking
Even before 2.71 comes out, it is possible to do this in cycles by rendering your terrain top down (with an orthographic camera) and with the Z position mapped to a gradient.
See this post for details.


Rendering particles vs ALT+D copying the object I have a simple question.

Is it better for render time and optimization to add for example Trees as particle system or to ALT+D duplicate it as many times as i need. What will be easier for memory?

I believe there is another way to "duplicate" objects, called "linking objects" (not entirely sure what it's called). But basically, you duplicate it as Alt + D, but it remains somehow part of the original mesh.

Alternatively you could use multiple array modifiers.


Why does Blender seem to freeze when I run this script? I'm extremely new to Blender. I've watched a few guides on modelling, rigging and animating and have made myself a character with a bunch of animations. But I'm not looking to export the model, I'm instead looking to save the animation as a batch of sprites from an isometric view.

I found this script just googling "blender render isometric". However when I run the script blender freezes for a few seconds and there's no file to be found. I don't quite understand how scripts are executed.

import bpy
from math import radians

angle = -45
axis = 2 # z-axis
platform = bpy.data.objects["RenderPlatform"]
original_path = bpy.data.scenes[0].render.filepath

for i in range(0,8):

    # rotate the render platform and all children
    temp_rot = platform.rotation_euler
    temp_rot[axis] = temp_rot[axis] - radians(angle)
    platform.rotation_euler = temp_rot;

    # set the filename direction prefix
    bpy.data.scenes[0].render.filepath = original_path + str(i)

    # render animation for this direction
    bpy.ops.render.render(animation=True)

bpy.data.scenes[0].render.filepath = original_path

Blender freezes because it's running the script and rendering out the frames. If you look at the System Console (Window -> Toggle System Console) while it runs, you will see the frame numbers and the filepath listed as each frame is rendered.

The amount of frames rendered depends on your Frame Range. By default this is set to 250 frames. Since the script renders out frames 8 times, this would be a total of 2000 frames. Blender will be frozen while this runs, which could take a few minutes depending on your scene and system specs.


In 2D animation, how to draw coloured shapes? Absolute beginner here. I would like to make a very simple 2D animation using Blender, but am stuck at the very basic level, I don't even manage to draw any shapes. I have searched the internet a lot for guides and video introductions, and found quite a lot of them, but none seem to show what you need to do to draw basics shapes and/or the tools that they use are not visible in the Blender user interface that comes up when you select a new "2D Animation". After a lot of searching and trying out, I now managed to draw a filled grey rectangle, by selecting "Grey" from what I think is called the "Active materials menu", and then using the "Box" tool to draw the rectangle. I have not been able to draw in other colours.

As an example, I have found the following answer, which says that you need to "create a new (fill) material", but I have not been able to find out how to do that: Blender 2.8: Grease Pencil Fill Brush Not Working

So I am looking for a way to do the following:

draw basic shapes like a rectangle, circle, etc, each with a different colour.

I found the answer shortly after posting the question for the second time. For everybody who is puzzled about this as well, follow this description

By default, 4 materials are visible in the material box at the top of the screen (the one that drops down when you click on "Materials"): Black outline, red outline, grey filled, and black dotted outline. To make it possible to fill a shape with another color you need to add a new material.

To add a new material, open the "Material Properties" window at the right side, by clicking on the little red ball icon:

After that, press on the '+' sign in the corner, and a grey bar appears in the list. Then press the 'New' button:

In the properties that then appear, change the default 'Material' name to anything you like, and enable the 'Fill' property. Then click on the 'Color', which is black by default, and a color selection dialog appears, with a black color wheel. The easiest then is to use the color selection 'thermometer' to sample the color you want. Or sample any other color at all, except black, and then select from the color wheel:

I have not found an easy way to do this.


Does HDR sky resolution change a lighting? I was wondering if I can use 2k/4k hdr skies instead of 8k but I want the best lighting and i don't know if the resolution changes anything so I decided to ask. thanks!.

Resolution of HDRi doesn't change strength of light too much.
Resolution have an influence on sharpness of shadows.
Probably not visible too much between 2K / 8K, but for lightning with 256px result visibly differs (see end of cube shadow). Small sharp point as light source (like sun) produce sharp shade, in small images it can be just a pixel, but usually is divided into several and also small image means bigger pixels in environment.
You can test it by your self if it matters in your case. Render them and if not noticable you can even try blend renders by Difference type to see per pixel differences.
Surprisingly for me it affects noise in render too.
Probably texture shoots light per pixel, so more pixels - more light rays ...? Anyway you would have to render with more samples fór lowres HDRi, than with highres HDRi, to get same quality.
In those two images I changed only HDRi texture resolution ... same samples.
256 px

8 K

Bigger issue can be a reflection.
... in case you have any visible in render.
256px / 8K

In case you need lowres environment HDRi texture for it's size, people use jpg version of HDRi in highres for just reflections. World node tree - Light path > Reflection Rays as factor.

I can't find the specific article of Greg Zaal, but you can check those as well Link1 or Link2.


How To Reset Curve Profile with Script how can i remove all points or reset curve to default ? (use code)

You can use the following. All is commented below:
import bpy

obj = bpy.context.object

# Get the modifier
bevel = obj.modifiers["Bevel"]

# Get custom points
points = bevel.custom_profile.points

# Keep only 2
while len(points) > 2:
    points.remove(points[1]) #Can't remove at 0 (don't know why)

# Reset locations
points[0].location = (1,0)
points[1].location = (0,1)

# Update the profile
bevel.custom_profile.update()

Note: the window won't update until you move the cursor over it.


Can a lower subdivision be used when navigating the viewport? In zbrush when you rotate/pan/zoom a hi-poly sculpt in the viewport it seems to swap in a lower subdivision giving the impression of faster drawing. Does Blender have any such feature?

Yes, in the options panel of sculpt mode, you have this : fast navigate


Make White Transparent shader that is not transparent? How can I make a slightly transparent white Transparent material in cycles, when making the Transparent shader white makes it completely transparent and invisible?

Mixing with another shader:

Using this node setup, the Mix factor is now your transparency slider, and the diffuse color is the color of the material. (in this case, white)

Note that using a diffuse shader as the other shader shades the material slightly. If you want a solid color, you can use an Emission shader but only when seen directly from the camera.

To do this, you can mix it with a transparent shader with the IsCameraRay output in the Light Path node (Add node > Input > Light path node) as the mix factor.

Seen here with a .3 mix factor:


Blender randomly loses environment texture I frequently run into a very annoying problem when rendering scenes with cycles where I use an environment texture.
Upon rendering the animation, Blender sometimes looses the environment texture, displays it as pink and renders the whole frame unusable. The render then stops, I have to manually save, close, restart the program and continue rendering. It happens about 3-4 times in 300 frames during a 6 hour rendertime.
It happens on both CPU and GPU renderers and happens on different computers, even different users (a friend of mine has the same problem). The problem occurs in Blender 2.76 and 2.77.

The GPU renderer outputs this error message: cuda error at cumoduleload: file not found
I tried relocating the texture to a SSD, a different HDD, the projects directory, nothing helps.

Any ideas? Thanks for the help :)

I run into this issue all the time, mostly when using scenes that have DDS files as textures.  No idea what the issue is, but I use a workaround to avoid it.

If you run it from the command line with a limited number of frames per run, you can do the whole run without worrying about getting the pink textures.  For example, the following series of commands will render frames 640 through 669, in 3 batches of 10 frames each.  By using the #### format in the render output, it will automatically put the frame number into the filename.  That way you can get a nice image sequences without running into the texture issue.

blender --background intro_scene.blend --engine CYCLES --render-output //tmp/HM-####.png  -s 640 -e 649 -a
blender --background intro_scene.blend --engine CYCLES --render-output //tmp/HM-####.png  -s 650 -e 659 -a
blender --background intro_scene.blend --engine CYCLES --render-output //tmp/HM-####.png  -s 660 -e 669 -a

No idea why it does this in the first place.  It's really frustrating.  Here's the full error for anyone who wants to dig into it a bit more:

Failed loading CUDA kernel C:\Program Files\Blender Foundation\Blender\2.79\scripts\addons\cycles\lib/filter_sm_52.cubin.
Error: CUDA error at cuModuleLoad: File not found


Create threaded drill bit from cone I'm trying to create something like this.

This is what I've gotten so far. It's not what I want it to be.

How can I create the shape like in picture 1?

I'll show you how to model it as a one mesh with a clean topology.

Start with enabling the Extra Objects add on. Then add a Spiral (Add-->Curve-->Spirals). Play with its settings in a Tool Shelf (T).

Convert your curve to the mesh (press Alt+C-->Mesh from Curve). Fill the gaps with the F key (enable F2 add on).

Add the edge loop (Ctrl+R) as pictured below.

Use knife (K) to cut away the very top of the cone. Make the topology as pitured below.

Add a loopcut between the other two. Snap the cursor to selection (Shift+S-->Cursor to Selected), and scale it evenly with Alt+S.

You may now finish modeling and add the edge creases (Shift+R) or create a topology like the one pictured below to make the edge loops  for creasing work.

Add final two edge loops to crease the blade even more. Enable Subsurf Modifier and smooth the faces. You may also cut the bottom of the drill with the knife to make its base flat.


How to model this particular screw? I cannot model this simple thing. This is the closest I could get:

I tried the screw modifier with simple deform to taper the worm, but it didn't work. I ended up using a lattice modifier, but it still doesn't work.

I don't know if you could do it properly with the Screw modifier, anyway, when you are in Edit mode, there's a Screw tool available on the T menu that works perfectly:

Draw your profile, keep in mind that the origin point will be the centre of the rotation and that the angle between the top and the bottom vertices will determine the slope of the screw. Stay in an orthogonal view so that Blender knows how it has to rotate, then click on Screw and play with the parameters on the bottom of the N menu.

In 2.8 it looks like you need to find the tool by the search menu (F3), and the parameters are in the Operator box (bottom left of your 3D view).


How to Extrude so That Extruded Face Isn't Parallel I just had a quick quick question.  So in the image, you can see that when I extrude from an edge loop, the extruded edge that comes out of it is always parallel to the original edge loop that I extruded from.  How do I extrude so that the angle of the extruded edge loop isn't parallel to the original ie) it follows the door.  I know there is a way of doing this without creating curves and beveling.  Any thoughts?

I am a newly-converted fan of the Offset Edges plugin.  It does exactly what you're describing (I think, based on your description).

https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Modeling/offset_edges

Edit: it does this type of thing:


Creating the effect of a Flip Flop gate using Logic Bricks A Flip Flop gate, upon receiving a positive signal, will toggle between a true output and a false output. How can I achieve this effect using logic bricks?
I want to be able to change perspectives with one key binding from first person to third person in the Blender Game Engine.

From the way you wrote your question, it sounds like you want to toggle between camera views. You can use a Boolean property, and have a keypress toggle that property to true or false. Then, if that property is true, the First Person camera will be activated, and if that property is false, the Third Person Camera will be activated.

This logic setup is one of the simplest you can use to toggle between two camera views:

Of course, you could use an integer property and a few more sensors and controllers to cycle through several camera views, instead of using a Boolean property (which can only be true or false) for the two camera views.