What does the fading selection color mean? In the picture you can see that the last vertex selected on the edge loop is somewhat separated by a color change from the rest of the selection. What does this mean?

There are actually two vertices in the exact same position there, which can be seen as you noted by the differences in edge shading.

I would box select where the manipulator (the blue, green, red arrows) are and either hit alt-m to merge  or hit W > Remove doubles.


Why does the median z value seem wrong? I have a circle. I checked every single vertex's z value individually, and they're all 0.0:

But when I select all the vertices, the median for the z value is not 0:

Why isn't it showing as zero? This has been very frustrating for me. I kept trying to set the value on a larger mesh to 0 (using s -> z -> 0) to no avail. But it didn't work. So I cut down the mesh to just this small portion and I saw this problem still.
Here's the file in case you're interested:
https://www.dropbox.com/s/jqi3eljppr8gcvv/uneven.blend?dl=0
This brings up a side issue I've been having using blender. I do an action (like s -> z -> 0) and it brings up a little window in the bottom left:

Is it still waiting for my input? What's it doing there? I can make it go away by deselecting vertices or something. Sometimes, like when I do a bevel, its purpose is obvious, and I change values in there and it affects the geometry. But most of the time it sits there and I need to do something funky to make it go away.
Thanks for any help with either problem!

The side issue can be gotten rid of by clicking anywhere on your screen. It's a part of Blender.
It's used to set how you want your scaling, moving, rotating, added object, etc.
Example: You added in a UV sphere but you don't want many vertices so you change the sphere using it.


how to turn off x ray in particle edit mode? I'm trying to Comb my subjects hair, but it seems as though as if a kind of x ray mode is turned on and I don't know how to turn it off.

As you can see, the hair particles are going right through the bear and whenever I comb, it also counts the movement on the back of the bear's fur too.

I had the same problem. Just press the 'limit selection to visible' button.
In particle or edit mode, 3d view bottom left, next to the propotional editing mode.


How to make an object have a clay like surface? I am new to blender and I am trying to add a clay like material to an object in blender.
I tried using a material but I want the object to have a rough imperfect dull surface like play-doh. Is it even possible to do that?

For a clay material, simply set the Specularity to 0:

If you want it to be more like "play-doh" you might want to raise the specular lighting by a bit (maybe to 0.1), but it will also be important to actually deform the model some. Play-doh shapes aren't perfectly smooth. I find that using a Voronoi texture on a Displace modifier, followed by a Cast to Sphere, works pretty well. Here's an exaggerated image and a more realistic image:

Finally, here's the modifiers and texture setup I used:


Rotating Around 3D Cursor (Object vs Edit Mode confusion) In object mode, if I rotate an object about the 3D cursor it acts exactly as I expect. It rotates around the cursor in a circle, like this:

But in edit mode the behavior is completely different. I don't understand what's going on. I am trying to rotate some vertices around the 3D cursor, but it doesn't rotate in a circle. It does this:

I should note that those vertices are connected to a large mesh that is hidden (I suspect that has something to do with this behavior).

As you can see, it goes inside of the sphere. As if the distance from the cursor decreases as it rotates. What is going on? And how can I rotate vertices in edit mode the way an object rotates in object mode?

Note: Transform orientation is global, and pivot is 3D cursor in both modes. Proportional edit is OFF in edit mode.

Thanks!

If the subdivision modifier is working, and you toggle the editing view in the modifier panel, the mesh displayed in 3D view will not be the one you actually manipulate.


When I press space instead of search I'm getting playback started Blender 2.8.
It can be Layout or Modleing tap opened, but when I press Space instead of search menu animation starts playing.

In 2.8x Search is F3. For this and other shortcuts see https://www.ablenderuser.in/2019/01/blender-key-map.html?m=1


Can I "skin" edges to be a round pipe, not rectalgular? I had created a spring-like edges like the first image below. I applied the "Skin" modifier, but it made the line to be a rectangular pipe. Can I make it a round pipe? The modifier has only "Branch Smoothing" value and it does not seem to do anything.

Sure. You can use two modifiers, either the bevel modifier or subdivision surface modifier. Bevel is nice if you don't want to add any loops along the axis of the screw.

Using Bevel :

Wireframe :

Using subdiv :

Wireframe :


Shrinkwrap displacement issues I have this high poly model, and I did retopo for it.

Now I want to create a discplacement map for it, or at least to try and get some more details into the model. I added a subdivision modifier, and then a shrinkwrap modifier, and that cuased some issues in the mesh. When I added a displace modifier between the subdivision and the shrinkwrap modifier, it help but it doesn't eliminate the problem.
What can I do to fix it?

Give your lowpoly a Subdivision Surface modifier. As your highpoly goes a bit beyond the surface of your lowpoly, you need to increase the bake Ray Distance value up to 2m, it seems to work fine:


How to construct a pyramid in blender but the edges of the triangles to be equal? How to make a pyramid in blender and all the edges to be equal size? Is there a way to do that in blender? Or if there is no easy way for that, maybe anybody not that lazy can provide me with a math line? Or maybe a link or whatever?

The formula for the pyramid you are describing can be found on Wikipedia. Look for the formula for the height of the 'Johnson Solid J(1)':

$$
H = \frac{1}{\sqrt{2}}a
$$

Where $a$ is the edge length of your pyramid.

Constructing the pyramid is pretty easy now: Start with a plane of the desired size. I started with the default plane (edge length of 2):

Now go into edit mode, select one vertex and extrude it (it does not matter which one or how far).

In the properties shelf you can now set the coordinates of the vertex. The properties shelf is the one to the right of your 3d viewport which you can toggle by pressing N. Under 'Transform' set the x- and y-coordinate to 0, and the z-coordinate according to the formula from Wikipedia. Since Blender can interpret some python commands in the number fields you can type in the formula directly:

Now always select three vertices that should form a pyramid side and connect them to a face.

To make sure your normals are all pointing outwards, select everything and press Ctrl+N to recalculate them.

To see the angles between faces go to the properties shelf again, scroll down to 'Mesh Display' and enable the 'Angle' checkbox under 'Edge Info':


Weird deformities when remeshing and using the grab brush Using grab brush but instead of moving as one smooth mesh, it is chunky and drastically raised in some parts despite just doing a minor adjustment. I used the voxel remesher at .02 and have a mirror modifier and have the setting use deform only on to run a bit faster. Not sure what is relevant. How do I get rid of these weird deformities? Smooth them out doesn't fix it. I tried remeshing again but it didn't help.

Had clipping enabled in Mirror modifier. Unchecked that and now it is fixed.


How to naturally connect objects of different shapes I want to connect objects of different shapes naturally. The part I'm going to connect to is the edge that has an empty face.

Edge bridge does not apply because it has different shapes.

Here is a way using Grid Fill.

UPDATE: check out the "Bridge Edge Loop" option proposed by @RayMairlot in the comments. It may be best suited to your need.

ref: https://docs.blender.org/manual/en/latest/modeling/meshes/editing/faces.html#grid-fill

Subdivide the side to match the number of vertices on the other side
Create supporting Edges
Select edges on both sides
Grid fill
repeat for the other sides.


Opening a blender file during python script execution without changing context During execution of a python script, I'm trying to import a .blend file. It's currently not an option to load the file when Blender boots, although ideally we would get the same result either way. I'm using:

bpy.ops.wm.open_mainfile(filepath=path)

However, this destroys bpy.context ({.window, .screen} = None), but only when blender is started without "--background". This is the relevant Blender source code (blender/windowmanager/intern/wm_files.c):

if (!G.background) {
    /* in background mode this makes it hard to load
    * a blend file and do anything since the screen
    * won't be set to a valid value again */
    CTX_wm_window_set(C, NULL); /* exits queues */
}

This causes "invalid context" problems for different operators (e.g., bpy.ops.transform.*) called afterwards.

It would be great to be able to open .blend files without the WM/GUI interference altogether. However, since there doesn't seem to be a WM-less Python call for now, restoring the original context (or at least a context equivalent to the one when Blender starts up) would also work. Bonus points for solutions without WM hacks (e.g. simulating clicks) ;-)

Found a WM hack based on this answer that seems to work. Some operators still complain about "PyContext 'blend_data' not found", but this doesn't seem to result in problems so far. Still feels a bit hacky though.

def fix_context():
    """Fix bpy.context if some command (like .blend import) changed/emptied it"""
    for window in bpy.context.window_manager.windows:
        screen = window.screen
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                for region in area.regions:
                    if region.type == 'WINDOW':
                        override = {'window': window, 'screen': screen, 'area': area, 'region': region}
                        bpy.ops.screen.screen_full_area(override)
                        break

Edit: this works (with --background) but only if there's running an X server for the current user. Feels like there's some gui hacking going around when Blender python scripts are running background... Running on an X-less server gives a segfault.


Rotoscoping to a transparent background I'm currently trying to rotoscope a video and the background is currently white and I don't know how to make it transparent.

Here is a screenshot:

There is no need to make the background white (or green) when you can make it transparent without more processing. The idea is to use the mask information to determine which parts of the image are opaque and which are transparent.

Don't use the mix node.

Use Set Alpha, so that your mask controls the transparency of the video: Whatever is white on the mask will remain opaque, the black areas will be transparent.

If you need to re-position or re-scale the elements do so after the set alpha node, so that the transformation happen as a single combined element.


Where is the brush selector of grease pencil? I do not find the brush selector of grease pencil described on the manual.
(https://www.blender.org/manual/en/interface/grease_pencil/drawing/brushes.html)

The manual is for 2.78 which is not official yet...but can be test driven. Check your version before looking for functions that might not be in previous builds.
Brushes become available once you start drawing, or click on one of the drawing buttons in the Grease Pencil Tab - in the Tool Shelf.
You can adjust the colour on the other side in the Properties.


Knife Tool Limited Cut - Not Cutting All of Mesh/Edges Currently, I am trying to cut my mesh in half with the knife tool, K. The cutting seems to work at the top and side of the mesh (I pressed enter), but it won't apply at the bottom.

Img1 and Img2 show the bottom edges which I am not able to cut. The knife tool won't even apply on these edges and doesn't change them into the red/purple color.

Img3 shows the cuts at the top and side which work perfectly fine. Without the bottom, I am not able to cut my mesh in half. Have I missed something?

Thanks.

Since you said "trying to cut my mesh in half ", is using the knife tool mandatory? Maybe you already discarded them, but there are other (probably better) tools, like the bisect tool, or the boolean modifier.

Bisect tool: this allows you to create edges through the whole mesh by setting a "bisect" line, like this:

Start switching the 3D view in edit mode, and adjust view to allow you to "bisect" drawing on the 3D view, like:

After clicking on "bisect", draw a single line (eg) from top to bottom: after confirming the end point, the cut is already done!

Now your mesh has an edge that goes through all its geometry: you can use this dividing line as reference to delete all geometry (eg) to the right of it:

you'll get

Another way, as said, it using boolean difference, and since is a modifier, is also non-destructive (until you apply):

Create a big cube that contains all the part of the mesh that should be "cut" away from the mesh

Then select your mesh, and apply a "difference" boolean, with the big cube as target

Done! Your mesh is cut, but you can still change cube (and this cut) position. Note that the cut zone ill be "closed" by a side - you can get rid of this after, if needed.


how to add more control to cardboard animation I’m having an issue trying to realise an animation for a four pieces of cardboard, I have set up each piece of cardboard so that when my spiral spline is pulled to the top of the screen the cardboard unrolls, however, what I want to do is have the cardboard bulge out in the centre of its animation and then straighten up near the end into the final shape before I begin the next stage of the animation, I’ve  tried rigging the cardboard but it doesn’t play well with the spline, I’ve tried to make the spline controlling the cardboard follow another spline but due to the way I understand the modifiers I can't get it to work either, any help would be appreciated.
Thanks in advance.
initial direction

Rob was correct just needed to add more work to the splines and make sure everything was applied, transforms, rotation and scaling using Ctrl+A then apply new curve deforms and set the correct deformation axis


Rigged Blender model doesn't preserve volume when exported as FBX The cylinder of the revolver shrinks in scale after it's exported to FBX. Although I toggled "Preserve Volume", it appears that Blender FBX's exporter applies it once to the revolver mesh, but ignores it for the cylinder mesh.

Here's how the animation is supposed to look:
https://cdn.discordapp.com/attachments/607260974088454154/627367561499115559/swagfire.mp40001-0035.mp4
Here's how the animation looks when reimported:
https://cdn.discordapp.com/attachments/605246613379612675/627394105609027594/test.mp4
Models are posted in here: osted from here: https://developer.blender.org/T70340

The developer said that it was a rigging issue, but he didn't give me the specifics about it.

It's a weighting issue: the cylinder is weighted to the cylinder bone AND to the grip bone, while it should be weighted to the cylinder bone only (the same applyes to the trigger and the Thingy).

You can remove thoose unwanted weights, but as the animation has been done with them, it will have to be redone or twicked.

The difference between the blend file and the FBX probably has to do with the normalization between weights that Blender does as default, while the FBX format breaks.


Problem with Curve Modifier on object array when I try to apply Curve Modifier on my air duct object, the corners get weird, no matter how many cuts the object has.

Can somebody explain how I can fix it? Pls

Curve modifier needs a subdivided,  the more the better, mesh to work as expected. Instead, use Bevel object which is a bezier circle with handles set to vector to form a square. Then rotate it and make a rectangle.


Select/Remove vertices joining only two edges I'm trying to find a way to select (and remove) vertices on the edge of a subdivided plane without having to go round and highlight each one separately.
I want to keep vertices terminating three or more edges, but remove those linking only two (leaving a contiguous edge, naturally) – any ideas? I'm thinking either there's an embarrassingly easy solution or it's not possible and I'm the only person not to know it.

Use Select Similar  menu in vertex selection mode to select vertices which share only 2 edges (in 2.79 it is Shift+G). Switch to vertex selection mode, select one vertex falling into mentioned category and with it selected run Select Similar > Amount of connecting edges.

  Amount of Connecting Edges
  Selects all vertices that have the same number of edges connected to them.

Select Similar in manual

Vertices which share only 2 edges will be selected and you can dissolve them with X * > Dissolve Vertices*.


Locking translation axis for multiple objects Selecting multiple objects and pushing lock button in properties panel "transformation" locks the axis only for one object in the selection of objects.

Select all your objects, lock the channel, then right click on one of the lock icons and "copy to selected" to copy the locked status to the other objects.


Creating a hill out of a plane Is it possible to grab a group of vertices and pull them upwards. And instead of the having just that area go up, can all the other vertices move in a beautiful manner (don't know how else to explain it)?

What you're looking for is called proportional editing. It allows you to select a point or set of points, and when you move those points other nearby vertices will move along with them.

To use proportional editing, enter Edit Mode by pressing Tab, then look on the bottom of the window and enable Proportional Editing (you can also use the hotkey O while in edit mode to toggle proportional editing).

To the right of that menu there is the Proportional Editing Falloff menu, which lets you select how nearby vertices will be affected.

Once you have proportional editing turned on, select a vertex and move it, and the nearby vertices should move along with it. To broaden or narrow the effect, use the mouse scroll wheel.

Images are courtesy of the Blender Manual and the Blender Wiki.


How do I add text comments to a blender file? If I select "Text Editor" in the top left corner dropdown, I get some buttons and other control elements that allow add texts, highlight syntax, run scripts.. but where is the text edit area itself? I'd like to actually add some text, not only create a text file/node/whatever it is called. Even the manual leaves me with no idea of how to actually write text notes.. Am I using a wrong tool? How to add some text abstract to my file?

In order to access the text editor you would have to drag the window down. Try to change to the text editor from the 3d-view.

As the Info Area is basically just the header, when you switch to text editor you will just see the editor header. Try pulling the header down from the interface to the 3d-view and you will see the text input space appear. (note recommended).

Instead maybe switch the timeline area (usually bottom left (clock item)) to text editor and put something in there.

I recommend reading that.

https://www.blender.org/manual/interface/introduction.html


Trying to make a donut from blenderguru's tutorial Im trying to bring down the frosting but for some reason it keeps cutting into the donut itself, im still new so i dont really know what to do.

Hope this helps,
Go to the little dropdown arrow next to the snap tool(The magnet icon) and make sure you have these exact settings:

These settings worked fine for me.
Some more things you should keep in mind:

The offset of your solidify modifier should  be +1 i.e. the thickness should come towards the outside

The icing and the donut should have uniform scale i.e it should have scale of 1 on X, Y and Z axis. If they don't have a uniform scale then you can make it uniform by going to object mode - > Press Ctrl + A and applying the scale.

You have to be in edit mode to move the vertices and change the shape of icing.

Snapping has a limit, you can't drag the icing too far and expect to have no intersections between the donut and icing(In ur case it should work fine)


Different render per layers? I have like 15 Layers, and a other one with light.
I need to render the 15 layers separate but still keeping the light from the apart layer.
And i need to leave the computer rendering in the weekend doing the full work, how can i render different 15 layers on different 15 folders?

edit: I'm using Cycles.

Thanks in regards.

I going to assume that you really mean 15 layers (objects in separate blender viewport layers) and not referring to render passes (Z, Vector, Normal). +someonewithpc is correct, but I thought I would expand and clarify the answer.

Here's what you need to do. I'm going to assume that you will want multiple render passes per render layer, since it's the more complicated solution. If not, it will be a little simpler.

View the image in a new window to see it full resolution.

Set your output file format to OpenEXR MultiLayer in the the render output panel.
In the Render Layers panel, setup a render layer for each of the viewport layers you want to render. Select the output render passes you need for each render layer (Z, normal, etc)
In the compositor, Add a Render Layer node for each render layer you setup.
Create a File Output node for each corresponding Render Layer node. In the property panel on the right, you will need to manually add additional output layers in the file output node (Z, alpha, etc). You can do this because you set the output file to OpenEXR Multilayer previously.
Hook up the matching input/outputs between each render layer node and file output node. You'll also have to enter the output Path in each file output node. It's good to choose a separate folder to keep each Render Layer frame set separated.
Make sure that the Compositing checkbox is checked in the Post Processing panel in the Render Property section.
Render the animation. You should end up with one folder per layer with 1 EXR file per frame rendered. In each EXR file you will have the render passes selected (Z, normal, alpha, etc.)
You can use the EXR files for further compositing in Blender or another external compositing app.

Note: The main render image (whatever is piped to the composite node in the compositor will still be rendered and written out. I believe you still need to have this hooked up for the rest of the process to work properly (I haven't tested this recently but know it worked like that in the past).


All textures upside-down I imported a large scene of Wavefront .obj format and I discovered that every texture in the scene is upside-down. Is there a way to import the textures properly or flip everything on the Z axis? If I have to use Python, how do I change the size of every texture to flip it. Everything is UV mapped.

And i prefer not to flip the textures from the image files themselves.

In python it's not very hard : http://web.purplefrog.com/~thoth/blender/python-cookbook/flip-texture-v-coordinate.html

import bpy
import bmesh

def mission1(mesh):
    bm = bmesh.new()
    bm.from_mesh(mesh)

    for uvt in mesh.uv_textures:
        uv_layer = bm.loops.layers.uv[uvt.name]

        for face in bm.faces:
            for loop in face.loops:
                loop[uv_layer].uv[1] = 1-loop[uv_layer].uv[1]
    bm.to_mesh(mesh)
    mesh.update()

if bpy.context.mode != 'OBJECT':
    bpy.ops.object.mode_set(mode='OBJECT')

meshes = set()
for obj in bpy.context.scene.objects:
    if obj.select:
        meshes.add(obj.data)

for mesh in meshes:
    mission1(mesh)

Just select all the defective meshes and it will flip the V coordinate.


How to specify frames for "Сycles" modifier in F-Curve editor? Basically, I want "Cycles" modifier to repeat only the last two keyframes of many others. Restricting frame range doesn't help me at all. So how to set it right?

Here is screenshot. Frames 40-60 are what I try to repeat.
http://www.pasteall.org/pic/104876
And .blend http://www.pasteall.org/blend/42636

The Restrict Frame Range values for f-curve modifiers doesn't work in the way you're trying to use it. Those values restrict the output region where the modifier's result can be seen. The modifier itself still applies to all the keyframes in your f-curve.

As a workaround, you can get the same effect you're looking for by using the Non-Linear Animation (NLA) editor. For your specific example, you'd use the Action Editor mode of the Dope Sheet to create two actions (both start at frame 1):

Action 1 (staging) - This is the non-cyclic animation. In your specific example, this would be the first 40 frames where you rotate from 0 degrees to 360 degrees.
Action 2 (cycle) - This is the animation you intend on cycling. In your specific example, this animation would be 20 frames long and rotate from 360 degrees to 270 degrees.

Use the Push Down button in the Action Editor to Add each action as a strip in the NLA. Start the staging action at frame 1 and the cycle action at the end of the staging action's frame (in your example, that's frame 41).

Now, with the cycle action still selected, go to the Properties region of the NLA (reveal it by pressing N with your mouse cursor in the NLA editor). Scroll down to the Animation Clip panel. The last slider in that panel is labeled Repeat. Increase that value for as many repeats of the cycle action as you need.

Here is a .blend file, based on your original example, that shows the work-around in action.


How to import morph targets into Blender? I'm trying to import a js file with morph targets into Blender(v2.65) using the three.js(r66) importer, but it seems that the importer plug-in is not working properly, because nothing is shown in the scene. I tried to convert the js into an obj file and then import it into Blender, but only the mesh was imported, the morph targets were not imported. Can someone help me please?

JS File: three.js/examples/models/skinned/UCS/umich_ucs.js

One possible way is to import 1 mesh. Create a shape key as a base shape key. Import a second compatible mesh. Select the second mesh, and then shift+select the original base mesh, and on shape keys panel, click "Join as Shapes". Repeat to join all shape keys to 1 base mesh.

Try using THREE js to shift to one of the morph targets, then export multiple OBJ files and join them all in blender.


How do you set the font in effect strip I can add a Text strip with the following code:

    effName = "eff" + tCStr[-3:]
    effName = sequences.new_effect(
        name=tField,
        type="TEXT",
        channel=tChan,
        frame_start=fStart,
        frame_end=fEnd)

I can also specify the location, size, color, and text content in my Python script, but I have not been able to change the font.

Can some kind soul please give me a clue how to do this?

I know the following don't work:

fnt = bpy.data.fonts.load(tFont)

bpy.ops.font.open(tFont)

bpy.context.scene.sequence_editor.sequences_all[tField].font = tFont

Note: tFont has the full path to the font.

Ok, I figured this one out.

tFont = 'fonts/' + row3[7] + '.ttf' # read font from .csv data file
fnt = bpy.data.fonts.load(tFont) # load font
bpy.context.scene.sequence_editor.sequences_all[tField].font = fnt # change font
bpy.context.scene.sequence_editor.sequences_all[tField].text = 'Text' # use font


Cycles Compute Device: None (Not even CPU option) I was trying to enable CUDA under Cycles Compute Device to enable GPU rendering but realized I don't even have the CPU option. Just none.
I just want to enable GPU rendering.

OS: Ubuntu 18.04 LTS |
Version: Blender v2.79 |
CPU: I7 4790 |
GPU: GTX 960 |
NVIDIA Driver Version: 390.77

Download the official version from the Blender website.

As it turns out the problem was with the Ubuntu Software Center version of Blender which for some reason doesn't offer the CUDA option. I downloaded the official version from the website and the option is available and I can render using my GPU.


Write cycles material node output to image file How can I write output of a Node/Node Group in Cycles Render to the file (PNG or something else)? I saw a special File Output Node, but I can't find in Search ShiftA).

The File Output node is a compositor node, not a Cycles material node - so it will only output the results of the actual render, not that particular material.

To output the shader results to an image you need to look into unwrapping your mesh and baking the material to an image.


Trouble with bone constraints and deformations I am trying to create something with this effect, but the instructions are very unclear about applying the bone constraints. It has to do with copy rotation and the damped track constraint, but I don't know how to use them. I am trying to fix these odd deformations in the shoulder area of my character.

Here's what I'm trying to achieve

Here's what I have so far

Here you can see the awful shoulder deformations I'm trying to fix

I know another user had a similar question, but the answer failed to explain the usage behind the constraints used. In fact, the example animation in which I'm trying to achieve is taken from an answer to another question similar to mine. Shoulder Deformations Question

One simple solution is tho set all bones constrained with a copy rotation, varying the influence setting from none (Shoulder) to full (hand).


How to fix Cloth Simulation from this odd compression The objective of this simulation was to just have the cloth hang down so part of the tent door is open and part is hidden behind the tarp.
Originally it was a simple plane, I have recently solidified it (0.01m) after reading some tips and answers from other questions on StackExchange but this did not solve it.
I will provide all the images showing my modifier stack, cloth physics settings, collision settings and the static pin group as well as the blend file below.

I have had to delete the bakes for the simulation due to file size for blend exchange.

If the fabric curls up like this or explodes the collision detection is usually to blame. But it takes only a few steps to fix this.

Add a floor: Add a plane, scale it up, add & apply a Subdivision modifier (3 levels, type: Simple), and add a Collision physics to it
Fix the door:

Swap the order of the modifiers to 1. Subdivison, 2. Cloth ←→ 3. Solidify
Change the levels of the Subdivision modifier: 2 (Viewport) and 2 (Render)
In the Physics tab, use the Silk preset. For some reason, your door plane is way too stiff. (Presets are in the drop-down menu right next to the Cloth section; the icon with 3 dots and lines).
Change the Distance of Object Collision and Self Collision from 15 cm to 5 mm (0.005 m). The default value of 15 cm is too high for your tent in real-world size.

Optimization: Remove the Collision from the 2 branches objects. It has no effect on the result since the fabric slides only briefly over the left branch and is attached to the right branch anyway. But the removal will speed up the simulation.
Run the simulation. It should run smoothly. If you get single vertices that go crazy for a second ("spikes"/"fireworks") increase the Cloth → Quality Steps from 5 to 9 and they should calm down.


Bevel unexpected result after a boolean operation I was trying to bevel some edges, the result is completely random, any idea how deal with this?
My ideal result would be something like this

link to the file

Thank you!

One of your face is reversed, you need to recalculate the normals (in Edit mode, select all and ctrlN).

I guess it messed up with the bevel because bevel uses the orientation to create the bevel profile, so two faces with opposite normal orientation > bug.

Anyway, here is a way to do it:


How to prevent particles from going where I don’t want them to? I don’t want these particles out side of my object:
.blend file

The problem is that I’ve already got two transparent planes and it will get all messy if I add others to stop the particles from getting out.

This is mostly because there are gaps between the cylinders and the curved meshes. Also, you should probably apply the solidify modifiers you are using.

Normally, what I would do is duplicate all the enclosing meshes and use parts of these to make one collision object to keep the particles in but a quicker way is to just use planes and block off these gaps. Planes are rather thin however and not very good collision objects, you should join these together into one object to create a boxlike enclosure.

Make sure the planes intersect the other meshes slightly so that there are absolutely no gaps left for the particles to escape. To make ones for the cylinders as tight as possible, just duplicate the tops, separate it and scale it outwards.

If you have the time, a much better collision object would be something in the shape of your actual model(s) to make sure that the space inside is as closed as possible.


How to connect a cylinder/sphere to a flat/curved surface surface? I'm wondering how you would attach a cylinder or sphere to a flat surface in edit mode. There are many instances, especially in SciFi where you need to attach a cylinder or sphere to a flat surface in a clean matter. Like in these images there are many cylinders intersecting curved and flat surfaces. I know in some of these images they probably don't have it connected and instead just pass through each other, but how would you connect the meshes in edit mode?

There are many ways to do so. But the question is often, is it necessary. Something artist needs the normals of the meshes to behave appropriately and sometimes the effort just don't really pay for the little returns.

On this video the user is creating an emboss effect on a gold bar. There is alot of times he needs to be joining faces in his video. Link below.

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

Although this maybe about embossing text the underlying method of how to join meshes pretty much applies for all cases.

Select the edges you want to fill.
Subdivide the edge with the lower vertex count to make a closer match the number of vertices.
Press AltF to fill.


How do I extrude ledges evenly on my villa model? I'm trying to create ledges at the top of my building to come out in steps. I'm using loop cuts and the extruding out along the normals.

The problem is that the extrusion doesn't come out evenly - at certain points the edges are coming out more than on the corners.

The object is properly scaled in object mode, which I understand can be the problem sometimes. Using 'individual origins' for the pivot point doesn't make any difference. Nothing else I've tried works, any help is greatly appreciated.

Enable the Offset Even option in the Last Operation box:


Render every Nth frame of an animation I want to render every Nth frame of an animation, in this case every 12th frame. This way I can play back the animation at 2fps and see if everything is going correctly.

I'm a real novice with Blender Python and cobbled this together:

import bpy

for f in range(startframe,endframe,NthFrame):
    bpy.context.scene.frame_current = f
    bpy.ops.render.render()
    bpy.data.images['Render Result'].save_render(filepath="" + str(f) + '.png')

This kind of works, the right images are rendered and saved. However it completely freezes up Blender, and after about an hour it crashes on windows due to being unresponsive I guess. How can I fix this? Preferably I'd like it to work like rendering an animation normally works, i.e. being able to still use Blender and seeing the progress of each rendered frame.

It's possible to do this without python by changing the Frame step in Render settings > Dimensions > Frame range:


plane disappears during animation I have created an animation that works perfectly with alt+A. I tried to use actuators and a script to make it work in bge, but everytime I run it the plane disappears. Here is the blend file.

If you move the mouse, the 3 arrows follow the cursor. When you right click on the ground plane, the animation should have taken place. It does not. Instead the ground plane disappears leaving behind a small green line.

Here is the module code:

#Import the bge library.
import bge

#Make the mouse cursor visible during game running time.
bge.render.showMouse(True)

#Set the current game scene and python controller to variables.
scene = bge.logic.getCurrentScene()
cont = bge.logic.getCurrentController()

#The function "initialization" is responsible for setting all scene objects, object sensors and object actuators to variables.
#These variables are created into the function but are for global use. Their names are the names of the objects/sensors/actuators in blender.
def initialization():
    for k in scene.objects:
        exec("globals()[\"%s\"]=scene.objects[\"%s\"]"%(k,k))
    for k in ground.sensors:
        exec("globals()[\"%s\"]=ground.sensors[\"%s\"]"%(k,k))
    for k in cont.actuators:
        exec("globals()[\"%s\"]=cont.actuators[\"%s\"]"%(k,k))

#The function "empty_to_pos" gives the cursor_empty coordinates on the ground.
def empty_to_pos():
    cursor_empty.worldPosition = (mop.hitPosition[0],mop.hitPosition[1],ground.worldPosition.z)

#The function "cursor_anim" is responsible for the start and end of the cursor animation.
def cursor_anim():
    cont.activate(anim_arrow_1)
    cont.activate(anim_arrow_5)
    cont.activate(anim_arrow_9)

initialization()
empty_to_pos()
if (right_click.positive):
    cursor_anim()

print ("I reached the end of track.py")

and an image:

Any ideas why the animation is not working and why the plane disappears? Thanks

Action (animation) actuators need to be part of the object, which you want to animate.

In the .blend, the animations are applied to the "ground" plane instead.

To make objects interact with each other in the logic editor, select them at the same time using Shift + Leftclick in the Outliner:

You will see the objects in the logic editor:

Then edit the logic so that one object's controller controls other objects' actuators:

You can see the full process in this video.
Unfortunately two of the arrows don't animate correctly and I'm not sure why that is. Perhaps their transformations need to be applied?


Boolean difference makes all geometry disappear on a scaled, solidified half-cylinder I have a half-cylinder that has been scaled in edit mode three times on the Y axis. It has a Solidify modifier with its thickness set to .7870 (arbitrary, but it shows my problem nicely). Even with Even Thickness enabled, the Solidify modifier does not handle the top of the cylinder very well:

When I try to cut a hole in the solidified cylinder with a cube and a Boolean modifier, depending on where I place the cube, sometimes all the geometry of the cylinder disappears (I didn't hide the cube here; there's really nothing left of the cylinder.),

sometimes it acts like I used Union instead of Difference (and it inverts part of the normals...),

and sometimes it even cuts a hole kind of like I wanted, although it still does a very poor job.

Inspecting the inside of the cylinder, I can see that the geometry of the cylinder is intersecting itself, and that is what I don't know how to fix. Here's my .blend file.

Edit: here's a screenshot of the actual model (side view):

That intersection is indeed the issue.

There isn't much way to fix this without doing it manually, but the clamp option can help at least clear things up a bit:


Are there significant differences between Filmic shipped with Blender and its development version? I've just read that Filmic is not completely implemented: https://developer.blender.org/D2659.

  Notes:

  The results appear to be identical to the original Filmic config, but I left out some parts like the renaming of color spaces, BT.1886, grayscale and new roles. Some of those things might be worth adding as well if they are backwards compatible.

  ...

Q: Are there significant differences between Filmic shipped with Blender and its repository? Before going down the rabbit hole: What does that mean to us and what version is preferred?

Quoting @troy_s, (the creator of the filmic blender's color transform LUTs and config.ocio files)

Is there any difference between this repository and the filmic blender in 2.79?

  Indeed.

  The default "Filmic" view, which carries on Blender's confused description of what a display is, is actually the Filmic Log Encoding Base coupled with the Base Contrast.

  There currently is no means to generate a purely Filmic Log encoded image. You can see this by comparing the "None" creative look against "Base Contrast" and note that the two are identical.

  This will pose issues for anyone seeking to use alternative display referred tool chains. For example, the Agent team used the Filmic Log encoded imagery at 16 bit for grading within Resolve.

The version on github works the way the author designed it to work: so that is possible to save images in log without any looks applied. Using log encoded images would allow users to save images in formats like 16 bit Tiff, to be used for further post-production (compositing, color grading, etc), and without having to distort the data or otherwise compromise the dynamic range of the images generated in blender.

Another difference is that you will find a sRGB EOTF transform. (again quoting the github page:

  This is an accurate version of the sRGB transfer function.

As I understand it the developers chose to keep some of the previous pieces of code to prevent error messages when opening older files, that expect the default color transform to be named sRGB

Other differences:

The github version includes a BT.1886 EOTF. It not does not include any of the "film emluation" looks. (for additional information read: Combine Filmic Blender and "Standard" Film Emulation), some other color transforms (greyscale and false colour) were moved from looks to views.


I want to get the outside outline of a plane that is doubled up https://i.imgur.com/rUqIDSU.png
I have this flat shape see left side of image
And I want to get just the outside outline of it. On the right side of the image you can see that I was able to get an outline using the following python.
bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.dissolve_faces()

however as you can see there are still intersections within the mesh. I can't seem to figure out how to get only the outside.

When I was dealing with this problem, I extruded the mesh then used intersect knife, to get the faces to interact, before merging doubles and re-collapsing it to a single plane.


How to set render filepath using blend filename in python Let say I have blend file called test01.blend, then I want to automatically assign render filepath via python to /media/data/render/[current blend filename]/[current blend filename]_.

So, it should look like this /media/data/render/test01/test01_

I'm trying to access it via bpy.data.filepath, but I got only full file path for current blend file not blend file name.

Thanks for your help

From iKlsR's answer:

  You can get the filename with
  bpy.path.basename(bpy.context.blend_data.filepath). This will return
  it as a string without the path attached.

You can then assign the render output path with it:

import bpy

filename = bpy.path.basename(bpy.data.filepath)
if filename:
    bpy.context.scene.render.filepath = filename

Note that basename will include the file extension (.blend). You can strip it using os.path.splittext():

import os
import bpy

filename = bpy.path.basename(bpy.data.filepath)
filename = os.path.splitext(filename)[0]

if filename:
    bpy.context.scene.render.filepath = os.path.join("/media/data/render", filename, filename + "_")


Is there a way to delete unneeded keyframes automatically? I made an animation by keying every bone in the rig on every keyframe.

Now I have a lot of extra keyframes, as some bones didn't move at all, remaining the same for all keyframes.

Is there a way to delete these extra keyframes automatically?
And are there any "good practices" to help prevent this happening?

Yes you can.

In the Dope Sheet, select all channels by pressing A while hovering over the list of channels, then press O. All unnecessary keyframes will be erased.


Why there's no tool to move origin point in edit mode? Why there's no straight tool to move the origin in edit mode? The tool is only available in Object mode, like that handy ctrl+ . or cmd+.  .
I'm just curious , there must be some good reasons for this. Can someone explain ? it's been a question for me for quite long. I think this tool shold be applicable for both edit and object mode.

You may not be able to drag an object's origin around in Edit mode, but, at least, with the shipped  '3D Viewport Pie Menus' > 'Origins Pie' add-on activated,you have the options, in Edit mode, to snap the origin of a Mesh to the cursor, or to element selections.
It seems not fully implemented for Curves: it toggles me out of Edit mode if I call 'Origin to Selection', before doing the right thing,  and flat-out refuses, if I call 'Origin to Cursor'.


Is it possible to blend a tiled texture with itself? I am not sure if this functionality exists, but I seem to remember seeing it somewhere. Basically what I want to do is to be able to set a margin where an image texture will blend (fade) into itself, making a smooth transition. Does this option exist? Is this even a feasible feature?

I will assume you want to blend a planar tiling. Not to blend a cube mapping between sides.

If you really want to then yes its possible, but it is much more complicated than doing it in some 2D app.

For the blending to work, the tiles need to overlap. You can manipulate the tiling with mapping vectors no problem: How do I create repeating patterns with cycles' procedural textures

What the problem is is to map two source mapping locations into 1 output location for the blending. That would require a function that gives 2 values for 1 input >> impossible.

The workaround would be to use 2 textures, each tiled like chessboard colors. The tilling would overlap between the two and you could mix them with linear weights of how far from the tilling border the pixel is. This would still cause artifacts on tile corners when blended both in X and Y so 3 textures would be actually ideal.

And the blending would look not good at all, I think you are better to make a tileable texture with clone brush, because this is not worth it.


Stuck in fullscreen? Ok, so I wanted to show my friend my video I was working on in blender. I go to the preview window and hit "fullscreen" (or something like that). So now I am stuck in this full screen mode. I have tried:

Shift+Space
Ctrl+Down arrow
Ctrl+Up arrow
Shift+Z
F11

Nothing has worked. Here is my file.


Blender UV unwrapping non-uniformly At first, I was able to uv unwrap the model without a problem. However, I now have been having issues with it. I don't know how it started or what triggered it to start unwrapping in this manner. Here is a screenshot of the issue.

It is not just the hand that has this issue. When unwrapping other parts that have been unwrapped and not unwrapped the same issue occurs. How would the issue be resolved? I'm using the normal uv unwrapping instead of the smart unwrapping. However, the normal version had no issue until now.

First of all, to unwrap only a part of the model you have to select the faces first and then unwrap them with whatever method you want, if you select everything it's going to unwrap everything.

I think the main problem here is that when you painted the texture, the UVs where placed in a certain manner and by unwrapping again after you were done painting you basically moved your UVs so the colors you painted before are not corresponding anymore to your model. I've put these two images below to explain better what I mean: I moved two vertices on the UV and the whole front face looks very different, this is basically what I think happened when you did the second unwrap.

At this point I see two ways you can solve your problem, either you adjust the UVs yourself by moving, scaling etc. or you keep the UV like that and paint another texture for it (create a new image just to not overwrite the one you have, you never know), maybe by painting directly on your model in Texture Paint mode. I know it is a pain to do something like this all over again (I've been there) but as far as I know these are the quickest options you have.


Blender Armature/Rig exported, without Bones but with Animations (to Unity) When I export my rig from Blender to Unity the bones under my characters armature vanish. Animations are listed and work as generic.

I can't reconfigure the rig, because Unity doesn't find the bones.(edited)
as you can see there should be a regular armature. But below, in Unity, the armature has no children...

Anyone any ideas as to why?

I recommend you check your export options.

It should look something like this :


What is the FPS speed that the animation timeline runs at by default? Blender 2.9 I'm currently learning to animate 3D to export for videogames but I'm having trouble with identifying the FPS speed.
When I press PLAY, at which speed does the animation play in the timeline? Is there any way to customize it? I don't really want it to be in 24FPS if I want to export it at 60FPS or whatever speed suits the project.
I've looked in the timeline, dopesheet, render tab and can't find anything regarding the timeline's FPS
Thanks!

It's in the render output settings. You can also change the start/end point, the step interval and even re-map the time if you like:


When I animate, I get 10 different actions? I'm animating a hand animation, but the dope sheet has ended up with around 10 different actions and I have no idea how to merge them:

If you want to merge (append) the actions into a single action you could select the keyframes in the action editor to copy and paste Ctrl-C / CtrlV them. Both are also accesible from the Key-Menu:

In case you want to cross-fade them you would need to use the NLA-Editor and arrange the actions on its timeline.


Prevent mesh from going below the grid? Hey all is there a way to prevent meshes from moving in the z axis below the grid?
I want to have a solid floor to work on Quickly without always needing to check the transform to 0 on Z

You could create a plane on Z = 0 (an empty will do, too, but you might want to hide what's below), then apply a Mirror modifier along Z around that plane, with Clipping enabled:

This will effectively clamp vertex positions:

If you leave a vertex at the plane, it will stick to it, and you will have to temporarily disable Clipping to be able to move it away:


2.8 How to Duplicate Collection without keeping it "linked"? I don't quite understand the new "collection" workflow, if i have a Collection with a bunch of object, and duplicate that collection, the newly created collection seems to be "linked" to the original one, anything i do to any of them effects the other.

what am i missing here ?

thanks

The feature to duplicate collections (without linking) has been available since commit e7ea99af1b0d933b9323be39d8b1c6f683bfba52. Therefore this feature was included in the release of 2.80 and subsequent versions.

There are two options in the context menu of the Outliner for duplicating collections, Duplicate Collection and Duplicate Linked.

The screenshot shows the context menu of the Outliner in version 2.81

Duplicate Collection calls the bpy.ops.outliner.collection_duplicate() operator and does precisely what you intend.

  Recursively duplicate the collection, all its children, objects and
  object data.

The old behavior with the linked object data is now called Duplicate Linked which calls the bpy.ops.outliner.collection_duplicate_linked().

  Recursively duplicate the collection, all its children and objects,
  with linked object data.


Is there a way to merge multiple identical materials Models I am provided with often have tons of tons of materials which tends to hang my host app. I used to go around this via Select > Select all by type > Mesh and clicking "Join" in the Tools tab.

Unfortunately this doesn't work for my latest model: "No mesh data to join".
I've opened the MTL file in a text editor and noticed over 3400 "newmtl" definitions and most of these are duplicates, for example there are 1852 instances of:

Ks 0.000000 0.000000 0.000000
Tf 0.000000 0.000000 0.000000
map_Kd ff_644.png

All starting with a different name after "newmtl ".

I could theoretically remove the duplicate material definitions in .MTL and then re-assign the different material names in the .OBJ to match the one that's been left as a source but the whole method is a damn hassle and not a real solution to be honest.

Is there any decent way to clean this mess up?

Thanks in advance!

Have you tried this ...

Create a box object and apply a materials to it.
Select all the other mesh object that has multiple materials you don't want in your scene.
Select the newly created box object last. (Important select the box last)
Hit CtrlL, select material from the drop down list.
All your meshes should have the newly created box's material.
Save your file, Close it and reopen it to refresh the data cache.
Export the file to any appropriate format you may need.


How do I make a Polygon Pattern in Blender? I'm creating a logo reveal for my business as it's in need of one, however we want the background to feature a polygon pattern that raps around the entire scene like a sphere. It must not be a texture either as we want it to be 3 dimensional. I would create one off the bat by adjusting some vertices but it doesn't look authentic enough. I've got a picture of the sort of pattern we want but we'd have it on a much larger scale.

http://www.superbwallpapers.com/vector/blue-polygon-28641/

Is there a modifier or generator that can produce such shapes?

I'd use a combination of the Displace and Decimate modifiers:

For the above image I used a UV sphere, but you'll notice some stretching at the poles. For this reason I found a icosphere with a high-ish amount of subdivisions (I used 6) works a bit better. I did not use any subsurf for the icosphere.
For the displace texture I used Clouds with a fairly small size (the size you want may vary depending on the size of your object and polygons):
To animate it, set the displace modifier to use another object for the texture coordinates. Add an empty at the center of the sphere and specify it in the displace modifier.

Then animate the scale of the empty:

Dynamic topology sculpting can be used to create this effect with more control, but it may not be very convenient for animation.


Is there a way to lock stacked UV Islands when running Pack Islands? There are some objects that I purposely UV mapped prior to duplicating them so I would only have to texture one object and have all the others use the same textures.

Is there any way in Blender, including available add-ons, that will allow me to lock stacked UV islands so that when I run Pack Islands, the locked stacks will get packed without getting individually separated?

Ok, so this still might be of interest to some of you...
This method involves the use of Blender's Texture Atlas Addon. It's in Blender's default addon section but needs to be installed.

Scenario:

Let's assume we have four objects. Two of these objects are exact copies of the other two objects. Let's call them original1, original2, copy1 and copy2.

Let's further assume that at least the originals are fully unwrapped.

All four objects should use the same texture, while the copies of the originals should use the same UV space within this texture.

Creating the Texture Atlas

Open a new view and change it to UV/Texture Editor.

Select original1 and original2 in the 3D View window.

In the Properties Window go to the Render Panel and scroll down until you find "Texture Atlas". Click on the "+" Button to create a new Atlas.

A new window "add Lightmap" will pop up where you can change the name (not necessary imho). Click "Ok" to create the Texture Atlas.

Under "Texture Atlas" click on "No_Unwrap", then click on "StartManualUnwrap".

(You might want to change the resolution here, you also can create a new texture later on)

In the 3D View window tab into "Edit mode". Now both original1 and original2 got merged into one object temporarily, should be in edit mode and you should see their overlapping UVs in the UV/Image Editor.

In the UV/Image Editor go to "UVs" -> "Pack Islands". You also might to rearrange the UVs to use the Texture space more efficiently.

When you are finished with rearranging the UV islands, go to "Texture Atlas" and hit the "FinishManualUnwrap" button.

Both original1 and copy1 are now separated objects again and you dropped out of edit mode.

If you select original1/2 and tab into edit mode the respective UV islands show up in the UV/Image Editor.

Copying the UV maps

In Object Mode select copy1, then shift-select original1. In the 3D View Menu Go to "Object -> Make Links -> Transfer UV Maps".

Select copy1, tab into edit mode and change the Texture in the UV/Texture Editor to the Texture Atlas/the same texture you are using for original1

If done correctly copy1's UV space should be exactly the same as original1's.

(I merged original1 and original2 into one object in this picture to show that both share the same UV space)

Repeat for copy2.


Access color of a point given the 3D position (on the surface of a polygon) My problem consists in accessing the color of a given point (I know the 3D coordinates (x,y,z) that lies on one surface of a mesh.

I use raytracing to get the 3D position of the point casting a ray from the camera, and I need to select the point that are most far away from the camera (I managed to do that, just discard the closer intersections): now that I have the point, since I have no previous knowledge about how the mesh is colored (I need to develop a general method), I need a way to get the texture and be able to accurately select the color at a given position (I can get the 2D position on the surface, if needed).

The color I need to access is actually the color that would be obtained if the camera would be placed behind the object (but I guess once the information about the color is available, that could be calculated)

I checked other similar questions and found something interesting that I am trying to do right now here: Find the color at a particular surface point on a mesh.

However, I need to this from a python script, not using the GUI.
If someone has some other ideas, I would be happy to hear them.

Some indications for a way to do that (maybe there are other possibilities... I'd be interested if some other answer could offer something more simple).

From the comments below the question, I assume the following entry parameters:

A mesh
A ray cast point 'V' on the mesh, so you also have the corresponding polygon index 'P' (considering you are using BVHTree from the mathutils module)
A UV map
A texture

First thing: at some point, you'll need to match V position on P to the V' position on the UV map part where P correspond to.
That can be done using barycentric_transform (function which can be found in mathutils.geometry), but a triangle is needed (as we need all to be convex).
This means that you need to work on a triangulated mesh (you could also triangulate on the fly, but I don' know how to do it).

So the overall process can be the following:

Get your mesh
Triangulate it
Ray cast and obtain V and P (a triangle)
Find the UV map part P' corresponding to P
Calculate V' using barycentric_transform
Remap V' on the texture

Some indications for all that using bpy and bmesh modules

Get your mesh

Snippet

import bpy
obj = bpy.data.object['your mesh name']

Triangulate it

Snippet

import bpy
import bmesh
def TriangulateMesh( obj ):
    bm = bmesh.new()
    bm.from_mesh( obj.data )
    bmesh.ops.triangulate( bm, faces=bm.faces[:] )
    bm.to_mesh( obj.data )
    bm.free()

Eventually, work on a copy:

def CopyMesh( obj ):
    copy = obj.copy()
    copy.data = obj.data.copy()
    bpy.context.scene.objects.link( copy )
    return copy

Ray cast

Snippet

from mathutils.bvhtree import BVHTree
... some code and at the end:
location, normal, index, distance = bvh.ray_cast( ... your parameters )

index here is P.

Find the UV map part corresponding to P

Get 3D vertices indices

verticesIndices = obj.data.polygons[P].vertices

P vertices coordinates in 3D space

p1, p2, p3 = [obj.data.vertices[verticesIndices[i]].co for i in range(3)]

P UV map vertices indices are found in:

uvMapIndices = obj.data.polygons[P].loop_indices

The UV map

uvMap = obj.data.uv_layers['your uv map name']

The coordinates of P vertices in the UV map space:

uv1, uv2, uv3 = [uvMap.data[uvMapIndices[i]].uv for i in range(3)]

Calculate V' using barycentric_transform

V' is given by (make uv1, 2 and 3 as 3D vectors before):

V' = barycentric_transform( V, p1, p2, p3, uv1, uv2, uv3 )

Remap V' on the texture

Get the texture, the pixels and texture dimensions:

image = bpy.data.images['your texture name']
pixels = list( image.pixels ) #Faster than accessible image.pixels[x] each time
width = image.size[0]
height = image.size[1]

From V', get x and y. These values as give as if the image size was (1, 1). So you need to rescale and modulo x and y, then reach the corresponding image color using 'pixels' (which is a linear byte array of individual color components RGBA).


What Particle/Face means/does? I'm fallowing a tutorial about Hair. And in the Tutorial, he alters the value of the Particle/Face property in The Particle System but don't explain what it does.
And I'm not noticing any difference visually in the particles.
Can somebody tell me what it does?

That is the number of Particles PER Face, expressed like a ratio.
If you leave it at 0 it emits whatever number of particles per face it wants, based on the total number of particles you defined on the fields above.
If you set it to any other number, then that exact number of particles will be emitted from each face, regardless of how many total particles there are.


Set parent with automatic weight for selected bones only How can I easily set the the selected bones parent of the selected mesh?
Reading the documentation it works well while setting the bone directly as parent but as soon as I use with automatic weight it use all the bones of my armature.
On my screen-shot if I do ctrl-p then automatic weight and move the hips, it will also deform the arm.

Select the vertices in Edit mode, remove them from all vertex groups named like a bone, and add them to this one group that has the same name as the bone you want to parent the vertices to.
Blender creates a vertex group for each bone if you parent the armature With Automatic Weights, With Empty Groups or With Envelope Weights. The weight assigned to the vertices in the group controls the influence of the bone on the mesh.
If you move the hips and the arm moves as well then you need to remove the arm vertices from the hips vertex group. You can do this visually in Weight Paint mode (paint with WP=0), or in Edit mode with plain numbers by editing the values in the N-panel (Item > Vertex Weights) or assigning/removing vertices from the group (Object Properties > Vertex Groups).
If you remove the weight of the hip bone from the arm you should add it to the arm bone (keyword normalize weights).


How can I update a specific layer of a multilayer exr file? Is it possible to "update" parts of a multilayer exr while retaining other render layers?

Let's say I have two layers A and B. I render both layers to the same exr and later I decide to re-render layer B (with option "Only render the active layer" checked). When I click on "Animate", Blender overwrites all existing exr files, so layer A is lost. I don't want to re-render all layers, since it's pretty time-consuming.

Do I have to use multiple exr files - one for each layer - to fix this? What's the benefit of the multilayer exr then?

You do need to render out a new OpenEXR file.

Bring the OpenEXR files you already rendered into the compositor using an image sequence node. Then add a file output node and set it to OpenEXR multilayer. Reroute the outputs to combine the images as needed and re-render the sequence.

The basic procedure to setup the OpenEXR layers is outlined on this post:Combining .exr files?

You might need to render out a set of dummy files to automate the rendering.
See this post:Export multi-pass .exr image sequence from cycles?


Possible to combine a pie.operator and box.operator together? Would it be possible to have pie operators along all 8 pie positions and below pie 2 have a column of box operators?

No, you cannot have all 8 pie positions and another extra box.

You can have boxes instead some pie positions though. So you can have 7 pie positions and the bottom 8th one being a box:

def draw(self, context):
    layout = self.layout
    pie = layout.menu_pie()
    #4 - LEFT
    pie.operator("mesh.primitive_cube_add", text="LEFT", icon='MESH_CUBE')
    #6 - RIGHT
    pie.operator("mesh.primitive_cube_add", text="RIGHT", icon='MESH_CUBE')
    #2 - BOTTOM
    box = pie.box().column()
    box.operator("mesh.primitive_cube_add", text="BOTTOM 1", icon='MESH_CUBE')
    box.operator("mesh.primitive_cube_add", text="BOTTOM 2", icon='MESH_CUBE')
    box.operator("mesh.primitive_cube_add", text="BOTTOM 3", icon='MESH_CUBE')
    box.operator("mesh.primitive_cube_add", text="BOTTOM 4", icon='MESH_CUBE')
    #8 - TOP
    pie.operator("mesh.primitive_cube_add", text="TOP", icon='MESH_CUBE')
    #7 - TOP - LEFT
    pie.operator("mesh.primitive_cube_add", text="TOP - LEFT", icon='MESH_CUBE')
    #9 - TOP - RIGHT
    pie.operator("mesh.primitive_cube_add", text="TOP - RIGHT", icon='MESH_CUBE')
    #1 - BOTTOM - LEFT
    pie.operator("mesh.primitive_cube_add", text="BOTTOM - LEFT", icon='MESH_CUBE')
    #3 - BOTTOM - RIGHT
    pie.operator("mesh.primitive_cube_add", text="BOTTOM - RIGHT", icon='MESH_CUBE')

You can split rows, create multiple columns, etc. Normal formatting methods of Blender UI applies. If you omit the .box() you don't have that ugly border and only grouped entries which looks better imho.


Is there a way to export each render layer seperate but as animation? i'd like to render in one Blender File different videos at once. Is this possible? I chose for each animation an seperate Render Layer
Thx for your help

Yes this is possible, for this you will need to use the compositor.

Activate use nodes and delete the composite output node.
You will be left with a Render Layers input node.
Create a copy of this node for each render layer you wish to create output, and select a separate render layer for each node.
Connect a File Output node to each Render Layers node using the yellow image connection dots.
Create a separate output path for each file output node.


Shift + D not creating new object In the below image the three highlighted borders, except for the vertical one on the right were creating using Shift + D:

The component "Cube" was the initial mold for the highrise; Cube.001 was added in separately and scaled
into the vertical left frame. The top and bottom frames are copies of it that were rotated and scaled to fit the top and bottom borders. Why aren't they each a separate component (e.g. Cube.002, Cube.003)? Shift + D is suppose to make an actual separate copy. In edit mode, they are three separate objects:

In this video

https://youtu.be/emT-CL957HE?list=RDCMUCOKHwx1VCdgnxwbjyb9Iu1g&t=646

it's its own separate object; when I click the vertical cube, all frames (top and bottom are selected).

You need to be in object mode to duplicate an object (as a separate object). In edit mode it will duplicate your selection IN the same object.


Making a flickering outline So I haven't seen this posted anywhere. I'm trying to get a as-much-as-possible hand drawn effect. I've noticed that flickering outlines can help a lot to achieve that look. However, I've tried many combinations but couldn't get a good result at all.
I've put an example here https://youtu.be/NLKiEiJUyw4
Any clue on how to achieve this on Eevee would be very welcome,
Thank you very much!
Example of a outline flickering effect

that would be grease pencil - traced object with a noise modifier on it.   image1
You can also try a displacement modifier with an animated texture on your object with freestyle turned on.
The other option is to edit the freestyle settings, turn on noise, and give a low period, high amplitude and animation the seed based on frame (type #frame into seed)


Materials and Exporting to different formats I am having difficulty transferring any materials that I add onto a structure within blender.  After I'm done adding the different materials, when I export the blend file to either a .obj or .3ds the structure carries over, but the materials do not.

When going into composite mode, and rendering the scene all I get is a blank scene with boxes, it seems to render rather quickly with no result.

My question is therefore, if you take the basic cube model, add a material to it, save it and export it to an object(.obj) file, is there a way to carry over the material change you made to it?  I tried this on the basic cube and it didn't work.

I'm a self admitted novice at using blender, so any insight or help is appreciated.

Material definitions can become very complex. Simple things like the Color, Specularity, Transparency can be exported to .obj (wavefront format). More complex material definitions which involve the texture stack can not be exported as .obj afaik. However, if you ask if exporting materials is possible "in principle", then the answer is "yes":

You can transport more complex materials by using FBX or Collada as transfer format. But beware, not even with these formats you can transfer the complete material definition. This is partially because the material properties are blender specific, and partially because the exporters have not (yet) implemented the full capabilities.

I know that the Collada exporter allows to export materials with image textures in the texture stack. I guess the FBX exporter can do that as well (but this needs an approval)


lighted rain behind a window i'm fighting with an effect I would like to achieve using particles & Blender (if possible Eevee, for rendering time concerns).

I want to make rain INSIDE a box, and to light that rain.

The lighting is very important.  You should really understand were the light source is, by watching the rain.
But the light itself doesn't really show up.
I did a lot of tests with particles, materials, volumetrics, etc; but can't get close to it:

I also had tests with particles emitting light, the problem being that I really need water drops to be illuminated realisticly - and to react to my light setup as I update it.

Does anyone know how to do this (and if it is doable) ?
Here's my current blend file.

Thanks a lot.

For the inner illumination of your drops remember to not make the drops 100% transparent. Look at the difference for value =1 and value=0.95

I don't think that there's any other option than doing this and adding a LOT of samples.. :(

You would have to modify the particles to be dynamic thought the flight, so their shape changes very slightly, so each moment they reflect light in a slightly other direction.
Also, cycles sucks at caustics. Your lightning setup would use refraction for the drops themselves to be lit "from inside", and reflective to get the shimmering effect on the video.


Uploading to Sketchfab loses texture I am trying to upload a model to Sketchfab and I always lose the texture.  I have tried uploading a .blend file directly, as well as exporting to .OBJ and uploading to that.  In both cases, the model is not maintaining the texture / coloring.

Any idea what I might be doing wrong?

Thanks in advance.

Edward

I believe that's how Sketchfab works -- the model comes in without the texture and you have to add it back in manually within Sketchfab's interface. Of course, if you're using a Cycles procedural material, that will be lost as well and you'll have to try and replicate it within Sketchfab.


Problem with Boolean modifier-difference I am modelling a PS4 where I need to make a hole in the console that resembles the PS4 logo. I have tried Boolean difference, it works for P and S but not for 4. Knife project also does not seem to work.

Is it a modelling issue? I am not able to figure it out.
The logo and the console.

How it actually looks like, the P and S are only intersecting the mesh

Blend file

The reason boolean difference fails on the 4 is due to non-manifold geometry. You can select non-manifold geometry with CtrlShiftAltM in edit mode. In your case, this reveals an unconnected face on the extruded version of the 4 (likely due to an extra edge before extruding):

I added an extra edge ring and merged the corresponding faces:

And then the boolean succeeds.


Single continuous mesh vs disconnected parts Sometimes I am modeling something that has parts which would be much easier to attach separately, as opposed to joining them. For example, a sword. I could model the blade and hilt and hand guard separately, or I could do it such that it is a single, joined mesh.

I understand that if parts are going to be animated like a wheel on an axle it obviously can make sense to use separate parts; and that a head should probably be connected to a neck for smoother lighting and stretching. But otherwise, is there any reason not to use separate parts if it makes the process easier? Does an engine work harder, or does it use more texture memory, etc.?

The best reason to use separate parts is because it makes the process easier. And because it is much easier to join two objects into one than to split one object into two, in my own workflow, if I have the slightest hint of a doubt that I might want to be able to access the items separately later on, I make them separate,

But separate does not always mean two objects. Sometimes I make two or more meshes as sub-objects of the same object, for example, I might make the rear wheels of a wagon as two sub meshes of the same object, but the axle as a separate object altogether. When I make two or more meshes sub objects of the same object, I make some effort to make sure that those sub meshes are easily separately accessible. One way is to assign them to different vertex groups, but sometimes it is enough to just make sure that there are no connections between the sub-meshes, so they can be selected with CTRL-L.


I want to unparent an object with python I want to unparent an object.

I tried the following code

import bpy

selectedList = bpy.context.selected_objects
selectedList[0].removeParent()

However, the following error occurred and the parent could not be removed.

AttributeError: 'Object' object has no attribute 'removeParent'
Error: Python script fail, look in the console for now...

How can I make a selected object have no parent?

Solution 1:

Assume you have an object in python obj:

Try obj.parent = None

None is a keyword refer to nothing. You assign the object parent to nothing is equivalent to remove parent.

Solution 2:

Directly modified data in object without operator can lead to some problem. You can clear the parent in your blender, and in info panel you should see the python command: bpy.ops.object.parent_clear(type='CLEAR')


How to make a walking animation for a character in the BGE on a uneven or steep floor? I'm looking for a method to make a character walk properly to the angle of the floor.

So when he walks up a hill the feet have to be always touching the floor correctly and the walking motion of the legs has to change with the angle too.

Walking the hill straight up or down is one thing, but imagining the character running sideways on it so that one leg is at a higher level than the other is more difficult.

Plus it will have a joystick-like rotation whilst walking so it blends from the "sidehill" animation to the uphill or downhill animation.

Does anyone have experience with this issue? Any tutorials, hints, tips, guesses, ressources, etc. would be much appreciated.

Any guesses on how to script this? E.g. how to change the model/animation according to the angle of the floor?

Ok,

you can change the angle of the step, easy enough with a ray, and parenting the animation
handles to a empty that animate the feet, just use track to another empty on the empty the feet animation handles are parented to, and place the empty via a ray. (so the player will walk up and down hills and change stride angle)

The hardest way (and best way) is this

http://www.youtube.com/watch?v=ZtzQAluEgts

This is a walking ragdoll, that uses the step offset angle code, along with the fact that it really walks.....

http://blenderartists.org/forum/showthread.php?353549-Non-PID-Ragdoll-based-on-Jackii-s-work-made-for-quot-Wrectified-quot

here is the 'base' of that rig.


Vertex paint mode shaded view in cycles When in vertex paint mode - the object being painted is displayed as shadeless.
This makes painting on a complex model difficult - as you cannot really see what you are doing.
You can use dirty vertex paint to make the geometry visible - but this is not ideal.

This is improved in the Blender render textured view using multitexture shading which gives you a shaded view.

In cycles the object remains shadeless in both shaded and textured mode.

Can this be shaded so it is not shadeless when using cycles?

This was changed in 2.71, now solid view is displayed with shading, and wireframe view is shadeless:


How to use Blender Internal to UV map AND Alpha map? I've been searching for an answer to my question, but my Google-Fu isn't quite up to scratch to figure out what is likely a pretty simple question.

Anyways, I'm looking to improve my hair on my character models in Blender Internal. I am looking to use alpha maps to make hair strands appear nicer and rounder while conserving on polygons (as I'm trying to eventually do models for games and animations in a cartoony-stylistic approach, a low poly count is vital to me).

I was wondering if anyone knew how to have a colour map and an alpha map work together. For example; I want one map where all my strands are on top of eachother on a texture like this:

Where he has all of his locks of hair on the same spot of the texture so that all the strands go with the grain.

And then I also want a separate map like this:

Where I can control the alpha of each individual hair.

How can I do this?

I wouldn't do it that way since the pixels counts are so different between the two images BUT if you wanted to, you do have the ability to have more than one UV map - so where you normally reference the default UVMap in the Data panel of the Properties editor, you would use one map for the color image and then add a new one for unwrapping to use the alpha map.


Circular order of edges around vertex I'm trying to get a circular order of connected edges to a vertex.

From the bmesh module, we can have a BMEdgeSeq of linked edges to a vertex with the link_edges function.
But the edges list is not ordered (in a circular way)

It is possible from the documentation of BMEdgeSeq to sort with a key, but, where are the possible key ?

Last solution, compute myself an angle between each edge to find a circular order (clockwise or not), but that seems heavy for meshes with a lot of vertices.

Any ideas ?

Thx in advance.

Here what i've made for my problem.
As pointed out, it uses bmesh and BMLoop structures to do it.

# Return edges around param vertex in counter-clockwise order
def connectedEdgesFromVertex_CCW(vertex):

    vertex.link_edges.index_update()
    first_edge = vertex.link_edges[0]

    edges_CCW_order = []

    edge = first_edge
    while edge not in edges_CCW_order:
        edges_CCW_order.append(edge)
        edge = rightEdgeForEdgeRegardToVertex(edge, vertex)

    return edges_CCW_order

# Return the right edge of param edge regard to param vertex
def rightEdgeForEdgeRegardToVertex(edge, vertex):
    right_loop = None

    for loop in edge.link_loops:
        if loop.vert == vertex:
            right_loop = loop
            break
    return loop.link_loop_prev.edge


Import object from python I create some small my own primitives. Is possible import it from blender file?

For example in blender file my1.blend I have object caled "my1". I prefer working on small files with one object in one file and next join it together and put location/scale in specyfic way.

I need import this object into my current blender project (other than my1, for example all.blend) in specyfic x,y,z location, and scaling to 1.5 factor. My object have some modyficators, materials etc.

I need only read object, materials, color etc. No scenes, lights etc.

You'll want to look at bpy.data.libraries.load(), which allows you to open a Blendfile and select which datablocks (objects, meshes, materials, etc.) you want to append or link. The API documentation also has examples.


Normal map from retopo is having artifacts, despite subsurf I did a retopo of a mesh by hand. Now, I found it to be ok and tried to bake a normal map out of the high-res-sculpt and the retopo. I tried it

with one stage of subdivision applied
and without applied subidivision

with subdivision it is smoother, but still has artefacts. now, if I subdivide further til the polycount reaches a supersmooth amount to blend out the polygon edges in the normal map, there is no sense in retopology I think? :S

(32-bit float-map, non colour data, combined with UV Map-node and Normal Map-node, linked to Diffuse and Material Output)

even with 2 subdivs, there are still minor errors:

This is due to a poor UV unwrapping (I guess you Smart UV unwrapped your mesh right?), UV maps seams should be hidden as much as possible. Search for UV unwrap 3D head on google to get an idea on where to cut.

Also read the Tangent Basis parts of this post to understand why your normal map create this kind of artifacts: http://wiki.polycount.com/wiki/Texture_Baking


Is there any way to apply a pose to a mesh and be able to remove the armature and keep the pose? Im trying to import a model into the oculus home but when i do the character isnt posed but is in blender. idk if theres a way to fix this so oculus can read the armature pose or that i can fully apply all of the pose to the mesh

Yes: apply the mesh's armature modifier, then you can delete the armature. :)
Note: save backups as this is permanent


Rigidbody.objects_add.poll() failed! After the script that was working as mentioned in my earlier post. I am trying to create a blend file that has the scene setup and a script that has the locations of the objects available in the blend scene. I am able to see the new positions created by the script to the objects in the blend scene. But I am not able to bake them all. I get the below error.

RuntimeError: Operator bpy.ops.rigidbody.objects_add.poll() failed, context is incorrect

This is relevant to the lines

bpy.ops.rigidbody.objects_add(type='ACTIVE')
bpy.ops.ptcache.bake_all(bake=True)

Let me know if you have come across this kind of error. How do I make the context correct. When I try to the print the objects that are in the scene, I am able to see the objects in the blend file. What does the context here mean?

Thanks in advance!

You should deselect non mesh objects before adding rigid body objects

 bpy.ops.object.select_all(action='DESELECT') #clear selection
 candidate_list = [item.name for item in bpy.data.objects if item.type == "MESH"]
for object_name in candidate_list:
    bpy.data.objects[object_name].select = True

this also should be done when clearing the scene if you want to keep the camera and light sources. and regarding the context see this answer poll() failed, context incorrect?


Array Fit to Curve not working I was following Derek Elliot's car racing tutorial [1]. I want to put a fence along the track. I have applied scale and rotation to the fence object and the array modifier is working fine but the curve modifier is not working. It generates the  fence array separate from the track and both sides of the fence seem to be drifting away from each other. I have also attached a screenshot from the tutorial video to give an idea of what I want to generate [2] and what is being generated in my case [3,4]. I have also attached the blender files [5] for reference.

First, select the path and apply its Rotation & Scale with CtrlA, otherwise it will make your object rotate. Go in Edit mode and in the N panel, bring back its vertices radius to 1 to correct the applied scale (and Tilt to 0 unless you want one).
Put the object at the same position as the path's origin: Select the path, ShiftS > Cursor To Selected, then select the object, press ShiftS > Selection to Cursor.
In the Curve modifier, find the good Deformation Axis, which seems to be X.


Wrong normals after merged two meshes I am just in mid of work, merged two meshes and one of the meshes turned out to become black. I have flipped the normals, no success, and then I recalculated them to be sure, no success again. If anybody happens to have an idea to solve this I would be glad to hear.

Thanks for your attention.

Your screen shot is not showing normals,
Please try to select one Object and flip the normals in your required direction
select other object and flip the normals to your required directions

as you combined the Objects all ready please use the mouse hover and L key to select each object.

Take a look of the image if I understood your issue correctly

I hope it will help you


How to render the 3D View, Editor view? This may sounds strange but I want to create a video and show the steps when adding the different effects to te scene. I want to have a high quality picture of the 3D View. Can I make this without taking screenshots?

Window menu "Make Screencast", the settings are in the User Properties view. If you want to do anything serious use a third party piece of software. In windows the Game recorder works well. – rob Oct 10 at 8:49


How do I move an object using a csv file? I am very new to blender and I am trying to move a cube in an environment. I have a csv file with a list of coordinates designated by columns, each column is the X, Y, or Z coordinates with n rows. From this list, I am trying to read the file in blender and move the cube to the coordinates in each row. Any python coding help or tips would be fantastic.

Assuming you need only the first 3 columns of each row and you need to iterate over, one way of doing could be this. you need to have your object selected

"""
Example csv:
1.1, 1.3, 1.1
2.2, 2,1, 2.3
"""
import bpy
import csv

csv_path = "path_to_your_csv"

with open(csv_path) as file:
    csv = csv.reader(file, delimiter=",")
    # iterate over each rows assuming you need only
    # the the first 3 columns (if there are more)
    for row in csv:
        # row is a list with strings elements so must be converted in float
        x, y, z, *_ = [float(value) for value in row]
        bpy.ops.transform.translate(value=(x, y, z))


Light path Transparent/Diffuse Depth I'm working on a cycles shader that requires thickness information, and by that I mean interaction between the mesh with the shader itself and other objects inside it, in a way that as closer a diffuse surface is to the mesh with the shader, the more transparent it is.
This is an example of the wanted behaviour:

Ignoring the normal map on the surface, as you can see, the closer the white ball is to the blue pillar, the black it is. This image is using Lightwave's thickness node. If one could input it in a Blender Mix Shader factor, it could control transparent/diffuse values on the surface.
Blender apparently doesn't have a proper thickness node, but it has Light Paths... I took a look at light absorption shaders, but those use a B&W MixRGB directly into the color of a Glass shader, I couldn't make it work using as a factor for a Mix shader. Also the fact that we're using transparency instead of glass can be a problem.
Basically this is the situation visualized:

The ray from the camera hits the MixShader Transparent/Diffuse surface, it then travels a certain Depth(D) before it hits another Diffuse Surface, then bounces back through the Mix surface and to the light source. If the Depth travelled is equal or greater than D, the surface is 100% diffuse, otherwise it is a blend until D=0 where transparency is 100%.
Fortunately we have a Transparent Depth Light Path node that can be used, but I'm not knowledgeable enough to understand the math behind it.
If you feed Transparency Depth directly into a Mix Shader, the result is almost good, except it is inverted (greater distance = more transparent), and it doesn't work if you flip the shaders on the Mix Shader, or if you multiply it by -1:

The left object kinda works (but inverted), the right object doesn't but firstly I'd be glad if even the left worked rightly.
So, is there someone with any idea how to make a thickness node on blender?
This is the file if anyone is interested:

Regards

Volume shaders should provide the desired result.

1) Create a solid geometry for the volume. Make sure the volume does not touch anything on the interior. In this case, the blob on the cylinder had a Boolean added to remove the interior, then the original cylinder was hidden. A slight smaller copy of the cylinder was used in the rendering.

2) Use a combination of the surface shaders and volume shaders for the material. The surface shaders should be mostly transparent so the volume effects are apparent.


How to create stitching by texturing? How should I create realistic stitching on my 3D model's leather grip via texturing? I have tried doing so by making threads with meshes and duplicating them as a curve, which is suggested by many online tutorials but that raises my project's polycount too much. Is there a way to add stitching texture on top of my leather material of my model? Any help is appreciated.

You may do it using a bumpmap. All you need is to create two textures.

Create a stitch image in photoshop or gimp and transform it into a brush (https://www.youtube.com/watch?v=iGSK3Q0Iy3c). It's color should be from over 50% grey to almost white color.

Export your unwrapped UV Layout.

In photoshop layer it over a 50% grey color layer to see where to put stitches. Use your newly created brush to paint them on the grey color layer.

Use a method as shown here: https://www.youtube.com/watch?v=gbDA3XinISs

Now you have a bumpmap (let's call it BUMP).

You need also to create a black and white texture as pictured below (let's call it MASK). It'll act like a mask for mixing two different materials.

Set up the nodes as pictured below. We'll use a BUMP texture to create a depth to the stitches. Plug it to the Displacement input of the Material Output node. Add a Math-->Multiple node between them to control the bump size. Use a MASK texture to set a border between two materials (in this case jeans material and stitches material). Plug it to the Fac input of the Mix Shader. Now you have a full control over jeans (or leather in your case) and stitches shading within one cycles material using only textures.

Here's how the stitches present in final render. With the proper mix of Diffuse and Glossy shaders they may look quite convincing.


How to transform (translate, rotate, scale) Vertex Groups using drivers? I'm trying my hand at procedural modelling using Blender. Houdini is known for procedural modelling, however, I want to achieve the same with an open source software like Blender.

I am currently trying to model a simple window frame with a cross (+) shaped frame in the middle. I want to adjust the width and height of the frame while still maintaining the integrity of the original shape. I've attached the .blend file. When I scale the frame width along the X or Z axis, the corners of the frame gets stretched out creating weird distortions.

I thought that the simplest way of getting rid of the distortions is by simply translating the vertices at the corner in the X or Z directions, thus giving us the illusion of scaling them along the X or Z axis. So I created vertex groups for the corner vertices, but how do I translate just the vertex groups with the help of a driver?

My driver object is an empty cube seen below the frame that has a few custom properties such as WinHeight and WinWidth which is supposed to achieve what I mentioned above. Is there a way for the driver to control only those vertices of the vertex group or is this not possible in blender?

Thanks in advance.

The simplest way to move a vertex group is using an armature: create a single bone armature, give to the bone the exact name of the vertex group, add an armature modifier to the mesh and select the newly created armature in the modifier's object field.

Now if you move, rotate and scale the bone (even with drivers) the vertex group will exactly follow.

You can have as many bones (and associated vertex groups) as you want in the armature, but - if you want rigid movements - make sure that every single vertex is affected by one bone-vertexgroup only.


How do I get anisotropy to work in 2.72? I must be doing something wrong here, but for some reason in blender 2.72/2.72b the anisotropy shader is acting no different from a glossy shader.

Here is a comparison:

As you can see, there is no difference.  I have tried all distributions and tangents and adjusting the rotation to no avail.

Here are my nodes:

I have not used any anisotropy since 2.72 came out and just opened up a simple scene I have not worked on for a while and noticed that none of the anisotropy is working as before.
Here is the scene I noticed it on:

The second render is the one I want.

Is anisotropy done differently in 2.72, or is this a bug?  I am inclined to think this is not a bug since somebody should have reported it by now, and one of the new things in 2.72 is the new Ashikhmin-Shirley distribution.

You need some roughness for the anisotropy to be visible.

As I understand it, anisotropic shading simulates the way light reflects off objects with fine grooves like on CD/DVDs or machined cylindrical objects. Without any roughness, the surface is considered smooth (no grooves).


How to get the pitch of a point relative to the camera's plane of rotation with Python API I'd like to get the inclination of a point from the camera's plane of rotation (defined by the local y-axis).

The code I currently have to works sometimes, but not always. It works when the camera is at the global origin, but not always otherwise. Here I have a point of type Vector, and a camera.

import math
camera = ...
point = ...

point_in_local_coords = ( camera.matrix_world.inverted() * point )
angle_to_normal = Vector( (0,1,0) ).angle( point_in_local_coords )
angle_to_plane_of_rotation = math.pi / 2. - angle_to_normal

In particular, I have

point = Vector( (-1.8580, -0.9115, 3.6539) )
camera.location = (0.104775, -2.752501, 1.390733)
camera.rotation_euler = Euler( (1.5293482542037964, -0.022381655871868134, -0.09930113703012466), 'XYZ' )

yields pitch=42.5164 degrees.
I tested whether this is correct by creating an empty at the location of point, and varying the camera's field of view until the empty is in frame. Since the empty is not in frame when the camera's FOV is 96 degrees (> 42.5 * 2), I know the true pitch must be larger than the one I calculated.

My question is, what is the correct way to calcualate the pitch of a point relative to the plane of rotation defined by the camera's Y axis. Bonus points if you explain where I went wrong :)

Version info:

Blender 2.78 (sub 0)
build hash: 0b13b7a

--------UPDATE---------------

Problem solved. I didn't consider that the elevation of a point from the camera's plane of rotation is constant, but that the apparent pitch will vary as the camera rotates. In my case, the FOV can shrink as the camera approaches the point, and must grow as it rotates away. This is a 'duh' thing, but that's what I forgot about. So my testing procedure was the problem :o

Both the suggested method, the initial method, and a myriad of other ways work - so I've accepted the proposed answer. Thanks for your help!

Compute the distance between the camera and the point projected onto the plane, i.e. d = point_in_local_coords.xz.length. Then compute the angle using a = atan(d, point_in_local_coords.y).

For bonus points: where you went wrong is the assumption that the angle you want to compute is unaffected by the point's local x and z coordinates.

PS: I'm typing this on my phone, without Blender to test, so I might have a typo in my math somewhere.


How to align two vertices on two planes? I have 3 vertices here which I try to align, the bigger User Orth view looks down along the 2 which already are aligned over each other.
The upper left view shows a sideview and the arrow represents the axis at which the big view is looking down along.

I'm trying to get the selected vertex inline with the 2 behind it, the problem is that I need to restrain it on 2 different axis which are in different orientation spaces:
The main orientation is the big view's camera, 30deg down along that edge.
But my problem is that I also need to prevent the vertex from changing it's global z because I want the top surface to stay flat.

What I've managed so far was using vertex snapping with the big view's transform space set to view and locking view z to snap it inline.
That'd work fine if it wouldn't still mess with the global z slightly anyways.

So is there any way to align that vertex with the ones behind it but keep that top surface flat?

While in the bigger User Ortho view, select the vertex you want to move, the one that cannot be moved in the Z axis. Once selected hit G, then Shift+Z (this allows the vertex to move in the X and Y axes, but not the Z axis). Then, holding Shift to limit movement speed and increase accuracy, visually line up the vertices. While not mathematically exact, you can zoom up quite close to ensure they are aligned to your liking.


how can i make child transformation property to change when its position is changed due to change in parent position suppose i have two object a cylinder and sphere. I set sphere as parent of cylinder. Now when I reposition sphere the position of cylinder also changes. But when i see transform properties of cylinder (child of sphere) its transform properties are not changed. i want transform property to change with the position of child object. please suggest a way to achieve this if possible

The Transform Panel shows the Local Coordinate Values. Since the Cylinder is parented to the Sphere, what you are asking for is not possible, unless you change the transform panel UI to display world space values (which would require more calculation, I presume)