UV unwrapping a hollow cylinder sequentially I have a "simple" problem. I want to create a hollow cylinder and UV unwrap it so i can texture it later. All i want is that the 200 quads (10 here for example) be uv unwrapped sequentually so when i apply an image as texture it comes out as the image itself on teh cylinder. However, using any kind of UV unwrapping (angle, conformal, smart, cube etc) is sort of randomly assigning the edges onto the UV map. For example the connected 2nd face to first face might be after 3 faces in the UV map. Here i tried the smart UV unwrapping and as u can see it resizes the different faces, makes some horizontal, some vertical.. this would be fine if the ylinder had 10 faces but when it will have 200 faces for smoothness, i cannot manually check how the faces are being UV mapped "randomly".  Last time i managed ot do this using conformal but its not working anymore.

Did you try the cylindrical mapping option?

Select your cylinder and go to edit mode.
Select all faces.
Go to either front Numpad 1 or side view Numpad 3.
Go to orthographic view mode Numpad 5.
U --> Cylindrical projection.


Can I Replace Numpy with a Different Build? I want to use OpenCV in Blender (2.77a), but trying to build it under Windows is incredibly frustrating.  I downloaded a pre-built version from http://www.lfd.uci.edu/~gohlke/pythonlibs, but it's not compatible with the numpy that comes with Blender:

>>> import cv2
RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9

I found that I can get around that by using a different pre-built version of numpy, but

I'm not sure what side-effects that might cause (is numpy used for anything in Blender itself?).
I'm not sure of the best way to override Blender's numpy.  Right now, I'm inserting the path to the new numpy at the beginning of sys.path.

Is there a better way to handle this?  How can I find out what API version of numpy is in the latest Blender release?

I don't think it's used by Blender itself. Possibly certain add-ons do, though. You'll notice soon enough if something doesn't work any more ;-)
I think that's a pretty good way to go about it. It's not destructive, so you can always go back to the shipped numpy.


Choose active tool in Python Is it possible to choose active tool in Python?

You can use the wm.tool_set_by_id() operator.

Example for a button:

layout.operator("wm.tool_set_by_id").name = "builtin.select_box"

Example operator:

import bpy

def main(context):
    bpy.ops.wm.tool_set_by_id(name = "builtin.move")
    for ob in context.scene.objects:
        print(ob)

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        main(context)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()


Problem with Rig. Part of one finger does not move with the mesh I tried Recalculating the outside normals, Merge vertices by distance and weight paint but the middle finger does move correctly with the mesh. The top of the middle finger part of the mesh is the problem. The bottom part of the middle finger mesh seems fine. Any help is greatly appreciated. I have included a pic and my .blend file. Thanks in advance!

https://pasteall.org/blend/72a204c539cf42a6ad9ffc39ba8680b4 <---- .blend file.

If we press AltH in Edit mode we can see that you have a hidden bone, and if we check its Deform option we can see that it is activated, while I guess it should not because you probably don't want it to weigh on the fingers, so deactivate this option and it should work fine. Also, disable the Deform option for all the bones that are not supposed to weigh on the mesh, and maybe even reparent.


need help with armature and weight painting I recently tried to play around making human, but i couldn't figure out the good weight ratio for hip and thigh. it ends up like this

my weight paint is like this

here's the blend file

Thank you in advance

Hard to understand your first picture, but your hip has too much influence on the thigh vertices, so simply select your armature, select your mesh, switch to Weight Paint mode, select the hip bone and use the brush in Blend > Substract mode to remove this influence. You'll have to bring some other corrections on some other parts of the mesh.


Point density and transparent background Is there a way to get point density and a transparency film to work.
Point density works when in normal film but when I turn transparency on, it is nowhere to be seen.

If point density is visible in RGB (set the viewer channel to "Color" only) it means that pixels in transparent areas should emit light, despite they don't occlude the background.

That's perfectly fine for an associated alpha image, and it means it can be conmposited straight away with an alpha over operation in the compositor.

Just go to the compositor and use an alpha over node to composite your plate over a solid background (black or gray should work) and check the result.

If that worked it means your plate is perfectly fine for compositing, although the viewer won't show the emissions in transparent pixels.

This is caused by a longstanding bug (sadly still present in 2.8) that makes the viewer pre-multiply images (that are already associated, resulting in a double up), making transparent emissions disappear.
They are there, but the broken viewer doesn't show them.


How to get rid of this jagged edges in obstacle and fluid interaction? This happened to me some times in the past. When a fluid interacts with an obstacle, it might appear some jagged pattern in the sides of fluid stream. As seen in the image below, increasing the fluid resolution doesn't fix the problem.

500 & 750 fluid resolution.

What is causing this behavior?

My setup is pretty default and I think this is a common issue. Anyway here is some data:

Domain:

The fluid uses the "Honey" preset.
Surface Smoothing is set to 0.5
Remove Air Bubbles is disabled.
Everythig else is Default.

Obstacle:

The Obstacle object is set to Shell.
Slip Type is Partial Slip with 0.2 Amount.

I found a solution for my instance it appears to have been the export mesh option on the obstruction.

It was causing all those jagged edges and simply disabled that and choose partial slip and turned off subsurface on the domain.

I too am waiting for flips released next month but they want 76$ usd :(
Look up on Facebook flips fluid addon


what are the requirements for mesh transformation using armatures I have a simple mesh, fully triangulated, closed surface, parented to an armature with "Bind to: Vertex Groups" selected. There are two bones, and a vertex group named like the child bone, which contains a couple of vertexes.
The weight paint looks fine (surfaces around grouped vertexes are red, rest is blue). Seems fine to me.

However, the mesh doesn't move if the child bone is rotated in Pose Mode.

Am I missing any of the requirements? Given how often questions like this pop up, I think a comprehensive list of conditions that need to be fulfilled for skinning would be very useful. I'm not even sure if triangulation and a closed surface are required in recent versions.

I uploaded my file here: https://drive.google.com/file/d/0B3uTFOmcBwRQajBzdkY4QUpUejA/view?usp=sharing

Edit: Recreating the armature fixed it. Is there anything special about the first bone that is created? I'm still not understanding what is going on.

Requirements for a pose mode transformation of a bone to affect a mesh object:

Mesh must have an Armature Modifier with the armature set.
Mesh must have a weight group with the same name as the bone.

Since we usually also want the object to move, if we move the armature object as a whole, it is advisable to parent the mesh object to the armature object.

It is possible to setup a bone, which doesn't deform the mesh regardless of weight groups. This is done with the Deform option. It is enabled by default, you must have disabled it by accident.


How can i make the track to constraint track on x axis using location transformation instead of rotation? When i move my bone that i assigned to the eyes of my character using track to constraint they will track up and down but only will track side to side when i rotate the bone. is there any way to make them both transformation in location?

You would almost certainly prefer a damped track.  Here's an example:


Is it possible to make this look more magical and see through? I'd like this purple shadow-thing to look more magical. I created an image in photoshop and added it to a plane as a texture, but it doesn't look quite like I want it to. Is it possible to achieve this look in blender?

You can do this by running your image through an Emission shader and then mixing That with a Transparent shader, using the image alpha as a mix factor. Then, make sure to enable "bloom" to make it glow.


With multiple objects selected, how can I tell which keyframes in the timeline relate to which object? If I have everything selected and can see all my keyframes in timeline, how do I easily identify which keyframe relates to which 3D object?

I often have a "what the heck does that keyframe do to what object?" moment once I've got a good few on the timeline.

As you have noticed, the timeline is good for

scrubbing,
playback settings and options and
manipulating the keyframes of a single or very few objects.

You need to switch to another animation editor type: the dopesheet or the graph editor.

  The Dope Sheet gives the animator a birds-eye-view of the keyframes inside the scene.

The dopesheet can show

the object's name (1),
the object's action (2) (if you have set keyframes you will have exactly one action)
the keyframe groups name (3) (keyframes for the same object are groups)
the names of the individual animation curves (fcurves) (4)

You can also toggle the Only Selected option (5), which will only show the keyframes for the selected objects.

The dopesheet provides you with a good overview for your keyframes. It is not only possible to manipulate the time property of keyframes (on which frame they are set) but also their values.

Click to enlarge.

If you wish to view the keyframes as individual curves or have finer control over their handles, you can switch to the graph editor.


Display color of particles I am trying out Particles systems within Blender 2.79. When I have an object emitting particles I can easily see them but when adding a second force and playing with the scene the particles are black on my screen on a dark gray background making it hard to see. I am not looking to render the particles a different color but be able to display them on the screen a different color than black, any help even a link to someone else answering this question would be great.

You may want to look into the display options in your particle system. This can help diagnose issues as well as get a better idea of the behavior of your emitter.

Here is an example of color by velocity.


Blender Camera Tracking ground plane - unable to adjust shadow darkness Hello fellow Blender users, I am having a slight issue with my shadow catcher ground plane when I am doing a Camera Tracking and recomposing my 3D data with the Camera Footage.

The ground plane (shadow catcher) shadow is already very light while I preview the render in the viewport. But when I export the render and assemble the video it is even lighter! Almost non existent.

When I look at the rendering process, the shadow is rendered dark enough but as soon as its composited with the camera footage it almost completely disappears.

Just to cover the basics first, check the ground plane material; the material settings will affect the shadow's visibility.  Also, if the world is emitting light, that can dim the shadow. Color space can affect it; sometimes filmic will dim it even further in the compositor.

If not, the issue is likely from the render layer's alpha channel.  You can change the alpha's strength with a color ramp or multiply node.  Feed that ramp with the render into a 'Set Alpha' node, which you can then feed into the alpha over node.


Moving objects away from 3D cursor equally like scale, without actually scaling Basically I want to move all selected objects away from the 3D cursor equally, the same way they would move if I scaled them, except i want them to not actually change size at all.

Turn on Center Only option in the 3D View header button with three dots.

For 2.8+ this toggle can be found inside the Pivot Point popover at the top of the 3D View header.


Determining the indices of a mesh My question is: How to show the number of indices so that I can add a fixed constraint to certain indices at physical simulation.

It works for a simple cube, but not for this mesh

To activate the indices at blender 2.79, you type in the python console the following command

bpy.app.debug = True

Switch to the 3D view and press N to access the Mesh display where the indices icon is activated

Finally, you would have the indices appear on the mesh

For who is interested in for more details: these indices would be used to located where the constraint are added to the volumetric mesh in physical simulation like SOFA physics engine simulator

This how it looks like, this would facilitate adding a constraint for a volumetric mesh in a physical simulation like SOFA framework.

this how it looks like in the XML code:

<FixedConstraint template="Vec3d" name="Fixed Dofs" indices="12 15 28 31" drawSize="0" />


RMB no longer selects in edit mode All of a sudden my right mouse button will no longer select in edit mode.  In order to select, I have to use the C or B selection mode.

If I happen to push the right mouse button after one or more vertices are selected, the selected vertices are deleted. In object mode everything works like normal.

I'm using 2.76b and Windows 10, this is a new problem, it was working fine. Perhaps I inadvertently set something?

Tried a different mouse, same issue, reinstalled Blender, same issue.

Thanks everyone.

Not really sure what happened there, did you change any settings under the key map editor? You may have run into some sort of bug.

Did you uninstall prior to reinstalling? If reinstalling Blender did not solve the problem, then you may need to clear your Blender user preferences.
Not sure how the installer works, or if it deletes/overwrites user preferences on setup, I always use the "portable" standalone versions, but apparently something must have been left over from previous installation.

Try one of the following:

Either go to your user profile folder, should be located under C:\Users\User Name\AppData\Roaming\Blender Foundation\Blender\2.##\config and delete whatever content is there. Make sure you back up any relevant files before deleting if you have customized any Blender preferences or settings. Then Run Blender again

or

Try and download one of the zipped Blender packages, unpack it anywhere in you system (say like the Desktop), then using the file explorer navigate to the extracted folder and under Blender\2.##\ create a new folder named "Config" so that it's path is Blender\2.##\Config and then try and run Blender from Blender\blender-app.exe


Add bevel to more complex objects I am creating a lego man and would like the legs beveled so that the edges are not too sharp. This works fine for simple objects like the body.

But the legs are made from a cylinder, which is chopped off at the bottom then its vertices are extruded to create the blocky part of the lower leg.

Is it possible to get a bevel on this type of object, or should I create the leg using a different technique to get smoother edges?

Here's a way you can do this.

With a little extra work and the same basic tools it can be refined further.


How to place a 3D model in the same posion in a photo for rendering? I have a real photo of a 3D object. And I also have the 3D object’s model. I want to place the 3D model in the same position and same size in the photo in Blender. The photo I have set it as Blender camera’s background. I have used the software fspy to match the camera angle to the photo with this method https://www.youtube.com/watch?v=CAN_Bjufzo0. My task is to create thousands of rendered images as similar as possible to the real photos. Their angels in the photos are different. So I want to find the fastest way to do it.

Here is the real photo.

And I have the background image from the same view of the real photo above.

This is the 3D model:

This is what I got so far.

But obviously, the model’s position in the rendered image is not the same as the real photo one.

In addition, I know the size of the real 3D models. Thanks.

This video mentions a software that will probably help you with aligning things up with the scene background, he starts mentioning it at about 1:38. Also, are you using hdri images and putting them as the world background?

youtube.com/watch?v=nb6rSMAooDs

Hope this helps!


What do new bpy class naming conventions in Blender 2.80 actually mean? What are the new class naming conventions in Blender's 2.80 Python API for add-ons?

It says here:

  This constraint applies to the bl_idname of each class (or the class
  name which uses it if no bl_idname is defined in the class).

  These are: UPPER_CASE_{SEPARATOR}_mixed_case, in the case of a menu
  the regular expression is:

[A-Z][A-Z0-9_]*_MT_[A-Za-z0-9_]+

  The separator for each class is listed below:

  Header -> _HT_
  Menu -> _MT_
  Operator -> _OT_
  Panel -> _PT_
  UIList -> _UL_

  Valid Examples:

  OBJECT_OT_fancy_tool
  SOME_HEADER_HT_my_header
  PANEL123_PT_myPanel (lower case is preferred but mixed case is supported).

  At the time of writing this, names that don't conform to this
  convention will produce a warning on startup. Eventually we will make
  this into an error, eg:

Warning: 'Oscurart Files Tools' doesn't contain '_PT_' with prefix & suffix
Warning: 'Oscurart Overrides' doesn't contain '_PT_' with prefix & suffix
Warning: 'Oscurart Animation Tools' doesn't contain '_PT_' with prefix & suffix

So this might mean that the bl_idname should actually be something like:

"object.MY_ADDON_OT_some_object_operator"

It still requires a '.' to be there so object.OBJECT_OT_something_something does not seem to make much sense to me. Does this actually apply to bl_idname? Could someone explain in more detail the idea behind this and how these conventions should be followed in practice?

It seems bl_idname of operators is an exception to this new convention

Looking through Python scripts that come with Blender 2.80 I can see that the convention is followed in bl_idname and class name as described with:

headers( _HT_ )
menus( _MT_ )
panels ( _PT_ )
UI lists ( _UL_ )

but not with operators since that is not possible. Operators sometimes follow this convention in their class names, but never in bl_idname, where they follow the usual categorization with the dot, like bl_idname = "object.randomize_transform".

That was the confusing part to me since OBJECT_OT_fancy_tool was given as an example without clarification and it would definitely not work as a bl_idname for an operator.


how can I stop freestyle from drawing in mist? I have a plane for the ground, but leaving a sharp edge between it and the camera looks odd. so I tried to use mist to help blur the edges and make it look somewhat natural(since I can't just make it huge, blender insists on clipping at a certain size)
however, I also want freestyle on some objects. when rendering, it draws lines even on things that shouldn't be visible, like things in dense fog. is there a way to constrain the effect to specific meshes or exclude it from others?

You can avoid freestyle rendering in mist by setting a "distance from camera" modifier.

Goto "Render Layers"
Scroll down to "Freestyle Line Style" Panel
Click "Alpha"
Click "Add Modifier" and then select "Distance From Camera"
Select "Mix" for the blend type
Select "Curve" for mapping type
Add a point in the center of the curve ui
set the right most point x pos to 0.3 and y pos to 0.0
set the center point x pos to 0.25 and y pos to 0.5
set the left most point x pos to 0.0 and y pos to 1.0

EDIT:

set the Range Max to the depth of your mist.

PROTIP: Gain more control over falloff by adding points to your curve. Adjust shape until the "Distance From Camera" modifier falloff matches your mist.


Create a circle from a plane So new to blender if this is super easy my bad.

I have created a plane with lots of small holes in it to replicate the mesh on the front of a speaker by subdividing a plane and using the Wireframe and Subdivision Modifiers. Creating this

 I want a circle shape not a square though how can I get the above image to be on a flat circle rather than a flat square to be like this but with my first pictures design not the hex pattern

I hope this edit cleared it up a bit

I used a hexagonal torus with two array modifiers to create the mesh then I just used the Boolean modifier to cut it out.  It's dirty but quick and easy:

Use Circle Select to select the extremities and proportional editing to slope the curve downward:

Finally, I added a "rubber" grommet around the edge:


I need help to smooth a part with a bevel It's my first time using Blender and I'm not that good, however I'm doing pretty well. I make FNAF meshes and I made a bevel on this part, and when I try to smooth the surface it makes these weird markings you see in the image

I try my hardest to try to fix this and nothing is working. Now you may ask why  I want to smooth this part, and that is I am exporting this Blender project, and in the the program I'm gonna import it in, there is a limit of polygons, so I obviously need to smooth this one part.

You have some duplicated loops overlapping other ones.

Select them using Select Edge Loops and dissolve them.

Image below:


New to Blender. My simple scene has really long render times I am a Max user and I have been trying to learn blender for the last couple of weeks. I created a simple animation: a rotating sphere with a rock generator applied to it, a few lights and that's it. I got a reasonably powerful computer (threadripper 1950x 16 cores/32 threads). I get a lot of noise in the render and if I tried getting rid of it increasing the samples I get crazy render times. It takes about 8 minutes per frame with 1500 samples (the animation is 1000 frames long) and the render is still really noisy. If I increase the samples the render time goes way way up. A scene like mine would take barely a minute or two in max and vray. I am obviously doing something wrong. Could anybody help me out a bit? Thank you!

I would recommend the following changes:

Remove the second render layer, because it doesn't contribute anything to the compositing result and doubles the render time.
Use Branched Path Tracing with high samples for the diffuse sub samples and mesh lights and low samples for everything else. This reduces the noise significantly.

If you would be switching to the most recent version of Blender you could also use Open Image Denoise, which can reduce the required samples significantly.


texture sky doesnt work in blender 2.8 (Eevee render) when i want make sky and sun i just use sky texture but with new render everything convert white, like this.

so can i fix it? or can i do another way to make sky and sun(with new render)
and sorry if i not speak English very well.

I just checked and it is not supported in EEVEE (yet?) according to the official documentation. https://docs.blender.org/manual/en/dev/render/eevee/materials/nodes_support.html


Strange rigging problem I am modelling a gun, and used an armature to manipulate the bullet chain with an IK target at the very end. I used this to manipulate the chain into the desired position, but for some reason a single vertice has shot off into the distance or something. When i go into edit mode the chain returns to it's natural mesh position, so I can't find out which one is doing this. I've tried using weight paint but I don't think that's working.

Here's a rendered version,

One in solid,

One in weight paint

and a closeup on the problem area

I wasn't sure what to actually search online to find a solution, so I came here.

Nevermind - After doing a bit of weight painting on the root of the "spike", it went back to normal.


Mesh "expands" in object mode? As you can see in the above image, my mesh in edit mode, or at least certain parts of it, exist in the size intended for everything to be. But it sort of starts to "expand" and clips through other parts of the mesh in object mode.

Why is this, and how do I fix it?

edit: here is the modifier tab

Things changing when entering/exiting edit mode are usually due to modifiers. Try disabling them to see if any is affecting your mesh on object mode.

As you have an armature modifier on the stack, I'd guess that some bone is scaled differently from (1,1,1), and that scales its assigned vertices.


Configuring .blend file for remote machine GPU rendering I would like to render an animation on a remote compute cluster with several GPUs. The machine I configure the .blend file on is a laptop on which I cannot enable the User Settings>System GPU compute device setting

It does seem as if I can select GPU render in the render properties:

on my laptop. But unfortunately this doesn't seem to have any effect on the remote cluster: Rendering doesn't use the GPU (I checked with nvidia-smi) but uses all available CPU threads. I figured the GPU compute option is greyed out since the laptop I set the scene up with doesn't have a supported GPU to run on. But the machine I render on does.

Unfortunately there is also no way for me to start a graphical session on the remote cluster (blender in GUI mode) so I could change the User settings or confirm the render settings before I render.

I understand that I cannot set GPU rendering from the command line but is there maybe some other way I can setup a .blend file on a machine without GPU to render on the GPU when it is executed? For example: is there a way to start the render with a python script that forces the GPU option before starting the render process?

Thanks a lot for any hints on this!

As far as I understood, you manually put your .blend file on the server without using any third-party software. This answer so may help you:

How do I force the netrender to render everything on GPU?

This consists of running blender from the command line while also passing him a python script to set the GPU device (code from the link above):

blender -b file.blend -E CYCLES -t 0 -o //file -P script.py

This way you CAN set GPU rendering from the command line using, in the python script, bpy.context.scene.cycles.device = 'GPU'.


How can I switch between Move/Rotate/Scale with shortcuts without straight altering coordinates? I'm coming from Cinema4D and there when you hit the shortcuts, you just change the "gizmo" and that's it. Then you can for example slide your object along an axis. But when I hit the shortcut in Blender, I'm straight modifying position in all axises. I almost never want to do that and this is confusing.

I'm using Blender 2.80 Beta

Hope you understand what I mean.

Blender lets you exclude one axis from transform actions.
Type the letter, X or Y or SZ to constrain after pressing the transform hotkey G, R, or S that you wish.
Or, type Shift + (letter corresponding to axis to exclude), G followed by X would move along the X-axis. G followed by Shift + X  would move along the Y and Z-axis.


How can I hide part of a mesh in edit mode and let it hidden in object mode? There is a way to hide a part of my mesh A in edit mode and let it (the part of mesh A) hidden in object mode while i'm working with another mesh B??

I'm doing low poly and the fingers are too close. I can't work and i would like to understand if it's possible to hide each finger of high poly, in order to create my low poly easily.

To hide vertices of one object both in Object and Edit modes and to be able to hide / unhide other ones while working I think you shold use Mask modifier.

From manual:

  The Mask modifier allows vertices of an object to be hidden dynamically based on vertex groups.

Create a vertex group, assign desired vertices to it, and choose it in modifier's options. You can add multiple modifiers to the mesh to dynamically manage hidden parts.
Don't apply the modifier as the hidden geometry won't be unhidden after that.

Note that to see effect of modifier in Edit mode you have to turn on Adjust edit cage to modifier's result button in the modifier's panel.

If you have different objects located one near another you can use Local View:

  Local view isolates the selected object or objects, so that they are the only ones visible in the viewport. This is useful for working on objects that are obscured by other ones, or have heavy geometry.

To enter / exit Local View press Numpad Slash. Note that when in Local View other objects won't be seen / selectable.

Combined with Mask modifier, this approach may speed up modeling objects placed next to each other.


Can't jump while using View Navigation Walk I'm using View Navigation Walk and the jump functionality is strange. I press spacebar but instead of jumping I go flying to whatever surface is straight ahead of me. It's more like a "hookshot" or "grapple gun" maneuver than a jump. Actually, I think this is the Teleport feature. But if that's the case, what key is "jump" mapped to?

When I search for "jump" in the Keymap section of Preferences nothing relevant turns up.

In Preferences, search shortcuts by name and look in 3D View > 3D View (Global) > (scroll way down) View3D Walk Modal

It's odd that it doesn't appear in search results when typing "walk" or "jump".
The default jump key is V, but can of course be reassigned.
It may also be worth mentioning that once in the Walk Modal, Tab toggles gravity, Esc resets the camera to its original position, and Enter commits the new camera position.


How can I orbit precisely in the 3D viewport? I can orbit in the 3D viewport by using the middle mouse button. I can also orbit in fixed increments using 2, 4, 6, 8 on the number pad. But how can I orbit more precisely? For example, I may want to orbit exactly 54.5 degrees on a particular axis.

The simplest way I found to do this is to first snap your 3D cursor to the center of the object you want to pivot around, then change your Transform Pivot Point to 3D Cursor. Next, select the object you want your view centered on, and press Numpad . to center your view upon that object, then press Ctrl + Alt + Numpad 0 to center the active camera on your current view. Next, turn on Increment Snapping and open the settings for it. Under the Affect section, Make sure Rotate is the only option activated. Now make sure the active camera is currently selected, and press r, z, and then move the mouse. The view will snap at 5 degree increments. I don't know how to do this any other way, nor how to change the increments of the snapping.


help with a gold sparkling shader I need some help with a shader I'm trying to make. I made renderings of darts (don't ask me why) and I'm trying to find a way to make a shader to look like the grip of this dart:

I tried a way of adding noise and the such (like making it look like glitter), but the speckles are fairly small, and it doesn't even remotely look like this.

I'm using cycles render, any idea on how to do this? Keep in mind I'm not super experienced, so if the solution is a fairly complex one, some screenshots or a step by step would be helpful.

To help you, understand the grip is supposed to have small diamonds in it, thats why it is so sparkly.

thank you for any help you provide!

I would go with a more PBR based set up, but since you mentioned you are fairly new to Blender I don't want to get to involved with the node set up.

A simple node set up could look like this. (It's not exactly right but maybe it is close enough for you. If I have more time I will try to do a more advanced shader)

To get those sparkles to really shine you may need to do some post processing. Although they show up a little better when you move the camera around.

I am just mixing between glossy shaders with a noise texture in the displacement to get that grainy texture.

Try messing the with value of the multiply node to get the shine that you want.

Also maybe darken the tan glossy shader some more, so the white sparkles pop better.

W/O displacement:


Save animation clips and play them for a time I know that my title doesnt explains very well my problem.

I would like to know if there is a way to do some animations in different clips and then in a general animation say, play that clip (that is loop) for x frames, and if it finishes it starts again.

For example, a character. You make an animation of it walking that is 20 frames, and you want to play it 40, another 20 of other action and another 60 of it walking.
There is a way of doing that properly?

Thx

Go to the NLA Editor, with your object or armature selected.  You will find your object listed along with its animation on the left.  Click the double arrow button, and the animation is converted into a strip on the timeline shown in the NLA editor.  Now you can duplicate the strip to continue the animation in any part of the timeline!


How can i select an Edge loop when using a graphic tablet? As the title says, Im using a graphic tablet with blender. Just wanted to try and use blender with it, but now I have a problem.

I have to check "emulate 3 button mouse" in User Preferences, so I can zoom, rotate and pan the view with the pencil using Alt, Alt+Ctrl and Alt+Shift.
The problem is that Edge loop shortcut is Alt + Left click, and that is the way I can rotate the view in the 3D view, so when I press Alt and the pencil, it rotates the view instead of selecting any edge loop.

I can select loops in the 3D view menu, Select > Edge loop but it´s really annoying to do that each time I need it, so a shortcut would be really better.

Do I have to create a new shortcut to Select Edge Loop? If so, what do you recommend? What should I do?
Thanks! :)

Do I have to create a new shortcut to Select Edge Loop? If so, what do you recommend? What should I do?

Changing the shortcut is one possibility.

Another way is to map a middle-click to your stylus button (I use 2 button stylus with lower one set to middle and the other one to right click). This way the viewport navigation works with default shorcuts so there is no need to change other ones. Also left click (stylus tip) select works the best with a tablet (imho) - I did not encounter this non-default option colliding with any other shortcut or UI functionality.


Show texture in UV Editor Most probably there's a simple answer to this, but I've been trying to find it for quite some time, I'm learning UV in blender, I added a procedural marble texture to a material, unwrapped the object "cube", I'm trying to show the texture in the UV Editor so I can position the faces in the right place, I found the way to do it for an image, but not for a procedural texture.

Image textures and procedural textures are not the same. If you want to view a procedural texture as an image, you would need to create a new image in the UV editor, and Bake your procedural texture to that image.

You'll get different results depending on settings. So, play around a bit.

First, set up your texture. I am just using 'Marble' at default settings. Set 'Mapping' to use UV.

Next, in the UV editor, create a new image to store the texture data.

Then, under 'Render' in the 'Bake' tab, select 'Textures'.

Hit 'Bake'.

Once you bake the texture to an image, F3 to save the image to disk. Then you can change your Texture type to use an image, select the image you just made.

Now, edits made to the image will affect your texture.

Different Texture types are handled differently in the background. So, procedural textures have a separate toolset from image textures, and video textures.

The UV/Image editor is for dealing with image and video textures. But, when your using procedural textures, the tools are all in the Panel for which ever procedural type you picked.


Fluid simulation wont happen in a small pipe? Fluid simulation won't happen in my model pipe. I Got a project from my client in which fuel must pass through a pipe. so I tried to do the simulation but the simulation won't happen. I tried scaling the inflow and domain. Why is this happening?

Most likely your pipe/inflow is too narrow/small for your simulation resolution - it must be at least comparable to the size of the “cells” of your simulation.

You can determine the size of the “cells” by taking the longest dimension of your fluid domain and dividing it by the fluid domain’s Resolution - your pipe should typically be at least three times the size of the cells, otherwise the flow of fluid can be blocked - especially on diagonal sections and curves; much higher resolution is preferable.

However, the overhead of the simulation will increase significantly with higher resolution, with an increase relative to the cube of the increase in resolution - so doubling the resolution will allow for pipes that are half as narrow but will take 8 times (ie, 2x2x2) the overhead (memory and CPU comutation time) to compute.


Insert keyframe for rigid body properties for object python script blender I have a bunch of objects falling onto a plane, and want to have them fall at different frames (i.e, Object1 falls at frame 1, Object2 falls at frame 100, etc)

Could anyone help me with trying to set a keyframe for the activation using the python script console?

I can do this by manually setting keyframes for the "Dynamic" checkbox in the Rigid Body dropdown, however I would like to automate this.

here is my code so far:

bpy.ops.import_mesh.stl(filepath="C://Users/deden/Desktop/x0y0z0h1.stl")
bpy.ops.rigidbody.object_add(type="ACTIVE")

I would imagine the keyframe command would look something like this:

bpy.context.active_object.keyframe_insert(data_path="rigidbody",frame=100)

But I cannot get it to work and haven't found any specific examples.

Alternatively, if anyone could show me how to add these different objects at different frames that would achieve the same result. For this approach I've tried code like:

bpy.context.scene.frame_set(frame=100)
bpy.ops.import_mesh.stl(filepath="C://Users/deden/Desktop/x0y0z0h1.stl")
bpy.ops.rigidbody.object_add(type="ACTIVE")

but when I play the animation all the objects are in place at the beginning of the animation as opposed to the frame I set it to before importing?

Please help!! End goal = objects falling at different times, whether its setting the rigid body properties with keyframes or importing the objects at different frames with rigid body activated

Thanks!

You have to use the correct datapath.

bpy.context.active_object.keyframe_insert(data_path="rigid_body.kinematic",frame=100)

Select the object, make it active.
Enable the animated (rigidbody.kinematic) property and keyframe it.
Disable the animated property on the frame you want to have the object start simulating and keyframe it.

This script assumes there is an object called Cube in the active scene.

import bpy

obj = bpy.data.objects['Cube']

start_frame = 100

# make the object the active object
bpy.context.scene.objects.active = obj
obj.select = True
bpy.ops.rigidbody.object_add()

obj.rigid_body.kinematic = True
obj.keyframe_insert(data_path="rigid_body.kinematic",frame=start_frame)
obj.rigid_body.kinematic = False
obj.keyframe_insert(data_path="rigid_body.kinematic",frame=start_frame+1)

Look at the python tooltips.


Menus are not visible I am new to Blender and I just got ver 2.80 on redhat 7.1

When I open Blender I see the outline of menus but I am not seeing any text. the box is completely transparent.  Even why I close Blender there is a message box outline but nothing inside it.  any ideas on what I need to do to fix this?

Make sure your hardware meets the minimum requirements for running Blender 2.80. The section about GPU requirements is particularly important.

  Supported Graphics Cards

  These requirements are for basic Blender operation, rendering using
  the GPU requires slightly different requirements. Always make sure to
  install the latest drivers from the graphics card manufacturer
  website.

  NVIDIA: GeForce 200 and newer, Quadro Tesla architecture and newer, with NVIDIA drivers (list of all GeForce and Quadro GPUs)
  AMD: GCN 1st gen and newer (list of all AMD GPUs)
  Intel: Haswell and newer (list of all Intel GPUs)
  macOS: version 10.12 or newer with supported hardware

If your hardware meets the minimum requirements, you're likely having issues with your graphics driver and it has to be updated.


Curve modifier on an already curved model? Hey there I have a brain neuron model which is already modeled in a curved shape.

then I create a Bezier Curve in the same shape and place the Origin to the start of the curve

and place the Origin at the same spot for the mesh I want to affect

but when I place a Curve Modifier on the mesh and choose the Bezier Curve it distorts the mesh like so...

but the weird thing is if I scale all the Bezier Curve points to 0 in the x-axis it fixes the mesh but then the curve isn't in the desired pose I want.

Can anyone help me with how I have a curved Bezier Curve affect a curved mesh?

Otherwise do I have to model the mesh in a straight line?

As soon as your curve is not flat, it will deform the shape! The curve will deform the shape as much as the curve is itself deformed compared to a flat curve.

So, "do I have to model the mesh in a straight line", I would say yes.

Note that you need to put the origin of the curve at its beginning and make sure that its normals go in the good direction.

Does it answer your question?


How to get thick lines around windows via UI settings? When I saw a video on the Blender YouTube channel, I was attracted to one theme.

The theme is that there is a dark gray line between each window.

What changes do I have to make in the Theme Editing to get the same results as the attached image?

I changed all the colors of the interface to blue, but I didn't get the same results as the themes in YouTube videos.

Hey there its a regular default theme But with user preferences>interface>line width  set to Thick.

its useful on tablets like the surface pro where the small hires screen makes panel manipulation somewhat tricky. Hope that helps, Happy Blending.


How to fix the weird surface in fluid object Hi Guys, this is my first time to make a fluid simulation. However, I got some problem. The surface looks so weird. I am trying to make an animation so I do not decide to use sculpt mode to fix it. Is it any other method to fix this problem

The issue is caused by insufficient domain voxel resolution. If you don't want to do high resolution such that these artifacts are not visible, you can:

smooth it with sculpting manually, but this is only viable for still images, this will be very time consuming for an animation.
design the fluid in such a way it will fully intersect with the inner surface of the glass. Then you can create a special mesh that represents the glasses inner volume and do a boolean intersection with the fluid. The problem is that a fluid simulation can lead to some non-manifold meshes (water droplets joined in single vertex where the voxels meet) and the boolean operation in Blender will fail for some frames. You can apply some smooth to the fluid with modifiers before the boolean one - this should further mitigate the problem of failing boolean, but it does not solve it completely. You can correct the failed frames manually, or use another software that has more robust boolean algorithms to do non-manifold booleans (CGAL, Houdini, ..).


opening Blender, empty white screen I installed Blender and once I run it this is all I get

I have a win 7 64 bits and I already have the latest drivers of my graphic card

For those of you who either have this problem, like I do, or will have the problem in the future, arklight posted a .dll to download. Once I moved that into the folder with my blender.exe it instantly fixed it.

  I have a nvidia geforce 9800 gtx/gtx+ also I made this thing I found in the link "Download opengl32.dll from ftp.blender.org/sergey/softwaregl and put it next to blender.exe. This will switch blender to fully software opengl" and now it seems i can open the program but it go slow... this means is a NVIDIA driver problem which means I need to wait for the next driver update to be fixed? – arklight Jun 12 '16 at 15:20


How do I make the supports for the roof of the car? Hey I am trying to make a Volvo V70 from 2001 but I find it hard to make the supports for the roof. I have no idea about how I'm going to do it. I've tried it before but it got all twisty and weird.

Here's the download for the .blend file.
https://drive.google.com/open?id=1rLPU7C6R5SLmdcSWtiSf0f1wvV_TTmtH

Edit mode, use circle-select C to highlight these corner vertices of the hood.

Turn on Proportional-editing with the little blue-dot icon at the bottom of your screen.  E Extract, then use G Grab, R Rotate, and S Scale down a little.

Use X Y and Z constraints where needed.

Repeat this a few times to extend your vertices in the right direction, and get the level of detail you're going for.  The more times you extrude, the more control-points you'll end up with.

It may be easier to bring down a secondary view-screen by dragging down on the \\ diagonal-slashes in the corner of your viewport.  Set one to front-view, and the other to side, with your numpad.

I'd also recommend naming your objects in the heirarchy-tree, so it's easier to tell what items are what.


Prioritizing modifiers between different objects I know I can prioritize modifiers in an object to decide which modifier will be computed before of another and viceversa, but can I prioritize modifiers between multiple objects?
For example, imagine we have two objects called A and B, they both have 2 modifiers, Am1; Am2; Bm1; Bm2. Can I prioritize them so that the computation order is the following: Am1 - Bm1 - Am2 - Bm2 ?
If not, can I at least prioritize one object on another, so that all the modifiers of an object are computed before of the other?

Not directly.

If a modifier (e.g. Am1) takes another object (B) as input, it will use the result of all modifiers applied to that object (i.e. it will depend on Bm1 and Bm2).

If you need a modifier on one object that only uses some of the modifiers on another (e.g B + Bm1) then you need to make a copy of that object with only the modifiers you need.

If you make the copy using Alt+D rather than Shift+D then both objects will share the same mesh, so any edits on one will update the other.


Having trouble with IK bones I'm new to Blender, and am trying to teach myself how to rig. I have a simple robot model with two arm bones and an IK bone on the hand to control the arm. The IK bone's Deform box is unchecked. I selected the "forearm" bone, then the IK bone, and selected "Inverse Kinematics." Under bone properties, I have specified that there are two bones in the chain. I think that this should make the entire arm should move (bending between the two bones, with the shoulder remaining fixed) but whenever I hold the IK bone, all I can do is rotate it alone. If I grab the upper arm, I can manipulate the entire arm, with the IK bone staying fixed (unless I pull in the other direction--the arm will come with me.) I must be doing something very simple wrong, but I can't figure out what it is.

The leg is an even bigger problem. I have two leg bones and a foot bone, with an IK bone coming off the heel. I select the foot bone first, then the IK bone, and select "inverse kinematics," which makes the two bones rotate a seemingly random amount.

I know you probably know the answer already since this was at May 15th.. But anyway.

The IK should not have any properties. The only ones should have properties with IK's would be the [Lower leg]/[calf] bones and the [lower arm]/[forearm] bones. There are many types of ways to use IK's but you only have them present for the forearm and calf bones. Make sure that they are not parented to the bone that is trying to use its IK. Also under the IK constraint, be sure to have an IK chain length of two. Sometimes you can add the shoulder bone or hips with a three chain but gives odd movements. Also arm IK's also work great with pole bones. Either elbows or knees. I suggest a blender IK rig tutorial.


Help modelling complex shape I am trying to recreate this  in blender, and do not know where to start. The main difficult part is the top curved object. I tried extruding some sides of a cylinder and then shrinking them down like this  but I couldn't get any further. I am relatively new to blender, so all feedback, tips and tricks would be greatly appreciated!

Thanks, Dan.

You should first draw its profile, here are 2 ways to do it (among many I guess):


How to move an object in to the corresponding mirrored coordinate (BGE)? Suppose I have character surrounded by a cubic room.
My goal is to move that character to the opposite position of the room every time the character reaches one of the walls, roof and floor both included.

Like in the classical game "Asteroids" but with the Z axis included.

It's already possible to print the position by using a game property (string) attached to this module:

def update(cont):
    own = cont.owner

    own["pos"] = str([round(v) for v in own.worldPosition])

But how do I create the interval able to move the character object to the desired position?

There is a .blend prototype hosted HERE.

Addendum 1): There is another prototype that can be found here:

LINK TO THE SECOND PROTOTYPE

For this second prototype if you press only the W key continuously, the character will move to the opposite side as intended. But, how does one achieve this integration?

Sounds like a job for the modulo operator.  The boundary size is hard coded here, so you can delete that boundary cube. Set the worldSize variable to the size you want the boundary to be:

def update(cont):
    own = cont.owner

    own["pos"] = str([round(v) for v in own.worldPosition])

    worldSize = 10

    own.worldPosition[0] = own.worldPosition[0] % worldSize
    own.worldPosition[1] = own.worldPosition[1] % worldSize

And a screenshot for context:


Mesh deform a curve with shape keys How do I deform a curve or a mesh using the mesh deform modifiers and key frames. Basically, I'm trying to bind the curve to the mesh when the mesh at its Basis key. I then turn up the influence on another key(on the mesh). The curve does not deform.

A curve is defined by a number of points and the connection between each point is then calculated. Any deform modifier on a curve can only move the points that define the curve, it cannot distort the curve in-between two curve points.

To get the benefits of a mesh deform modifier on a curve you need to be sure that the areas of the mesh that are deformed by shapekeys are surrounding a point in the curve.


How to draw and extrude this curved figure? I'm a new Blender's user and I cannot figuring out how to do that...
Does someone can explain me how to create/draw this figure and extrude it to get a smoothed edges 3D mesh? I'd like to create a marble pedestal.
Is there any tool similar to the Adobe Illustrator Pencil tool?

A way to do that:

Start with a plane (ShiftA then 'mesh' and 'plane'), enter edit mode (Tab), select all vertices A and delete X 'faces only'.

Still in edit mode, select the vertices, and hit W subdivide. Then in the operator panel, choose 2 cuts.

Now add a subsurface modifier. Set it to two subdivisions, for instance, and check 'adjust cage to modifier result' :

Select the four corners, then scale S :

(edit)
For the extrusion :

Select all, extrude Z EZ, the add a loop cut CtrlR and adjust it to the top.

Select the top vertices again, then scale them down a bit.

(edit, again)
If you need to close the shape :

Simply add the needed quads, and eventually add another loop cut to make the vert/horz transition more sharp:


bezier curve with bevel object: nice corner A bezier curve with a bevel object and a bend with a free vertex.
How is the bend made nice with a continious width?
The increase of resolution (Data > Geometry > Bevel > Resolution) smoothes the bends of 2D curves, no effect on 3D curves.

Thank you for any hint!

As Duarte Farrajota Ramos commented, it isn't possible as a 3D-curve at the moment.
However, you can use seperate 2D-curves (see the links in the comments) or make at least the left joint of the corner horizontal:

Use shrink/fatten (alt+S) to fatten it by the factor $\sqrt{2}\approx1.41421$


Hooking Computers Together I have a fairly top end iMac, but might have access to a couple basic windows computers. I was wondering if I could hook up the windows computers to do my 3d rendering, and leave my iMac for video work (AE, PP)? How would I do this, and is this logical?

If you wanted to go to the trouble of setting up a SSH into the Windows computers, you could control them over the network from your Mac. The problem is that it takes a lot of work to set up a Unix-Windows SSH. You can find resources for doing that here. If you are comfortable with the working in the Unix shell and do get that set up, then you can put together a "pseudo" network render that doesn't need the Blender Network Render. I use a similar method to render on Linux servers since they don't have a GUI.

Install Dropbox on the Windows computers. Make sure that you know where the Dropbox folder is.
In the .blend file you want to render, under the Output panel in the Render settings, uncheck "Overwrite" and check "Placeholders".
Upload the .blend file to Dropbox, so that it automatically is copied to both of the Windows computers.
Run Blender on each of the Windows computers from the SSH shell. You can use the command <path to blender> -b <path to file> -o <path to Dropbox> to run Blender in the background and render whatever file you specify. Both of the Windows computers will render whatever frames you specified in the .blend file to the Dropbox folder.

The advantages of this method are:

You don't have to use the network renderer (no "Slave" and "Master" configuration to worry about)
It is really easy to add in another computer: just install Dropbox, SSH in, and run the command.
You can see exactly where each of the working computers are from the terminal on your Mac.

Disadvantages:

It requires a basic knowledge of the Unix shell (command line)
Could possibly be an extra bit of a pain since the Windows computers would have to have extra programs installed to be able to communicate in that way with the Mac.
Every time you cancel mid-render, each computer will leave a blank image file (the one it was in the middle of rendering). This isn't a big deal as long as you remember to delete it, so that the computers will pick up where they left off.

Basically, there isn't a simple way to do what you want. In spite of that, it is possible. Hope that this helps!


How to prevent child objects to move ? I have created a light bulb and I want all the objects of the light bulb "behave as one entity". So I thought I should create an empty and make that empty the parent of all child objects (together the light bulb). But now it is still possible to select and move an individual child object. And I don't want that. If I select the glass and move that I want the whole light bulb to move.

I want to build a library of 3D models and I want to be able to append a 3D model (for instance a light bulb) and move that model in my scene. But I do't want to join all meshes, I want the individual child objects to stay separate objects.

That is exactly what Dupli Groups are for.

Create a group that includes all the individual components.
Add this group as an instance into the scene: Add > Group Instance. This instance will behave like one object.
You can link a group from another file, which could represent that library you want to create. In the library file you have still access to all the groups components and you can edit them, but the linked instance will behave like one entity.

This has also other benefits like saving memory if you need multiple instances of the same group.


Array modifier - why is the source object tripled? I don't understand why is the source object: BaseDeco 1, tripled when I apply the array modifier, with offset based on an Empty (BaseDeco 1 Empty)? It is tripled - there are 3 sources from which the Array makes clones.

I thought the array should start from one object (in this case the BaseDeco 1 - when I go into edit mode, there is clearly only one piece), and go around making 20 copies, but it's tripled. Why and how to control it?

I simply need 20 copies going around the perimeter of the circle.

I'm attaching the Blend.

The modifier works as intended in the file. The pieces overlap on top of each other because of the amount of rotation in the Z axis of the Offset Object. If you wanted 20 copies around it you need to rotate the offset object 360°/20=18°:


How to posterize a texture in cycles proceduraly? How to posterize a texture in cycles render procedurally like photoshop "posterize" filter. Thanks. And sorry for my bad English:)

I think six math nodes do the trick.

I separate the image texture into R, G and B
Then I use a math node to perform a modulo division. It divides the input by a value and keeps the rest. 100 modulo 30 = 10. Here, 0.845 modulo 0.1 is 0.045
Next step, I subtract the result from the original value with another set of math nodes: 0.845 - 0.045 = 0.800
I join the RGB values and feed them into the shader.
I added a value node that tells all 3 modulo nodes which value to use. 0.0 means the original image, 0.1 uses ten steps, 0.2 uses 5 steps.

Not totally happy with the result though. I bet there'll be a better answer soon. Below has a value of 0.2

I made two improvements afterwards. I packed it into a node group which means the value node isn't necessary anymore. The input of the group does it nicely.

Under the hood I divided the factor in half and added it to the RGB values to simulate rounding. That should result in a brighter image closer to the original.

Collapsed it turns into this:


Offset in selecting frames on the timeline My Dopesheet shows different frame to the one in timeline making such the whole project unsynced.

I noticed that when passing the frames in Dopesheet when I select frame 24 it jumps to frame 26, while timeline shows frame 25. At frame 50 it does the same thing.

It goes accumulating, so when I get to frame 500, the difference is like 12 frames. Anyone experienced the same thing? I don't know how to get back to sync it again.

When number of frame which is selected in the Timeline / any of animation editors isn't the same as in the Current Frame value this means they are remapped to other values of Frames Per Second.
The unusual behaviour can be noticed even when clicking on frames in animation editors.

If this is not desired then change it back to default values for both Old mapping value and New mapping value (see manual about these options):

These values are 100 by default, but you can change it to any ones if they are the same.

Can I increase the frame rate of an animation while keeping it the same length?.

How can I modify the frame rate without changing overall animation speed?.


How do I create a two sided plane with subsurface scattering for modelling leaves and foliage? Usually leaves and foliage are modelled as thin polygonal planes with no thickness. Because of the amount of geometry required to achieve dense realistic foliage, modelling them with any thickness would lead to very high poly counts. Because of this limitation it’s not possible to use subsurface scattering which requires volume in order to work properly. For realism leaves and foliage need SSS.
A work around is to add a solidify modifier which will give subsurface scattering some volume to work on a thin polygonal plane once rendered. But I want to model leaves with two sides, top and bottom, for realism and the solidify modifier doesn’t work with backfacing geometry.
How do you get a correct translucent material with subsurface scattering and two sides for a thin plane?
In the solidify modifier you have ‘Rim’ settings ‘Fill’ and ‘Only Rim’ with both ticked you don’t see overlapping edges, backfacing works correctly, but the SSS doesn’t return any result, with one or the other ticked, SSS works but the normals are flipped and the overlapping edges appear.
Here is my node setup.

Screenshots

Blend file
See also: https://devtalk.blender.org/t/diffuse-translucency-way-too-difficult-to-set-up-in-cycles/807

You don't :).
Leaves have no Subsurface Scattering (which needs greater thickness), they only have Translucency (also called Diffuse Scattering).
The linked devtalk post already offers a setup for correct backface reflections.
To use different texture for Frontface/Backface, split the node-tree into two branches.

Result with a small light underneath to show translucency

For convenience, I packed the whole setup into a nodegroup called Principled Leaves BSDF.
You can download it below. Both front/back images are packed in the file.


What is Protected Layer? I found some explanation, but there is not difference between Protected and Unprotected layers for bones.

Theoreticaly if I have my bones protected it will be linked to scene after Make Proxy. But it is also linked with unprotected layers. If I will do some changes in bone hierarchy it is propagated to my scene too. So where is difference?

It looks like some old function from previous Blender version.

It is to do with the way blender links armatures into other files. In the final video of Humane Rigging Nathan says that non-control bones should be on layers that have protected enabled and control bones should be on un-protected layers.

Even Nathan doesn't explain it much but it has something to do with the way armatures are linked between the original file and the proxy rig in another file. We are not meant to modify any rig bones in unprotected layers once the armature has a proxy rig in another file.


How can i fill an object that consists of 2D panes into a completely solid (water tight) model? I do apologize in advance as i am very new to blender and this forum. I will completely understand if i have not explained myself the best and encourage people willing to understand to ask further questions. I tried my best.

I have a .FBX file of a building that has an open bottom, the building consists entirely of 2D panes stitched together and i would like to fill the interior only without loosing any detail on the outside. This would be so that the bottom is flat of course. The end goal is to export this as an .stl file and 3d print the building. I think this process is along the lines of making your model 'water tight' however ive seen people do this but it ends up with rounded randomized bridges between gaps. This is a building with very blocky and has straight edges i would like to keep the accuracy and only fill the inside.

Im not the greatest at explaining and constructing questions but if anyone was willing to understand and help out it would be much appreciated.

I have attached images to help further anyone's understanding.

Cheers :)

Looking at the image, the wall seems to have some thickness at the base of the building, but further up inside I can see darker faces indicating planes with no thickness.  I think you will need to manually work through the model to delete any internal faces in edit mode, leaving only external faces. then ensuring all these planes are joined by merging vertexes then finally creating a new face on the bottom to seal it off.

I am not aware of a simple shortcut.  There is a few hours work needed to convert this into a printable shell.


Linux - Blender UI elements too small I am using Blender 2.79b on the LXDE desktop on Debian Linux Stretch. My hardware is an old Core 2 Duo Mac Mini, and I'm using a high-resolution monitor (a TV) by VGA. The UI elements are a tad too small, and Virtual Pixel Mode is not available in the user preferences for some reason. Is there another way to make the UI elements bigger, or a way to enable the missing Virtual Pixel Mode? I should note that the Blender I am using came from Debian's repos as opposed to downloading it straight from Blender's site, if that makes a difference.

I found a solution on my own. Turns out that there's a "display scaling" option now that wasn't there in earlier versions of Blender.


Cycles alpha mask hole I use Cycles. The main goal is to render different objects from various scenes into separate files using alpha mask. It’s necessary to ensure that in future pictures do not overlap, when images superimposed out of order. All fine, BUT there is one nuance:

Between layers (images) there are gaps (holes).

I have found solution for similar problem but for internal render. There had to disable antialiasing.

In my case, I’ve experimented with nodes, but the result virtually unchanged:

Please advise how is it possible to remove all gaps (holes)?

Attached blend file with the settings I used.

There are a couple issues. My first question is why are you using two scenes? That will really complicate things. In this answer I have only addressed one as you can copy that information to the second one.

The first thing I noticed is you have your makes layers set, and although that could be handy in many instances, it really is not necessary in this case. Go ahead and disable all of them on all render layers:

Also you should try and change your compositor setup, all you need is something like this:

This setup gives me a nice result, and the issues you mentioned appear to have been fixed.


Hide object in a specific area I have two 3D VIEW areas, and I would like to hide an object only from one of these.

This is possible, but requires the sphere to be in a separate collection. Assuming it is, you can use the following steps to hide it in one area, while still displaying the object in the other.

Open the sidebar by pressing N and select the View tab in it.
Expand the panel named Collections
Enable Local Collections, this allows you to have different (local) visibility settings per 3D view area.
Hide the collection with the sphere by clicking on the eye icon behind its collection in the panel


Particles height adjusment Hair-type particles are intersected somewhere in the middle. Is there a way to move them up a little? I can't find anything in the properties panel that would work.

Move the object your are using as particle a bit upwards in Edit mode so that the bottom of the ball is at the object's local origin.


No settings appearing in the Properties Editor I have the object selected in Object Mode but the Properties Editor is not showing me any settings/options in order to allow me to add textures, modifiers, materials, etc. It's as if nothing is selected yet the object is selected. Switching back and forth between Object and Edit mode makes no difference. Cycles Render is selected. I'm running version 2.79b. I'm thinking its got to be something simple that I'm just overlooking but for the life of me I can't figure out what the problem is.

I fixed the problem. In fact I had somehow changed the menu to horizontal.

Right-clicking on the Properties panel and changing it from Horizontal to Vertical fixed this problem.


How to select linked without delimiting? When I use L to select linked vertices, there's a delimit option in the sidebar that I can't deselect. I want to select all linked vertices without a delimiter. How do I do that?

EDIT: This wasn't possible in v2.78. Selecting linked vertices without selecting a delimiter has been implemented in v2.79b!

In 2.79b at least, you can select multiple delimiters or deselect delimiters by shift LMB on the appropriate button.  With no delimiters enabled, it will only limit select linked by mesh connections.


Accidentally Painting Normal Map I recently baked a normal map from a high poly to a low poly, and then set up the normal map in the Material tab. I then created a new texture to colour the model and added another texture slot on the same material with this texture in mind.

However something peculiar happened. When I tried to paint a colour on the diffuse map straight on the model it seemingly painted on the normal map I baked earlier. I think it works by using black as the deepest and white as the highest points of detail:

When I try to paint on the diffuse texture via the UV editor I have no problems, but it paints on the normal map texture in the default view. I am a bit confused because:

I don't know how I got to painting on the normal map; it was rather unexpected.
I don't know how to change to paint of the diffuse texture.

I wish to know how to get back to painting the diffuse, and how to enable normal map painting whenever I please; had I known sooner I'd be using it more often!

When painting, you need to choose which image is active by selecting it in the Slots tab of the toolbar. Normal maps work on colors that represent xyz axis for normals, and bump maps use black to white gradient for in and out displacements. Reordering the textures in the Properties texture stack won't affect it unless both are set to 'color' and then the one on the bottom of the stack blocks out the one on the top of the stack.


Can't get BGE animated texute to work I am attempting to animate an explosion in the Blender Game Engine.  The explosion is supposed a plane with an animated texture on it.  I have heard that textures can be animated in BGE by using the Tiles/Animation options, and I seem to recall that I did it once, but for some reason, it won't work. When I enter game mode, the texture just displays a static image.  I am using GLSL shading, so that shouldn't be a problem.

Here is the .blend:

Thank you.

There's apparently a bug in the current version of Blender (2.78c) which won't allow users to use spritesheets as animated textures.

Try this method to get around the bug
https://www.youtube.com/watch?v=hIQ0xYTAgt0
(Video not by me)


how to attach a camera to a single particle Question:
How do I get a camera to follow/move with a single particle?
My example:
I have created a large particle system and I would like to have the camera sit behind and follow a single particle as it floats around. If i could also have the camera be animatible (moving back and forth left and right as a secondary key framed animation that would be great).
research:
this question seems to have been asked before on here, but not answered. Also i found this https://blenderartists.org/t/particle-as-object-for-camera-track-to-constraint/640226
seems like a good idea but i don't know scripting and was not able to get it to work.

This script assigns first particle location to another object(In this case Empty). you can parent camera to this object for further manipulation.
import bpy

ob = bpy.context.scene.objects["Cube"]
target = bpy.context.scene.objects["Empty"]

def my_handler(scene, depsgraph):
    eval_ob = ob.evaluated_get(depsgraph)
    particle_system = eval_ob.particle_systems[0]
    target.location = particle_system.particles[0].location

bpy.app.handlers.frame_change_post.clear()
bpy.app.handlers.frame_change_post.append(my_handler)

If you are looking for alternate solution, i recommend Animation Nodes addon, which can do this more efficiently.


How to avoid pinching on concave shapes with the bevel modifier and subsurf? How can I setup the Bevel modifier to only work on 30 degrees angle and avoid pinching at the same time on convex shapes?

I want to avoid pinching generated on concave shapes to replace the manual edge loops or sharp edges workflow for hard surface models:

It's interesting to have a look at why this happens. This is a transition from  2x Simple subdiv to Catmull-Clark subdiv on a corner beveled with one segment.

It's not 'pinching' in the same sense as the pinching you get at say, the poles of a UV Sphere. It's more like 'leapfrogging'. Under the CC algorithm,the edges of small faces that were next to large faces in their own plane move further than small faces that were next to small faces at an angle to them, to the point that they overtake. This effect is compounded with each iteration, and the smaller the bevel by comparison with surrounding faces, the worse it gets.

I've never been able to think of a solution to fully automate away the need for hand-modified holding loops, or using creases to pin vertices and prevent them from being moved by CC.

Personally I tend to think in 3's, (put in a bevel with 2 segments) and not restrict by angle. Then the extra edge-loops an be 'tied off' (reduced from 3 to 1) elsewhere on the model, if needed. But that's still hand work.


How to notice edges in each other? When I notice 2 edges in each other, I select both of the points and hit Alt+M, which allows me to merge them. I always merge them at center to have both points merge and have them as one point. I always, when I finish a model, select every edge in wireframe mode twice to see if there are edges in each other that I may have modeled by mistake. Is there any way the system could help me with this task? It takes a lot of time and I could always miss something. Any help is appreciated. Thank you!

You use W>Remove Doubles, with everything selected A, this will find all the vertices within n units of another vertex and merge them. n is defined by the merge distance, which you can modify using F6 after executing the command.


How to use vertex color if defined, or white otherwise? I'm fairly new to Blender. I have a Cycles material in Blender 2.79. I'm using an Attribute node with COLOR_0 to get the vertex color and multiplying that into the material color.
But if a particular mesh doesn't have the COLOR_0 attribute, it comes through black. Is there a node that can act as a switch based on presence of an attribute?

One way is to define a material where it will use a node comparing value of vertex colors for a factor defining what socket of the next node will be used.

There are 2 cubes and 2 different materials on them (for demonstration purposes). Both cubes have vertex color layer called "Col" (default name).

The color is fed to the Math node set to Less Than which compares values on the input to its second socket (which is 0.001, almost black, color will be black if no vertex color data is present).

Then the output of that is used as a factor for the MixRGB node - the output is either 0 or 1. If factor is 0 bottom input of the MixRGB node is used, If it's 1 - then the top one.

The cube on the right has Attribute node with vertex color layer written wrongly - "Col1" and blue color is used instead of default black. You can setup any color in the bottom input of the MixRGB node.


Blender Arrow when rendering When I try to render some scene for some reason I can see arrows around object, how can make them not to show at render?

Are your arrows objects? If so, uncheck their camera icon in the Outliner.
If you want to render to OpenGL make sure to mark "Only Render" under /Display in the 3D-view Properties window, too.


Can't preview smoke simulation on Blender 2.82 Whenever I add a Quick Smoke effect, I can't preview it on the viewport unless I bake it.

And Yes, I added the Smoke Domain on the object.

I've seen tutorials like this https://www.youtube.com/watch?v=VmRqlsuSvsw
and this https://www.youtube.com/watch?v=_IDBfQnttiE that clearly shows the possibility of previewing the smoke before baking it.

I'm using Blender on a Mac with AMD GPU. I would guess that this is something related to OpenGL, as thoroughly explained here - Why is the smoke preview not showing in Blender's viewport? but that's for Windows.

Does anyone have any idea how to fix this?

Fixed it. The default Cache Type is set to "Modular". In order to see the Smoke preview in the viewport, it's necessary to switch it to "Replay".

Big thanks to Pablo Vazquez that found this solution on Twitter.


How to add faces to underside of a model Hi. Attached is an image of just the bottom verts of a model that I have. I have hidden the top section so it can easily be seen.
I plan to print the model, so this is the open underside face, I need to create faces on this underside to effectively close the model, would anyone know an easy way of doing this?

Your help is really appreciated.

Thanks.Richard.

Thanks all. I managed to sort and print the model with copying the top part of the model, extruding then scaling global Z to scale 0. Much appreciate everyones comments. Thanks again.


How do I prevent VSE strips using Image Offset from being cropped before the transform effect can shrink them onto the screen? I am creating a video using the VSE where I show a sequence of screenshots of two devices side-by-side.

Unfortunately, one sequence of screenshots is from a Nexus 7 in portrait mode (resolution 800x1280) and the video I am making is 1920x1080.  This means that the screenshot must be scaled down to fit on screen.

I have a sequence of the screenshots and some overlay elements grouped into a meta strip.  Each screenshot has the Image Offset box checked so it is pixel-for-pixel to start with.

The meta strip has a transform effect strip applied to it and I apply a uniform scale of 1080x1280 to fit the meta strip on-screen.  I do this so that all the screenshots in the meta strip benefit from the same scale and transform, and I can adjust the position of this screenshot sequence in the canvas without having to edit 10 different transform strips (and a growing number of overlays).  Unfortunately, the top of the screenshot gets chopped off.

How do I prevent the large images in the meta strip from being cropped before the transform effect can shrink them onto the canvas?

 (now has copies of the images packed into the .blend, but you'll still need to save them and point the image strips at them)

Consider a preprocessing pass where you just create new Scaled images at the intended final size with a possible transparent border.
Suppose the Blend User had 100 images at dimension (X,Y) where for example (X = 1280, Y=800) and their final render size was .5 times (X,Y). The User might just create a [2nd new] VSE scene to quickly create a new sequence of images at the new size for final use. VSE is used to batch scale images into a new file. GIMP might do the same.
I might even place the images in the upper right hand corner and leave a transparent border in PNG format. Suit borders to your needs.  Your already use overlays. Thus no further scaling need take place because of a transparent border.  Then many or all of the files would have the same size ... the offset would be different.
Since I cannot see your VSE strips I am not addressing them directly.  So we cant see limitations, if any, of the strip manipulations. They may be some more space efficencies possible if all that were known, yet its not a requirement.
I have not considered file names.
One could claim their is some waste of hard disk space or RAM.  Space may be cheaper than time.


Car topology problem: front quarter panel Well, I'm making this car that will be exported to a game, but I'm having problems with topology.
Everything looks great, but these front quarter panels have very different tones of shades between the faces.
When I render, everything looks good, except in the game, the car look very bad

This looks like just the camera angle. Move your camera and check if the problem still exists. If it does check your face normals.


Camera translation and rotation for rendering I have an object at the origin of the global coordinate system. I want to render images of the object from many different randomly chosen viewpoints. How can I randomize the camera position by following these 2 steps:

Pick an octant (e.g. one of the octants is the space in which all points have positive x, positive y, and positive z values) in the 3D coordinate system, then randomize the camera location in that octant, given that the object is at a distance from the object within a pre-defined range.
Automatically point the camera at the object after translation

I am not quite sure that I have understand what an Octant is, but you may try this:

first create a camera and an empty, then add to your camera a "TrackTo" constraint and set its Target to be the empty.

This is how it should look if you move you camera along the Y axis

after finishing your setup this code will pick random points in positive space, you have only to set min and max values so it can avoid overlaps and define the maximum length of your octant as you wish.

import bpy
import random

#pick random point in Octant
def Octant(minX, maxX, minY, maxY, minZ, maxZ):
    rndX = random.uniform(minX, maxX)
    rndY = random.uniform(minY, maxY)
    rndZ = random.uniform(minZ, maxZ)
    return (rndX, rndY, rndZ)

#select your main camera
camera = bpy.context.scene.objects["Camera"]
#set camera random position
camera.location = Octant(1,5, 1,4, 1,8)

it can be also enriched by the same logic so you may have small differences on the focal length and the empty's position too.


How to export Bone Weights? I am editing the default OBJ exporter of Blender (io_scene_obj) to create my own version which supports bone weights, for skeletal animation.

I now know how to access the bone weights per vertex in the Object, however I need to correlate those Object vertices to the Mesh vertices.

I am able to fetch the "vertex index" of the vertex with this piece of code:

import bpy

arm = bpy.data.objects['Armature']
obj = bpy.data.objects['Cube']

obj_verts = obj.data.vertices
obj_group_names = [g.name for g in obj.vertex_groups]

for bone in arm.pose.bones:
    if bone.name not in obj_group_names:
        continue

    gidx = obj.vertex_groups[bone.name].index

    bone_verts = [v for v in obj_verts if gidx in [g.group for g in v.groups]]

    for v in bone_verts:
        for g in v.groups:
            if g.group == gidx:
                w = g.weight
                print('Vertex',v.index,'has a weight of',w,'for bone',bone.name)

however I am not sure how to use this vertex index.
is it a direct index into me.vertices? (I sure hope it is)
Please note that I triangulate the mesh before I export it. I keep the vertex order though, so it should be the same.

Here's what I'm planning to do:
My file format has a new kind of line:

vc f f f

and it modifies the f lines:

f position/uv/norm/skel position/uv/norm/skel position/uv/norm/skel

the vc lines were originally designed to hold color information like this

#Solid red
vc 1.0 0.0 0.0
#Solid green
vc 0.0 1.0 0.0

However I realized that this exact same system could contain skeletal animation information.
Here are the steps:

1) Get the 3 most influential weights on a vertex

2) Make them add up to 1

3) Divide them by 2

4) Add the Bone ID to it

Here's an example:

#Bone 1 influences this vertex 100 percent, there are no others
vc 1.5 0.0 0.0
#50 percent influenced by bone 1, 25 percent by bone 2, and 25 percent by bone 3
vc 1.25 2.125 3.125

In order for this to work, I need to figure out how much each vertex (3D point, with X, Y, and Z) is weighted by each bone, pick the top 3 per vertex (and if there aren't 3, stick in a fake 0 bone with 0 weight for every missing spot) and write it to file in VC lines.
If I do this for every 3d point, then I can simply use the same indices as the positions for the f lines.

f A/B/C/A

How could I achieve this?

I assume that there is only one armature in the scene called 'Armature' and that the only mesh currently being exported (But not necessarily the only one in the scene) is influenced by it.

I have access to the list of Objects to be exported, so I can access both the triangulated mesh from bpy.data.meshes[] and the object from bpy.data.objects[]

The objects data property contains the data used to define the objects appearance. For a mesh object that includes vertices, edges and polygons.

While vertex groups are stored within an objects properties, each groups vertex indices are direct indices into the objects data.vertices[] list. These are all kept in sync internally by blender so you don't have to be concerned, unless the mesh gets edited while you are accessing the data.

If you start with bpy.context.selected_objects you can export objects of type MESH. Then look at an objects modifiers list to find a modifier with a type of ARMATURE and get the object property from that to get the relevant armature.


In a BGE RTS, how could I make a selection box to select Units? I am making an rts in blender and do not no too much about Python.  Right now I have a cube (which will later be a character with an animation) that follows a mouse tracker (a cone facing down that moves wherever you click and the cube tracks and follows it.  If I duplicated them then all the cubes would go wherever I would  click to place the mousetracker.  How could I make it so you can "select" a cube with a rectangular selection box (or clicking it with a mouse button that is different to the mouse button used to move the mousetracker) please do not direct me to any tutorials as I would like to use the mousetracker to move them.  Help would be appreciated!  Thanks!

Here's how to select people in general, by clicking on them with a button other then the one that sets the mouse tracker. Unfortunately, I don't know how to do a draw-box, but if someone else does, I would be super thrilled.

You need to add a mouse sensor, and set the field from the default Left-Mouse-Button to something else, like Middle-click, or Right-Mouse-Button. You also need a property on the cube; call it "active". This property needs to change to "True" when the cube is selected, and "False" when the cube is inactive; therefore, the Boolean variable type would be the best for this property, since there are only two different modes.
In order to change it, you need a "Property" actuator set to toggle (that way you can deselect also). In the field with the little bullet, (the property field) enter "Active" which is the name of the property you want changed.
Connect the actuator to your Mouse sensor you created earlier.

Now when you click on a cube, it will set the property "Active" to true.
All you need to do is create another property sensor, set the evaluation type to "Equal" and enter true for the search, with Active as the property to be evaluated. connect this to the AND controller that allows your cube to steer toward the tracker and Viola!

Here's a blend to show you. hit Num5 to add people.


How to avoid accidentally relocating the 3d-cursor? Is there anyway to help avoid accidentally relocating the 3d-cursor?

You have all of these complex keystrokes in Blender like (CTR+ALT+SHIFT+C),
 but yet all it takes is a simple accidental left mouse button click to re-locate the cursor.
How many hundreds of times I have done this and then had to move the 3d-cursor back where it was. Moving the 3d cursor is not stored in the Undo buffer, so you can't "undo" a relocation of the 3d cursor.
It is very frustrating.

I saw the same question with solution from a long time ago:
http://blenderartists.org/forum/archive/index.php/t-236492.html

I went to the user preferences and switched "Set 3d cursor" from "LMB" to "Shift + LMB".
Now I can no longer accidentally move it.


How to create a bottom for this rock to make it a whole mesh? I've tried boolean with union, but that copies the whole object and when I go to retexture the copy, it turns out wrong. I need to create a bottom so I can shape it and then copy the rock texture to the bottom so the rock appears whole.

You could copy some of your rock mesh (selection with inner region or circle select...) and orient it, so that you don't need to fill a large hole, but you have a gap between your rock mesh and that patch.

Then you could fill this gap with methods like shortest path select (hold ctrl while selecting) the gaps borders for short lengths of the gap and then fill faces (with F).

The gap filling result will be nicest if in advance to filling you extrude the parts of the gap closer to each other in multiple iterations(Then you have quads in most of the gap region)


Add a custom curve mapping property for an add-on? Question
The title says it all. I want to be able to make this in Blender's UI, and sample it at specific points from an add-on:

Problem
There is very insufficient documentation on this, and I can't find any examples for how to create a CurveMapping property. I have worked with templates before, and I know the correct template to use, but it requires a curve mapping prop.
Extra Info
I found a few threads about this, and one gives me the impression that this cannot be done at all, but it is also very old.
https://blenderartists.org/forum/showthread.php?313871-Who-knows-how-to-Create-a-Custom-CurveMap
https://blenderartists.org/forum/showthread.php?207562-B256-How-do-I-add-a-CurveMapPoint-to-CurveMap-points
This similar question has been asked here before, but it didn't even get a comment:
Does anyone have an example of template_curve_mapping?
Is this even possible to access in python (as in only accessible in C)?

First off this solution is inspired by the Interpolation From Curve Mapping node in Animation nodes which offers more info on using the curve data.

The idea is that blender offers mapping curves in various places, one that we can dynamically add items to is node trees. By creating a node that uses curve mapping data we can then access that data using layout.template_curve_mapping in our custom panels. While Animation Nodes creates a helper material, my approach is to create a custom node group as it will only be visible in the Add->Group menu in the node editor which keeps it more out of the users view than a material.

While we can add nodes during a panels draw() we can't alter the name, so a solution to have more useful names is to keep a dictionary to map useful names to the less helpful 'RGB Curves.12', this should be stored within a custom property in the scene so that the mapping can be kept between restarts. Another approach would be to create a group with one node for each mapping that you want to use.

import bpy
def myNodeTree():
    if 'TestCurveData' not in bpy.data.node_groups:
        ng = bpy.data.node_groups.new('TestCurveData', 'ShaderNodeTree')
        ng.fake_user = True
    return bpy.data.node_groups['TestCurveData'].nodes

curve_node_mapping = {}
def myCurveData(curve_name):
    if curve_name not in curve_node_mapping:
        cn = myNodeTree().new('ShaderNodeRGBCurve')
        curve_node_mapping[curve_name] = cn.name
    return myNodeTree()[curve_node_mapping[curve_name]]

class CurvyPanel(bpy.types.Panel):
    bl_space_type = "VIEW_3D"
    bl_label = "Test Curve Mapping"
    bl_region_type = 'UI'

    def draw(self, context):
        self.layout.template_curve_mapping(myCurveData('TestOne'), "mapping")

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

In the parameters to template_curve_mapping, the first is the curve based node that we use for our curve data, the second is the property that it uses to store the CurveMapping structure.


How Can I modify drivers properties via python in blender? how can I modify properties, for example adding variables, changing their type and targets in a driver on an object all via python, so that I can loop that on multiple objects?

It's best if you create the driver itself in Python using the driver_add() methods, as they return the driver object back to you. This way it's convenient to access and modify them. Below is a short documented example which should get you started. I'm creating two drivers, one for the location and one single channel one for the rotation, just to show the syntax difference. In the example, I then only setup a variable for the location one, so the rotation one has no function.

in the second part, I iterate over all created Driver FCurves and then create a variable for each of them. Setting the variable name is optional, I only did it for demonstration. Further down in the code I access it by calling the name property of the variable object, which is much more robust in terms of programming. There is quite a few options to set up, too many to document them all here in this example. However, the dir() function of Python can help you out, as well as Blenders ToolTips and the console of course. A list of all drivers in the active object can by the way be retrieved using bpy.context.object.animation_data.drivers.

For the code here to run, you need to have an object called 'Sphere' in the scene, as well as another one which is the active object and will receive the driver. So now, here's the eample:

import bpy

# work on the active object
ao = bpy.context.active_object

# create a driver for all three transform channels
# the return value is a list of FCurves, each one containing a driver
drvList = ao.driver_add('location')

# if you want to create a driver for only one channel, you need to
# pass on the index of the channel, starting with 0.
# So: rotate.x = 0, rotate.y = 1, rotate.z = 2
# note that for rotations, there is Euler and Quarternions!
drvList2 = ao.driver_add('rotation_euler', 1)

# create and manipulate variables
for drv in drvList:

    # create a variable
    var = drv.driver.variables.new()

    var.name = 'HelloVar'

    # set the type first (default is 'SINGLE_PROP')
    var.type = 'TRANSFORMS' # you can use 'SINGLE_PROP', 'LOC_DIFF' or 'ROTATION_DIFF'

    # the targets are the fields which you can fill in in Blender Driver UI
    # in essence, you set the Object here from which the variable receives its values
    # sometimes there are more than one target fields (like in case of LOC_DIFF
    # that's why the targets object is a list
    target = var.targets[0]

    # the id property takes an Object for TRANSFORMS drivers
    target.id = bpy.data.objects.get('Sphere') # assuming you have an object named 'Sphere' in your File

    # take the X location of the Sphere as the driving channel
    target.transform_type = 'LOC_X' # others are ROT_X, SCALE_X

    # use local space transforms for this example
    target.transform_space = 'LOCAL_SPACE' # others are TRANSFORM_SPACE and WORLD_SPACE

    # now set the expression on the driver
    # as an example, set it to 2 * var
    drv.driver.expression = '2 * %s' % var.name


Animation Nodes Loop Issue I'm having this issue with animation nodes where, if I want to change the list of vertex positions of an object based on a boolean condition, then only one vertex gets affected. In this case, only the vertex at (1,1,0) gets moved upwards. In the example I appended, clearly all vertices of my object are at a lesser distance than 10, so they should all move. However, if I delete the "boolean branch" of the tree, and modify the whole list blindly, the whole object moves.

Thanks!

EDIT:

I'll append a screenshot of the actual nodetree where I'm having the issue. As you can see I'm looking for the nearest five particles of the particle system to the point, and then, with a very simple script, i find the velocities of those particles and calculate the resultin vector. Also, I check if the minimum distance of the five is less than some arbitrary number that I choose, and based on that, I decide to do the change or not. Appart from that, I check for the nearest points in the sphere to the current vertex in the iteration (and append the index of said vertex as well to the list of indices). Then I use a script which I will leave here to change all the vertices that are pointed to by those indices in the original list of vertex positions. And based on the boolean mentioned before, I choose what list to connect to the mesh output node.

What I intend this to do is, for every frame in the animation, change the whole list of vertex positions based on everything I just said.

Thanks for the help!

Script:

def mod_vec_list (ind, pos, vec_dist, vec_vel):
    for x in ind:
        cust_dist = (vec_dist - pos[x]).length + 1
        pos[x] += (1/cust_dist) * vec_vel
    return pos

res = mod_vec_list (ind, pos, vec_dist, vec_vel)

There are three reasons why your node tree don't work as you expect it to. The following three sections explain those reasons in details.

Data Copying

First, please read the Data Copying section in the documentation to understand what we are talking about. You expect all the vertices to move one unit upward, your reasoning is that the condition is always True and this is true. However, notice that your If True input is connected to a Set List Element node that, in turn, is connected to a parameter of the loop. Since that parameter is connected to the If False input of the Switch node, enforced data copying is performed, subsequently, the Set List Element doesn't edit the list, but rather a copy of the list that is only available is the scope of each iteration. By the end of the loop, you never moved any vertices, you moved only one vertex in each iteration in its scope. Cut the connection going to the If False input and you will see the loop works as expected, that's because data is no longer being copied, that is why when deleting the condition branch, everything works as expected.

Instant Overwrite

You are outputting the vertices to the mesh at each iteration and each iteration overwrite the vertices location that was written in the previous iteration, so, the only effective data written is that of the last iteration simply because it will not be overwritten. In that last iteration, the If True input is the original vertices except for the last vertex moved upward one unit which you observed as that at the location (1,1,0), the reason for this is what which we described in the foregoing section. In conclusion, never write data inside a loop! Output the data from the loop then write it.

Infinite Offset

You are getting the vertices locations from the Cube and outputting it to the Cube, upon continuous execution of the node tree, the vertices will start to move to infinity, which, I assume, is not something you want. In conclusion, your source shouldn't be your output, either cache the vertices location or output to a new mesh.


Can't move vertices and bones anymore I think I made some mistakes and now I can't move my stuff anymore.

I uploaded a blend file so you may could tell me what I have done wrong and next time I will be able to fix the problem by myself.

Link to blend file:
https://www.dropbox.com/s/7l1tb5v2g0lpyzs/character.blend?dl=0

I looked at your file. As @Denis stated: You activated Snapping, the little orange horseshoe. Just disable it using Shift+Tab, and you can move the bones around again.