Rigid object behaving differently in Object and Edit mode? Ok, so I'm a total noob at this. However, It seems weird that an object, in this case a modified cube shape, behaves differently when dropped from a hight depending on if it is viewed in object or edit mode. Im using the 2.8 Beta. In Edit mode, my object drops and hits a passive floor plane, bounces a bit and comes to rest. All good. When I switch to object mode however, the object drops and hits the floor normally, but after that it won't fall over! It just stands there on an awkward angle and moves a little in super slo-mo!?

Any ideas?

I have just solved the problem!

I exported the object from my Blender file as an .obj file and imported it back. Now it behaves perfectly with physics and other stuff!


How can I close the bottom of a cup? I´m learning blender now and I was practicing modelling a cup but when I got almost to the end of it I realized it was botomless. I guess I did that when I was trying to fix the subdivision surface that was curving the bottom too. Is there a way I can close it?

In Edit Mode select the bottom edge by Alt+LMB.
Press F to make a face.


How do I stop vertices being hidden by the Subsurf modifier in Edit mode? So I'm trying to do a model and I noticed when in Edit mode the vertices and edges are being hidden by the smoothed surface view:

How do i fix this?

There are times that the unmodified vertices of a mesh will be inside the surface created by a Subsurf modifier.

Personally, I regularly flip between view subsurf levels while I'm modeling, anyway. (Ctrl0to5 on the keyboard) Then you can edit the model in its unmodified appearance, which is often less confusing than another option, (illustrated)

which is to 'Adjust edit cage to modifier resullt'. this will result in the appearance of sliding points around on the curved, subdivided surface.


How to decelerate a spinning object? I want to animate a helicopter land on a landing pad and the blades would slowly decelerate taking about 2 minutes until they stop.

I can only find tutorials on how to keep a wheel spinning forever but I want the spin to slowly over time reduce in RPM (rotation per minute) until it stops.

There must be a physics simulation for this. I have yet to use a mechanical simulations in Blender. I know one thing, calculating RPM to manually keyframe deceleration doesn't look right and is time consuming.

So how do I set up the blades to simulate the engine shutting down and decelerating gradually until it stops?

This is for an animation rendered in cycles not for a game engine.

You only need 2 keyframes to control the way the rotor decelerates. Insert the keyframes, then go to the animation view. There you can adjust how the rotation shall behave over time. The default is an S curve:

But you can change that e.g. to an exponential curve:


Update an existing (animated) model I have one .blend project where I've imported objects via .dae files.
I've set up a scene and made animations etc...

Now there is a request to modify details of one or more object.

Question 1:
Is there a way that I can replace my existing model with a newer version where I keep the location, rotation, scale and animations?
Because now I need to delete the object, add it again and animate it again.

Question 2:
For future projects, how do you set up a blender project to overcome such problems?

There are a lot of ways. Two simple approaches (assuming you are talking about static meshes):

Switch the mesh in the Properties window - Object Data:

Or if you have LocRotScale keyframed, switch the action in the action editor:


Physically correct render of material covered with another material What is the physically correct way to setup light shaders for such object as wood plate covered with varnish? Wood and varnish have their own indexes of refraction, however they are kind of a single material now, since you can not split them apart. What is the common practice for such kind of things in Blender?

You can layer reflections by using multiple layered mix nodes. This way you can controll roughnes, ior and bumpmap of each reflection layer separately. For example this is a simple carpaint shader using this technique.

it's far from perfect - it's just for demonstration.


Procedural carbon fiber material After several failed attempts to create a procedural carbon fiber material, I decided to look around for tutorials, only to find that the majority require the use of textures. The only promising resource seems to point to a dead page, but from the little information I could gather, it seems to have something to do with two texture nodes and a checker node.

I'm not quite sure what to do with this information, so hopefully someone might be able to fill in the blanks as to how I can achieve that weave-like look that carbon fiber has, without the use of textures.

Here's my base for how I control my carbon fiber material.

This particular result is stylized for the purpose of indicating the primary color's that I change, to get what I want.

And Below is my node setup:

As time allows, I will circle back around on this, and add the text step-by-step to get this node setup for completeness, however lacking this the images should suffice for now.


Mesh is not smooth, How should I fix this mesh? It's not smooth mesh of body.
other mesh is smooth
How should I fix this mesh ?
I download fbx data, and convert to fbx data of binary by FBXconvert2013

I just used Shade Smooth, some surface are clean. but some surface still not good

The subdivision surface modifier will smooth out the entire mesh by default, which will lose hard edges. You can prevent this by going to Edit mode, Edge selection mode, selecting the "hard" edges (edges that should remain sharp) and choosing Edge -> Edge Crease. When you do this, it will look like nothing is happening, but your mouse is controlling a sliding scale parameter. Click anywhere in the viewport ONCE to complete the operation. You will see a small panel appear in the lower left corner. Open it if it collapsed. Manually set the edge crease in that panel to 1.00. This overrides the value set by your mouse.

Now if you append a subdivision surface modifier to the object, the hard edges will be respected.

If your car's body, tires and rims are all one object, it is likely that not every part requires a subdivision operation. You can separate part of a mesh into its own mesh in Edit mode by selecting the faces you want to detach and typing CTRL + P in the viewport. Choose to detach the selected faces. Even though you are in Edit mode, both meshes will now be selected. You must get out of Edit mode now to limit your selection to one object again.

Tip: if faces on a mesh are difficult to select but no faces on that region are connected to the rest of the mesh, you can type CTRL + + (specifically the "+" symbol on your numpad, not the secondary key) to grow your selection outward from a current selection. If you do not have a numpad on your keyboard (ouch!), you can choose to simulate one in the preferences.


blender python move faces along normal Using the GUI you can Set Transform Orientation to Normal select a face in edit mode then hit G button then Z button to move the face in the direction of the normal.

I am trying to do this with blender python.

import bpy

ob=bpy.context.view_layer.objects.active

for i in range(0,len(ob.data.polygons)):

    # deselect everything first
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.select_all(action='DESELECT')

    # it seems you can only select face during object mode
    bpy.ops.object.mode_set(mode='OBJECT')
    face=ob.data.polygons[i]
    face.select=True

    bpy.ops.object.mode_set(mode='EDIT')
    face_normal=face.normal

    matrix=((0, -1, 0), (face_normal[2], 0, -face_normal[0]), (face_normal[0], 0, face_normal[2]))

    bpy.ops.transform.translate(value=(0, 0, 0.1),
        orient_type='NORMAL',
        orient_matrix=matrix,
        orient_matrix_type='NORMAL',
        constraint_axis=(False, False, True))

This sample code should iterate through all the faces on the selected object and translate each face individually along the face normal.

This is just a test snippet - I intend to use filters to select specific faces later but just iterating through all faces now to verify code works.

If you create an object this code works to scale the object on the Z axis but not oriented toward the face normal.

I suspect the problem is something with the way I'm assigning the orient_matrix matrix variable. I can't find any examples on how to assign the the orient_matrix for translate operations. there are lots of examples for rotations but not for translating individual faces.

I would recommend bmesh for this.

No face selection required, no toggling mode, no bpy.ops.mesh... operators.

Because a recent answer used an edit mode bmesh, here is an edit mode version

Translates all vertices 0.1 locally in the direction of their normal for each face.

Example scripts, move all faces along their normals.

import bpy

context = bpy.context

import bmesh

ob = context.object
me = ob.data
bm = bmesh.from_edit_mesh(me)
for f in bm.faces:
    bmesh.ops.translate(bm,
            verts=f.verts,
            vec=0.1 * f.normal)

bmesh.update_edit_mesh(me)

Or in object mode

import bpy
import bmesh

context = bpy.context

ob = context.object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)
for f in bm.faces:
    bmesh.ops.translate(bm,
            verts=f.verts,
            vec=0.1 * f.normal)

bm.to_mesh(me)
me.update()

Could have also simply

for f in bm.faces:
    vec = 0.1 * f.normal
    for v in bm.verts:
        v.co += vec

Notice this is going to give dreadful results, as each vertex can be a member of multiple faces.  Running scripts above on a uv sphere  will spike the poles. On the cone make the apex grow (appear to scale more in Z)

A good indicator of what we are trying to do here when using all faces would be to split the edges, so each face is free to move on its normal without affecting the normals of adjacent faces.  Here is an example using default cone

bmesh.ops.split_edges(bm,
        edges=bm.edges,
        )
for f in bm.faces:
    bmesh.ops.translate(bm,
            verts=f.verts,
            vec=0.1 * f.normal)

This shows where each face would be if we extruded individual faces along their normal.

Instead we could  move all the vertices along their normals.  This will give the impression of a 0.1 local scale on convex objects like the spheres and cube, but will "fatten" Suzanne.

import bpy
import bmesh

context = bpy.context

ob = context.object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)

for v in bm.verts:
    v.co += 0.1 * v.normal

bm.to_mesh(me)
me.update()

Putting it together.

Here we move each selected face along its normal, by finding all the verts that belong to selected faces, then for each vert move along average of the normals of connected and selected faces

Run in edit mode with faces selected.

import bpy
import bmesh
from mathutils import Vector

context = bpy.context

ob = context.object
me = ob.data
bm = bmesh.from_edit_mesh(me)

verts = set(v for f in bm.faces if f.select for v in f.verts)
for v in verts:
    norms  = [f.normal for f in v.link_faces if f.select]
    n = sum(norms, Vector()) / len(norms)
    v.co += 0.1 * n

bmesh.update_edit_mesh(me)


Why does Blender 2.68 appear to still be 2.67b? When I download 2.68, unzipped it and then opened Blender, I got the 2.67b splash screen. I am on x64 Windows 7.

I am a bit confused. Which version of Blender have I actually got, and how can I tell the difference?

Because 2.68 is currently a release candidate and the renaming of the new version is not done yet.

If you look at the splash screen there is a number after the r.
It is not the same between the 2.67b and the 2.68 RC


Three bones following a curve I have a chain of three bones and I want them to follow a curve (bezier curve). I've tried  to do this creating a bone constraint follow path but it doesn't work. I've tried putting four emptys and creating two constraints for each bone: one constraint child of and another one track to. It doesn't work. In both cases the bones move but not aligned following the curve.

Also, I've noticed that sometimes the bones are in different positions in Edit Mode or Object Mode.

This is the screenshot:

Please help me. Thank you!

I first created my bone chain and the path I wanted my bone chain to follow.

Then I added another bezier curve with the same length than the armature and one vertex for each bone head or tail. By pressing "V", I turned the handle type first to "Automatic" and then to "Vector".

Next, I selected the last bone of the chain and added under the bone constraint panel a "Spline IK" constraint, targeting the second curve (Length 3, Y Stretch).
At last, I added a "Curve" modifier to the second curve, targeting the first one as shown on the picture.

Don't forget to select the right deformation axis (in my example "Z") and to check "Apply this and all preceding deformation modifiers on splines' points rather than on filled curve/surface".

Now, by moving the curve along the Z-axis, the bone chain moves along the curve.

This is not a perfect solution since the Spline IK is deforming the first bone (don't know why) and since the curve modifier is also modifying a bit the length of the second curve, but it worked pretty well for what I needed, and I hope this will help.


Modelling a Dagger (1): How to bend straight faces I am trying to model this dagger I found on the internet (source):

So I first concentrated in the top part (the blade itself), and later model the handle. I started out with a cube, and tweaked it until I got to this point:

Now you can see my problem: I have no idea about how to "round" the sides of the blade, so that they are not straight but with a certain curvature.

I tried adding a bezier curve that adjusted to the outline of the blade, and then added a Curve modifier, but it seemed to bend only one part of the blade.

Of course I could just Loop Cut and Slide, and scale it up a bit. However I'm looking for a more precise way to do it. I'm pretty new to Blender and any advice on how to model the blade is more than welcome.

Thanks.

One approach would be in Edit Mode add a loop cut in the middle CTRL+R and delete the vertices on one side so you are working with half of the blade.

Add a Mirror Modifier and check "Clipping".

Add some loop cuts from top to bottom CTRL+R and scroll the mouse wheel to increase the number of loop cuts then Right Mouse click to complete. I used 12 in this example.

Select "Proportional Editing" and a "Fall Off Type". I choose Spherical. Select vertices in the middle and press "G" and use the mouse wheel to determine how many neighboring vertices are affected (Illustrated by a circle in the viewport)as you drag. Right mouse click to complete.


How to pick good keyframes for motion tracking? What are good practices for picking good keyframes when motion tracking? How are these frames used?

What is an "ideal" keyframe?

I don't think is about having an ideal keyframe but a range of keyframes that have proper tracking information.

You'll get the best tracking out of images that have recognizable, unique features, and those features stay recognizable from frame to frame so that the trackers yield low errors. Blurred images, low contrast or flat colors make for bad tracking. Also bad for tracking are repetitive or similar patterns where the tracker might lock to the wrong place from frame to frame.
For 3D tracking it's better if the tracked image that has translation movement and parallax

So, to determine the range of keyframes to be used to successfully solving a scene, you should consider:

At least 8 common tracking points.

Accurately tracked features (or with a low error average)

Parallax or information that clearly describes perspective or any spatial transformation.

Don't use sections with a lot of fast motion blur or where the camera remains stationary. Avoid sections where you have a lot of evident distortions (ie lens distortions or artifacts caused by rolling shutters, compression errors, etc)

In other words: In the Solve section for A and B  select the frame range where you feel that the tracking has been the most accurate and has enough information to solve your scene.

If you are unsure, you can let Blender decide what the best part of your shot is by enabling the Keyframe option on the solve tab.

Note that the section of the video clip that will get solved is not limited by the range of keyframes A and B or the auto-selected by blender. The whole shot will get solved (if possible) using the values for lens, distortion, etc determided in the keyframe range.

Additional note:

If a tracked element leaves the frame but comes back later in to the shot, it is very important that you track both sections and then join the trackers so that blender understands that is dealing with the same element and not something new.

For general tips on motion tracking read: How can I get better results when doing camera motion tracking?


Flipping keyframes in walk cycle animation not working I try to flip my keyframes like in this tutorial.

I do everything exactly like in the video, but it fails.

Select all bones from armature.
Set timeline frame to 80
Select all keyframes from frame 1
Click on
Click on

Result:

What am I doing wrong? I just try to flip the keyframes like in the video.
The bones are named with the naming convention name.L and name.R.

I was already reading many same questions, but there is no working solution.

Something weird is going on, but you can solve it by selecting in edit mode all the .L bones, delete them, then select all the .R bones, Shift+D to duplicate, Esc not to move them, Shift+C set the cursor to center, make the cursor pivot point, Ctrl+M  X to mirror the bones on the X axis, Then Armature - Flip Names.

Everything now works as expected.

The reverse (L-R) of this whole operation doesn't work!


Can't access custom properties of a linked characters proxy rig I have a rigified character.
I added a custom property to the rig object to drive a shape key on the face. It works as expected in the original file: the custom property slider of the rig drives the shape key on the face.

For ease of iteration, I link the rig (as a collection) into my animation file and make a proxy out of the rig so I can animate it. Animating the rig controls works as desired.

The problem is: the Custom properties of said rig are greyed out and inaccessible in the files where the rig is linked.
This makes it impossible to animate the shape keys for the face.

Is there a way to unlock custom properties in a linked proxy rig ?
if not, is there a workaround people use to animate custom properties on a linked rig ?

Here is a screen shot of the Rig's data panel after it has been linked and proxied. if you look at the bottom, the smirk property I wish to animate is locked. Is there a way to set it up so it stays accessible even when linked, like other properties of the piccolo_rig object are ?

I decided to use a workaround. Being able to use the custom properties would be a slick option as far as UI / user friendliness goes.
But for now I've decided to create one bone per face shape and treat them like sliders where translating the bone in Y axis would drive the face shape.
This works in linked files.
If anyone wants more details about this setup I can write up something.


Bump Map Painting - Low Resolution (Cycles) I'm trying to paint a bump map but it's not looking so good. Am I doing something wrong?

I created a new 4k texture

Created a material with a bump node connected to a glossy shader

It's not looking correct. Can i enable, somehow, a high res painting?

Thanks!

I've had this issue too, I think its caus when creating the image theres a option for 16 bit / 32 bit image and you should use that rather.

And change the image nodes Linear to > Smart.


Missing face texture I downloaded a model and the face texture is not showing but im not really sure why,
anyone knows whats up?

Here's the .blend file

You didn't include the textures, so I can't make a final judgement, however:
your character uses 2 materials for the body, 9 for the eyes and 5 for the mouth. I am guessing this is supposed to produce facial expressions cartoon-style by switching the materials. I would strongly suggest to take all the different face meshes and split them into several objects, so you can easily hide the ones you don't need. Also the normals of those exchangeable parts are flipped, I don't think that was intentional.
With this setup (and I don't think this is the way you want to approach this in Blender) you're multiplying with an alpha value. Specifically with that of the animalboyaeye_alb.5.png, that image, or at least its alpha channel seems to be wrong, but I can't judge, because the textures aren't there.
Try separating the face parts, it might already make the problem go away. If not, send us the .blend with the textures.


My river water won't flow at steady rate, any solution? (found it) (edit : i've found what worked for me, check below if ure interested)
Im trying to make a steady river flow. It's actually just water flowing "horizontally" from the start (unlike my gif), but idk i've spent hours trying to do this, changing value, baking, freeing data, rinse and repeating tens of times without much result :(
What i did was basically making the ground and riverside as effectors, then i made a vertical plane mesh as inflow (with the correct normal orientation). After that, i put a big box with the side close to the start & end of my river as the domain.
I tried changing the inflow mesh with a cube instead of plane, tried checking and unchecking "is planar", changing resolution from 32 to 64.
I also tried changing the initial velocity (which i think might be the solution for this)... source velocity from 1 to 3 to 10 to 20, normal value from 0 to 5, 10, 50, 100, even 800 as i didnt know which value did what, initial Y velocity too from 0 m/s to 2, 5, 10. And permutations of those tweaks as well to no avail.
Here is my blend file if u guys wanna take a look, it's 34mb though :
https://drive.google.com/file/d/1Ck0zCwZ73lhhpn9O1ZsssvC-MICtReIK/view?usp=sharing
Thank you for your time, genuinely appreciate anyone helping me.
(Ah and excuse my english, it's not my first language :D)

idk if im allowed to answer my own question, but i think ive found the solution.
not sure which one made it work but here u go
change the plane shape into cube,
uncheck the "is planar" in the inflow mesh,
choose inflow instead of geometry,
surface emmision 1
for initial velocity,
0 source, 0 normal, initial Y* coordinate 7.1 m/s
for Y*, change it to the direction that ur river is flowing to.
hope it helps


Render on GPU from command line on Ubuntu server For best render performance and more free VRAM I installed Blender on an Ubuntu server without GUI.

I launched Blender from the command line using argument and all was OK, but after installing it uses CPU render for Cycles and I wanted to use GPU render.

Without GUI I do not understand how to switch to it and how I can set tile size of render region (to get the best performance).

I tried to replace userconfig.blend with GPU setting but Blender still renders using CPU.

I also tried to set global variation BLENDER_USER_CONFIG="path to userconfig.blend file with GPU setting, or to run Blender on Ubuntu desktop mounting Blender folder from Ubuntu server and blender still uses CPU.

Any ideas?

Whether to or to not use the GPU is a setting saved in the .blend file that you render. Under the "Render" tab in the "Properties" Panel, you can set which compute device the file will render with (CPU or GPU). Note: if you aren't editing on a computer with a valid GPU, then that setting will not appear as an option. If you save the .blend file with that setting, then the command line will render with whatever compute device you specified. (blender -b file.blend [[-args]]) Unfortunately, this cannot be set directly through the command line.

Blender Command Line Arguments List.


Rendered model is broken So I was finishing my model and I spotted this deformation.
I have bevel modifier applied, but turning it off doesn't fix it.
It also appears in rendered image

The issue seems to happen because you have an n-gonal surface (the side of the sword has more than 4 edges). Usually, when renderers encounter faces that have more than three or four edges, they get confused.

To fix this, try to select the face and 'triangulate' (ControlT) it. This will split the faces into triangles, making the shape less ambiguous for the renderer.

If this doesn't work, you'll have to manually cut it up with the knife tool (K) until only quads and triangles remain. If you do this, try to make a uniform pattern (don't just cut randomly).


How to reverse the moving of timeline in blender My timeline is moving in the opposite direction of frames like frame 50 to frame 1

You are likely pressing the 'play backwards' button instead of the 'play' button. If not, check your frame beginning and ends. I'm on phone rn so I cant show a screenshot, but its pretty easy to find.


How to increase the Space between two Edge Loops? I created two edge loops and during creation (or after) I want to move them apart. I can move them together during creation but I wanted them a certain distance from the existing edges on either side of the newly created edge loops.

This is a bit like 3DS 'slide' and 'pinch'.. the nearest match in Blender is to cut 1 central loop, then CtrlShiftR 'Offset edge slide' that loop, sending two parallel loops off in each direction. (Don't forget to check the tool's options in the 'last operator' panel).

You can then dissolve the original loop.


how can i start blender 2.8 in ubuntu 18.04 Ive downloaded blender 2.8 and extracted files to a suitable folder. But when i double click on the 'blender' program nothing happens.
I used the same procedure with blender 2.79b and that works just fine.
I need 2.80 as i'm having trouble with mhx2 import in 2.79b - the addon is enabled but nothing appears under file import, and my understanding is that mhx2 was updated for blender 2.80 and no longer works with 2.79b, and i can't seem to find earlier version....
/gary
PS it wiuld be helpful if tags could be selected from dropdown nenu or something  as i dont know all the names

The version you downloaded might not be configured for your distribution. To see if there were some error messages you can open a Terminal window in the folder you extracted blender to by right clicking in the file browser and choosing "Open in Terminal". Then run the program by typing "./blender" (or whatever the program file is called), hit enter and see if there are any error messages.

However I would advise to install Blender from another source that has been tested with your OS instead. There is a PPA for newer versions of Blender maintained by Thomas Schiex: https://launchpad.net/~thomas-schiex/+archive/ubuntu/blender
If you don't mind using the newer development version of Blender (2.81) it might be what you want. You can add a PPA to your system by following the instruction close to the bottom of the linked page or through the Synaptic package manager.


Primitive shapes whose parameters are dependent on their relative postiton Fist time posting. I love Blender (a hobbyist new user making stills and stuff) but if it is not the right software, feel free to send me off.
I'd like to have a sphere and a cone whose base is formed of the tangent points of the rays cast from the cone's tip to the sphere, depending on how far the cone's tip is from the surface of the sphere. In other words, the cone would always depict a visual horizon of the sphere: approaching it's half and an infinitesimal angle as the distance goes to infinity, and an infinitesimal radius and a 180 degree angle as the distance approaches zero. I would then be able to keyframe the distance to create an animation of how the shape of the cone changes depending on it.

Here is one workflow that might get you where you want to go:
Set the 3D cursor to world origin Shift+s, 1
Create a "unit cone" with radius 1 and depth 1:

Notice Location Z is set to -0.5. This places the vertex of the cone on the origin.
Use the object menu to set the object origin to 3D cursor. Now the cone's origin is at the vertex. All scaling and rotating we will do is reference to the vertex.
Add in a UV Sphere, leave the radius at 1 for simplicity, then move it away from the cone. While you've still got the Sphere selected, add a "Limit Distance" object constraint, set the Target to the Cone, Distance to 1.1 (a little more than the Sphere radius) and "Clamp Region" to outside. This prevents the Sphere from moving too close to the Cone's Vertex. Its hard to calculate the tangent of a point inside the Sphere!

Now we need to point the Cone at the Sphere, to do that select the Cone, and press r, y, -90 to rotate it 90 degrees on the y axis. Then apply rotation. The add a "Track to" object constraint to the Cone. Set the Target to the Sphere, and Axis to x. The Cone's base should now point to the Sphere as you move the Sphere around the scene, and you should not be able to move the Sphere too close to the Cone.

Now we need to add some Drivers to the Cone: Open the Cone's Transform panel, right click on Scale X and choose "Add Driver", on the Driven Property panel, set the "Expression" to var, and under Input Variable set the type to "Distance" and the Targets to Sphere and Cone. This should make the Cone stretch to always intersect the origin of the Sphere. You can experiment with the expression to get the effect you want.

Finally, add drivers to the Cone's Scale:Y and Scale:Z properties.
The expression is
tan(asin(1/dist)) * var

Where dist is a distance variable as setup previously, and var is height of the cone, taken from "Scale:X"


Projecting a 2D road onto a 3D elevation mesh I'm trying to create a track for Assetto Corsa (a racing game) based on a real mountain road that's close to where I live. It's an ambitious endeavour, but I hope to learn a lot in the process - even if I won't eventaully finish the whole road.

What I've already done is: I imported an SRTM elevation file with this excellent plugin which turns it into a georeferenced mesh. I had to delete big parts of this mesh because it was huge, but now I have the mountain ready.

Next I imported an OSM file containing the road in question with a plugin written by the same author. Now I have two gereferenced objects which superimpose perfectly from what I can tell.

Perspective view with the road floating above the mesh

The problem is that, while the mesh is 3D and ready to use, the road is a 2D path. What I want is to have a 3D path of the road (with elevation) which I can then use as the basis of the road for the game as explained in this tutorial.

Top down view

I think I can obtain this path by:

Intersecting an extrusion of the 2D road path with the 3D mesh, but how do I do this? I went as far as creating the extrusion, but I don't know how to do the intersection.
Using Knife Project to cut the mesh with the road's projection. Again, I tried, but Blender crashes, so I'm not sure if I'm doing it right.

Any help appreciated.

you can do that with the shrink wrap modifier as follows :

original mesh

Add the shrink wrap modifier :

and you will get this

if the road is not curved enough " didnt follow the mountain exactly " try to subdivide it before applying the modifier


Converting metaball object to mesh in python returns empty mesh In my script I'm trying to:

Create a metaball object (works)
Add metaball elements to it (works)
Convert it to a mesh (returns empty mesh)
Store the data in a bmesh (works, but is of course still empty)
Delete the metaball object (works)

I'd like to understand, why my mesh is always empty and to fix the underlying issue.

My source code:

# Create metaball object
mball = bpy.data.metaballs.new("TempMBall")
mball_obj = bpy.data.objects.new("TempMBallObj", mball)
context.view_layer.active_layer_collection.collection.objects.link(mball_obj)

# Add one element to it
ele = mball.elements.new()
ele.co = (0.0,0.0,0.0)
ele.use_negative = False
ele.radius = td.sk_base_radius / td.sk_min_radius

print([ele for ele in mball.elements])  # Make sure there is data in mball (there is)

# Convert it to a mesh
mball_mesh = mball_obj.to_mesh()
print([v for v in mball_mesh.vertices]) # Empty!

# Store copy of the mesh in a bmesh for further manipulation
bm = bmesh.new()
bm.from_mesh(mball_mesh)    # Still empty!

# Delete metaball object
bpy.data.objects.remove(mball_obj)
bpy.data.metaballs.remove(mball)

# My custom mesh manipulation and writing the bmesh into a different object

bm.free()

Thanks to this answer on blenerartists I now know what my error was.

In order to properly convert a metaball into a mesh you have to look at the evaluated metaball. The correct code looks like this:

# Create metaball object
mball = bpy.data.metaballs.new("TempMBall")
mball_obj = bpy.data.objects.new("TempMBallObj", mball)
context.view_layer.active_layer_collection.collection.objects.link(mball_obj)

# Add one element to it
ele = mball.elements.new()
ele.co = (0.0,0.0,0.0)
ele.use_negative = False
ele.radius = td.sk_base_radius / td.sk_min_radius

print([ele for ele in mball.elements])  # Make sure there is data in mball (there is)

# Convert it to a mesh
depsgraph = context.evaluated_depsgraph_get()
mball_mesh = mball_obj.evaluated_get(depsgraph).to_mesh()

# Store copy of the mesh in a bmesh for further manipulation
bm = bmesh.new()
bm.from_mesh(mball_mesh)

# Delete metaball object
bpy.data.objects.remove(mball_obj)
bpy.data.metaballs.remove(mball)

# My custom mesh manipulation and writing the bmesh into a different object

bm.free()


How to make material from multiple objects appear as one. Ignore interior faces? I'm struggling with a what seems like a simple task, both in an animation sense and a 3D printing sense. I'm attempting to create a model similar to what I'm showing here that would allow me to take a point source of light and run it along the interior of a "blue glass" material. Here's my steps so far...

I created the circles with the circle curve.
Added depth to them, made them full, etc. in the object data panel.
I converted them into meshes.
I joined them all into one object.
Used edit mode to remove and doubled vertices.
Created a larger square and did an intersect boolean to attempt to
get only a single layer of mesh...didn't work.
Created my material and added lights.

You can see when I have the light in a part of the model that has no interior faces then it fully shines down the tube. When it's behind or in an area where there are interior faces they occlude the light.

Is there anyway to make Blender behave as if the whole object is solid even if it isn't? I understand the best way to achieve the look I'm wanting is to have no interior faces, but that seems to be an impossible task given the modeling that I'm doing. This example is a heavily simplified version and the full model has many more layers of circles at descending sizes.

I'm also running into this problem with creating these models for 3D printing. The interior faces are a real problem that I can't seem to overcome.

I've got two images attached, one showing the lighting issue, the other showing a fuller version of my model. TIA

This should probably have been a comment, but I can't create those for now...

If you want to combine objects while eliminating the interior surfaces, the boolean 'union' operator seems the most appropriate to combine your circles. This operator removes internal faces (creating vertices where needed).
It's probably going to be quite fastidious to do, unless you can do it in stages where you combine a few tori, and then duplicate those units (e.g. create units of 4 red circles and one purple).


Auto-smooth bevel object I'm trying to make an achitrave using a path with a bevel object. It works pretty well! But I can't get the shading right. When set to flat shading it looks good except you get the faceted reflections on the smooth bits:

If I set smooth shading it screws up the sharp edges:

There is an "autosmooth" option for normal meshes that would solve this, but I can't use it on paths. Is there any way around this problem?

Keep smooth shading but simply use 2 very close control points at your sharp edges. This way you can control your bevel shading perfectly, the closer the points, the sharper. The drawback is added geometry (one additional curve segment).

Here is a sharp edge with a single control points. No sharp edge:

Instead, the same edge but using 2 control points very close to each other:


How to make some value sliders of a node in a node group display on the group node I made my first node group , now i want the node group to display some fields inside it on the node itself , how do i do that.

Use some nodes with sliders (for example a Map Range Node) on it and connect it to the hollow group input or node as seen in this screen shot.

After that use the N-Panel to set up the minumum and maximum slider range.
The Result looks like this:


Iterate over Properties of an Operator I'd like to iterate over the properties (names and values) of a dialog operator in its execute method.

My current way of doing this involves a metaclass and multiple inheritance...

Is there any simpler way?

To iterate over all RNA properties you can access:

self.rna_type.properties.keys(),

In most cases you'll want to skip rna_type, which is added automatically.

Example operator which prints its properties in order.

import bpy
from bpy.props import StringProperty

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

    foo = StringProperty()
    bar = StringProperty()
    baz = StringProperty()
    spam = StringProperty()

    def execute(self, context):
        for k in self.rna_type.properties.keys():
            if k == "rna_type":
                continue
            print(k)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()


How to access/edit information about included audio files? I have a blend file that is supposed to be packed with a few wav audio files, but it seems the author forgot to pack them, and I don't have the files, if I try the option File>External Data>Pack into blend file blender shows the error:

Unable to pack file, source path '//long path/something.wav' not found

I've found the library where those files were originally downloaded, and downloaded the required files, now I want to edit the information in the blend file so that blender can find those files.

You can edit the file path of the Sound Datablock (and any external file) using the Outliner:

From the header, make sure the outliner is set to display 'Datablocks'.
Browser to the Sounds section and find the sound datablock you want to edit.
Expand the RNA and modify the File Path string as required.
You might have to restart Blender to force a reload.


Strange twisting from multi-chain armature I am making a rig that transfers motion from one mesh to another via bones. This is for complex mesh hair strands. The base mesh has a cloth sim on it. Chains of bones are constrained to follow this mesh. Another version of the mesh is then driven by this bone armature.

It works by IK constraining the tips of bones to vertices. Their roots are locked by being Connected to the bones high up the chain. Each strand has 5 vertical loops. There are 3 bone chains per strand, on the edge and center loops.

This picture shows the armature and the mesh it is driving, but not the mesh the armature is constrained to.

All areas of this rig are working, but I am getting strange behavior in some parts. In some areas, mostly at the tips, there is twisting in the mesh being controlled by the armature. It appears to be twisted by 180 degrees. Currently, I can solve it by manually selected the three bones that converge at the tip, and then rotating them by 180 degrees on their local Y.

I would like to remove this twisting. I do not understand where it could be coming from. Inherit rotation is disabled on all bones. I've tried changing the bone's rotation mode off Quaternion, but it makes no difference. This rig works entirely by copying location, not rotation, so I do not see how there could actually be any rotation data on the bones (there is none to reset.) Removing weights from the side bones does not help. I can only conclude that the bones are fine, but the mesh is somehow flipping? What could cause this?

EDIT: Here's a link to the file. It's a .zip because it also contains the .mdd needed for it. Apparently those cannot be packed into the blend file. Load it into the Mesh Cache modifier.

https://www.dropbox.com/s/ki3slubwrpb1j9r/HairRigTwistingProblem.zip?dl=0

EDIT 2: I have found a workaround. If I make a vertex group of the loop that runs horizontal across the tail that is at the top of the last bones in the chains, and give them copy rotation to that vertex group, it seems to fix the problem. I may have to pursue this workaround as the full solution, but it does not explain what's going on in the first place.

The problem is 3 chains per hair strand combined with that you skipped many segments an created long bones over them, so the bones cannot follow the mesh strand exactly. They try their best to fit the shape, but this results in twisting at the tip:

The 2 side chains are redundant. Build only 1 chain but for every segment and set the bones like this so they rotate with the mesh:

You cannot notice any folding in the strands anyway, you will hardly see any difference.

If you really want to copy the motion exactly, rather than setting up 3 chains for each strand segmented like crazy write a script that will generate disconnected bones on every face and constrain each to that particular face with a Child Of with vertex group of that face. Child Of Constraint Set Inverse with Python

Also this simulation is not very high quality, the mesh oscillates with high frequency and you can see some nasty artifacts (but that does not cause the problem)

In the armature modifier check Preserve Volume (that does Quaternion skinning which you want)


3d view looks really wonky. All I see is what appears to be the camera view? Not sure how I ended up with this view in my 3d view window. I looked at the display in another 3d view and it shows the whole scene, as it should.

I can't see any difference in the display properties.

How did I end up with this wonky view? And, is there a way, short of collapsing that window and re opening it, of getting it back to the "standard" view?

You probably wanted to draw a border and accidentally hit ALTB instead of what you wanted and drew a clipping border. The magical cutout to help you see clearly in a packed scene. Just hit it again and it should vanish.

https://docs.blender.org/manual/en/dev/editors/3dview/navigate/clip.html


Deleting temporary mesh after extracting data When extracting data via temporary mesh, like this:

mesh = object.to_mesh(bpy.context.scene, apply_modifiers=True, settings='RENDER')

Do I need to delete this mesh, after I'm done extracting data? Will it stay in memory after running the script?

Yes, you need to deleted them by yourself.

If you print that mesh object in script multiple times, you will find out that the name change by adding post-fix serial number to its based name as follow:

<bpy_struct, Mesh("Suzanne.002")>
<bpy_struct, Mesh("Suzanne.003")>
<bpy_struct, Mesh("Suzanne.004")>

And if you are using Blender 2.8, in the Outliner Panel, you can change display type from View Layer to Orphan Data (what an adorable name), the meshes you created will stay at there. You can pin them by pressing the cross button, making a fake user to let Blender keep the data-block.

If you need to delete it in script, you cannot del mesh since the object data-block was already binded in to bpy.data.meshes, use bpy.data.meshes.remove(mesh) instead to delete it.


Render 100k objects each with independent color and scale through time I'm trying to visualize some data that is essentially 100k time series, each with an associated position. I'd like to render this with each object a sphere whose color/scale/alpha is driven by it's time series (something like https://youtu.be/JH6WOUFjAys?t=19 but orders of magnitude bigger).

I currently have a script that populates the scene with UV spheres for each of the objects, inserts all the time series points as keyframes, and uses drivers to share those properties. It works but is incredibly slow to set up. Part of that is inserting all the keyframes, but even duplicating the object that many times is challenging.

I've consider trying to use animation nodes, but don't see how I could pipe in custom data. Particles are the typical answer for this many objects, but I don't see how I can control their position exactly (although I have played with using  PLY point cloud) and for sure how to map a time series to each particle.

I'd be happy to write a custom particle system if that's the sensible approach, but can't really find any examples where to start for that.

I have a first pass template working with animation nodes (see attached diagram) but find this takes 10s per frame to prepare the scene, even with only 500 objects. I suspect this is because each pass it has to reparse the entire text file for each frame. Would there be a way to cache this or use a binary format? Given each frame corresponds to a sequential row into the text file it seems like there should be a more efficient way.

The most fundamental issue with your node tree is the fact that you included the file parsing node tree inside the loop. So for n number of iterations, you are slowing your node tree by n number of times, in this case 500x ! Furthermore, you need to take advantage of Animation Nodes's victorization abilities, that is, some nodes can process a set of data by default, without the need to use loops. And finally, as you suggested, the data can be cached, and caching is something we can do in Animation Nodes.

While CSV can be used, you data set seems to be very big and so it is recommended that your file is in a binary format which you can parse using python and pass the data to Animation Nodes using a script node, alternatively, you can use something like json or yaml.

Parsing

Lets say your CSV file is as follows:

1,1,0,1,8,1,5,7,3,0
6,1,4,1,3,9,6,6,0,7
0,7,8,6,1,2,7,9,5,6
8,4,8,2,0,7,2,4,6,1
4,7,4,6,6,1,0,9,0,3
0,3,8,4,8,3,4,5,0,1
9,2,3,0,8,1,5,2,7,5
2,4,9,5,7,3,4,4,6,0
4,3,1,2,0,6,4,7,6,4
5,9,8,1,6,1,1,8,8,5

Where the first three characters are the x,y,z locations and the rest of the line is the scales at frame 0,1,2, .... This sample file can be parsed as following:

The output Locations vector list is of the same length as the number of objects, where each vector represents the location of one of the objects. However, the Scales vector list is different, it is structured such that the first n number of vectors are the scales of the first object at the frames 0,1,2, ..., the second n number of vectors are the scales of the first object at the frames 0,1,2, ..., and so on. Notice that n is equal to the number of frames there is.

The parsed data is constant, so we can safely cached it. Caching can be enabled through the advanced node settings of the loop:

Instanced Object Transforms

There are multiple ways to generate and position the objects, each have its own limitations, the first of which is by using the Instance Object Node which you used in your node tree:

Using the parsed scale data is not as straight forward as the location data. Notice that the scale of the first object at frame zero is at the index 0, the scale of the second object at frame zero is at the index 0+p where p is the number of frames, the scale of the third object at frame zero is at the index 0+2p and so on. So in general, to get the scales at the frame f of the nth object, we use the general formula f+np. Also, notice that the number of frames is equal to the length of the scales list divided by the number of objects. By using all of previously mentioned facts, we can get the list of scales at some frame using the Slice List Node using the step size as the number of frames:

Notice that we disabled End in the slice node to instruct the node to take steps till the list end. And by animating the scene, we see that it does work as expected:

The problem with this implementation is that it will be relatively slow at higher number of objects, in the next section, I will introduce you to another method to instance tens of thousands of objects with no problem.

DupliFaces

Blender has this feature called DupliFaces, it allows us to instance objects along polygons where the scale of the objects is the area of the polygon and their locations is the centers of the polygons. In Animation Nodes, we can create a mesh composed of triangles such that their areas equals to the scale of the objects and their centers to the locations of the objects, and by using this mesh as a base for dupliFaces and by using a sphere as the parent object, we get exactly what we want:

The Unity Triangle Node is only available in version 2.1, so if you don't have it, just create a mesh with vertices locations equal to:

$$
\begin{bmatrix}
-3^{-\frac{1}{4}} \\ -3^{-\frac{3}{4}} \\ 0
\end{bmatrix}
\begin{bmatrix}
3^{-\frac{1}{4}} \\ -3^{-\frac{3}{4}} \\ 0
\end{bmatrix}
\begin{bmatrix}
0 \\ \left(\frac{2}{3}\right)^{\frac{3}{4}} \\ 0
\end{bmatrix}
$$

Notice that to activate duplication, you have to change dupli_type to be FACES, parent of the sphere to be the mesh we created and use_dupli_faces_scale to be True. And that's what we did using the attribute nodes.

A blend file that implements simple Duplicate Groups in AN:

Conclusion

Don't use loops unless necessary.
Put anything outside of loops if you can.
Cache subprogrames if needed.
Use Duplicate Groups whenever you can.

Coloring Objects

I researched coloring the Duplifaces instances and found that there is no way to color them individually, that is, unless we can decode the random output of the Object Info Node and extract the object index out of it or generate a 3D color map and evaluate the instances locations at it, which is also very hard to do in cycles. We really need a better render engine, a render engine we deserve !

So our options are limited when it comes to coloring:

Use a material for each object. Disadvantages: 100k material in a single scene ... I will reject this method.
Another method would be to use a single material and vertex colors. Disadvantages: Objects have to be Deep Copies, that is, meshes have to be copied as well !
Set object index for each object and use the Object Index Output from the Object Info Node as texture coordinates for a Nx1 image where N is the number of objects, this texture stores the color of each object in a pixel.

Vertex Colors

This method being simple, it gets slow rapidly, it is 80x slower than our original implementation. Notice that Deep Copy has to be enabled.

Object Index

This method is also simple, but much faster, much lighter and much much more memory efficient. This is due to the fact that we don't Deep Copy the objects and we set only a single integer instead of a full vertex color map.

First step is to set the Pass Index of each object to be 0, 1, 2, 3, ... which represents the index of each object, then we create an image with dimensions Nx1 where N is the number of objects. The first pixel is the color of the first object, the second is the color of the second object and so on. To create this image we use the script:

if imageName in bpy.data.images:
    image = bpy.data.images[imageName]
    image.generated_width = width
    image.generated_height = 1
else:
    image = bpy.data.images.new(imageName, width, 1)

image.pixels = [c for color in colors for c in color]

In the material side, we normalize the indices to represents texture coordinates for an image by dividing by the number of objects. The implementation is as simple as:

Notice that if the number of objects is constant, you may removed the Object Attribute Output node because the objects already have their indices set, this will reduce the execution by almost half! Also, note that we can automatically set the value of the divide node through animation nodes using the Cycles Material Output Node:

I think it is obvious which method you should be using.


How do I make my textures show up in render? I have only dragged pictures onto my objects for my animation and I'm guessing thats what the problem is. It shows up fine in edit mode or whatever but when i go to render it, it is completely white. Could someone please look at my file and tell me what I did wrong and how to fix it? http://pasteall.org/blend/31117

You've created a world texture, but I think you want a material texture.
To add a texture to a object, you must first create a material:

With the moon object selected, press new in Properties > Material:

Now you can assign the texture you already created to your object, by selecting it in the texture panel, making sure that the middle option (checkered ball icon) is selected:


Noise texture node is not available I am creating a shockwave similar to that in a youtube tutorial, and I want to make it multiple colors (Purple and red), but it seems the noise texture node is not available in compositing, which is EXACTLY what I need.

Shockwave tutorial:https://www.youtube.com/watch?v=TWNLOjw5HYc&t=1829s
However, since it's not at my disposal, I need another way of getting this result. Anyone know how to do this? Or, if there  is a way to get access to the noise texture itself, I'd appreciate that as well. Anything helps. Thanks!

check the bottom of the frame you captured, he is not editing the Composition nodes, he is just adding the noise texture to the material so the strands would have color variation.


How to make "Idle" animation like in "Overcooked"? I am new here and I wanna try to make Idle animation for my character like in game "Overcooked".

Example:

I try to make skeleton animation like here.

But my Blender give me error.

(I think it's because of my shoulders).

Anyway, give me, please, some advice and tips, how to make animation correctly for my character? Bone structure? Weights? (I think error not main qestion?)

Thanks for attention and help!

P.S. English is not my first language.

P.S.S. Files? Here and here?

If you want to make it bounces a bit like in your animated gif, you can select your top bone and altP > Disconnect Bone. The bone remains the child of the bottom bone but it can move independently. Now you can move it up and down. About the rest of your question, in my opinion it's much too broad for a forum.


Is blender capable enough to model this? let's say I have a solid cylinder surrounded by a cloth like pipe. I want to bunch up the cloth to one end without it going inside the cylinder.

is there a way to make parts of the cloth move and collide with itself as parts underneath it moves up?

I'm assuming you want to do this dynamically.

Add a rigid body to your underlying object, add a cloth simulation to your outer pipe and enable self collision.

Now it's just a matter of adjusting the cloth simulation settings to get what you want.


Animating terrain as its modeled Is there a way to animate a terrain as it is being modeled? As in have a hill rise up from a plane. Also is this possible with the terrain having a texture to it?
How would I go about this?

You can use animated shape keys for it. To avoid too much stretching of the texture, you can use object coordinate.Like this:


HELP: Mesh Gaps & Bone Properties Can't say I'm too experienced with modelling or Blender in general but over the past week or two have been learning to rig a model, part of which has had some extensive edits through swapping out different body parts from other models.

I've now been left with a bit of a problem and I have absolutely no idea how to fix it so I would appreciate any help anyone can give.

The torso is displaying a lot of blue lines in the mesh, sharp edges I believe their called, and when I try to pose the model the torso forms gaps where the sharp edges are as if there not attached. Anyone know how to resolve this?

The other issue I have is with the bones. This model it basically a reference tool, a manikin for me to use in Clip Studio Pro. Problem is that some of the bones in the hand are showing up as selectable for posing/distorting the model once exported and yet these bones should not be used at all. The same bone layout exists in some official modelling files I've used for reference, and those do not appear selectable in CSP. Does anyone know how to completely disable these bones/make them unselectable?

PS.
As you may have noticed in the last set of images, the armature has these bones - Bone.001, Bone.002, Bone.003, and Bone.004. They do not appear to be anywhere in the rig and I cannot seem to delete them. Anyone got any ideas how I can remove these seemingly redundant bones?

Any help anyone can give would be greatly appreciated. Thank you! :)

With the sharp edges/splits, it looks like the problem is that you are using an edge split modifier, and it is above your armature modifier in the modifier stack. Try using the up/down arrow buttons in the top right corner of the modifier to move the edge split modifier below the armature modifier.

As for the hand bones, I don't know enough about the export process here (are you using fbx or some other format?), but the bones may exist on a different bone layer in the armature. You could try looking through each layer under the armature tab of the object properties (the tab with the symbol that looks like a little man) by clicking on layers to toggle their visibility.

The other alternative is that the bones may have been hidden using ctrl-h or similar. You can unhide everything in a particular mode (armature edit mode in this case) by using alt-h.


Image texture not showing on object I set up the diffuse material, add a image texture node, select the image and yet everything remains beige. Any ideas? The tutorial I was following along it worked just fine when he did it... but he was using v2.6x

You probably didn't add a uvmap. A UV map is what maps the 3d coordinates of the object to the 2d coordinates of the Image being used as a texture.

Notice properties -> Data -> UV Maps has no entries.

The simplest way to see a texture there is to press the + symbol to the right. Your viewport rendering will show a texture on the Cube.

See blender's manual page about uv_mapping.


Cannot merge or slide accidentally opened windows I realise that you should be able to grab and slide view layers to close them. I have done this successfully in the past. However, as a NOOB, I managed to get into a complete mess with shader windows that, when I tried to slide away, just opened window after window. I do realise it will be because I got the grab and slide wrong. However, they are not now in any position to slide over each other and I also cannot merge them for similar reasons. They are lying one on top of the other and grab does not achieve anything. Is there another way of closing these?

Managed to find a way with a lot of trial and error. The grab and slide worked eventually after selecting different combinations of windows. Cheers


Access the weight values of a polygon How can I access the weight values of a polygon resp. it's vertices by the vertex group name?

ob = bpy.context.active_object
vertexGrp = ob.vertex_groups["Group1"]
for poly in ob.data.polygons:
  weight = 0
  for vert in poly.vertices:
      weight += ob.data.vertices[vert].groups[vertexGrp].weight

      # The commented lines didn't work either
      #weight += ob.data.vertices[vert].groups[1].weight
      #weight += ob.data.vertices[vert].groups["Group1"].weight

  #do something with the weight

It's about the last line, including the commented ones, that give me an error, it seems I don't use it right. Googled for hours, but didn't find an example I could understand. Please help.

OP (me) didn't realise that a weight value of 0 auto-removes a vertex from the group. Also you need to use the index for accessing the weight data. So this works:

import bpy

ob = bpy.context.active_object
vertexGrp = ob.vertex_groups["Group"].index
for poly in ob.data.polygons:
    weight = 0
    try:
        for vert in poly.vertices:
            weight += ob.data.vertices[vert].groups[vertexGrp].weight
        weight /= len(poly.vertices)
        print(weight)
    except:
        print("no vgroup")


Can I merge multiple objects into one, while keeping the rig working? So I was following this guide of creating a low poly person and rigging it, and as you can see he created a person from multiple cubes and spheres and connected them to one rig manually, by selecting each object and connecting it to a proper bone. That works beautifully and it's simple, intuitive, and fast to me.
Now I wanted to import my model with working rig to Unity, and he also has this guide. The first problem is that he uses a model that is a single object, so I just use Ctrl + J to merge all cubes and spheres into one object, but it breaks the rig completely. Here he uses automatic weights and weight paint, and both of these work terribly in my case. I wouldn't have such a big issue with facts like the forearm actually moving some bits of my legs as well if the weight paint tool wasn't so painful to use for me. I struggle so much to remove every bit of paint anywhere besides where it should be and, even if I succeed, I can never get it to work as it used to while using the first method (like forearm scaling down and leaving the bone while rotating for whatever reason).
Is there any way to somehow merge these objects and keep the skeleton working? I do realize that the rig breaks because references break when I merge the objects, but there's a couple of reasons why I wanted it to be a single object, like changing the center of the whole object to the bottom and make it work so I can animate it with Unity.

For the rigging of machines / robots / non-organic objects, etc. you have 2 methods.
If you want to keep separate objects, use basic parenting: Select on piece, shift select the armature, switch to Pose mode, select the bone you want and CtrlP > Bone
If you want to join all your objects into on (i.e. your case), parent with vertex groups:

Select all your objects, join them with CtrlJ
Select the object, shift select the armature, press CtrlP > parent With Empty Groups (which is going to create vertex groups in your objects but no vertex is assigned for the moment)
Go in Edit mode, select one part of tour object (example: the head), go into the Properties panel > Object Data > Vertex Groups, select the head vertex group (i.e. the vertex group that has the name of the bone that is supposed to control the head), click the Assign button under the Vertex Groups list, and so on


What is the purpose of the "active" toggle on fcurve modifiers? What is the purpose of this toggle?

What can it be used for?
The manual page doesn't mention anything about it as far as I can see.

For example, if I click on the noise modifier and it put my mouse over it, it says "F-curve modifier is the one being edited":

and if I click on the noise modifier and it put my mouse over it, it says "F-curve modifier is the one being edited":

The graph displayed looks the same whether one or the other is selected.

It basically says which modifier you clicked on

Maybe this could help:
http://www.blender.org/api/blender_python_api_2_75_3/bpy.types.FModifier.html


How do I calculate an angle of a surface? I want to angle this cylinder to have the same angle as the top surface of this wedge.

How do I match the exact angle of the surface to the cylinder?

Besides calculating the angle manually via trigonometry - you can actually snap and align objects to faces.

Turn on snaps, select face. Turn on Align rotation with the snapping target.

After you snap it, the angle should be displayed in the cylinder's transform.


How to make a rope bridge in blender? So, I want to model a rope bridge in the image below. I attempted to do this by making the individual bridge steps and then applying a curve modifier and then an array modifier.

However, it'a yielding incorrect results:

How do I rectify this? If there is no viable solution for my method any other attempt/method are also acceptable provided they are not too high poly and are easy to unwrap.
This is my setup:

The order of the modifier of the array should be on top then below the curve modifier.

And the Rotation and scale should be applied

Below i have change the order of the array on top and then the curve modifier.

Then applied the scale and rotation. (Ctrl+A)

Rotate at Z axis 90 degree

With the array increased the count and adjusted the bridge.

Press ctrl+N to flip normals

Adjust the curve to align the starting point


Multiple UV for unwrapped object Creating a plan of a room with 2 types of wallpaper.
I am using a UV map for each wallpaper.
I managed to get the UV map for wallpaper 1 (called StripeWallpaperLivingRoom) to successfully apply to the first set of walls. At this time, during development, I had unwrapped the other walls with this map but was going to sort that out when applying the second wallpaper (PlumWallpaperLivingRoom) to these walls.
I am attempting that now and unwrapped these walls so that they appeared default blank. However, although I have the unwrap mesh set up correctly aligned for my second wallpaper, it is not reflecting on the actual wall render.
The image for the correctly rendering StripeWallpaperLivingRoom is called 20-944_3.jpg and PlumWallpaperLivingRoom is called graham-brown-wallpaper-20-200-76_1000.jpg.
In Materials, these are called StriaStripe and StriaPlum respectively.
The Texture property does seem to only reflect the 20-944_3.jpg so maybe I should have done something here?? Also, even though I did unwrap to remove from the original UV map, the maps for the original 3 walls have appeared randomly on the original StripeWallpaperLivingRoom  and I think this is overriding my new PlumWallpaperLivingRoom map.
I am still a NOOB so if you can see where my misunderstanding is, please can you explain in detail. Thanks.
I am attaching screen prints to relate this info to.

You have two materials for one object: StriaStripe and StriaPlum. StriaStripe is on top and was put on the object first, and therefor the object is shown with that material.
If you delete StriaStripe in the Material Properties tab, the object will only have StriaPlum as a material, and then you can see it on your object.
But maybe you don't want to delete it.
In that case you have to select StriaPlum in the Material Properties (click it and it will have a gray bar over it). Then go into Edit Mode with Tab  and press A  to select all the faces of your object. Then click Assign (under the material list in the Material Properties tab), and the faces will get the selected material. Now the object is shown with the other material.
So with the Assign button you can give different materials to different faces, and one object can also have a material on part of the faces, and another material on other faces.


Texture disappears when "Render Image" is clicked The main screen before clicking "render image":

Page 1 of the options (pages made by scrolling):

Page 2 of the options (pages made by scrolling):

I am very, very new to Blender, so bare with me.

I had a friend make a model for me.  He assigned two textures to two objects called "Cube" and "white."  Each works properly when the render view is closed, but when I generate a render, no matter what pose, all textures disappear, and the model is solid black without shading.  How do I fix this?

Thanks to Scott Milner, the issue has been solved.

A light source needed added.


I cannot change a font I have been trying to adjust something in the Udemy Blender Classes

In previous lectures, barely into some, the numbers in the lower left are referenced. This is something that appears on the header bar for a moment when making adjustments.

How do I adjust that? I have fixed the font sizes, added in a theme, but this one area remains pretty much unreadable.
CAN this even be adjusted? For me this is barely readable.
For all the times it HAS been referenced I can only think it will CONTINUE to be referenced and I sure would like to be able to read it.

No. You can't change the font size.

I think this is an issue with blender and should be fixed as soon as possible.

But if you think other way around, then the answer is, Yes. You can change it's color.

In themes, you can change is background color via Header and text color via Header Text. Both available in 3D View category.


Run code when addon is disabled through preferences but NOT when blender closes I noticed that when it comes to addons, unregister() gets called both when disabling the addon AND when exiting blender.
I have an operation I only want to perform if the addon is disabled from the user Preferences, but NOT every single time blender closes.
Does anyone know of a way to differentiate between the two situations?
Some context:
my addon needs to copy custom matcap files to blender's user path (datafiles/studiolights). The problem is deleting them only when the addon gets unchecked in the preferences, but not every time blender exits. Copying those files into that user path seems to be the only way to install a matcap.

Not sure this is the best answer, but you can check if the current space is the Preferences windows in unregister
def unregister():
    if isinstance(bpy.context.space_data, bpy.types.SpacePreferences):
        # your code here

This should run the code when the user disables the addon from the prefs windows and it should not run the code when Blender is closed. In other cases it may or may not run, so this only works if "best effort disable-detection" is okay for you (it sounds like it is).


Can one create a video from sequence of meshes that you already have using blender? If I have a sequence of .obj (or any other readable format) files created from my own simulation code (say cloth simulation), can I use the rendering capabilities of blender to generate a video?

Is there a way to set the material properties for frame 1 and use the same or rest of the frames while the corresponding meshes are imported afresh from that ones I provide?

If you can get your sequence into a .MDD or .PC2 format, you can try using the Mesh Cache modifier.

If that doesn't work, you can try this addon which handles .obj sequences.

A third option is to write your own python script to toggle the visibility of each mesh so it is visible for only one frame. You can do this with a script that sets the object.hide_render property accordingly.

You can copy materials to from the active to the selected objects with CtrlL> Materials.


Odd Reflections occurring within my scene There's been odd reflections within my scene an example of this is shown below:

The My goal is to try remove the green tinge/reflection off of certain objects within the scene, the ground is creating the green diffuse.

I've tried turning off all ray visibility options on the lights and the objects.

Alright, i fixed this through turning the worlds diffuse back on as stated by Leander, then turning off the grounds diffuse which stopped the ground affecting the rest of the scene


How to make Abstract EM Waves material in Cycles? I found out a cool image on Internet, and I want to recreate a similar scene (or an animation) with Blender (using Cycle).
But after all of my researches, I didnt find out a way to make this type of material. I also tried a lot of different node trees, but no sucess...
I hope that someone have some tips, and I hope that you'll understand me :).
Thanks for reading.
- A.C

This answer https://blender.stackexchange.com/a/64978/29586 created a wispy material in 2 dimensions only. The same principles can be extended to create a similar volumetric material.

Starting with the Generated coordinates we can create a volumetric horizontal 'plane' simply by controlling the emission based on the Z coordinate. This could be achieved using Maximum and Minimum nodes to control the emission at certain 'heights' in the volume. However, using a Power function and other Maths nodes allows the cutoff to be varied and 'focused' as desired.

The emissions is around the plane Z=0 with full emission at Z=0 and emission falling off at either side, controlled by varying the Focus and Intensity input nodes to produce the following effect.

Adding in some Noise - controllable via a Mapping node - makes it less regular. The individual X and Y Scale factors can be used to stretch the noise into ripples and/or adjust for the dimensions of the containing mesh if required. Note that the output of the Noise texture is reduced by 0.5 so that the noise is centered around 0.0 and it can then be multiplied by a scale factor to allow the noise to be varied dynamically (the Mapping node can't be driven directly by an input value).

Adding a twist to the plane is complicated by the fact that the Mapping node does not provide inputs to very the values within the material - instead, we need to manually apply rotation based on the Y coordinate using matrix multiplication as described here https://en.wikipedia.org/wiki/Rotation_matrix. ie,

X = x.cos(angle) + y.sin(angle)
Y = -x.sin(angle) + y.cos(angle)

This can be achieved as follows :

Also, add a Color Ramp to fade out at the edges to limit the 'plane' to the range -0.5 to 0.5 (otherwise the rotated 'plane' will extend out to the edges of the mesh as it twists (rather than staying the same width)).

To replicate the effect in the sample image you can adjust the Color Ramp so that the edges are more pronounced and with the centre darker than the edges and blending between the two colors. It's important that the far edges of the color ramp fade out to black to limit the outer edge of the 'wave'.

For additional variation, add some modulation of the rotation by using an additional Noise texture to vary the rotation.

The final material is as follows :

Adjust the various Input nodes, Color Ramp, Texture Node Scales, until you get the desired effect.

Blend file attached

For ease of re-use, the nodes can be placed in a Node Group.

Note that 'Phase' parameters have been added to allow the phase of the waves to be controlled.

Positioning multiple meshes and animating the waves can produce the following result :


How would I go about remapping this UV I've imported a model but the UV has made the mesh have two faces.
What's the best way to fix this or is there a tutorial on fixing imported UVs?

7.png

If you have imported the mesh, then maybe it's just how this UV is supposed to be used.
It looks like the problematic area is where there's supposed to be hairs. My guess is that the texture you're using isn't used on that area.

Then, either it's a matter of different UV sets, in which case you just might check in your object's Data tab if you have several UVs, and unse them accordingly in your material :

Either you just have to select those faces, and assign them to another material :

Or maybe both.


what do you call this round button? and how can I summon that button?(hot key and other way that could summon it with mouse.)

That´s the official PIE menu addon. Go to user preferences >> Addons >> Type in the seachbox: pie. Select all 3. Now you have special shortcut keys that will display what you see on the screencap. Specifically invoke it with tab.


Animated GIFs in Dynamic Previews Enum Is there any possibility to load animated gifs as a custom icon, which then would be viewed as animated sequence right in the preview? for now, it's just blank and no static preview generated

For testing I used the "Ui previews dynamic enum" template in python templates (in Text editor)

EDIT: IF there is no possibility to load gif, anyone here knows the alternative?   Maybe fake somehow animated preview, but for user it'll be looked like gif animation

Fudge it via the draw system.

Emulating the frames of an animated gif by using the 4 triangle icons. The simple panel template has been edited to add this "animated" icon to a label.  The icon will step thru its list when the draw is called and panel updated. Mousing over the area, scrolling the area etc will tick the animation.

import bpy

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "Layout Demo"
    bl_idname = "SCENE_PT_layout"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"
    i = 0
    icons = ['TRIA_RIGHT',
             'TRIA_DOWN',
             'TRIA_LEFT',
             'TRIA_UP']

    @classmethod
    def icon(cls):
        cls.i += 1
        if cls.i >= len(cls.icons):
            cls.i = 0
        return cls.icons[cls.i]

    def draw(self, context):
        layout = self.layout
        layout.label("Anim %d" % self.i, icon=self.icon())

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

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

if __name__ == "__main__":
    register()

Ok that's not too impressive, need some way to tie it to time better.  As an example  redraw the properties area on a frame change. Run code and start an animation to see effect.

import bpy

def redraw_props(scene):
    for a in bpy.context.screen.areas:
        if a.type == 'PROPERTIES':
            a.tag_redraw()

bpy.app.handlers.frame_change_post.append(redraw_props)


Animate objects created from a grid-mesh / plane My Goal is to animate how a plane can be used to create certain objects using the bend / other modifiers

Plane to Cylinder

Cylinder to Torus (note: had to rotate the Empty for this to work)

Torus to Hyperboloid to a Sphere (How can I do this in Blender)
Not sure how to use the bend / other modifiers to do this.
Here's an animation of what I'm trying to do.
https://imgur.com/dQejc2N

I've attached the blend file below

The principle is to use two "simple deform" modifiers:

one animated from a circle, bent -360°, (for the torus) to a half circle, bent 180°, for the sphere
the second to bend around the previous by 360° to give it the volume (torus or sphere)

The base grid is parallel to front view and centered to avoid the usage of empties in the bend modifiers.

Though, we also want here to join correctly the uneven grid borders (top to bottom and left to right):

which means we have to bend more than 360° to join them. And doing so, the mesh won't be a perfect sphere at the end.
So we need to compensate that. This is done with a "cast (to sphere) modifier" centered on an empty placed at the center of the sphere. This modifier is also animated so that its influence is null when the shape is a torus.
That gives us this setting:

Simple deform around X animated from -380° (*) to 180°
Simple deform around Z at 369° (*)
Cast (to sphere) modifier animated from 0 to 0.5
Weld to get ride of duplicate vertices
Wireframe

(* these values are tuned to that border overlap correctly and weld modifier works on them)


Need Technique for Projecting Countries onto the Earth I've got a project I'm on where I must project some shapefile generated country surfaces onto a globe. Here's where I am currently...

Now, the shapefiles I used have excellent vertex resolution about the edges of the countries, but has only 5-10 vertices within the boundaries of any country. This is because the shapefiles were not meant to be curved at all, they're meant to stay flat (or were designed for that purpose, at least). That's why off to the left we can see the gray background between pink and blue -- the Americas are floating.
If we move the countries toward the globe any closer, large countries clip through the globe as seen below.

Shrinkwrap
My plan for country projection was to shrinkwrap the countries to the globe, but that results in the same clipping as above due to the low interior vertex count.
Subsurf
I tried increasing the count using subsurface-division, and that crashes blender. I believe the issue is the HIGH vertex count at the edges -- Russia has 24,000 vertices. So when I subsurf Russia, it just stalls and crashes after half an hour of crunching on it.
Decimate
To decrease the vertex count, I tried decimate. However, it spawned two problems:

Some countries are 1 face & thus cannot use decimate which needs 3 faces minimum.
Even decimating Russia until it's unrecognizable (~1000 verts) still leaves a crash-worthy vertex count.

Question
All I need is to project these countries onto the globe. I don't know where to go from here. Maybe increasing the vertex count a very slight amount for each country with some other modifier or program... or by hand. Then shrinkwrapping.
I feel like there must be some to that just does projection on a surface based on tris instead of verts.
Anyways, any ideas for different approaches or improvements on this approach are very welcome. :)
EDIT -- Adding blend file

In there we have the countries all parented to an empty called "Core". I've been scaling the core up and down to get the countries where they are now.
EDIT 2 -- I didn't consider there actually is another constraint. The country vertices need to be mapped to the nearest point on the globe.

You could:

Select all you countries and join them with CtrlJ
Create 2 grids (delete faces only, keep the edges), one for the front, the other for the side view:

Select one grid, shift select the pink object, go in Front view, go in Edit mode and in the header menu, choose Mesh > Knife Project. In the Operator box, enable the Cut Through option. Do the same for the second grid (side view), here is what it gives:

You could as well use a sphere as a grid:

Give your pink object a Shrinkwrap modifier, increase slightly the Offset so that the sphere and the pink object don't cross each other:

You can give it a bit of thickness with the Solidify modifier.


Add Nodes to Material with Python I have edited a script that creates some nodes, but the only problem is, it always created a new material. I want it to either add the nodes on the existing material, or a pre-defined material. Here is the script base I am using.

http://blenderscripting.blogspot.com.es/2013/06/automatic-colour-ramped-shader-from.html

Thanks for the help in advance! :D

You can get the material node tree from bpy.data.materials['MyMaterial'].node_tree

Then add the nodes with node_tree.nodes.new()

For example, to add a diffuse shader node to MyMaterial and create MyMaterial if it doesn't exist:

import bpy
mat_name = "MyMaterial"
# Test if material exists
# If it does not exist, create it:
mat = (bpy.data.materials.get(mat_name) or
       bpy.data.materials.new(mat_name))

# Enable 'Use nodes':
mat.use_nodes = True
nodes = mat.node_tree.nodes

# Add a diffuse shader and set its location:
node = nodes.new('ShaderNodeBsdfDiffuse')
node.location = (100,100)


Eevee - Material Shader - "Ray Length" or Z-index equivalent? Is there a method of controlling EEVEE shader node values based on distance from the camera? (Something like "Light Path > Ray Length" provides for Cycles shaders.)

I know you can render a Z-depth pass for compositing, but I would like to use this information in a shader node.

Any suggestions?

Found the answer to my own question: the "Camera Data" input node has "View Distance" and "View Z-Depth" outputs.


Is it possible to change the active bl_category with python? Assuming that the bl_category has a name, and is listed together with "Tool" "View" "Item", which are natively exposed in blender
in the bl_space_type = "VIEW_3D"
Is it possible to have a list of all the applications that are exhibited in this space? And is it possible to change the currently active tab via a script?

Search registered classes.

To get all the classes in bpy.types that are a subclass of bpy.types.Panel and bl_space_type == 'VIEW_3D'

>>> for p in dir(bpy.types):
...     cls = getattr(bpy.types, p)
...     if (issubclass(cls, bpy.types.Panel)
...         and getattr(cls, "bl_space_type", "") == 'VIEW_3D'):
...             p, getattr(cls, "bl_category", "No Category")
...
('CYCLES_VIEW3D_PT_shading_lighting', 'No Category')
('CYCLES_VIEW3D_PT_shading_render_pass', 'No Category')
('TOPBAR_PT_annotation_layers', 'No Category')
('TOPBAR_PT_gpencil_layers', 'No Category')
('TOPBAR_PT_gpencil_materials', 'No Category')
('TOPBAR_PT_gpencil_primitive', 'No Category')
('TOPBAR_PT_tool_fallback', 'No Category')
('VIEW3D_PT_active_tool', 'Tool')
('VIEW3D_PT_active_tool_duplicate', 'Tool')
('VIEW3D_PT_annotation_onion', 'View')
('VIEW3D_PT_collections', 'View')
('VIEW3D_PT_context_properties', 'Item')
('VIEW3D_PT_gizmo_display', 'No Category')
('VIEW3D_PT_gpencil_draw_context_menu', 'No Category')

... and lots more

Ok, lets recategorize  bpy.types.VIEW3D_PT_grease_pencil   from "View" to "Foo"

Check if it's registered (should be since it is in bpy.types, unregister it, change the category, re-register.

>>> cls = getattr(bpy.types, "VIEW3D_PT_grease_pencil")
>>> if cls.is_registered:
...     cls.bl_category
...     bpy.utils.unregister_class(cls)
...     cls.bl_category = "Foo"
...     bpy.utils.register_class(cls)
...
'View'

Note this "trick" is used in some addons as an update on an addon preferences string property to recategorize panels

Inspect the module.

Similarly, since a lot of these are from bl_ui.space_view3d can inspect the module

>>> import importlib, inspect

>>> for name, cls in inspect.getmembers(importlib.import_module("bl_ui.space_view3d"), inspect.isclass):
...     if name.startswith('VIEW3D_PT'):
...         name, getattr(cls, "bl_category", "No Category")
...
('VIEW3D_PT_active_tool', 'Tool')
('VIEW3D_PT_active_tool_duplicate', 'Tool')
('VIEW3D_PT_annotation_onion', 'View')
('VIEW3D_PT_collections', 'View')
('VIEW3D_PT_context_properties', 'Item')
('VIEW3D_PT_gizmo_display', 'No Category')
('VIEW3D_PT_gpencil_draw_context_menu', 'No Category')
... and many more

be remiss not to mention, most blender modules that register classes, have a classes list or tuple

from bl_ui.space_view3d import classes

for cls in classes:
     ... as above

or for every addon ... addon_utils.modules() provides a list of addon modules, that can be inspected as above to look for more, that may not even be enabled / registered.

AFAIK it's not possible to set the active panel / category (tab)


Cant Rotate,Scale when I hook a vert on a curve in Blender 2.8 Here's an little video how I used to be able to rotate and scale the curve using hooks in Blender 2.79

https://streamable.com/byura

Any Work around or fix would be highly appreciated!! :D

I went into the same issue today in 2.8. The way to make it works is to select your BezierCurve handles in Edit Mode then press RMB and click on Set Handle Type -> Toggle Free/Align, now you can rotate and scale your Hook.


reference objects without materials We are making our thesis film on maya for the rigging options, and prefer blender for the render, amongst other things because we want multilighting with ramp shaders. Our problem is that we want to animate parts of the background witout having to reassign shaders for each file.

So we came up with a solution. Import the animation in alembic from maya into blender, save the file, open a new file and then link the objects from the previous file, then add overrides and create materials.
The idea would be to swap alembic files in the original file; and in the new file, have an updated version with the shader overrides.

The problem is that when we try that, the file does update, but the new shaders are gone.

I found this video that looks a bit like what we'd want, but it's for visibility, not materials. https://theduckcow.com/2018/blender-overrides/

Thanks in advance !

EDIT: here's a simplified version of what we achieved in blender, and that would be less easily achievable in maya.

OKAY ! So finally, after playing around with various scripts found on this website, assembling them, we found out  we had taken it the wrong way, as blender workflow is different from maya. The material is applied after in maya, and before in blender.
The solution is a simple script that asks objects from the scene to be applied a premade material. In maya, naming is important for referencing, so our objects always have the same name. It's a bit fastidious to enter each name individually the first time, but it works out for us, as we simply run the script for each panel thereafter.

Here's our frankenbaby: (replace lama with whatever name you have)

import bpy
ob = bpy.data.objects.get("lama")

# Get material
mat = bpy.data.materials.get("Lamamat")
if mat is None:
    # create material
    mat = bpy.data.materials.new(name="Lamamat")

# Assign it to object
if ob.data.materials:
    # assign to 1st material slot
    ob.data.materials[0] = mat
else:
    # no slots
    ob.data.materials.append(mat)


Select whole object parts after it has already seams? I noticed when working on my objects which consist of multiple smaller parts, that when I already unwrapped them and now want to select some objects with L it will only select the UV island but not the whole object anymore. Is there another operation I have to use now or a button to press to let blender know that I do not want to select UV islands but the whole mesh?

Select Linked has options in the Last Operator panel (once it was executed).

Often by default Seams option is checked which means selected linked geometry will be limited with the seams added to the mesh:

This is useful for selecting only one UV island within the current mesh without picking seams manually.
To disable that uncheck Seams and all the linked geometry of the mesh will be selected.


How to change mesh using driver like cgcookie cookieFlexRig? how I can change mesh into another mesh using driver.
I found in cookieFlexRig it easy to change clothing model, hair, shoes.
How to do this?

The flex rig doesn't change the mesh, every hair mesh is in place at all times, the visibility is changed by using a mask modifier.

For each hair object, add a mask modifier, then add a driver for the invert option and set the driver calculation so that when a certain value is set the invert is the right way for each object.

A driver is a python expression that determines the value of the property being driven. In the case of controlling the mask modifier, the result should be a True or False value that inverts the mask effect. Drivers can be edited in the driver context of the graph editor.

The flexrig uses each number to "view" a different mesh object, the easy way to determine which is active is to test if a custom property is equal to the chosen number for each item. For example choice == 1 will be True when the custom property is set to 1. A custom property can be added to an object in the custom properties panel which is found in the object properties.

The driver panel looks a little different in 2.78 but it isn't hard to find the same settings - you choose single property and select the object that has the controlling property then enter the property name as if it was a dictionary key in python ["good"] into the path property, then you use the driver variable name in the scripted expression choice == 1


Assign a shortcut to "Limit selection to visible" toggle Where might this entry reside in the User Preferences > Input list? I would like to assign it to a key (using ver 2.69)

This is not available by default in preferences but you can add it manually. Open your user preferences and go to the Input tab, toggle 3D View and then Mesh.

Scroll to the bottom where you will see a button that says Add new. For the identifier, enter wm.context_toggle and for the Context Attributes enter space_data.use_occlude_geometry, next assign a key combination to it and save your user settings.


UV unwrap ico Sphere How can I UV unwrap ico Sphere in order to project a 360 image on its inner surface?

I need to use this model in Unity, so I have to be able to export UV layout along with the model.

The way I tried will cause a lot of distortion:

You don't actually need to UV unwrap your sphere at all. Just plug the Generated output of a Texture Coordinate node into your texture's Vector input, and set the projection (probably "Flat") to Sphere (or try Tube).

Edit: Missed the fact that this is for Unity. I will leave this answer here for others who just want to do it in Blender.


Can't find how to enable IK on another user's rigged model, what's the catch? I'm trying to help a user in this question , but he's using a complex posed human-body, and rigify. He posted the model here: http://pasteall.org/blend/index.php?id=43931

I would like to check how to solve his problems, but I need to change the model pose, it seems locked, there should be a sort of IK switch for the rig but I can't find where it is. I'm quite a rigging noob, sadly.

He told me hs's using rigify, but even after enabling it, I can't still pose this model... I'm using Blender 2.78, but could try older versions too.

Bones that are visible by default in this file have all transforms locked.You have to make visible armature layers, that contains controlling bones. Here is the image, that shows this.


What is the mathematical basis for F-Curves? The Blender user's manual says:

  Although F-curves are very similar to Bézier Curves, there are some important differences.

One of these differences is the fact that an F-curve doesn't allow a property to have more than one value at any given time. Blender's F-curves might take the keyframes and handles in the following image and produce the curve shown in the image:

However, a normal cubic Bézier curve with the same endpoints and handles would actually produce the following curve:

This curve contains a loop and is unsuitable as an F-curve.

So what is the mathematical basis for F-curves? More importantly, can you direct me to any scholarly articles that describe this type of modified Bézier curve? (or at least some good search terms for me to research)

After some digging through the Blender source code, I found the answer.

Short answer: They're just Bézier curves.

Long answer: They're normal Bézier curves with certain restrictions placed on the positions of the handles (the red circles). If the first handle is to the left of the second handle, as in the following image, then the curve is evaluated as a normal Bézier curve:

This guarantees that the curve will not turn back on itself.

However, if the handles cross (the first handle is to the right of the second handle), their positions need to be adjusted to avoid loops. The file fcurve.c (blender-2.77a\source\blender\blenkernel\intern\fcurve.c) gives the answer on line 2199:

/* adjust handles so that they don't overlap (forming a loop) */
correct_bezpart(v1, v2, v3, v4);

On line 1830, the correct_bezpart() function begins. The function finds the width of each handle and the width between the two keyframes. If the combined width of the two handles is greater than the width between the two keyframes, then the two handles are scaled down so that they don't cross each other, but their relative lengths are preserved. The original handles are used for drawing to the graph editor, but the scaled down versions are used for generating the curve, a plain-old cubic Bézier curve.

Here's an example F-Curve before correction. These handles are not used to create the actual curve; they're just drawn to the screen in Blender's graph editor:

Here's the same curve, but with corrected handles. These handles are not seen in the graph editor, but are the ones actually used to create the curve. If you want to pull out your ruler, you'll see that neither the lengths of each handle relative to each other, nor the angle of the handles were changed.

If you're not convinced, I invite you to look at fcurve.c and see for yourself. Overlapping handles are detected on lines 2188-2190. The actual handle correction takes place on lines 1830-1866.

As far as why they're called "F-Curves", your guess is as good as mine. My guess is that the 'F' stands for 'function', meaning that, like a math function, each x-value maps to exactly one y-value (A Bézier curve is indeed a function, except that an (x, y) pair is a function of t).

Whether this method is the brainchild of Blender developers or was the result of some third party is still a mystery to me. The answer to that question, in my opinion, is more valuable than the method itself.


Video Encoding over multiple computer? Is it possible, to render a single video file, with more than one pc?

The answer to "How to make VSE render faster?" will help you accomplish this. You can split this process up on several computers as wished and join all the frames into your final video via ffmpeg later.


Can not unhide some bones https://www.blendswap.com/blends/view/78956#comment-114838

       I have to tweak this rig so I need to unhide bones in arms and legs. I've found them in the properties panel but Alt+H does not do any good.

Select the armature, go to properties/armature/bone layers and shift click on every layer to search all the bones of the skeleton. Uncheck the "shapes" option to turn off custom shapes.