How can I make my interior scene better lighted? I am using 2 sun lamps, the principal one has the strength set to 30.000, the other one is pointing in the opposite direction, is bigger, and has the strength at 1200. An HDRI is supposed to light up the scene a little bit more, but even with all of this, I haven´t achieved a nice lighting, I am using filmic color management with the exposure at 2100 in order to see what it is in shadow areas (sofa), but I end up having a lot of noise, even with 2000 samples.

My glass is made by a glass and a transparent shader, mixed by an 0.855 factor. I don´t think the problem is the glass, becouse i made a test, deleting it just to see what the light would do without it, and the result was the same.

As I said, there are techniques at your disposal to reduce noise (and by extension, render time) that don't involve relinquishing your shadows.  Here's an example showing how much Clamping actually affects shadow exposure.  I've used the Denoising filter (for simplicity) included with Blender 2.79 Candidate but there are more effective and more flexible ways of controlling noise as well.

Denoising settings for this render:

Notice also the wood texture outside the window, with an Indirect Clamping value as extreme as 1.00, it's affected as well, since it's technically not Direct light.

Full size (Click to enlarge):


How to lock elbow rotation (forward kinematics) Before answering this question please consider that an 'answer' involving IK bone constraints should go in comments. In this question I am only interested in forward kinematics.

Many humanoid models use a T-pose like this:

I often end up doing custom rigs, and need to keep them simple (I really do). To avoid unrealistic bending of the elbow while animating, I want to constrain the rotation of the elbow joint.

One method (when using forward kinematics) is switch to Eulers and lock the rotation in UI, as illustrated by this picture:

However, some artists discourage the use of a straight T pose. So we often see this:

My guess is that an axis-angle rotation may do the trick in such cases, however figuring the rotation axis would require tedious calculations; also, behaviour when rotating an axis-angle-locked joint in 3D view is not very satisfying. Finally I don't really want to use something other than quaternion rotations if I can avoid it.

So, what would be a good way to constrain rotation in such cases?

You can use bone constraints to limit bones rotations (and other things) in pose mode:

Here is the wiki on rotation limiting.
The settings depend on actual bone setup and what the bone roll values are. Sometimes the bone roll needs to be also adjusted.

This will allow only rotation in local Z axis:

The range of motion can also be adjusted by setting the angle limits for appropriate axises.


How to delete unused vertex groups? I downloaded a model and found that there were way more vertex groups than bones in the armature. Is there a way to delete all vertex groups that are not assigned to a bone?

You may first wish to make sure these vertex groups aren't being used for something else such as particles, shape keys, modifiers, etc. Vertex groups are used for a lot of different things besides just bone weights. But assuming you still want to remove these groups, it can be done like this:

Make sure all the bones of the armature are visible. With the armature selected, go to the Object Data Properties tab of the properties panel, and make sure all the Layers with bones in them are visible (the ones with a dot have bones). Shift + click to select multiple layers.

Enter weight paint mode. From object mode, first select the armature, then select the mesh by Shift + clicking on it. Press Ctrl + Tab and select Weight Paint

Select all the bones by pressing Ctrl + A

Lock the selected groups from the menu at the top of the viewport. Weights > Locks > Lock Only Selected

Or if you want to preserve some other vertex groups as well, use Lock Selected instead, and make sure all the groups you want to keep are locked.

Delete the unselected groups. In the mesh's Object Data Properties, press the drop-down arrow on the right of the Vertex Groups section. Then select Delete All Unlocked Groups.


Cutaway shader addon issue I am trying to use the Cutaway shader by iReboot (aka Dylan Whiteman) as found on his page here. However, the results are not exactly as expected. The model shown in the attached screenshot is made of planar geometry with solidify modifier, and it uses particle systems to instance other assets. Both the planar objects (particle generators) and the particle objects have the cutaway shader material applied. But the render preview shows parts of the object that are supposed to be hidden away in black. Would you know what might be causing this? Any suggestions for how I can fix the issue?

(Also, I do not want to use boolean modifiers to achieve a sectional view because they do not work well with large complex geometries that are required in this case because of the need to use particle systems.)

The fix Duarte Farrajota Ramos suggested worked. Attaching screenshot of settings for reference. It was not an issue with the Cutaway shader add-on, but a matter of increasing the number of transparency bounces under the Light Paths subhead of Render settings.

Thank you!


Object surface be cracked when move too far grid center I have a problem but i dont know how to describe it.
I have one object. It is look good if I put it in (0,0,0) xyz axis or about +- 100 unit location. But when i moved it to (1000,0,0) it became weird with some cracked on surface and it worse than that.
I applied locrotsccale already, just subsur modifier (but it not better when I removed modifier)
Some one help me how to fix it. Thank you
Here is my screenshot:

Update:
Here is my file to check FILE

This seems to be due to an old bug. The cause has been identified:

  The issue is actually coming from the way how ray bounce is happening: it is using ray_offset() in order to avoid self-intersection. This function will push ray along the face normal by a small value. This small value is different for different axis and actually depends on magnitude of the original coordinate. In this case ray is getting pushed a bit more along Y axis than along X and Z axis. This makes ray to be moved into the surface itself, causing light artifacts.

But it's apparently difficult to solve. There is a patch you can try if you are familiar with building software, but you'll likely have to apply it to an older version of blender (and it doesn't fix everything).


Applying transforms automatically before I export an FBX? I'm currently working on a game project using MonoGame, and I have been using Blender as my "level editor" in a way:

Now, in that image, you can see I use the same bush and tree model multiple times. Unfortunately, each of those is a different mesh separate inside the same object, instead of all being linked dubplicates of an object. The reason for this, is because when I export a .fbx, all my transforms (position, rotation and scale) get cleared, so I'm left with all my objects in the middle of the stage at 0,0,0.

Is there any way to have it so that when I export, Blender temporarily applies position+rotation+scale to each object. It would really save me a lot of time in editing if I could just move objects around instead of vertices as  I am now.

Thanks in advance for any help on this matter!

EDIT: More info:

At the moment, the way that currently works is like so [1.] (I've selected one object). Note how the origin of the object is at 0,0,0, but its vertices are offset to where I want them to be.

If I were to separate them like I want them, and have the origin be in a useful location relative to the mesh [2.]

Then when I load the FBX into my game, this happens (the position of the objects doesn't get exported, so they go to 0,0,0) [3.]

EDIT: I found out that there was nothing wrong with Blender's .fbx exporter. I could get the transform of each object by using: ModelMesh.ParentBone.Transform

They should be separate objects. Right now, by your explanation, blender sees it as one mesh.

  different mesh separate inside the same object

They are not different mesh. Blender sees it as one mesh when grouped as object.

In edit mode, select one plane at a time and hit P. Choose selection option. Now it's a separate object you can apply loc,rot,scale to.


Creating a create tilable displacement map What would be the ideal way in order to achieve a shape like the model provided, using this sample displacement map?

I plan on using multiple tilable patterns to create models to 3D print, what would be the ideal solution?

These are the kindof textures I wish to use:

The reason I need this to be tilable as a height or displacement map is because I plan to apply it to objects that aren't simply a flat surface as if it was a texture file.

Here are 3 solutions:

Displace modifier (but it will be hard to get sharp angles, I guess Displace modifier is good to make more organic surfaces):

Unwrap your surface.
Give it a Subdivision Surface modifier with a Subdivisions value of 4.
Give it a Displace modifier. Choose Texture Coordinates > UV. Load your texture in the Properties panel > Texture (I've used one of yours and convert it to a DISP with CrazyBump), and select it in the modifier.
Put a second Subdivision Surface  modifier below the Displace modifier.

Tissue addon:

Install the addon.
Create your pattern object, create your 3D surface.
Select your pattern object, then your surface.
Open the Tools panel > Create tab > Tissue, click on the Tessellate, choose the options you want, validate with the OK button.
You have a new object. You'll probably have to remove doubles.

You could also try Duplifaces but it won't work for every kind of pattern:

Select your pattern object, parent it to your 3D surface.
Select your 3D surface, go in the Properties panel > Object > Duplication > click on Faces, activate Scale and choose the Inherit Scale value. If your surface has a lot of faces you'll have as many duplications.
To make the object editable, press shiftctrlA.


How to apply material to disjointed object duplicated with array modifier Ok, so I created an object that looks like this:

The internal object is surrounded on all sides by another object.  The inner object has a marble material.  The outside object does not.

I duplicate the object via the array modifier in the x and y direction like so:

Now, if I apply a marble material to the inner object, it applies the whole material scaled down to fit in the little inner object rather than spreading it out over the entire array.

I'd like to know how to make the material apply to the entire array.  The image below is the actual blend.  The "stairs" and the individual squares on the board are the same material.  As you can see, it looks like the material is compressed into each square, versus being spread out as on the "stairs".

When dealing with the Array Modifier it's important to know that object coordinates (which you are using) are generated for the whole object, but the 0-1 texture space is matched to the un-arrayed object. If you were using UVs, the UV map would repeat on each tile, which is even less of what you want in the long run. So your approach is the right one, but instead of having UV coordinates between 0 and 1, you have them between 0 and 7, because you need 7 tiles to fill the space. That makes the texture repeat again on your tiles.

Luckily the solution in your case is simple: Plug a Mapping node right after you generate the random coordinates, and set the scale to 1/7 (or if you change the number of tiles later, fill in the numOfTiles respectively). Blender will do the math for you. Voila: The coordinates have been transferred back to 0-1 space:

You can check the modified Blend file here:


Object is mirrored at incorrect location Having a spot of trouble, I'm new to blender, I've added mirrors to meshes fine no problems, but I'm now trying to mirror a mesh and its not mirroring where I want it to be, I need the mesh to be in the same location on the other side of the tank

The object that you have set as the Mirror Object ('Cylinder') on the object you want to mirror ('Cylinder.010') is not at the centre of your tank, therefore, neither is the mirroring.

If you still want to use a Mirror Object then choose a different object to use as your Mirror Object (one that has it's origin at the centre of the tank).

For example, here I change the Mirror Object to be 'Cube.004' and the mirroring is correct:


There is a way to improve the quality of pre-visualization? in the preview I have this very low quality black pixels, in the example It's much better. There is a way to seepd up the pre-visualitaztion. I have 32 GB of RAM and a i7 9 generation intel...
Here mine:

Here the example:

To get rid of the noise in the viewport, you can increase the Viewport Samples, and/or turn on Viewport Denoising (denoising will provide comparable quality, while allowing you to get away with using fewer samples):


Why does 'Knife Project' only sometimes select the new faces? In some cases the result of the cut with knife project is not selected, why?
How do I get the result to be selected?

It depends on whether the object you are using as the 'knife' is 'closed' or not. In your first image the circle is a closed loop of edges, so everything inside is selected. In your second image the two edges are not connected so the result of the knife project is not selected.

Closed edges:

Open edges:

If you want the result to be selected then make sure the object you are using as the 'knife' is a closed loop of edges.

I don't 100% understand why this is the case, it could be a technical limitation or done by design.


Advice on how to understand UV unwrap a rounded object After UV unwrapping a rounded object, drawing and painting a texture on it with a different program is difficult! It's not precise. I can't paint lines accurately, because it's spherical! Maybe you guys understand. How can I accurately and precisely paint and draw in a different program, on an a warped UV?

Stretching

First of all, you should make sure that your UV map is free from stretching as much as possible. It is impossible to make it complete stretch free unless you split every triangle. If you plan to draw on the texture only in the 3D editor, that might be a possibility.

To check stretching, assign a checkered texture, like the built in in blender.

Also, in the UV/image editor, in the left panel (hit N), under display, you can check the stretch checkbox. It will color code stretching. Pure blue means no stretching. Various nuances of light blue, cyan, green, and all the way to red means more or less stretching.
There are two kinds of stretching to select here, angle and scale. I mostly use the angle stretching.

Cylindrical mapping

To make it easy to paint latitude and longitude lines, you can use cylindrical mapping. In the 3D editor, in edit mode press U and select Cylindrical projection. The projection is relative your view. Press 5 and 1 on the numpad before doing the projection.

However, this technique will give you serious stretching at the poles. The top row and bottom row in the texture will be be concentrated to a single vertex.


How to get additive blending in cycles? I want a semi transparent particle that adds to the color behind it. Stack enough on them on top of each other it will be brighter and brighter until it is pure white. It is of course volumetrics I really want.

Example image:

I have tried this but it only decreases transparency. Not much surprise there. Is it at all possible?

My result with the Add shader. Light isn't added (then it would be white). It is only the transparency that goes away.

My node setup with the Add shader. I have also tried it with reversing the colors of the two shaders I add. Similar result.

Start of a solution

Thanks to Gandalf3, I have begun to solve this with only a shader. This is the shader.

This is a test render. I need more geometry, tweek the alphas and some more, but basicly, it is what I want.

I had to increase bounces in light path settings. This is experimental values but work for now. If not changed, the central part of the flames would be black.

This setup will add the transparent shader to itself when seen by the camera. To avoid excess fireflies, an emission shader is used for non-camera rays.

I used two transparent shaders in this case, but if you don't need to control them separately then only one is needed.
Result with three overlapping objects:

Note that with many overlapping objects you may need to increase the max number of Transparent bounces in Render settings > Light Paths to avoid getting black spots where there are more overlapping transparent surfaces than the specified number of bounces.
Update
With the new transparent depth output of the light path node, you can avoid getting black when you run out of transparent bounces. This setup will replace the transparent shaders with an emission shader when the max number of bounces is reached:

This way you can use lower numbers of transparent bounces and not have annoying black spots.

Original answer:

This will make the emission shader become brighter the longer a ray travels through the object:

However, this only works with a single object, so it doesn't look too good with many overlapping particles.


Why am I getting rounded faces when combining Edge Split and Subsurf? What's going on here? I'm trying to apply a normal edge split with a subdivision to make it look high poly with good edges. But when I applied it on this model it did this.

Edge splitting doubles the vertices and edges, effectively creating to separate parts, which then get subsurfed individually. If you need sharp edges, adjusting the Mean Crease is likely a better way. It's under Transform in the Properties panel while in Edit mode.
Here I have all the edges of the Icosphere selected, so they all get the same Crease value. You can, of course, adjust the crease for each edge individually. It applies to the currently selected edge(s).


Bunched / Wrapped Cable Im very new to Blender and was wondering if there is a way to model a wrapped cable that is held together in the middle (by a velcro Strap).

Like this:

Thank you in advance!

The question is tagged modeling and is pretty big, and I'm not going to make a full-blown tutorial (I wouldn't be able, and is off-topic), so I'm focusing on the basics, trying to get to a decent starting point and ignoring the modeling of details and the shading.

The starting point is simply a curve. Start by adding a Bezier curve.

In Edit mode (Tab), select one of the two default handles and:

E extrude it to the opposite side, making sure to add some variation/randomness
repeat for several loops

rotate the handles in the view you've been using (select, R, repeat) to add randomness, or to align them (it really depends on how messy you want the cable)
change view and add some random displacement of the handles in the perpendicular direction (select, G, repeat)

You now want to add handles along the middle in order to control the shrinking. To do so:

select all your handles (A)
right click, Subdivide

Deselect all the vertices (AA) and select only the middle ones using a box select (B)
Shrink these handles along all axes except the long one, in my example: the X axis (S, shiftX)

The curve is done, now it requires some thickness.

Exit Edit mode (Tab), go to the Curve properties, and under Geometry, increase the Bevel > Depth.

You will probably see some overlaps, that can be fixed by moving some handles manually in edit mode.
The velcro strap can be done starting from a plane and extruding it around the middle: while doing it, look around often to check that it's not intersecting or staying too far from the wires. With a Subdivision Surface modifier, it will then look softer


Smooth Shading on specifically-oriented edges I have a spherically tapered cylinder that I'm trying to apply smooth shading to, partially.  (Sorry for the terrible description, picture below)

I'm trying to apply smooth shading to vertical rings in the picture - I like the defined edges that run along the x-axis.  I tried selecting only those rings in edit mode and applying smooth vertex, but that didn't appear to do anything.  Will, I have to put in loop cuts for each x-axis line, then add an edge split with smooth shading to get my desired effect?

As of this commit (will be in blender 2.71), blender has support for split normals. You can download 2.71 release candidate 2 here.

Set your object to smooth shading.
Enable auto smooth in Properties > object data:

Select every edge loop and mark it as sharp:

Press CtrlAltRMB on one of edge loops you want to make sharp to select that edge ring.
Press Edge Loop in 3D view > Header > Select to select the rest of the loops.
Press Sharp in 3D view > Tool shelf > Shading / UV > Shading > Edges, or press CtrlE> Mark Sharp:

Result:


How to avoid dark/black area in blender when using hemi? I use blender to render patent images, which require "black and white" drawings. Hemi is very handy because 1 hemi lamp is enough and no shadows. But this time I got this:

After using gimp Edge detect -> Revert colors -> Auto-crop image -> Threshold to 239 -> 1 bit color index, I got this:

It's still usable, but it's ugly! So what happened? Hemi lamp used to be simple and works great! All I need is to put 1 single hemi lamp at origin (0,0,0)!

After I set 0.01 thickness(using extrude/z/.01) to those "black planes", they're all dark/black now...

It seems to have something to do with camera direction. There would be no dark/black planes if you looked from downside of the planes, just like this:

There is no edges showing on the planes because they have no thickness. Add a slight thickness to each plane and you should see detectable edges.

This seems an odd way of doing this though, I'd look into blender's edge detection functionality or freestyle as an alternative.


Normal map seems fine, but shades completely wrong (2.8 Beta) I'm trying to bake a normal map from my high poly sculpted model to my low poly model.

From left to right:
 1. Lowpoly model without the normal map
 2. Lowpoly model with the normal map
 3. Highpoly model.

I use Non-Color image input, the texture itself looks fine, but the LookDev preview is completely broken. What is going on?

What is missing is a Normal Map node between the Image Texture node and the Principled Shader node:


How can I create a silhouette using HDR in cycles? In real life, when taking pictures with a bright background the object you are looking at becomes mostly black. How can I get this effect in Blender?

I would like the monkey to become a silhouette without using any compositor or material hacks.

I'm not sure if my HDR image has a high-enough dynamic range to actually do this, so feel free to user your own HDR instead of mine.

The HDR was too big to pack into the Blend file. Here it is:
https://drive.google.com/file/d/0Bxf7lERLL3TlQkM2a2FKSkRRMk0/view?usp=sharing

A silhouette means that the light coming from the camera side of your object is not as intense as that of the background by a large ratio. Bringing down the intensity of the image used in the environment can help you bring down values on the foreground object as well.

There are several ways to adjust the exposure for a scene

Use the strength slider to adjust the exposure on the HDR, this will allow you to adjust the HDR environment without affecting any of the intensity of other lights on the scene:

A different way to do this is to Change the exposure for the whole scene on the Film>Exposure section. Changing the exposure will affect all of the elements in the scene:

Or you can also change the exposure value on the color management section:

If you use the compositor (which is not only not a hack, but it is your very best friend, as it can be a powerful tool) you can use one of the many color correction tools available in it, in this case the ASC-CDL node is the best tool for the job.

The main advantage of this approach is that you can alter the relationship between the bright and dark information of the scene. Not only you can change the exposure making all of the image brighter or darker, but if you you modify the power you will affect the ratios (or contrast) of the scene, giving you much more nuanced control on the final result.

You can even decide to keep a bit more detail in the highlights and the shadows:


Sculpt brush not orienting to mesh surface correctly For some meshes when I go into sculpt mode the brush does not orient to the surfaces of the mesh correctly, essentially acting perpendicular to the mesh.  This causes my sculpting to occur in tightly packed lines, instead of a nice circle on the surface.  This happens with and without Dyntopo enabled.  Below you can see a screenshot of the brush which should be a circle on the surface is instead perpendicular to it, and the strange vertical sculpting as a result.  My meshes all have correct face orientation as well.

@Blunder fixed the issue for me, I needed to apply the scale of the objects.


How do I make my walking animation to continuously move instead of stopping at the end of the frame As you can see, for some reason when my walking animation ends, why does it take longer for the character to move its legs apart again (that is from frame 0 to 40) compared to when the character moves apart its legs again from frame 80 to frame 120?

How do I continually get the character to move its legs repeatedly?

You can do that by changing how the interpolation is in the Graph editor.

1.Open up the graph editor and make sure you're on F-Curves;

2.Select all necessary keyframes and press Shift + E;

3.Now a little menu will appear, click on "Make Cyclic (F Modifier).

There, now your animation should be what you want.


How can I make the neck of this desk light? How can I make the neck of the light? For the flexible part, I think that a normal map would look weird because it is circular.

Modeling

Create a bezier curve tracing the neck of the lamp. Model a small part of the neck and array it using the bezier curve as a Fit Type. This will repeat the part till it fits the length of the curve.

Then using Curve Deform modifier, deform the output over the curve.

Now scale the object and apply the scale to get the required amount of repetitions.

Procedural Shading

If you want to implement the bumps in shading stage. Solidify the curve and and enable Use UV For Mapping.

Then for the material, use the $x$ component of the UV to compute strips like pattern where the value $20$ controls the number of repetitions, $0.17$ controls the width of engraving and $0.2$ controls the relative slope of the transition.

You can now use this as bump of displacement for the material.


Select multiple items that are listed together in Outliner How do I select multiple items that are listed together in the Outliner? For example, have a look at the image below: if I want to select from B to G without having to shift-click on everything in between, how do I do that? For example, in Finder on macOS, you can select multiple items that are listed together: click the first item, then press the Shift key and click the last item. All items in between are included in the selection. Is there a way to achieve the same thing in the Outliner?

The selection method you describe is now implemented in Blender 2.81, together with Ctrl-left-click selecting (Cmd on a Mac), to toggle between Active and Unselected states for individual items.

B Box selection is also available, as in the viewport: left-drag to select, middle-drag to deselect.


How to keep z axis aligned vertically while rotating camera angle When I try to change the direction a camera is pointed, it often changes the relative orientation of the z axis. I can't keep the global z axis "vertical" from the perspective of the camera. I want to be able to turn the camera left, right, up, down, but without rolling.

You don't tilt your head whenever you turn left or right, after all.

To put it another way, I don't want the blue z-axis line to tip left or right on my screen when angling a camera. How do I prevent this?

Thanks in advance.

You can simply lock the Y axis of the camera rotation.

Here:

Or here:


The front part of the object material doesn't render As you can see the front of the castle is laking a material. It is supposed to be a stone wall and you can see it on the sides but for some reason it doesn't render in the front.
Is there a problem with my camera setting or something else. I didn't have this problem before, it just suddenly appeared and I don't know how to get rid of it.

Here is a render of how it looked before and how it is supposed to look

It probably bugs because you haven't created a Normal Map node between your Image Texture and your Principled BSDF Normal input socket. Don't forget to set your Image Texture to Non-Color:


UV Mapping basic cube results in rectangles instead of squares I try to UV map the standard cube created when starting Blender (v2.79).

I'm following a tutorial (https://www.youtube.com/watch?v=vbj4d5XL0NA), using Cycles and have made these seams.

The cube size is standard 2x2x2 but move a little in Z-direction.

When I try to UV map it I get the following result.

Why do I get rectangles instead of squares? Is there some way to easily change it to squares?

This is the settings of the cube

Blender file

Maybe changing the UV unwrap Method might help?


Can someone help me with this vertex? I'm making a robot and that is the arm:

When i try to add a vertex with Ctrl+R and scale down, that happens:

What can I do so these vertex join all edges?

It appears to be a duplicate vertices/faces issue. Basically, there are two (or more) vertices where there should be one, creating unwanted geometry.

This is the problem:

The simplest solution is to select all of the vertices and to use the Remove Doubles option to automatically remove the overlapping geometry as show below:


Particle Settings - Noob - Blenderguru Tutorial New to Blender, I'm not sure why my Particle Effect isn't working here. I'm sure I've clicked a wrong option but I have no clue where. I've been following a Blenderguru tutorial on Youtube and this lesson added a 'Use Count' feature from the particle effects. However, when I enable it, the blue spheres are grouped in bands. Basically they don't look random.

I tried changing the seed number, no effect. I tried re-doing the step (deleted the sphere and set it up again), no effect. I've restarted PC.

Any ideas?

Tutorial

From a Youtube comment:

Johnathan Burkhardt
1 day ago
I had the same problem!  If you go to Particles > Render > Collection  there is a checkbox for "Pick Random."  I clicked that and it fixed the problem!

Sorry guys, I knew it was a noob problem.


Render Environment Map with Blur Effect I have a scene with a cube inside an icosphere. the cube in the middle is my viewpoint object and i want to render a cube environment map. my environment is the textured inside of the icosphere and some other objects inside the icosphere. now my question is how can i achieve getting a blur effect on any of my objects inside the icosphere? if i put the objects i want blurred in another render layer and set up notes (blur) for it, it doesnt render the effects when i create the environment map.
is there any solution for me?

If your environment texture on the icosphere is unblurred:

Render everything into 1 equirectangular environment map. Blur it in your favourite 2d app (it is seamless so tile it before blurring) or inside cycles nodes with noising the mapping inputs with b-wide node pack.

Then render this blurred environment into the cube map.

If your environment texture on the icosphere is already blurred:

Render the objects inside the icosphere only. Lit them with the environment texture but exclude the icosphere to not reflect on the cube.

Blur this equirectangular inside 2d app to match blur of the enviro and merge them into 1 environment (you will need an alpha channel for this also).

Then render a cube map from this blurred enviro.


I can't snap 2d cursor to vertex in UV editor in blender 2.8 I'm in UV Editor and trying to snap the 2d cursor to the vertex ( while the vertices are visible). I turn ON snap and set it to 'vertex mode' , but the 2d cursor won't snap to any visible vertex at all. I can only make it snap to the grid (increment node). Is it a bug ? or did i miss something here ? i'm using 2.8.

I turn on snapping in UV Editor and the only thing that snaps is the vertex that I move, snapping to the location of the nearest vertex. I don't believe that snapping works with the cursor location, that I still have to use Shift + S  menu and choose Too Selection.


Weird Bubble on my mesh I am doing this Blenderguru tutorial to work on my modelling skills. There is a weird bubble next to that black circle. What is the reason for that and how to solve that (I already did smooth shading) ?

This is caused by uneven topology. you need to make all of the topology on the front of the phone flat. We will use vertex snapping to fix this problem.
First, select the edge loop that borders the camera, but not the one that actually makes the indent.

Now we need to enable vertex snapping. You can enable snapping by clicking on the magnet in the 3D window bar. Alternately, Shift+Tab will also turn snapping on. Now you need to change the type to "Vertex" Do this by open the pop-up next to the magnet in the 3D window bar and selecting the cube with the two white vertices.

Now all you need to do is grab the loop along the "Y" axis (G>Y) and mouse over the next largest loop to bring them even.

an orange circle will appear to tell you where you are mosing over to snap.


Combine and duplicate meshes before exporting them? I'm writing an add-on that exports objects to FBX file format.

One of its features will be the ability to merge another object for export. So the user selects object A, clicks the "choose merge object" button, then clicks object B. During export, the objects are combined as per Ctrl+J type operation, exported as a single object, then everything is restored to normal (back to 2 objects).

This is my idea:

Duplicate both objects - remaining steps deal with copies
Set B as selected and A as active
Use bpy.ops.object.join()
Export A (active_object)
Delete A

I have a couple questions regarding this if anyone might know something about it..

X. Is there an alternative to avoid the need to create temporaries and delete them afterward? The objects could be any complexity imaginable, so any way to use the inputs as read-only would be better. Some alternate merger? A+B=C instead of A+=delete(B)?

Edit: I later found out that you can duplicate an object as a link (which doesn't copy mesh data), then use that linked duplicate as an input object for join(). This is very similar to not needing to create temporaries because the mesh data is never duplicated.

Y. In the scenario above using join(), would the temporary copy of B be deleted automatically? Not sure how join() works under the hood. And a little worried about messing around with a deleted object reference in code.

Edit: Yes, all input objects except the active one get deleted by join().

I really appreciate any advice. I'm very new to python and add-on development,  so details are also appreciated.

Sounds like a job for our good old friend: Undo. You can make it complicated for sure, but since the operation is in memory anyway, it should make it pretty fast.

import bpy

from bpy.props import (BoolProperty, FloatProperty, StringProperty)
from bpy.types import (Operator)
from bpy_extras.io_utils import ExportHelper

# ExportHelper is a helper class, defines filename and
# invoke() function which calls the file selector.
class EXPORT_OT_customFBX(Operator, ExportHelper):
    """Export the scene to FBX"""
    bl_idname = "export_scene.custom_fbx"
    bl_label = "Export FBX"

    # ExportHelper mixin class uses this
    filename_ext = ".fbx"

    filter_glob: StringProperty(
        default="*.fbx",
        options={'HIDDEN'},
        maxlen=255,  # Max internal buffer length, longer would be clamped.
    )

    # List of operator properties, the attributes will be assigned
    # to the class instance from the operator settings before calling.
    global_scale: FloatProperty(
        name="Scale",
        description="Scale",
        default=1.0,
    )

    use_subsurf: BoolProperty(
        name="Use Subsurf",
        description="Use Subsurf",
        default=False,
    )

    apply_unit_scale: BoolProperty(
        name="Apply Unit Scale",
        description="Use Subsurf",
        default=True,
    )

    def execute(self, context):

        viewport_selection = [o for o in context.selected_objects if o.type == 'MESH']

        if len(viewport_selection) == 2:
            if context.active_object in viewport_selection:
                # Join!
                # https://blender.stackexchange.com/q/13986
                # https://blender.stackexchange.com/q/50160
                bpy.ops.object.join()
            else:
                print ("Can not call join operator")
        else:
            print ("Nothing to join.")

        # Export
        bpy.ops.export_scene.fbx(
                filepath=self.filepath,
                global_scale=self.global_scale,
                apply_unit_scale=self.apply_unit_scale,
                use_subsurf=self.use_subsurf,
                use_metadata=True,
                axis_forward='-Z',
                axis_up='Y'
            )

        # Undo!
        bpy.ops.ed.undo()
        return {'FINISHED'}

# Only needed if you want to add into a dynamic menu
def draw_export_fbx(self, context):
    self.layout.operator(EXPORT_OT_customFBX.bl_idname, text="Custom FBX (.fbx)", icon="MESH_MONKEY")

# Registration
classes = (
    EXPORT_OT_customFBX,
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    bpy.types.TOPBAR_MT_file_export.prepend(draw_export_fbx)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)

    bpy.types.TOPBAR_MT_file_export.remove(draw_export_fbx)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.export_scene.custom_fbx('INVOKE_DEFAULT')

Operator is based on Templates > Python > Operator File Export

Another quite boring approach is saving the file before exporting to fbx and then reload the blend:

def execute(self, context):

    # Save!
    if bpy.data.is_dirty:
        bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)

    viewport_selection = [o for o in context.selected_objects if o.type == 'MESH']

    if len(viewport_selection) == 2:
        if context.active_object in viewport_selection:
            # Join! # https://blender.stackexchange.com/q/13986
            bpy.ops.object.join()
        else:
            print ("Can not call join operator")
    else:
        print ("Nothing to join.")

    # Export
    bpy.ops.export_scene.fbx(
            filepath=self.filepath,
            global_scale=self.global_scale,
            apply_unit_scale=self.apply_unit_scale,
            use_subsurf=self.use_subsurf,
            use_metadata=True,
            axis_forward='-Z',
            axis_up='Y'
        )

    # Reload
    bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)
    return {'FINISHED'}

Might be nice doing some tests to measure execution time of both... in memory.


Rigify: Problems generating rig I am having problems with the authoritative addon "rigify". When I push the generate button, it does not generate a IK or anything else. I get it in the panel in the right corner, but cant see the rig. I have Auto Run Python Ticked and haven't done anything to the rig, other than positioning it to the mesh. I dont get any errors either. Anyone know what the problem may be?

Found the problem... I had increased the size of the mesh and skeleton. Therefore, I did not see the generated rig as it was hidden in the butt of the mesh. Stupid or me, to not notice this earlier...

Thx for answering me batFINGER. Appreciate it :)


Cant texture paint when zoomed in I recently switched to 2.77, and I just tried to texture paint for the first time in 2.77 and while zoomed in, I cant paint? I dont understand. I tried fiddling with the projection painting settings, but to no avail. Can anyone help me? I've had this problem all night and can't fix it

-EDIT-

I found a workaround, setting the view mode to orthographic fixes it, but i still would like to see this fixed in perspective.

If switching to orthographic view fixes it, your issue is that you have too few faces and are too close to them.

What I do is I add a simple subdivision modifier. It's frustrating that it doesn't work, but blender has trouble localizing the brush on the face when it is severely warped by perspective. Here is a post on the developer manifest.

https://developer.blender.org/T40707


How can I create a flowing, rippling water surface effect that follows the curves of a river mesh? How would I create a simple but nice looking river?

Even a small creek or stream of water i just want to know some good ways of doing this!

One of the tricky things about rivers is how to animate the water ripples along the path of the curving river. The best way that I have found to do this is by adding a Displacement Modifier set to UV texture coordinates and using a Noise/Cloud texture as well as UV unwrapping the mesh first before extrusion.

There are two important secrets to this technique.

One is UV unwrapping the river water mesh as a straight line first before you alter it to fit the river shape. If you start with a plane, unwrap it right away, then the UV map will stay straight even if you extrude the plane edges to form the curved river shape.

Secondly, you need to enable the AnimAll addon so that you can
animate the UV map.

Once you do that you can set two keyframes for
    the UV map and then animate it moving from top to bottom. In the Tools panel on the left, choose the Animation tab (after enabling the AnimAll addon). Select the UV checkbox, and click the Insert keyframe button at the appropriate frames after moving the UV map.

This will
    move the texture image along the river and will also move the
    displacement along the river. Once your UV's are set and animated you can use those texture coordinates for material textures or displacement modifier textures.

Here's a test scene using this technique:


How can I use Filter nodes from Compositor in Material Editor? I want to use the filter nodes from Compositor in Material editor. For example, I want to apply a dilate filter to a noise texture.  Is it possible? If not, is there a easy way to achieve this?

Thanks for any help?

Unfortunately, compositing nodes and shader nodes are not interchangeable.

There are some new shader nodes available in the 2.81 release, which include extra vector math and the ability to connect inputs to the mapping node.

If these are not adaptable to your needs, you will need to do what you want in the compositor. Using cycles, you can use the object and material indices to get a mask in the compositor allowing you to apply the dilate to a specific object/s.

While the object and material indices are not currently available in evee when compositing, they are available in the object info shader node. You could use layers to have one object separated from the scene so you can adjust it in the compositor before combining it into the final image.


Change orientation of object while following path in game engine I am making a shooting gallery game. I have ducks following a circular path. When one of them is hit, i want it to flip on its back but still follow path. I could make two separate actions, one for hit, one for no hit and drive them by frame number in the game engine.

But i was wondering if i can simply apply a rotation to the duck while it is following the path when it is hit. If this is possible, can someone give me some guidance on doing so.

I suggest to use two objects.
Sledge
The base is the sledge that plays the path following animation.
Duck
The Duck is parented to the sledge. When hit it plays the flip-back animation.
As it is parented to the sledge it will still follow the sledge movement.


Unwrapping on a mesh created with an array giving unpredictable results I'm sure this is a pretty obvious question but I'm stuck.  I'm preparing a wall to be knocked through with a rigid body simulation.  I created a a plane, then used an array to create the wall.  I then separated this by loose parts.

So far so good.  When I add an image texture I get the image on each mesh.  So I want to join the meshes and then unwrap to put the image on each of the faces.

But all it does is randomise the image as you will see in the screenshot.

Here's a link to the Blend file. Dropbox Link to Blender File

Please help!

Should be straightforward.

Go into the UV workspace and choose the top orthographic view. Select the object a and then u and choose Project from view: Bounds

That's it. In case it is upside down then just rotate as required.


How to copy mesh to new files with Python? I have a blend file with hundreds of mesh objects as part of a kit bash pack.

I want to copy each mesh to its own file and turn those files into KPacks for Kit Ops addon.

To export each mesh into a new file I tried to use this code:

import bpy

base_path = "c:\\temp\\"

for idx, obj in enumerate(bpy.data.objects):
    bpy.data.libraries.write(f'{base_path}obj_{idx}.blend', {obj}, fake_user=True)

The problem is that in the files created by the script, only the data blocks are copied, there are no meshes created.

How can I copy each mesh to a new file? It would be very tedious to do that manually for hundreds of files.

Found how to do it. The code I had was half the solution.

After creating a new file, executing the following script adds the mesh to a collection in the scene as I needed. It assumes there's no collection and only one data block in the blend file.

add_object.py

import bpy

collection = bpy.data.collections.new("Collection 1")
bpy.context.scene.collection.children.link(collection)
collection.objects.link(bpy.data.objects[0])
bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)

To execute the script, I executed this in a loop:

blender.exe  <path_to_new_blend_file> --background --python add_object.py


How do I remove these black pixels from my baked texture? How do I remove the black pixels in this Cycles baked texture?

I think this is directly dependent of the texture size here.

There is no light under the cross, so there are blacks pixels to write on the texture. Here one pixel of the texture is a bit larger than the cross, so we can see these black pixels.

This can also appears when you're at the border of an uv island, if you don't activate the margin option in the baking panel, but it's not the case here.


Get console output when running blender in background I am running blender in background and supplying a python script. Now I want to access the console output of the python script, and do some http calls based on that. However, I 'm unable to figure out how to get the console output as blender is running in the background and the process has exited.

Can someone tell me how to achieve that?

The exact way you handle this will depend on several factors like what OS your running and how much output you expect to retrieve. More detailed help is better suited to stackoverflow as it isn't specifically blender related.

Using python as a more cross platform solution, you should read through the subprocess page which explains and offers several options. Basically output from prints in your script can be retrieved from stdout while errors are normally sent through stderr. For simple needs you can just get the contents of stdout when blender has finished into a string to scan through, while for more advanced needs you can setup pipes and process the output line by line as it comes out.

For *nix like systems such as OSX and Linux you could capture blenders output in a shell script with a line like output=$(blender -b -P myscript.py) - with windows you should be able to do something similar with a .bat script and with OSX you could also use an applescript.


Complex organic-like object from two splines (imported) I'd like to create complex organic-like (or UFO-like) object from two splines like this:

I'm going to make splines in Illustrator (which is far more convenient for me than creating them in Blender) and then import them into Blender.

The question is:
Is there any tool to create closed surface from the given info? I'm newb to Blender and I suspect I've seen something similar somewhere on the Internet. Could you provide the name and if possible tutorial?

PS. Do not pay attention to curves in the example, I've made them as my mouse went.

A simple way of achieving this is to use a combination of Solidify and Boolean modifiers.

First model your splines to match your desired profiles. In my case I started with a Nurbs Circle and then manipulated it in Edit mode to get the desired shape - one for the Top profile and another for the Right profile and rotated them and position them appropriately.

Next, convert each profile into a Mesh and, in Edit mode, select all and create a Face by pressing 'F'.

Select the 'Top' object and open the Modifiers panel and add a Solidify modifier. Increase the thickness sufficiently so that it will fully overlap with the other shape. Repeat with the 'Right' object so that the two objects overlap as shown.

Position and scale the objects so that they match - I had to stretch you're example 'Top' view to match the dimension of the 'Right' view.

Select one of the objects and add a 'Boolean' operator. Click the dropper in the Object field and click on the other object in the viewport. Set the Operation to 'Intersect'. Select the other object in the viewport and press 'H' to hide it. You should now see the generated object from the intersection of the two extruded profiles.

To tidy up the geometry of the generated mesh, right-click the object and add a Remesh modifier. Select Smooth for the Mode and reduce the Octree Depth until it doesn't quite start to distort. Enable Smooth Shading.

You could also optionally add a Subdivision Surface modifier.

Select 'Apply' on each of the modifiers to apply them (be careful to apply them in Top-to-Bottom order).

Once the modifiers have been applied you should unhide the hidden objects (Alt-H) and select them and delete them as they are no longer required.

You'll get better results by adding additional profiles - preferably you want at least a Top, Front and Side profile (although you could have more if you know the profile from other angles) and position them and scale them in a similar way and add in as additional Boolean modifiers in the modifier stack - eg, Solidify, Boolean1, Boolean2, Remesh, Subsurface.

The generated shape will most likely need some fine tuning in Edit mode as the profiles don't provide enough detail - in particular for concave shapes.


How do I save a pose in 2.8? I'm trying to figure out how to use the pose library in 2.8 as I never learned how to use it in the last version. For some reason the "+New" icon is grayed out and I can't select it. Any help?

Choose the tab at the top of the screen that says "Animation". This will put a narrow "Timeline" panel at the bottom. Change the Timeline panel to "Dope Sheet"
The "Dope Sheet" panel has another drop-down menu near the panel-changing menu you just accessed. From this drop-down menu, change it from "Dope Sheet" (or whatever it may be) to "Action Editor".
This next step assumes your model is rigged to its intended armature. Select that armature and press CTRL + TAB. This will put you in "Pose" mode and the armature will turn a light blue color. In the top-middle of the Action Editor panel, there is a button that says "+    New". Click that to create a new action. You can also rename it.
Now, This is important, click that little icon near that button that looks like a gray shield. The program does not indicate this (and they should have, sine at least 2.79) but this is the button that saves your animations. I am telling you to press it now because if you don't, you will start posing your character, save your scene, exit the program, and be startled to find it's gone when you return. You don't have to save the animation immediately, but you have to before you change Actions or close the program, so be in the habit of doing it immediately.


3d View -- How to display camera data in the camera frame? Is there a way to use display options like "object info" or "view name" (in the viewport's preferences) to display other information like for example the lenth focal of the active camera and its position. And is there a way to move this information anywhere in the 3d window ? Like in this example:

So I found a script that allows me to display the focal point on the 3d window.
import bpy
import blf

dns = bpy.app.driver_namespace
dc = dns.get("dc")
dc.remove_handle()

class DrawingClass:
    def __init__(self, context, prop):
        self.prop = prop
        self.handle = bpy.types.SpaceView3D.draw_handler_add(
                   self.draw_text_callback,(context,),
                   'WINDOW', 'POST_PIXEL')

    def draw_text_callback(self, context):
        font_id = 0  # XXX, need to find out how best to get this.

        # draw some text
        blf.position(font_id, 15, 350, 0)
        blf.size(font_id, 20, 72)
        blf.draw(font_id, "%s %s" % (context.scene.name, self.prop))

    def remove_handle(self):
         bpy.types.SpaceView3D.draw_handler_remove(self.handle, 'WINDOW')

context = bpy.context
dns = bpy.app.driver_namespace
dns["dc"] = DrawingClass(context, bpy.context.object.data.lens)

The first 3 line allows me to erase the preceding display. How can I prevent the scipte from reading the first 3 lines the first time the script is run? For now the script reads the focal once and writes it. How to make sure that the script is read every time the focal is changed?

AFAIK that's not possible by default and I guess there is no existing add-on which is able to display any kind of information in the camera frame.
However, you can draw the text using python's bgl module and create your own add-on. Following example code is based on our famous Operator Modal Draw template that comes with blender, extended by the answers from Coordinates of corners of camera view border and Multi-line Text in blf (with multi colour option) to get the ball rolling:

hud.py
import bpy
import blf
import bgl

# -> BASED ON: https://blender.stackexchange.com/a/14746/31447
def view3d_find(context):
    # returns first 3d view, normally we get from context
    for area in context.window.screen.areas:
        if area.type == 'VIEW_3D':
            v3d = area.spaces[0]
            rv3d = v3d.region_3d
            for region in area.regions:
                if region.type == 'WINDOW':
                    return region, rv3d
    return None, None

def view3d_camera_border(context):
    obj = context.scene.camera
    cam = obj.data

    frame = cam.view_frame(scene=context.scene)
    # move from object-space into world-space
    frame = [obj.matrix_world @ v for v in frame]

    # move into pixelspace
    from bpy_extras.view3d_utils import location_3d_to_region_2d
    region, rv3d = view3d_find(context)
    frame_px = [location_3d_to_region_2d(region, rv3d, v) for v in frame]
    return frame_px

# -> BASED ON: https://blender.stackexchange.com/a/31799/31447
def draw_string(x, y, packed_strings):
    font_id = 0
    blf.size(font_id, 18, 72)
    x_offset = 0
    y_offset = 0
    line_height = (blf.dimensions(font_id, "M")[1] * 1.45)
    for command in packed_strings:
        if len(command) == 2:
            pstr, pcol = command
            blf.color(font_id, pcol[0], pcol[1], pcol[2], pcol[3]) # #bgl.glColor4f(pcol)
            text_width, text_height = blf.dimensions(font_id, pstr)
            blf.position(font_id, (x + x_offset), (y + y_offset), 0)
            blf.draw(font_id, pstr)
            x_offset += text_width
        else:
            x_offset = 0
            y_offset -= line_height

def draw_callback_px(self, context):

    WHITE = (1, 1, 1, .7)
    CR = "Carriage Return"

    x, y = view3d_camera_border(context)[3]
    cam_ob = context.scene.camera

    if cam_ob is not None:
        ps = [
            ("{} {}mm".format(cam_ob.name, cam_ob.data.lens), WHITE),
            CR,
            CR,
            ("T: {:.2f}, {:.2f}, {:.2f}".format(
                cam_ob.location.x,
                cam_ob.location.y,
                cam_ob.location.z), WHITE),
            CR,
            ("R: {:.2f}, {:.2f}, {:.2f}".format(
                cam_ob.rotation_euler.x,
                cam_ob.rotation_euler.y,
                cam_ob.rotation_euler.z), WHITE),
        ]

    draw_string(x+10, y-20, ps)
    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)

# -> MODAL OPERATOR TEMPLATE
class ModalDrawOperator(bpy.types.Operator):
    """Draw a line with the mouse"""
    bl_idname = "view3d.modal_operator"
    bl_label = "Simple Modal View3D Operator"

    @classmethod
    def poll(cls, context):
        return context.area.type == 'VIEW_3D'

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        if context.space_data.region_3d.view_perspective == 'CAMERA':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_PIXEL')

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "Switch into Camera View")
            return {'CANCELLED'}

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

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

if __name__ == "__main__":
    register()

Copy and paste the script into the text editor, run it, move over to the in 3d View, press F3 and type "Simple Operator..." to execute. If you'd like to convert it into an Add-on, just add a python dictionary named "bl_info" at the top of your addon: https://wiki.blender.org/wiki/Process/Addons/Guidelines/metainfo

In order to make it work for 2.7x versions you would have to replace 2 lines due to changes in Matrix Multiplication and on how to set the text color using blf.color in newer versions:
# draw_string()
- blf.color(font_id, pcol[0], pcol[1], pcol[2], pcol[3]) # Blender 2.8x
+ bgl.glColor4f(*pcol) # Blender 2.7x

# view3d_camera_border()
- frame = [obj.matrix_world @ v for v in frame] # Blender 2.8x
+ frame = [obj.matrix_world * v for v in frame] # Blender 2.7x


How to disable/enable multiple shapekeys visibility? I have over 300 shapekeys added to my mesh. How can I disable and enable the visibility for all of them using scripting?

Iterate through the shape keys and check the current state of the mute attribute. Since it is a simple bool property which only can be True or False, I'd suggest write a toggle in order to enable or disable all shape keys of the selected object per execution:
import bpy

# iterate through the shape keys of the active object
for shape_key in bpy.context.object.data.shape_keys.key_blocks:

    # toggle (if true set it to false and vice versa)
    shape_key.mute = not shape_key.mute

Considering your last question and especially for a better workflow, I'd recommend writing a small Add-on instead of running code in the editor for each step:

shape_key_extras.py (updated for 2.8+)
# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

bl_info = {
    "name": "Shape Key Extras",
    "description": "",
    "author": "p2or",
    "version": (0, 0, 1),
    "blender": (2, 80, 0),
    "location": "Properties > Object Data > Shape Keys",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Mesh"
}

import bpy
import random

from bpy.props import (IntProperty,
                       BoolProperty,
                       FloatProperty,
                       StringProperty,
                       PointerProperty)

from bpy.types import (Operator,
                       PropertyGroup)

# -------------------------------------------------------------------
#   Helper
# -------------------------------------------------------------------

def exclude_by_name(char_sequence, name):
    if char_sequence:
        char_list = [i.strip() for i in char_sequence.split(",")]
        if name.startswith(tuple(char_list)):
            return True
        else:
            return False
    else:
        return False

# -------------------------------------------------------------------
#   Properties
# -------------------------------------------------------------------

class SKE_PG_settings(PropertyGroup):

    value: FloatProperty(
        name = "Value",
        description = "Set static value",
        default = 0,
        #min = 0,
        #max =1
        )
    random_min: FloatProperty(
        name = "Min",
        description = "Set minimum random value",
        default = 0,
        #min = 0,
        #max =1
        )
    random_max: FloatProperty(
        name = "Max",
        description = "Set maximum random value",
        default = 1,
        #min = 0,
        #max =1
        )
    apply_enabled: BoolProperty (
        name = "Apply Values to enabled Keys only",
        description = "Apply values to enabled Keys only",
        default = True
        )
    exclude: StringProperty (
        name = "Exclude",
        description = "Exclude by first character",
        default = "#, =, *"
        )

# -------------------------------------------------------------------
#   Operators
# -------------------------------------------------------------------

class SKE_OT_enableAll(Operator):
    bl_idname = "shapekeyextras.enable_all"
    bl_label = "Enable All"
    bl_description = "Enable all Shape Keys"

    def execute(self, context):
        for shapekey in context.object.data.shape_keys.key_blocks:
            shapekey.mute = False

        self.report({'INFO'}, "All enabled")
        return {'FINISHED'}

class SKE_OT_disableAll(Operator):
    bl_idname = "shapekeyextras.disable_all"
    bl_label = "Disable All"
    bl_description = "Disable all Shape Keys"

    def execute(self, context):
        for shapekey in context.object.data.shape_keys.key_blocks:
            shapekey.mute = True

        self.report({'INFO'}, "All Shape Keys disabled")
        return {'FINISHED'}

class SKE_OT_toggleAll(Operator):
    bl_idname = "shapekeyextras.toggle"
    bl_label = "Toggle Mute"
    bl_description = "Toggle Mute of all Shape Keys"

    def execute(self, context):
        for shapekey in context.object.data.shape_keys.key_blocks:
            shapekey.mute = not shapekey.mute

        self.report({'INFO'}, "Enabled Shape Keys disabled and Disabled Shape Keys enabled")
        return {'FINISHED'}

class SKE_OT_randomizeValues(Operator):
    bl_idname = "shapekeyextras.randomize"
    bl_label = "Randomize Values"
    bl_description = "Randomize all Shape Key Values"

    def execute(self, context):
        scn = context.scene
        ske = scn.shape_key_extras

        if ske.apply_enabled is True:
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:
                    if shapekey.mute is False:
                        shapekey.value = random.uniform(ske.random_min, ske.random_max)
        else:
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:
                    shapekey.value = random.uniform(ske.random_min, ske.random_max)

        self.report({'INFO'}, "Values for Shape Keys generated")
        return {'FINISHED'}

class SKE_OT_applyValues(Operator):
    bl_idname = "shapekeyextras.apply"
    bl_label = "Apply Values"
    bl_description = "Apply a static Value to all Shape Keys"

    def execute(self, context):
        scn = context.scene
        ske = scn.shape_key_extras

        if ske.apply_enabled is True:
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:
                    if shapekey.mute is False:
                        shapekey.value = ske.value
        else:
            for shapekey in context.object.data.shape_keys.key_blocks:
                exclude_char = exclude_by_name(ske.exclude, shapekey.name)
                if shapekey.name is not 'Basis' and exclude_char is not True:
                    shapekey.value = ske.value

        self.report({'INFO'}, "Value assigned to Shape Keys")
        return {'FINISHED'}

# -------------------------------------------------------------------
#   UI
# -------------------------------------------------------------------

def draw_shapekey_extras(self, context):

    scn = context.scene
    layout = self.layout
    ske = scn.shape_key_extras

    layout.separator()
    layout.use_property_decorate = False  # No animation.
    layout.use_property_split = False

    row = layout.row()
    row.label(text="Mute State")
    col = layout.column(align=True)
    rowsub = col.row(align=True)
    rowsub.operator(SKE_OT_enableAll.bl_idname, icon="RESTRICT_VIEW_OFF")
    rowsub.operator(SKE_OT_disableAll.bl_idname, icon="RESTRICT_VIEW_ON")
    col.operator(SKE_OT_toggleAll.bl_idname, icon="FILE_REFRESH")

    layout.separator()
    row = layout.row()
    row.label(text="Set Shape Key Values")
    col = layout.column(align=True)
    rowsub = col.row(align=True)
    rowsub.prop(ske, "random_min")
    rowsub.prop(ske, "random_max")
    col.operator(SKE_OT_randomizeValues.bl_idname)

    row = layout.row()
    col = layout.column(align=True)
    col.prop(ske, "value")
    col.operator(SKE_OT_applyValues.bl_idname)

    row = layout.row()
    col = layout.column(align=True)
    col.prop(ske, "exclude")
    col = layout.column(align=True)
    col.prop(ske, "apply_enabled")
    layout.separator()

# -------------------------------------------------------------------
# register
# -------------------------------------------------------------------

classes = (
    SKE_PG_settings,
    SKE_OT_enableAll,
    SKE_OT_disableAll,
    SKE_OT_toggleAll,
    SKE_OT_randomizeValues,
    SKE_OT_applyValues,
)

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

    bpy.types.DATA_PT_shape_keys.append(draw_shapekey_extras)
    bpy.types.Scene.shape_key_extras = PointerProperty(type=SKE_PG_settings)

def unregister():
    from bpy.utils import unregister_class
    for cls in reversed(classes):
        unregister_class(cls)

    bpy.types.DATA_PT_shape_keys.remove(draw_shapekey_extras)
    del bpy.types.Scene.shape_key_extras

if __name__ == "__main__":
    register()


Smoke looks blurry even though resolution is set to a high value As you can see, smoke looks very blurry.
I have tried everything people said on other forum, but since the way blender simulates smoke has recently changed, most of it isn't helpful.

This was with 200 resolutions division and 3 upres factor. Most tutorials I watched used these setting or slightly more or less, yet they got noticeably better results, whether in viewport or rendering.
I don't see what I can do to up the quality, the edges are fuzzy and the whole picture is overall blurry.
Any help would be appreciated
Edit : this is with denoising  :

better, but still nowhere close to the cool high definition renders

Number of Divisions has nothing to do with "blurry" result. More divisions gives more details (volume grid is detailed). You can try to sharpen with ...
Default 32 Divisions

add Math node Multiply 100 into Density socket

add node Color Ramp, to get rid of lines ...

change Render Properties > Volumes > Step Rate 0.1

(Step Rate - lower value less "lines" in a volume.)
Play with ColorRamp to get more or less of volume ...


Lamp changing color in bge How do I make a lamp constantly changing colours in bge? I need to make it cycle through the rainbow. Like in RGB gaming pcs.

This is possible in BGE using an action actuator.

https://cdn.discordapp.com/attachments/387475783838466051/597625497622544384/animatelightscolouration.blend

However I think there's a bug before 2.78 that doesn't allow you to do this.


Alpha Over .png file pixelated after adding it to Video Sequence Editor After I add the Alpha Over png file to my VSE it is pixelated.
Maybe you could have a quick look into the files and show me my error:

Alpha Over Image File:

VSE with Image File:

Thanks in advance!
Appreciate any help.

Cheers

In the filter layout, try setting the "Convert to Float" value to True. Also try Enabling "Deinterlace". Put the Text image over your black color and make sure it's blend mode is set to "Alpha".

Your Example Blend files didn't have the text images in them, so I couldn't make sure my advice would help.

It could also be that your text image isn't high enough resolution.


How do I prevent Blender from randomly duplicating items? I am really enjoying the Blender program, but I am also having some extreme issues with it as well. It seems to "glitch out" randomly, and when I try to replicate the scenario, sometimes it will do it again, other times it will work correctly, and other times, it messes up completely differently! For instance, in the file that I attached, I am trying to create a "Firebending" effect. I have the smoke flow and domain set up, but for some reason, Blender keeps randomly duplicating the domain at different points throughout the video. I'm really not sure how else to describe it and get help because the events are so random and so confusing to me. I often follow video tutorials exactly, but if I mess up and have to undo a step, Blender loses its mind it seems. Is anyone willing to try and help me out with some of these problems? Thanks in advance!

Ethan

PS: The video tutorial I am using is this fire power video if it helps you guys out with answering my question.

EDIT: Here is the second attempt I had after removing Smoke Adaptive Domain and rotating the sphere 90 degrees.

Modifiers are in wrong order. Move Smoke modifier down in the stack so Particle system would be first. At least i think this is what you are trying to achieve.

Oh and it ain't random duplicating. You have "Smoke adaptive Domain" checked on Domain Smoke properties and because modifiers were in wrong order, it looked like there is duplicated domain as it should normally stay inside the original domain.

EDIT: Well that particle system seemed bit complicated for me to fast figure out how to make that more "firebending" style you wanted. But here is idea for you how to do it easier without using particle system. Added another domain, sphere and wind. might be more better way to do this, but this is what i would use


UV map for cuboid produces islands of same size I have a cuboid with height, width and length not of same scale. When I Smart Project UV map for this, I get islands of same size.

I think I must get islands of different sizes as height, width and length are not of same scale for my cuboid.

Am I doing anything wrong or is it normal ?

It sounds like you have scaled your mesh. Unwrap operations should always be done with the object scale set to 1 (to avoid problems like yours).

In object mode if you select the object and look at the scale in the properties region, you will see that it is not all 1.

Press CtrlA > Scale, to apply the scale.
Then in edit mode re-unwrap the mesh, and it will have the proper scale.

As an aside, if you were to use the Unwrap operation, blender would warn you with this message.

  Object has non-uniform scale, unwrap will operate on a non-scaled version of the mesh.


Legs and arms twisted using MakeWalk I'm using Blender 2.82. I'm trying to animate a human exported MakeHuman. I followed this tutorial to use a bvh file to animate the scheleton. When I click on "Load and retarget" and I select the bvh file I always obtain a strange behaviour as in figure, so the legs and the arms are twisted in a very strange way.
How can I solve it?

You probably need to manually redefine the T-Pose for your target rig.
MW seems to be mostly doing its trick by copying rotation differences between the defined rig t-pose and whatever happens to be the current animation pose. An incorrect T-Pose will result in the bones looking in the wrong direction, which you can correct by rotating them such that the end result is correct in the pose mode, and then telling MW to use that as the T-Pose for the retarget.
You can do the latter by using the "Define T-Pose" button in the utilities section of the MakeWalk tool panel:

Note that you may have to also untick any automatic options on the target before doing that. If you have ran automatic bone detection earlier, you can save that as a target definition which you will later be able to specify manually.
Note that the bones you have to rotate to get the model into the T-Pose also have to be the ones that that are matched on your target rig. You can inspect that by opening the target armature section and scrolling to "FK Bones". All bones not listed here are ignored by MW.


Making a HDRI map more subtle creates a drop shadow I tried following cegaton's answer here to make a HDRI map more subtle, and the result produced generates a darker edge / drop shadow between the 3D objects and the background:

I am not sure what causes it.

It's because you're blurring the Environment Pass. The Environment Pass is not inclusive of the area behind the building. In other words, there's a black hole where the building is that's being blurred... therefore some of the blue is going to be darker around the edge.

I've been hoping and waiting for the Blender devs to include the capability of making only specific layers transparent.  As far as I know, this doesn't exist yet.

If you want to blur the environment without having a halo and without having to save a separate render to disk and then composite the image to your scene, you can use the "Glass Sphere" trick.

1.) Set Transparent under Render Properties >> Film:

2.) Add a Sphere object (low poly) with Smooth Shading enabled and set the material to be Glass with a IOR of 1.0 and a Color of 1.0 White.  Make it large enough to encompass your Camera and then Parent it to the Camera:

3.) Create two render layers... one for your setting and one for the sphere.  Exclude the Sphere's layer from everything else (this ensures that the sphere itself doesn't affect the lighting on any objects in your scene).  Set the Number of Samples on the Sphere Layer to 1 (it should only take a couple of seconds to render):

4.) After that, blur it as you were with the Environment pass:

EDIT: I forgot... the reason this works is because you now have a shader (albeit a perfectly clear shader) covering the camera plane.  Blender must render the shader and all the rays that are affecting it, hence the environment on the other side of the glass must be visible.  For obvious reasons, a Transparent shader will not work for this.


Python Script: Set Value for Modifier manually Does anyone know if it's possible to write a python code that enables you to manually set individual parameters for modifiers? For example:
Solidify-Modifier to set the wall thickness
bpy.ops.object.modifier_add(type='SOLIDIFY')
bpy.context.object.modifiers["Solidify"].thickness = 0.4 #[mm]
bpy.context.object.modifiers["Solidify"].use_even_offset = True
bpy.context.object.modifiers["Solidify"].use_quality_normals = True
bpy.context.object.modifiers["Solidify"].use_rim = True
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Solidify")

Is it possible to not set the value for the wall thickness in the code itself, but rather have the user type a value manually? This is only part of the code for a mesh-reparing Add-On I need for 3D Printing. And the wall thickness will depend on the structure. Any suggestions are appreciated!!

Invoke a popup dialog.

Test script to invoke a properties dialog to "manually" type in a thickness value, then add and apply a thickness modifier to a mesh object.  I've called the operator "Add Thickness", hit F3 to bring up search.

Notice I've used the API method ob.modifiers.new(name, type) rather than the add modifier operator.

import bpy

class WM_OT_myop(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "wm.myop"
    bl_label = "Add thickness"
    # annotations in 2.8
    thickness : bpy.props.FloatProperty(name="Thickness", default=0.4)

    @classmethod
    def poll(cls, context):
        return (context.active_object is not None and context.object.type == 'MESH')

    def execute(self, context):
        ob = context.object
        m = ob.modifiers.new("Solidify", type='SOLIDIFY')
        m.thickness = self.thickness
        m.use_even_offset = True
        m.use_quality_normals = True
        m.use_rim = True
        bpy.ops.object.modifier_apply(apply_as='DATA', modifier=m.name)
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self)

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.wm.myop('INVOKE_DEFAULT')

Note this example is for 2.8.  To make it for prior, change

thickness : bpy.props.FloatProperty(name="Thickness", default=0.4)

to

thickness = bpy.props.FloatProperty(name="Thickness", default=0.4)

and use the spacebar to bring up the operator search.

Note: I could have simply pasted your code into the execute method of the operator. This is why (on my soapbox) I strongly recommend using a context variable, eg a line context = bpy.context at the top of test code (not to paste if context is defined elsewhere). For example if the context is overridden in an operator the context passed to execute may not be bpy.context


Modify the size and location of the Rigid Body Collision Object Maybe I'm just spoiled by Unity3D, but I would like to reposition and resize the Rigid Body Collision Object of an object in my scene. Is there currently an established method to accomplish this?

In Unity3D, you can adjust the x and y positions as well as the scale of the collision object.
Adjusting the collision margin and collision shape do not produce the desired result in Blender 2.78.
A thanka you.

*Updated Partially to my Satisfaction:

I was able to change the position of the rigid body object relative to the collision object in edit mode which persisted into object mode. However, the ability to scale the collision object remains elusive. It does appear I accomplished one iteration of upscaling though.

You can not resize the collision box itself, but you will notice that if you scale your object your collision box will scale as well.
To customize the collision box:

Scale your object in Edit Mode to fit the collision box.
Note the scale factors on paper and take the inverse of those numbers by calculating 1/x.
Then scale your Object by those Factors.

You can also do this with translation by translating in Edit Mode to fit the collision box and doing the inverse in Object Mode

Notice that this will work perfectly for cubes, but if you want spheres you have to keep them spheres. You can not turn spheres into ellipsoids.


How big can i make the "world"/animation set? I am setting up an animation scene that needs to be a sprawling area.  I have noticed that navigation gets awkward as I get further away from the central grid, especially in "user perspective".  I am only at the point of setting up the main parts now and I would like to know now if I am doing something wrong before I get into adding the details.  Is there a limit to how large I can make the world/set?  Can I extend the outer boundaries?  Am I doing something fundamentally wrong?  Thank you!

You can technically make the scene infinitely as large as everything scales linearly. as you start getting up to a large scale you might start running into clipping issues with the camera however this can be adjusted by adjusting the end clip of the view.

However it's not recommended to scale things up more than needed as translation and scaling starts to get a little weird especially when you add cameras to the mix.


Mark bevel edges after solidify I have a profile that I want to solidify and then bevel. I'd like to mark which edges to bevel after the solidify without collapsing the stack. Is that possible in Blender?

Best,
JD

Maybe the hardsurface nerds will refute but I don't think you can. So I guess the solution is to select your vertex and to bevel it with a shiftctrlB.


Can you bake a normal map with the empty space around the objects transparent? Is there an option in Blender to set "background" areas of a normal map bake to have an alpha of 0?
What I am doing exactly, for my own reasons, is baking the orthographic normals of various objects onto a plane in front of them, like this:

But I want everything except the object itself to be transparent in the normal map texture that is baked.
I am using a Python script to also bake maps for objects at every different combination of rotation, generating thousands of files like so:

So any solution or workaround for my particular case has to be scalable. If there is some option or feature in blender to render the empty space around objects onto the normal map with an alpha of 0, finding that is the main goal for me.
I've considered a workaround like rendering a mask with the object silhouette white against a black background and manually multiplying that with the alpha channel of the normal map in Python before saving, but if there's an option I can turn on to avoid the work of writing that script, it would help - doing that would also add to the render time, which is already quite significant, so if I can go a more direct route I would put that ahead of a workaround like that. I'm still fairly new to Blender.
Thanks!

One possibility is with Workbench render and the built in check_normal+y.exr MatCap. If speed is needed, this should be very fast.

Set the render engine to Workbench.

Set the lighting to MatCap and chose the "check normal" matcap.

Ensure Transparent is enabled under Film.

Make sure Color Management > View Transform is set to Standard. The default of Filmic emulates how a camera sensor shapes dynamic range, but that is definitely not what we want right now.

Use a camera with the Type set to Orthographic, aimed at your object as in your screenshot (it's a bit hard to tell if that one is orthographic already or not).

Render:

PNG images are encoded with a gamma correction with the expectation that they'll likely be displayed on an sRGB screen which will apply the inverse correction. Since that isn't the purpose of normal maps, you might want to be careful of this.
If you're decoding the PNGs yourself/with a library, take note of if it applies the inverse correction or not before exposing the values to your own code (and if it doesn't, either apply the inverse correction yourself or render the PNGs without correction from Blender by setting the View Transform to Raw).

Or if you can, use OpenEXR and ignore the last several paragraphs. Blender saves EXRs in linear space by default and most other software should assume they are in linear space. They also offer full float precision, so if you encounter any banding artifacts, switching to OpenEXR will likely fix those too. They are a bit big, however.


Stop cloth from gliding of I am trying to make a ghostlike animation. Cloth floating over a simple armature. This all works very well, right until the point I want the ghost to move it's arms. In theory the cloth over him should move with him, in practice it glides of.

How can I stop it from gliding of? So far, I've tried pinning and hooking. But that doesn't work, seems to horribly distort the cloth. Also, I can't start the cloth hooked, as it has to fall down first. I am really at a loss here. The animation included shows what's happening better then I can describe.

https://youtu.be/-x4r8ZSitVM

Blender file added for clarification.
https://www.dropbox.com/s/gtmegd3wjukylkj/Shared.blend?dl=0

Try turning up the friction in the Cloth Collision settings.


Print(store) particle velocity vector and distance from other particles I am newbie to blender and I want to know if it's possible to store or output to a file the particle motion details (like velocity vector of each particle, distance from all other particles, particle ID, etc.) at various time-stamps (like at time T than at T+ΔT, so on).

Or are there any other hacks to do so?

You can loop through the particles in a particle system and read the location and velocity of each particle.

For the distance you will need to calculate that for each particle. The distance is a pythagorean calculation.

import bpy
from math import sqrt

scn = bpy.context.scene
obj = bpy.context.object
p_system = obj.particle_systems['ParticleSystem']

def distance(p1, p2):
    return sqrt((p1[0]-p2[0])**2+(p1[1]-p2[1])**2+(p1[2]-p2[2])**2)

for f in range(scn.frame_start, scn.frame_end):
    scn.frame_set(f)
    print('At frame {}'.format(f))
    for i1,p1 in enumerate(p_system.particles):
        if p1.alive_state == 'ALIVE':
            print(' particle {} has a velocity of {}'.format(i1,p1.velocity))
            for i2,p2 in enumerate(p_system.particles):
                if p2.alive_state == 'ALIVE' and i1 != i2:
                    d = distance(p1.location,p2.location)
                    print('  particle {} is {:.4f} from particle {}'.format(i1,d,i2))


Positioning edge loops with precision I'm pretty new to Blender I'm trying to design a room with widows at specific locations along the wall. The method I'm using is to add edge loops and then delete the faces on the inside and outside of the wall.

I'm having a really hard time positioning the edge loops to the exact location that's needed. So for example I know edge loop 1 is x inches from the left edge and I know the next edge loop should be 41" from that one etc.

Sliding edge loops to accomplish this seems painful and I'm wondering if there's a better way to do this.

The factor of the Edge Loop is a value between -1 and 1. Assuming you know the total length of the wall (w), and (x) is the distance from the corner,  you can use this formula :

factor = 1-x/w*2

To enter the formula, press the = while using the loopcut tool, then type your values.

But this is tedious, cause the total length will be reduced by each cut. It would be much easier to extrude faces starting from the left, because extrude allows to specify distance values.


How to remove rotation of non planar faces? I have this object, it is so far no thickness.

However there are some faces where I accidentally rotated the X and/or Y axis so now there are parts standing out on the side.

Is there a way to reset these rotations, so that the whole plane will be flat?

In Edit mode, Select all vertexes, Then press S, Y,  0  This combination scales vertexes to zero on Y axis, and will make faces completely flat in x-z plane


new Blender version 2.8 not working on win7 64bit I have downloaded the new version of Blender 2.8 on my desktop I can see Blender starting up a gray window opens and then just shuts down.

I resolved this issue on a pc x5675 older system, by installing blender 2.81 experimental.  It may have some extra bug fixes that may help you. Apparently the release for stable is in November.


Parent with Automatic Weights fails, how to detect which bone? failed to find solution for one or more bones

Is there a way to find which bones are failing so I can hone in on the problem quickly?

Here's the solution I come across, this might work for others so I'm posting here.

So you failed the automatic weighting and you have no idea where the problem might be. So what's the solution?
Well, it's to go around looking for real close or overlapping vertices all over your mesh. (I assume you tried normal fixing or merging by distance already)
It is not a pleasant thought if your mesh is complex.

So select all your mesh in edit mode, Select all vertices(or better the ones youre suspicious about) then keep applying Merge By Distance while increasing the Merge Distance value, then apply the auto-weight until it works.

Example
My Merge Distance was: 0.00001 by default.
I increased it to 0.00011 then applied and re-auto-weighted. Didn't work.
So I increased it to 0.00012.
Keep going.

I found my mark at 0.00022m.

Use this method at your own risk, there's always the off hand chance of your CPU going critical and causing a thermonuclear reaction in which half a continent can vaporize in the blink of an eye.


How to stretch 120 seconds of animation over 270 seconds? I have an object with some animation (120 seconds) and I want to make this animation now play over the duration of 270 seconds. How can I stretch the animation to this new duration?

Select the object and open the Dope Sheet. Set the frame scrubber (the green line) to the starting frame, press A to select all and then press S to scale the keyframes apart up to the required frame. This should stretch the animation to whatever length you want. If you have multiple keyframes, Blender will even these out for you. You can also hold Shift when scaling to snap in small increments.

Note of course that since you are making a short animation longer, it will most likely playback slower.


Boolean union with overlapping faces Is there a way to make a Boolean union of two objects which have at least one touching/overlapping face (same orientation)?

Let's say I have a cube and a cylinder (same size), shift the cylinder on x and y and in edit mode move up the top vertices, so the bottom ones stay overlapped:

The I'll select the cube, add a Boolean modifier with union and select the cylinder as other object.

When I then apply the Boolean modifier, the cylinder disappears either or I will have non-manifolds, because of inner geometry.

The only known solution to me is to move all the vertices on the ground layer (z 0) a tad up or down so the don't exactly overlap.

But doing this to every object I want to Boolean union is very tedious, especially when they are rotated and I can't move the vertices exactly in the right direction.

So is there an easier way?

The boolean modifier has two modes, 'Carve' and 'BMesh' (under the box for the second object)
A quick test shows for me that if I use 'BMesh', internal edges and faces are preserved, while with 'Carve', they are removed.


Where is the option for grease pencil convert to curve 2.78a I have drawn a few lines holding the D key. Now I want to convert it to a path or a curve but I can't find these options in the properties panel (N). Where are these options in Blender 2.78a?

This function is not in the properties panel (N) but in the tools panel (T). Open it up and scroll down to the Grease Pencil tab on the left. At the bottom of the Grease Pencil panel you can find Convert to Geometry.... Click it and you can choose whether you want to convert it to a polygon curve, a path or a bezier curve.


Low FPS on Animation Playback I have a question about animation "best practices": If I want to render my animation at 24 fps, does that mean I also need my animation preview/playback window to run at 24 fps?

Some details: I've created 15 second walk-cycle scene that I want to render at 24 fps. However, when I use the animation playback feature (alt-a), the highest framerate I'm able to achieve is 16 fps. As a result, I've prepared an animation that looks reasonable at 16 fps but is much too fast at 24 fps. Of course, I could rescale my keyframes to compensate for the difference after I've finished the animation, but I'd prefer to see something close to the finished animation the whole time.

Some optimizations I've tried to increase the playback framerate:

Sync Mode set to "Frame Dropping"
All objects except my character and camera are set to be invisible
All subsurf modifiers are set to their lowest level
The shading mode is set to "solid" or "wireframe"

Are there additional things I can do to increase the playback framerate? Or do I just need to work around my current 16 fps playback framerate?

Things you can try to improve viewport performance:

Enable VBOs in User Preferences > System. This should speed up drawing of highly complex scenes with lots of geometry.
Enable Only Render under the display panel of the 3D viewport. This will hide extra lines and wireframes, which are slow to draw.
Disable Double Sided in the object properties editor for high polygon mesh. This is especially helpful on Fermi-level Nvidia cards.
Turn off modifiers you don't need in the viewport.
Use Simplify in the Scene property editor to globally reduce the complexity of the scene.
Make sure you are viewing the scene in Solid mode, it's typically faster than all the other mode, including wireframe.
If you are using physics simulations like particles or cloth, make sure they are baked. Otherwise, Blender will try to recalculate them every time you switch frames.


Unable to "Create Plane Track" I have created 4 tracks for the decal but am unable to 'create plane track'
Keeps showing me the error below

To create a plane track you need at least 4 trackers, select all of them using A


Algorithm for turning Voxels into Triangle Mesh I have a model of a human body as a bunch of voxel locations (ie. one point could be x=2, y=3, z=-5 or (2,3,-5) ).  As a technical note, this model in numpy.

Is there an established algorithm for turning these voxels into a triangle mesh of its surface?  Or, somewhat less complexly, say I have only the voxels that are already the skin of the human body.  Can I turn this into a single triangle mesh that can be rendered in Blender?

Or, if it's easier to answer the implicit question, how can I render these voxels rapidly in Blender?

=====================================================

References:

I tried implementing the method detailed here: https://gist.github.com/neonb88/3052f7a511e9030f83f8a7123dc72207. But this method didn't work quickly in Blender for a 3-D array of size (20, 20, 20)
voxels to mesh
volume data to mesh

If you want a general algorithm for creating a surface over voxel data, the most common, and normal starting point, is the marching cubes algorithm.

There is an addon that implements this for particles called Cubesurfer, so you could probably write a script to place particles based on your numpy data and then run this. Or you could look at the source (note, it useds Cython for performance reasons)