Jagged edges with simple render I have used a basic template for rendering simple shapes against a blank background.
Load generic blender project, insert shape, change from eevee to cycles, GPU rendered.... no changes to anything else.
When I rendered any shape before the edges came up clean and smooth.... now upon doing the same setup they are extremely jagged, no smooth edges ever now, now matter what shape I insert.
See the image attached for a simple shape, rendered with jagged edges - no changes are made to teh general blender project setup apart from changing to cycles with GPU
Thanks - just confused why from one project set up like this, it was fine, and now all are jagged.

Thank you for your .blend-File. That helped a lot.
The problem is the lighting.
If you change your lighting settings to this:

you get this: (and yes, i added the blue cube to check, what's going on ;)


Bake to an object with Solidify? I am working on some clothing that will be using cloth sim. For this reason, it's best to keep it as a flat mesh without any thickness for the simulation. I then add a solidify modifier after the cloth sim to give it thickness, and a subsurf and/or bevel to prevent sharp edges.

The downside of using a mesh with no thickness is that it can't have much surface detail. And since cloth meshes do better with consistent vertex spacing, I don't want to knife detail into the mesh either. My options for getting more detail are to have a separate detailed mesh that is then attached to the cloth sim mesh with Surface Deform modifier, or to bake my detail to textures.

I know I can bake a solid mesh to a flat one, and I'll get the normals of the solid mesh on one side of the flat one. But can I bake to a mesh with a live solidify modifier and have it work properly? As far as I know, each side of the solidified mesh has the same UVs. So you get the same texture on each side. But what about the generated rim? How does this all work?

Use your single faced mesh BUT on the end of the sleeves, or neck or any cloth "thickness" just model just a few faces giving the appearance of thickness "U" shaped on the edge like this (see pictures) that way you will get the sense of thickness without the need to apply a modifier or more subdivision surface unnecessarily.

That way you will still have cloth simulation with a very light weight mesh.
Make the cloth collide with very simple capsule polygon parented directly to the bone (no bone weights), hidden from render (wireframe view only). This way you´ll get a nice cloth simulation without the need of solidify. Play with stiffness. Make some vertex groups to "friction" the cloth more on some points.

Hope this is what you´re looking for. Cheers.


How to make wall faces for this object? I have this object:

I want to make wall faces for all of its outer edges, but only on the top, so there should be no faces on the bottom of those edges.

I have tried Loft and Bridge from LoopTools, and I also tried to select them all then press F, which obviously just makes a lot of faces connecting each edge to each other edge.

if i understand correctly, you want this mesh on one side of a box shaped mesh? if so, you should extrude those edges over the Z-axis, then scale the resulting edges
 to 0 over the Z-axis, and make a face on those edges.
shortcut to extrude over Z-axis: E->Z, followed by a value, or move with the mouse.
then to scale : S-> Z-> 0 to make it flat.
then press F with those edges selected, which will make a face.
As you pointed out yourself, answering your own question, you could use checker deselect to select every other vertex, and dissolve them.


How to have person in video mask added geometry as they walk in front I have a video plate that I shot and have motion tracked into Blender. There is a person walking through the shot and I want to add geometry in front and behind them. However, things that should be behind them obviously aren't as they are in front of the video.
Is there a way in blender to have a mask matching the person tracked to the person so that the background geometry appears to go behind them? Or am I going to have to take this to After Effects or something and hand roto a mask and export it as a new video element and composite it?
Pretty new to all of this so may not be using the right terminology. Also assume I'm an idiot when responding and explain it to a 3rd grader. :) Thanks everyone who shares anything. Stuck on this one.

In the video clip editor you can create masks and animate them with keyframes. For precise rotoscoping over video, load the video element on the Video Clip editor, create a new mask and you can animate the shape and feathering as you like.
Overlaying an image to cover a face in a video?
You can also use trackers and parent the points of the mask with the trackers, to ease the rotoscoping process.
Can a mask stick to a shape in the motion tracker?
Then you can use those masks in the compositor with a mask node that uses those masks to combine other images.
You don't need to use AfterFX.
How to draw a Rotoshape (mask) in the Compositor?
To work with geometry you can check this link as well:
Use masks as part of materials in cycles


How to change the Blender Console number of spaces used for indentation? As I make myself comfortable scripting in Blender I use the Scripting workspace: the Text Editor and Python Console in particular.

I've noticed that the Text Editor uses 4 spaces for indentation while the Console uses 5 somehow.
This makes it cumbersome to copy tested snippets from Console into Text Editor as I need to manually edit every single indentation.
Here is a short sample copied from Console:

 for o in C.view_layer.objects:
...     print(o.name)
...

Is this normal behaviour ? Is it possible to change Console's indentation to 4 spaces instead of 5 ?
What is the recommended workflow that would allow consistent copy/pasting between Console and Text Editor ?
(Note this is on Windows 10 using Blender 2.82a)

The indent is 4 spaces.

The console indent is 4 spaces.

>>> C.space_data.prompt
'>>> '

The prompt is ">>> " notice the space at the end, you are counting it as being in indent.  Can select console code and choose "Copy as script" effectively chopping length of prompt from start of each line.

Copy from image pasted here

import bpy
from bpy import data as D
from bpy import context as C
from mathutils import *
from math import *

#~ PYTHON INTERACTIVE CONSOLE 3.8.2 (default, Apr  2 2020, 03:24:36)  [GCC 7.5.0]
#~
#~ Builtin Modules:       bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
#~ Convenience Imports:   from mathutils import *; from math import *
#~ Convenience Variables: C = bpy.context, D = bpy.data
#~
for i in range(20):
    print(i)

Notice it copies all the console buffer and adds the imports, not just the selection.

Would be simple enough to use standard copy and chop 4 from each line of the clipboard.

>>> for line in C.window_manager.clipboard.split("\n"):
...     line[4:]
...
'for i in range(20):'
'    print(i)'

>>>


Aligning plane normal vector side to face a point : Python I have 2 points P1 = (x1, y1, z1) and P2 = (x2, y2, z2). The problem statement is some what like this.

Draw a plane at point P1 (any arbitrary point in 3D space). Rotate the plane to face point P2 (another arbitrary point in 3D space) such that the normal vector of plane at point P1 is facing point P2. Change the rotation of the plane such that it maintains it perpendicularity to point P2 as much it can while one of its X, Y or Z rotations is 0

So far, I've managed to draw the plane and make it face the point P2 using this code:

def align_plane_to_point(obj, point):
    normal = obj.data.polygons[0].normal.xyz
    mat_obj = obj.matrix_basis
    mat_scale = mathutils.Matrix.Scale(1, 4, mat_obj.to_scale())
    trans = mat_obj.to_translation()
    mat_trans = mathutils.Matrix.Translation(trans)
    point_trans = point - trans
    q = normal.rotation_difference(point_trans)
    mat_rot = q.to_matrix()
    mat_rot.resize_4x4()
    mat_obj = mat_trans * mat_rot * mat_scale
    obj.matrix_basis = mat_obj

Calling this function with arguments obj = Plane at Point P1 and point = point P2, makes sure that the normal side is facing point P2.

Now I am not sure as to how to go about the last part of the problem. Maintaining perpendicularity to point P2 but making sure at least one of the rotations is 0.

Say for example the rotations (in degrees) are like so after executing the above function:

X: -40
Y: 60
Z: -80

Again how do I know (programmatically) which value can I set to 0, making sure plane is as much perpendicular as it can be. I don't mind changing the rest of the values as well as long as the normal is facing towards the point P2.
Manually changing the values, I can see the rotation of the plane and thus decide, but using Python I don't know how to figure this out.

Any help is appreciated.

The function precisely for that is to_track_quat
Works much like track to constraints. Gives more than rotation difference.

to_track_quat(track, up)

This uses the Vector to point with the specified track axis, (Z for normal) and a secondary "up" axis (x or y, never same ...).

Code would be:

def align_plane_to_point(obj, point):
    dir = point - obj.location
    return dir.to_track_quat("Z", "X").to_euler()

if obj:
    obj.rotation_euler = align_plane_to_point(obj, point)

Of course you can extra check for obj rotation type, the function giving a quaternion, I convert it here to euler assuming the usual kind. Or may use it for rotation matrix, like:

rotMatrix = dir.to_track_quat("Z", "X").to_matrix().to_4x4()

(as quat to matrix produces a 3x3 matrix)

If u need more control, but more complicated, you can have the second dir (up be controlled by another vector) you may look into this, if it helps.

I build there the rotation matrix directly out of 1 vector and a second that is not necessarily perpendicular.

First I make the second/third vector perpendicular by the cross functions, with some exceptions. I'll not copy that here ... Then can build a 3x3 matrix (only rotation) by putting the 3 vecs into columns

mat3x3 = mathutils.Matrix().to_3x3()"
mat3x3.col[0], mat3x3.col[1], mat3x3.col[2] = mx, my, mz"
eulerRotation = mat3x3.to_euler()

where 3 vecs,  mx, my, mz,  mz would be the point - obj.location, the other 2 being determined as in the linked code

if u use directly such matrix (to 4x4 ok) you'll have some difficulty controlling the scale for some exceptional cases (may fall to 0 on some axes), so to euler or to quaternion is the way, even if u further convert back to a full matrix


Arduino cannot receive serial data from blender I'm trying to send data from blender to arduino(Arduino mega 2560) using pyserial 2.7. But blender cannot send data to Arduino.I'm using COM3 as my serial port and there is no problem with sending data from Arduino to blender.When I'm trying to send data from blender to arduino it print out this error

My blender code

import serial

ser = serial.Serial("COM3", 115200)
var = 10
out = ser.write(var)

arduino code

int led = 40;
void setup() {
Serial.begin(115200);
pinMode(led, OUTPUT);
}

void loop() {
if (Serial.available())

{

int t= Serial.read();

digitalWrite(led,HIGH);

}

Does anyone knows where I'm doing wrong??

The traceback clearly prints:

Could not open port 'COM3' PermissionError(13) 'Access is denied'

Try to run it as admin.


Change Screen Colors Can the program default colors be changed, that is the grey menu and screen itself.

I simply cannot see properly with the dull grey colors.

Yes it can.
Enter the blender user preferencesCtrl-Alt-U Add go into the themes tab.
In side the themes tab you can customize all the colors.

When You are done, be sure to hit Save User Settings.

You can also Down Load Themes:

You can download themes for site such as blendswap, or by searching on the internet.
To install a theme, press install theme, and then open your theme, which should be a .xml file.

Then save your settings.


How can I raise the brightness of just the voronoi part of this shader? I found a voronoi setup that looks kind of like stars. I want to increase the brigthness to make the stars look like they're glowing. If I raise the emission, it can add too much blinding light to the scene however. Is there another way I can increase the brightness of the white stars while keeping the blue the same and also without adding light pollution to the rest of the scene? Below are my images and node setup.

If you want to brighten just the "stars", use a second ColorRamp to isolate just the white values (against a  black background). Then, use a math node to multiply this by some value (depending on your desired brightness - higher is brighter) before adding it back to the original (colored) texture.


Network animation with faces / simplicial complex using animation nodes I am looking for a way to quickly and automatically construct an animation of a type of network (called a simplicial complex) wherein sections of the network structure have material on the faces in between the vertices.  I can construct the animation of a network using the 'animation nodes' package, here: https://animation-nodes.com/
This package allows the vertices to 'connect' or draw and edge between them whenever a certain criteria is met, such as the distance between them is below a threshold.
However, I have not figured out how to include a face on the triangle between nodes if the vertices are all connected to each other.
Here is an example of a snapshot in the animation of a simplicial complex (I would like for the vertices to move and faces to respond by appearing/disappearing with the edges in the animation):

This gif describes the type of motion:

Does anyone know how to achieve this?

This answer is based on Omar Emara's Answer
, so be sure to read it before you move on as I won't explain everything that have been answered there.
This is the loop to generate polygon

However, this loop doesn't take the distances between vertex points into account so I modify the loop to use the Distances output from Find Nearest Points node. As per documentation

Distances - The distances between the output points and the input point.

Input point is the inputs Vector, this outputs give you a list of floating point (the distances) with length same as Amount input where the first element is always zero as it is the distance to itself. With that we can compare each value with distance threshold.
not any(set(p) == polygon for p in polygons) and all(d < radius for d in distances)

radius is the distance threshold. all(d < radius for d in distances) will make sure that every value is inside the radius or below the threshold.
You can see where each node connecting to what node. Put that code on Expression node.

By adding this new condition input in generator, we only add polygon indices that met certain distance threshold. You can ignore the Distances List output of the loop for now. Here is the comparison side-by-side on Material Preview mode.

In this example I'm using Circle Mesh and scatter them using Vector Wiggle, however you can use particle system as well. The node setup is pretty much same as Omar's, use Combine Mesh to generate the polygons.

To generate edges we can use Find Close Points node (Mesh > Operators > Find Close Points), use mode Amount or Distance whichever that suit your need.
Here's the final result rendered using Viewport Render. https://imgur.com/a/wLhA6HB
. I use three Find Close Points nodes setup with different parameter and different material.


Why do calculated and read-out RGB-Values differ? In short:

Generate Mesh and choose color in color picker for the whole mesh (The mesh in the example below is a simple cube)
Read color (three float values) via Python and send them (with mesh details and uv-map ect) to a C++-Application
C++-Application creates a image which should be used as a texture

Problem:

The color, which is shown in the color picker isn't the same as the color of the texture.

I use the three float values, calculate the values between 0 and 255 and set the rgb-channels. Then the image is saved.

Some Screenshots:

color picker with rgb

RGB-Values via GIMP:

R = 184
G = 119
B = 255

RGB-Values calculated and rounded: (255 * value)

R = 0.479 * 255 = 122
G = 0.184 * 255 = 47
B = 1.0 * 255 = 255

They aren't the same?

Generated Texture

RGB-Values via GIMP:

R = 122
G = 47
B = 255

Renderen with Blender Cycles

And now a Screenshot from the Mesh + Texture rendered via Cycles (with Ambient Occlusion). I removed the default lamp because I wan't to get a clean output.

RGB-Values of the color picker via GIMP (same as above):

R = 184
G = 119
B = 255

RGB-Values of the cube via GIMP:

R = 125
G = 48
B = 255

What is the problem?

PS: I didn't know which tags I should use for this question. So please remove or add tags if you think that would be better. Thanks!

The values differ because the rgb-values of the color picker aren't gamma corrected.
If I correct them like answered here https://stackoverflow.com/a/17910665/3069477 the colors are matching. I still get different RGB-Values but the difference is really small (rounding error).
Resulting Screenshot:

Thanks @someonewithpc!


Breaking a cylinder into sections in blender I need to know how to cut a shape up into separate sections, for example, how can I cut a cylinder in half, so that I can animate the different sections pivot points, thus the cylinder opens out.

With a cube before I've been able to just duplicate it 7 times, however with a cylinder I need it split in half and into other smaller sections.

There are several ways to do so. As you mentioned, if you really need to fill sections after cutting, I would suggest a tricky way:

Create a mesh that contains expected sections. Add Solidify modifier to this mesh, set Thickness to 0.00001. You can leave other options as default;
Add Boolean modifier to cylinder, set Operation to Difference, and Object to the section mesh. Then press Apply;
Delete the section mesh, Tab into cylinder object, select all elements, P>By loose parts to separate each sections apart;
If you want to recalculate their origins, just ShiftCtrlAltC > Origin to Geometry.

P.S.:
In the latest version (the coming 2.70), Boolean modifier supports ngons, which will generate better and cleaner result.


Fuse cc to Blender 2.8 flipped normal issue i am having an issue with importing Fuse characters i make, when i import the obj file into blender 2.79b/ue4/paint3d the model looks fine, when in 2.8 the normals are all out of wack wondering if this is a bug, if i export it, fbx or obj, the changes carry over into other programs 2.79b included.
i have included an image of whats happening, on the left is 2.8 on the right is 2.79b. a big thank you to anyone who can help me with this issue

All you gotta do is disable Show Backface in settings of every material, and it will look perfect.


How to hide these lines so i can see only grass texture? I cant hide or delete this lines on grass so it is looking awful

Deselect the Wireframe option in object properties panel perhaps?

Also in viewport overlay option:


Cannot unwrap parts of mesh? I'm not able to unwrap the top and the bottom of the model to put texture for some reason.


How to correctly separate vertex color data into the R channel on EEVEE? for some reason if I add (in the shader tree) the ATTRIBUTE>COL from the vertex color property and channel it to a separate RGB (only making the R channel plug into a ramp node and then to the shader to RGB) I´m not getting a monochromatic channel from the red channel on EEVEE. What I get instead is the red color in the viewport.

How can I correctly make the red vertex color output a mono channel in red?

Also, I´ve been trying the same approach using ambient occlusion and feeding it to a separate rgb node into other channel, but then I don´t get the expected results: If I get a greyscale value on vertex driven by the red vertex color channel I want to multiply it using Ambient occlusion.

It is possible on Modo, Max and Softimage. What am I missing to do on Blender?
Thanks.

This appears to have been a bug at a specific release of Blender - now unable to replicate the problem so it would appear that this has been long since fixed.


black out of place faces in render I've got a weird issue with this model. The mesh is fragmented when rendered, even though nothing of the sort shows up in material or solid view.

It has happened a few hours before and moving the whole mesh around and putting it back into place helped for some reason. Not this time.

There are no other faces in that space, so it's unlikely that it's z-fighting. It also seems to affect this particular part only (side panels and the front splitter are one object, separate from the rest of the body).  Any idea what I can do to fix it?

EDIT

As requested, I'm attaching a screen of my wireframe, together with properties. I'm using cycles.

Here's the download link: borked wireframe

Also, it's working again (don't know for how long this time), even though I changed nothing. I'm starting to think it's my graphic card glitching out, though it's weird that it's affecting only one object

You have some seriously uneven and messed up topology in your mesh, there are vertex overlapping faces, tris mixed with quads and ngons at unexpected places, all that contributes to bad topology and potential artifacts at render time.

Anyway there's an (apparently) useless and undesirable Bevel modifier and the end of your modifier stack causing trouble in the resulting mesh.

It is causing artifacts even in the viewport, and some more in the rendered view. Disabling it seems to mostly fix that problem.

You may want to read up on why quad based topology is important

EDIT

You may also want to remove doubles in your mesh (under edit mode select all and W > Remove Doubles) and recalculate normals (under edit mode select all and Ctrl + N)


Is there a way to change the colour of displaced areas only? I've created this model and created displacement using a combination of weight painting and the displacement modifier to create some intense wrinkles. Is there way that i can change the colour or material of the displaced areas/wrinkles without altering the rest of the mesh?
Is this something that could be achieved through procedurally generated displacement instead of the modifier.
Any help welcome :)

Using nodes might be a bit faster.
Simply use the same Displacement texture as a mask for MixRGB node and select the colors.
You can also use MixShader node to mix different shaders.


World image not showing When I try to use an image for the world sky material it doesn't show the image in viewport and render, instead it shows the base color and it's black in render view, it is only happening with new .blends , I tried opening other .blends and it works,

as you can see in the picture, the sky is not showing correctly and instead it shows the base color of it which is purple-ish black

Before anything, thanks to Cegaton for sharing a related post about my problem

the solution was to use an environment texture and not an image texture, since the world sky is not a mesh you can deform or uv unwrap it needs a different kind of texture


How do I set the Seed value to 0 under the Sampling tab? The seed value keeps resetting to the default value after I set it to 0, once I render a frame. I want to eliminate all noise from the final rendered image.

I believe you are misunderstanding the meaning of the seed value.

Seed is not how much noise there will be in your render. Seed is basically the pattern the noise will have. Noise is a natural byproduct of the way Cycles (and any ray-tracing renderer) renders the scene. There are many methods for eliminating noise in Blender, but the primary method is to raise the samples.

There are so many resources on this topic, because it is really the major factor in whether a scene feasible to render. If we could render everything with one sample, we wouldn't really need to worry about render times, as long as our poly-count didn't exceed our memory.


How to select all faces within a square with a certain length and at a location (x,y)? I have seen this : Selecting faces within a given radius

But it's a circle, I'd like to do the same but with a square

So is there a way to select a face from a coordinate point (x,y) and then apply the script to select a square respecting a length?

Basically to something like that:

I thank you in advance for your help, attention and time. I'm a begginner and I was thinking of KDTree but I don't quite understand the documentation... So if someone may help me I'll be grateful.

Square select.
Here is an edit to @zeffis answer
In edit mode, with face select mode, select a face and run script.
Change space = 'GLOBAL' to space = 'LOCAL' to select square using local coordinates of the mesh
size is the side length of the square

 Test run in GLOBAL mode

 Test run in LOCAL mode
import bpy
import bmesh
from mathutils import Matrix

space = 'GLOBAL'
size = 2 # 2 x 2 square
d = size / 2

obj = bpy.context.edit_object
if space == 'GLOBAL':
    M = obj.matrix_world
elif space == 'LOCAL':
    M = Matrix.Identity(4)

me = obj.data

bm = bmesh.from_edit_mesh(me)
f = bm.faces.active
if f:
    o = M @ f.calc_center_median()

    for f in bm.faces:
        f.select = (all((abs(o.x - (M @ v.co).x) <= d) for v in f.verts)
                and all((abs(o.y - (M @ v.co).y) <= d) for v in f.verts))

    bmesh.update_edit_mesh(me, True)

Note answer written for 2.8.  To run in 2.7x replace all at symbols @ with asterisk *
Notes
could extend to "cube" select by adding the z coordinate to test.
Doesn't consider the alignment of the view, either uses global or local coordinates.
Could extend to have choice to extend selection or not.


How do I render a shiny metallic or chromed material? I really thought I got this but I can't seem to get this material right.
I'm trying to achieve this:

In case, anyone wants to see more photos of this, it's the Dior foundation cap.
But I cant seem to get it to shine like this.
Although I've tried various nodes, this is what I'm doing currently:

And this is what I'm getting:

My roughness for the above image is at 0.192 and reducing it further isn't looking great. I've also tried using principal BSDF with metallic at 1 but that didn't look similar to what I want either.
This is the HDRI I'm using: https://hdrihaven.com/hdri/?c=studio&h=photo_studio_01
Any tips on how to come closer to the reference images would be really appreciated!
Edit for Jachym:

Your HDRI doesn't have enough contrast.

Use default Principled BSDF shader with Metallic = 1, and Roughness = 0.1
Add a contrasty HDRI
Done.


Trouble with .FBX importing/rendering I've been trying to open up this FBX package and get a render like the below preview, but Blender is really messed up when I try to open it. I've tried in 3 different version of Blender and tried using an add-on for importing the FBX and the glTF version of the package. Nothing has worked.

I've tried around 15 different 3D asset tools and haven't had any luck, with issues varying from failed imports to missing textures and lighting. I just want something that will give me the view in the preview below and render it.

Any suggestions are greatly appreciated!

FBX package

When you select the fbx file, there is an option to "Import User Properties" if you turn this off the file imports without error.


How to backup Blender startup file? I recently changed my computer. So I opened the blender, and I have so many custom parts that I want to transfer the startup backup file to a new computer.
I don't know the location of the startup file, but I couldn't find it.
So, how can I bring the startup file at new computer

The easiest way is to start a new scene and then save it as a file.  Copy that file to the new computer. When you're ready open that file on the new computer and then use the file menu to "Save Startup file".


Mesh disappears when activating dyntopo Using Blender 2.8

My mesh is slightly edited and disappears when activating Dyntopo. However a current workaround is to add an empty mesh and join your broken mesh into that one. After that you can sculpt it as normal.

If anyone has a clue why this happens I'd like to know more.

I have had the same problem. For me, the problem was with the visibility of the individual geometry components (vertices, edges, or faces). Please make sure to enter edit mode, select all components, hide selection, then unhide again.

Hope this solves the problem for you too!


How to get information about linked files? I have a scene with several objects and groups linked from other files.

How to know what file contains my linked object or group?

I found 2 ways to get the information I need.

Using Edit Linked Library plugin (Object : Edit Linked Library) is rather helpful.

It allows me not only to see what file contains the selected linked object but to switch to its editing from the Relations tab of the Tool Shelf.

Other way is to use the Blender File mode of the Outliner. It shows the sources of all connected data (objects, materials, armatures etc...), but does not highlight links of the selected object (at least I did not find the way to do it).

One can use search by name of the object to find all information needed.


How can I close a big hole in a mesh? I have a large hole in a mesh that I'm trying to fill:

I've been trying an approach like this:

I'm finding it quite tough, since the number of vertices around the perimeter of the hole don't match a grid.

Is there a better approach to filling a hole like this?

Select the whole loop around the hole with Alt+RMB (make sure to delete triangles first). Use a Grid Fill option (press Space and type Grid Fill). Then play with its settings.


Transparency on imported objects i downloaded an .obj file from the web. It shows an tank. The tracks of the tank has some transparent parts in the texture. But the mesh is always showing behind texture. I dont know how to remove them.

For better explain, here the images:

I mean the lightgrey parts. How can i remove them? Thank you for help and sorry for my worse english.

Cheers :)

Blender does not know the texture should be transparent on some parts.

If you're planning on using cycles, you can mix your shader with a transparent shader using a texture mask/alpha as the factor.


Map onto Non-flat Earth How do I put an image (Google Maps satellite view, flat to start with, later to be 3D topology) onto a part of a sphere?.  The map is of an Earth region a few miles long, and I’d like to model it as accurately as possible, e.g. the correct visible distance from a standing adult’s eye-level above surface to horizon.

What is the best way to do that?

Or is it necessary (or simpler) to define the whole sphere and then zoom the viewport and rendering view onto just the required part ?  I can see that for a uv sphere, this would imply a massive number of elements (faces/facets, nodes, edges...).

I've never done this, but I think you would get most accurate horizon distance, if you use UV Sphere with radius being average Earth's radius in your region and then work from there (remove all the surface area you are not going to need, subdivide faces at remaining region, apply uv texture), though its hard to tell if this method wouldn't be overkill or too inaccurate, depending on size of your region.

You can calculate Earth's radius at specific latitude with tool like https://rechneronline.de/earth-radius/

As for the textures - it is worth noting that no satellite photo is "flat" (like drawn map) and google maps doesn't display them on flat surface either - it is already mapped onto sphere, so you would have to map UVs "from view" (with viewport having as close settings as camera that took original image), again - maybe more work than needed, depending on region.


How can I parent objects so that only position and not scale is applied to the children when scaling the parent? I've got this fairly complex setup of a tom-tom drum here. My goal is to be able to scale the drum to different sizes and have the models around it scale and move into position as required, so that a simple scale operation gives me different sizes of drum that don't look out of proportion.
Here is the main body of the drum (called a drum shell in real life). It is parented to an empty plain axes which is positioned at the centre of the drum itself. The body of the drum and the plain axes have their origin points at the centre of the drum too.

And the following is one of the drum lugs on the outside of the drum shell.

There is just one object here, but it is duplicated using an array and a mirror modifier. The array modifier creates the duplicates around the body of the drum, and the mirror modifier creates a duplicate set of those for the bottom of the drum. This way I can model a single lug and place it around the drum multiple times.
The lug is parented to a plain axes object (called the lug multiplier point in my scene), which is at the centre of the drum with a origin that is also at the centre of the drum. The array modifier for the lug also uses this as an object offset. This way, I can rotate this plain axes object in order to better position the lug duplicates around the drum - by dividing their count by 360 to get the Z-axis rotation value.
All of those elements are here:

The same thing happens with the lug tension rod, and the lug holes on the drum hoop, as in the following image:

Finally, I have the drum shell, drum skin, and drum hoop all parented. The hoop and skins are mirrored also, to create their relevant counterparts on the bottom of the drum.

So all of this works pretty well. I can change the number of lugs, tension rods, and hoop lug holes easily enough. I can also scale the drum and change the size of the hoop and skins along with the shell.
What I now want to do is be able to change the positions of the outer elements when scaling the drum, so that everything maintains it's proportion - the outer elements should not scale their size, they should just change position. I can't quite get this to work.
I've tried parenting the lug to the drum shell using object parenting but that just links position and scale. I've also tried parenting the lug to a vertex on the drum body. But I get a very odd result where the lug positions are completely out of whack. I think that's to do with the array modifier. I just can't figure this out.
Anyone got any advice on how to essentially shift the original lug elements across the X axis, away from it's origin point so that it maintains its distance from the outer shell? I'd like to do this based on scaling the shell if possible.
If I edit the lug in edit mode and shift the vertices manually across the X axis, then I get the repositioning behaviour I want.

You can actually parent to a vertex to achieve something like this.
I would probably parent empties to the vertices where you want to add a child object and you can then use constraints (such as 'Copy Location', 'Copy Rotation') or make that empty a parent of your child object to link your child object to there.
To achieve this, create the empty and move it to the location of the vertex. Select the empty, hold Shift and select the 'parent' object. Hit Tab to go into Edit mode (you should now be in Edit mode with both the 'parent' object and the empty selected). Select just the vertex and press Ctrl+P to Make Vertex Parent. The empty should now be linked to that vertex.
Next simply add a 'Copy Location' constraint to the 'child' object to copy the Empty's location (this is similar to parenting) and a 'Copy Rotation' to the 'child' to copy the rotation of the 'parent' object. This way it will stay at the location of the vertex but with the rotation of the parent object, ignoring all scale.
I hope this makes sense - only limited time to submit this answer. I can add more detail if this seems helpful (unless someone else wants to add a more detailed answer along similar lines).


How to set options before script execution Let's say I want to create UI for addon which allows to choose options (eg delete meshes only) before script execution. How can I achieve that? I know about F6 panel (and options in the T-panel) but it works only after I run a script.

You can also register properties on bpy.types such as WindowManager, Scene etc., add them to a panel together with an operator (will appear as button) and pass the value of a global property (bpy.types) to the operator as operator property:

import bpy

class PrintSomeString(bpy.types.Operator):
    bl_label = "Print Some String"
    bl_idname = "object.print_some_string"
    bl_options = {'REGISTER', 'UNDO'}

    print_this = bpy.props.StringProperty(name="Print this")

    def execute(self, context):
        self.report({'INFO'}, self.print_this)
        return {'FINISHED'}

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        layout.prop(context.window_manager, "some_string")

        props = layout.operator(PrintSomeString.bl_idname)
        props.print_this = context.window_manager.some_string

        props = layout.operator(PrintSomeString.bl_idname, text="Print welcome message")
        props.print_this = "Welcome to Blender!"

def register():
    bpy.utils.register_module(__name__)
    bpy.types.WindowManager.some_string = bpy.props.StringProperty(name="Some String")

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.WindowManager.some_string

if __name__ == "__main__":
    register()

(Adds a panel to the Object tab in Properties Editor)


Extrude (vertex/edge/face) along axis? I`m trying to extrude an edge from a simple plane(or box or any other simple object) but Ctrl+E in edit mode then dragging on the yellow handle just moves the extruded edge around without any restraints. I found something about Axis Locking which I couldn't get to work in 2.8. The same issue seems to exist when extruding faces and vertices.

The workaround I found via some tutorials: dragging out the edge then canceling before committing, then using the gizmo (W) to move in a certain direction. I`m sure that's not how it's done but tutorials and docs didn't yield anything useful on the matter (maybe bad search skills in which case I apologize in advance)

E< to extrude followed by the axis you want to constrain to. So E Xwould constrain to the X axis.

Alternatively E to extrude and hold down the middle mouse button and that also constrains.


Copying from the info header in Blender 2.8 I'm just getting started with trying to script with Blender (currently in 2.8), but, in the very first steps I'm really confused why the command directly copied from the info header doesn't work. It is the code that Blender ran, and it's not working in the interactive console.

EDIT: It seems that the interactive console is giving the wrong context while we switch our mouse location from the properties panel to the interactive console, i.e. the context changes when we change our mouse location to various viewports of the blender file. So, How do we set the context for the specific parts of the viewport? In this case, to the properties panel. If possible please provide a list of all the possible values that can be input, or possibly a link to it.

That's just how it is. It is not perfect. Some operations reported in the Info panel require a specific context to run and will not work in scripts or from the Python  Console, then there are a few that get reported incorrectly there as well. It is often helpful to see the info panel, but there are limits to its usefulness. See the documentation if you need to find a specific function or ask another more specific question describing what you want to do here if you cannot find the answer elsewhere online first.


How to add an object to the scene through python I have an object that I got by accessing bpy.data.objects[] by its index. I later call .copy() on this object to copy it and it works, I get a copy but it isn't added to the scene, how would I go about adding the copy to the scene?

I figured it out:

bpy.context.scene.objects.link(object)


Is it possible to pin distinct Bones of a Model to a Plane while posing? I need several poses and would like to know if whether it would be possible to pin the feet or hands of a model to a plane (as floor or wall) while animating excercises like squat or push-up ?

If IK would be the answer: Setting an inverse kinematic constraint usually allows me to move the legs by moving a foot, but I want it the other way around. I used rigify and I'm still intimidated by the complexity of this rig, how should I setup the IK chain (without breaking it) ?

A meta-rig created by Rigify is set to forward kinematics by default. With the settings shown in the n-panel on rig-foot.ik.L/R it possible to move the body with the foot on floor by only moving the rig torso (shown in 2nd img).


Cycles. The object doesn't show the material I want, but other, how do I delete unwanted materials? I modeled Plastic Plate in Blender, then added Clear Glass Material, also render in Cycles, but it doesn't show the glass material. See the result in the image below at the left-hand side. My question continue at the second or Image 2.
Image 1.

Here I render the object in Blender, everything was fine to me. Why it can't work in Cycles, or how to do make it to work?

Image 2.

Then in the image below; how to delete these materials. See Image 3.

Image 3.

just make sure no Object use your material you want to delete . Unset from all objects in your scene .
then go to file>Clean up > purge all
save your project
close and re-open .
Do it times to clear Scene completely .


I can't go back the Panel with the original options to create an object I'm not sure how to explain my question so I have some Images.

When I first create the object the panel Sapling: Add Tree shows up but if i then go and do something else the panel disappears.

I cant seem to find a way to bring it back does anyone know how

Thanks

Once the original object has been created, and has gone through some kind of transformation, there is no way to get the original creation parameters panel back


mirror modifier doesnt work Help I want to mirror something in blender with mirror modifier but then happens that
I use blender 2.78a

Make sure you first have applied transforms (Ctrl+A) , and then make sure you have your object center on the center line of the grid. You can do this by snapping the cursor to the object's center (Shift+S > Cursor to Selection) in Object mode and then snapping the object to the cursor with Shift+S > Selection to Cursor in Edit mode.

Then in Edit mode move your geometry to align to where it should be on one side of origin point by X axis; the Mirror modifier should show the mirrorred part on the opposite side. If mirrored part has to be connected to original enable Clipping in Mirror modifier settings.


How to discretize a 3D mesh to generate a 3D binary matrix I apply the algorithm proposed by TLousky discretize a mesh to discretize the entire mesh. I get this result

import numpy as np
import bpy, bmesh
from mathutils import Vector
print('Start')
def check_raycast(ray_origin, ray_destination, obj):
    ''' This function casts a virtual ray from "ray_origin" to
        "ray_destination", and finds any intersections along
        the ray's path with the mesh object referenced in the "obj" param.
        If there are any intersections, it will return True, else False.
    '''
    mat = obj.matrix_local.inverted()
    f   = obj.ray_cast(mat * ray_origin, mat * ray_destination)
    loc, normal, face_idx = f

    if face_idx == -1:
        return 0

    return 1
matrix=np.zeros((76,76,88));
#the size of the cube (voxel) is 2*2*2 cm
i=-1
for x in np.arange(-.75,.75,.02):
    i=i+1
    j=-1
    for y in np.arange(-.75,.75,.02):
        j=j+1;
        k=-1
        for z in np.arange (0,1.75,.02):
            k=k+1
            c = bpy.data.objects['Cube']
            o = bpy.data.objects['modelPerson:Body']
            bpy.context.object.location[0]=x
            bpy.context.object.location[1]=y
            bpy.context.object.location[2]=z

            # Generate bmesh object from cube mesh data
            bm = bmesh.new()
            bm.from_mesh( c.data )
            bm.edges.ensure_lookup_table() # Generates edge   index table
            bm.verts.ensure_lookup_table() # Generates vertex index table
            intersectsMesh = 0
            for e in bm.edges:
                # Find the global coordinates of each edge's two vertices
                coos = [ c.matrix_world * v.co for v in e.verts ]
                # Set these verts as ray casting origin and destination
                ray_origin, ray_destination = coos
                if check_raycast(ray_origin, ray_destination, o):
                    intersectsMesh = 1
                    break
            insideMesh = check_raycast( c.location, Vector( (0,0,1000) ),  o )
            print( "Intersects: ", intersectsMesh )
            print( "Inside Mesh: ", insideMesh )
            matrix[i][j][k]=   insideMesh|intersectsMesh
            print("value",  matrix[i][j][k])
print("max value of matrix before reshape ", np.max(matrix))
matrix2=matrix.reshape(1,16*18*16);
print("max value of matrix ", np.amax(matrix2))
'''I reshape the matrix for using savetxt() after I can reshape the matrix using Mathematica'''
np.savetxt('3DMatrix.csv', matrix.reshape(1,76*76*88),delimiter=',')
print('finish')

here is my code

You're getting this because of the matrix[i][j][k]=   insideMesh|intersectsMesh line.

The "insideMesh" test is currently not accurate enough: If the cube intersects with the mesh at a certain Z height, the "insideMesh" test will also be true for all the Z (k) values below that height in that matrix column (that have the same X and Y values), since the test is based on a ray cast straight up towards (0,0,1000).

You can fix this either by replaceing the or | with and & (which might require smaller cubes but nor necessarily), or by making the "insideMesh" test more robust by checking for intersections with all 6 possible directions:

directions = [
    (0,0,1000),
    (0,0,-1000),
    (0,1000,0),
    (0,-1000,0),
    (1000,0,0),
    (-1000,0,0),
]

insideMesh = len( [ i for i in range(6) if check_raycast( c.location, directions[i], o ) ] ) == 6


Help with 3D modeling So I'm new to blender, but I've gone through the Blender Guru video series and did all that fun stuff.

So I've set out to make a mod for Fallout 4, but I've run into a couple of issues with my mod that I'm hoping someone here can help with.

So my goal is to overhaul all the bullets, cases, and cartridges with HD versions and so far it's going good, but there are a couple of aspects of my meshes I wish to improve on.

So first off, how would I go about making the type of crimp goorves seen in this bullet? I'll add a comparison of my high poly mesh as well for comparison. The crimp is very complicated and I'm not sure what method I could use to replicate it in my mesh.

Create a black and white Displacement Map in image editing software.

Add six Edge Loops CTRL+R. Then select the two inner Edge Loops and Scale them in press S and then SHFT+Z to keep them from moving on the "Z" axis.

Using Cycles create a new material and bring the Displacement Map in to the Image Texture Node (Set this to Non Color Data).

UV Unwrap your bullet using Cylinder Projection. Open your Displacement image then Scale and position the UV Map to fit the image.


How can I get a Depth of field render pass? How can one make a render pass with black and white data to display depth of field based on the Settings > Camera dof settings?
I want to blur or defocus in the compositor, similar to the way it is done with the Z pass but with a more accurate dof information that is based on a target, as opposed to distance away from the camera.

I tried to fiddle with the settings in a new Render layer, overwriting the material, but I have been unable to achieve a render pass effect that outputs something useful.

Defocus node
There's build-in support for focusing on objects using this node.

In the Properties editor under Object data (with the camera selected):
In the Depth of Field panel, add your Focus object.

Camera Object Data, Depth of Field settings

When setting up your Defocus node, enable Use Z-Buffer.

Cycles DoF
Cycles also has built-in support for DoF. Again in Depth of Field panel, set your Focus object and now increase the Size.

Aperture Size
Also called lens radius. If this is zero, all objects will appear in focus, while larger values will make objects farther than the focal distance appear out of focus.

Creating a black and white depth image

In the Node Editor:

Add | Vector | Map Value (or Shift+A,V,M) and connect the Z-pass.
Right click on the Offset value and select Add Single Driver.

In the Properties shelf (N) of the Driver section of the Graph Editor:

Change the variable type to Distance and set the two object to the camera and your target object.
Set the script expression to -var.

Back to the Node Editor:

Adjust the Size setting in the Map Value node.
Add | Converter | Math(Shift+A,N,M), set to Multiply and the values to -1 and the Map Value node.
Add | Color | Mix (Shift+A,C,M), set to Screen and connect the Map Value and Math nodes.


Modifying my rough hard plastic material for photo realism I spend way to many hours on trying to find a working node setup for my plastic material. I tried using PBRs, suggested node setups from Stack Exchange for Blender 2.7 and less, but nothing really worked. Can anybody suggest some tips for tweaking?
Subject:
Optical fiber connector (MTP)
Problem:
Realistic rough plastic material

You could try a setup like this. Some things to note - First, as you can see from the graph, Bump Nodes facilitate Normal inputs, and Displacement Nodes are used for Displacement. Displacement doesn't have quite the effect in EEVEE as it does in cycles, but it still does has some effect (especially with Ambient Occlusion turned on).

On the topic of Normals, the contrast of generated textures (Such as a Noise Texture), is far too high to be able to plug directly into a Bump Map at full strength and still have it look "natural". As you can see in the graph, I mixed the result of a Noise Texture .996% with pure white. and I still had to reduce the strength of both the Bump Node and the Displacement, otherwise it still looked too strong.
Although I know it breaks the rule of Metallics/Dialectrics, I found the materials benefited from a slight increase in the metallic values, to work in conjunction with the roughness to make the reflections (or sheen) look a bit more realistic given your lighting setup.
Lastly, as you can see, I mixed some Ambient Occlusion "shadows" with the base color, which allows for some extra perception of detail while keeping the Normal Strength on the subtle side.
To save you the trouble of setting up all the nodes again (as I have already done it), I will post your .blend  with my modifications, so you can see the results without too much effort, and can then decide whether something like this works for you.
File is here -
As a final note - I know the example I used is in EEVEE, but it works just as well in Cycles.


how to realign a bone when a lot of constraints are used I'm trying to rig the wing of a bird (I'm following the piero training course of the CG Cookie) and I noticed that two bones are out of place. Since the author of the tutorial used a lot of constraints and became a mess for a newbie to understand,I would like to know if there is a method to know how to fix the bones that are misaligned when a lot of constraints have been used. thanks.

There is no automated function for fixing false constraints, because there is no way blender knowing whether this constraint is doing it's intended job right or wrong. You have to fix this manually.

The only automated feature, is "clear transform" (type it after pressing SPACE). but this only resets your animated translation, scale and rotation and will most likely don't fix your problem.

You actually have to manually click through every bone and disable and enable the constraints (by clicking on the eye icon of the constraint), to find the wrong constraint and fix it by hand.


Selecting and removing particular objects I have a script that takes in positional data and creates a cube based on their positions. Each time I run the script, I've noticed that the old cubes are still showing up in the User Perspective. It's a pain to go through each cube and manually delete them.

I've googled for a while to find a solution to no avail. I know that

for ob in bpy.data.objects:

Allows me to iterate through the objects in the scene. I get

Camera
Cube
Cube.001
Cube.002
...

but I don't know how to use the API to select only cubes to remove and I don't know how to remove them. Is unlinking the same thing as removing the cubes from the user perspective?

This should do the trick, first iterate through everything in your scene, next check if it is as mesh and check if it is a cube (by name using the first 4 chars), then remove it. Also, make sure you are in object mode when running the script.

import bpy

scene = bpy.context.scene

for ob in scene.objects:
    if ob.type == 'MESH' and ob.name.startswith("Cube"):
        ob.select = True
    else:
        ob.select = False

bpy.ops.object.delete()

Unlinking an object from a scene does not remove it entirely.

Condensed version of the same script thanks to CoDEmanX.

import bpy
for ob in bpy.context.scene.objects:
    ob.select = ob.type == 'MESH' and ob.name.startswith("Cube")
bpy.ops.object.delete()


How to bake in EEVEE? Cycles baked texture is atrocious! BTW: I am a complete noob in Blender, sorry if this is a silly question!

From what I've found, it seems you can only bake in Cycles. Does anyone know of a way to bake materials in Eevee? When I baked in cycles, the output texture was very low quality, and had a lot of noise and blurriness. It also had strange edge glitches :C (See last image)

CYCLES

EEVEE

Comparison between Eevee render & Cycles Baked Texture

Set more samples for less noise.
Set identation in uv map than you remove the seams, if you need only colors select in the bake menu "diffuse" and deselect all checkbox except "color"


Blender model keeps squishing my vertices I am working on a arch viz model for work and this is my first time doing arch viz in blender aside from a few tutorials.
I have been trying to UV unwrap my model but every time I do it squishes some of my vertices together on a flat plane which messes up my texture mapping.
I am relatively new at this and I don't know how to fix the model so I can texture it properly, I've tried manually unwrapping it with seams and it has the same issue.
Any help would be appreciated thanks!

It looks like there are some places where the distortion is focused.  There's someplace where Blender just can't give us a flat map, and it's distributing the distortion across the map a bit to make it so that no one place is awful.  If we enable sync-- those doubled diagonal arrows in the upper left corner on my UV editor below-- then select the distortion plus a bit more, and hide everything else, we can get a closer look at the problem area:

So when we look more closely, we can see that there are some places where we have what amounts to an unseamed box, at this particular doorway.  Let's seam appropriate edges so that we can unwrap this without distortion:

The selected areas are places that need seams.  One way to think about seams is where we'd need cuts if we were going to wrap this object up for Christmas. For things that are roughly box-shaped, sometimes I think about making fold-up dice as a craft project as a child.
Now that we've created a few more seams, we can unwrap and see how we did.  Don't forget to unhide everything if you don't want to create more islands than you need.

Much better!  There are still a few issues which you didn't ask about (those lines stretching across the UV map).  You should take a look at those as well, using UV sync to find them and then hiding stuff so you can see what's happening.  (Hint: they're due to non-manifold geometry.  You can find non-manifold geometry by using the "select non manifold" operation and learning what its options do.)


How to set Frame Range automatically to video length How can I set a End Frame of blender movie clip editor to match the end time of the video (without trying to search the End Frame of video)? Currently when I'm importing the video, the End Frame is set to 250 instead of ~600 which my video is currently having.

Your problem - from a VSE point of view:

You want your End Frame Range to be set to your newly imported Footages length.
The solution:

While still hovering over the VSE view press PageUp.

Hover your mouse over your timeline and press E to match your End Frame with your Current frame. (Blenders Hotkeys are context sensitive)

Note:
Make sure, the function Use Preview Range is unchecked if you want your Scene Frame Range to be set accordingly for your final Render.

Further explanation regarding your situation:
You want to achieve this in the MCE directly. Which is possible via some Python code. But for a quick manual workaround just import your MCE Clip into a VSE via Add (Shift+A) - Clip - <Movie Clip Name> as it will produce the result you want in the MCE as well. The Frame Range used is the current Scene ones which is applied to both the VSE and the MCE. You could delete your VSE Strip of the MCE clip afterwards if you don't want it to be rendered out.


Is there a way to automatically translate position of vertices to normalize to 0-1? I mean every vertex position should be between 0-1.

I use Monogame so I can't use scaling (button S). I decided to make a model which would have vertices position between 0-1 and then scale it.

Do you mean, that every x-, y- and z-coordinate of every vertex in your mesh should have a value between 0 and 1? If yes, here's the solution (fully in the 3D Viewport):

with your Mesh selected in object mode apply the scale of your model (Ctrl-A then click Scale)
set the origin to be at the center of the bounds of the object: Ctrl-Shift-Alt-C, then click Origin to Geometry, hit F6 and choose in the Menu after Center: Bounds Center
open the properties shelf on the right N
you see a panel called Transform. In this panel you see a property called Dimensions:. choose the largest value of the three and change it to $1$.
under Scale: one of the three $1.00000$ will have changed. Copy that value by hovering over it and pressing Ctrl-C
Paste it over all other $1.00000$ in Scale: (hovering over the value again and pressing Ctrl-V)
Under Location: set every entry to $0.5$ (you can set the first and copy-paste it like explained before.)
Your Mesh now fits perfectly into the box from 0 to 1 on all axis. Lastly you can set the origin if you want to $(0,0,0)$, which may be useful for Monogame later. Do this by applying the location of your model (Ctrl-A then click Location)
Additionally you can apply the scale, but that's depending on what Monogame requires. (Ctrl-A then click Scale)


How can I check the returned boolean of a function? I am attempting the check whether a function returns True or False in order to procede to the next step of a separate function.

For example, here is a stripped down version of what I have:

def target(modifier):
    if modifier == 'MIRROR':
        return True
    elif modifier == 'ARRAY':
        return False

def execute(self, context):
    if target is True:
        print("True")
    else:
        print("False")

This does not work, though. How can I check what the return boolean of target() is?

The way you are doing it in the second block is not what you think you are doing.  The line

if target is True:

will ask if a function reference is the same as a literal True...which it is not.  You want to invoke the function, so use the parenthesis and pass in the string you want.
If the parameter "context" is the one you are interested in comparing (if you are using BPY, it isn't, heads up), it will instead be:

if target(context):

Notice I drop the is True", if is doing that for you already, you don't need to do it again.


Blender cameras convention I would like to create cameras looking at origin uniformly distributed in a sphere. I got most of it right...but the cameras are looking away from the origin. I know I can get it right by a certain combination of rotations, but I want to be sure that what I am doing is 100% correct. Can someone familiar with this help me point out what's the right way to do it?
By changing the lookat slightly in the "wrong" way I can get what is expected result. However, what I would like to do is apply the coordinate transform matrix to the camera matrix after the "right" lookat is computed(right lookat==x-right,y-down,z-forward,i.e. the cv convention).
There is an additional problem with the code that looks right. The camera scale is negated for some reason. I thought scale is not affected by transform matrix. Having negative scale causes some other problem when I am converting the camera back to cv work.
looks wrong but should be correct?

looks right but wrong.

code to create cameras
import bpy
import bmesh
import random
import math
import numpy as np

from mathutils import Matrix

def sphere_golden_spiral(num_pts=1000):
    from numpy import pi, cos, sin, arccos, arange
    indices = arange(0, num_pts, dtype=float) + 0.5
    phi = arccos(1 - 2*indices/num_pts)
    theta = pi * (1 + 5**0.5) * indices
    x, y, z = cos(theta) * sin(phi), sin(theta) * sin(phi), cos(phi)
    points = np.stack((x,y,z),axis=-1)
    return points

def norm(v):
    return v/np.linalg.norm(v)

def lookat(eye,at=np.array([0.,0,0]),up=np.array([0.,1,0])):
    z = norm(eye-at)
    x = norm(np.cross(z,up))
    y = np.cross(x,z)
    z = -z
    view_mat = np.zeros((4, 4))
    t =np.array([0.,0,0])
    t[0] = -np.dot(x,eye)
    t[1] = -np.dot(y,eye)
    t[2] = -np.dot(z,eye)
    view_mat[0,:3]=x
    view_mat[1,:3]=y
    view_mat[2,:3]=z
    view_mat[:3,3]=t
    view_mat[3,3]=1
    return np.linalg.inv(view_mat)

def rotx(a):
    from math import cos,sin
    return np.array([[1,0,0,0],
                     [0,cos(a),-sin(a),0],
                     [0,sin(a),cos(a),0],
                     [0,0,0,1]])

def roty(a):
    from math import cos,sin
    return np.array([[cos(a),0,sin(a),0],
                     [0,1,0,0],
                     [-sin(a),0,cos(a),0],
                     [0,0,0,1]])

def rotz(a):
    from math import cos,sin
    return np.array([[cos(a),-sin(a),0],
                     [sin(a),cos(a),0,0],
                     [0,0,1,0],
                     [0,0,0,1]])

def cams_sphere(points):
    points = np.array(sphere_golden_spiral(points))
    group = bpy.data.groups.new('Trg_sphere')
    context = bpy.context
    for i in range(len(points)):
        p = points[i]
        bpy.ops.object.camera_add()
        cam = context.object
        cam.name='Traj_sphere_%i'%i
        transform = lookat(p*10)
        #print(rotx(math.radians(-90)))
        #transform = np.matmul(transform,roty(math.radians(-180)))
        cam.matrix_world = Matrix(transform)
        group.objects.link(cam)

cams_sphere(100)

I'm assuming that this is not a math.se question,  but a blender.se question, therefore [frame challenge] I'd suggest to use the builtin types and methods.

If you want to know why your math doesn't work, Blender.SE might not be the right place.

I will add some more tips to restructure your code, but take them with grain of salt, as I am no software dev.

I would also discourage the excessive scoping of types from imports at the start of functions. I can see at a glance that np.sin is a numpy function, but have a hard time otherwise.
The x, y, z tuple in the sphere_golden_spiral function was barely readable.

  PEP: Limit all lines to a maximum of 79 characters

Separate the lookat function from a "position" functions. Right now the lookat function produces a matrix containing the position. This is not very intuitive.
Use enumerate if you want both index and object. (Not range(len(...)).)
If you want to multiply your numpy array times 10, don't multiply the individual elements, multiply them all at once.
Replace look_at with the built-in to_track_quat.
Use the built-in Vector, Quaternion and Matrix types.

A modified script.

import bpy
import numpy as np
import mathutils

def sphere_golden_spiral(num_pts=1000):
    indices = np.arange(0, num_pts, dtype=float) + 0.5

    phi = np.arccos(1 - 2*indices/num_pts)
    theta = np.pi * (1 + 5**0.5) * indices

    x = np.cos(theta) * np.sin(phi)
    y = np.sin(theta) * np.sin(phi)
    z = np.cos(phi)
    points = np.stack((x,y,z),axis=-1)
    return points

def cams_sphere(num_pts):
    points = sphere_golden_spiral(num_pts) * 10

    for i, point in enumerate(points):
        bpy.ops.object.camera_add()
        cam = bpy.context.object
        cam.name='Traj_sphere_%i'%i

        cam.location = mathutils.Vector(point)
        cam.rotation_mode = 'QUATERNION'
        cam.rotation_quaternion = cam.location.to_track_quat('Z', 'Y')

cams_sphere(100)

Obviously, you can use the longer (possibly more stable) version with a matrix multiplication.

        bpy.ops.object.camera_add()
        cam = bpy.context.object
        cam.name='Traj_sphere_%i'%i

        location = mathutils.Vector(point)
        rotation = location.to_track_quat('Z', 'Y')

        mat_loc = mathutils.Matrix.Translation(location)
        mat_rot = rotation.to_matrix().to_4x4()

        cam.matrix_world = mat_loc * mat_rot


Shadow artefacts when rendering with bevel-modification When rendering with bevel-modification some parts appear non-beveled on the shadow side of the object.
This doesn't appear when using the "manual method", ctrl-b. File attached: spraycover.blend
What is going on, how can I prevent this?

It is possible that you have duplicate geometry, or that the corners are made up of 2 unconnected faces. To clean up your mesh, you can try Mesh > Clean Up > Merge by Distance. This will "snap together" all vertices that are within a certain distance of each other.
If this doesn't solve your problem, you might have to manually inspect the faulty areas of the mesh. Select the  vertex you are having issues with, and move it out of the way to see what's going on. This might help you understand how the mesh is connected, and what is causing the problems.


Blender Cycle's z-coordinate vs. camera-centered z-coordinate (orthogonal distance) Rendering a scene and writing the 'Z-buffer' into an EXR file using 'Blender Cycles', I get a depth map. That depth map differs from the depth map which is
produced by 'Blender Render'. Given its shape, I was assuming that the depth
map corresponds to the 'sight ray's length'. However, that did not work out.

I derived my formula as follows:

ys [px]: y-coordinate of the pixel
cy [px]: y-coordinate of the principal point.
d  [m/px]: density, i.e. length / pixel on the camera sensor
           (y_size [m] / y_size [px])
f  [m]:  focal length
zs [m]:  length of the 'sight ray'
zc [m]:  orthogonal distance to lense's plane
         (z-coordinate in camera centered coordinates)

Then,

$$z_c=z_s\cos(\alpha)$$

assume

$$\alpha=\arctan\frac{(c_y-y_s)d}{f}$$

applying

$$\cos\arctan(x)=\frac{1}{\sqrt{1+x^2}}$$

delivers

$$z_c=\frac{fz_s}{\sqrt{f^2+(y_s-c_y)^2d^2}}$$

But, that does not seem to work out. What am I doing wrong? What would be the formula?

The aforementioned formula is the correct, only that Blender provides the depth at $(x+0.5, y+0.5)$ at pixel $(x, y)$. The general solution is

$$z_c=\frac{fz_s}{\sqrt{f^2+((c_x-x)^2+(c_y-y)^2)d^2}}$$

respectively with the offset:

$$z_c=\frac{fz_s}{\sqrt{f^2+((c_x-x-0.5)^2d_x^2+(c_y-y-0.5)^2)d^2}}$$

if density in x and y differs:

$$z_c=\frac{fz_s}{\sqrt{f^2+(c_x-x-0.5)^2d_x^2+(c_y-y-0.5)^2d_y^2}}$$


Texture Paint window not showing any light I have an object(chair) and light in my scene, everything works fine in object/edit mode. I can switch between display methods and the lights/color change accordingly. But when I click the chair and go into TexturePaint mode, there is no more light/shading. A metallic material will be pure black, an image texture will show all the colors completely flat.

Changing to Lookdev or Rendered Mode doesn't help either. Any idea why this is happening?

Thanks!

In case someone comes across this, I finally found the same problem asked before with an answer that solved it: blender 2.8 texture paint material mode not showing shaded object, just flat color is shown?


Reset Normals directions to object rotation after applyed scale I hope im not missing something easy,but i have this problem.

Was moving with gizmo by normals this object and was all right.Had to Apply Rotation and Scale,and after that the normal gizmo just reset and i can only move it like if its on "global"(Transformation Orientation bar on the top centre),wich is crazy bad in this case

How to set them back to the right value ?

I saw an answer saying to duplicate before applying,then use Data Transfer mod to set that back..Now i dont know it sounds like a workaround(maybe im wrong,it just sounds that way to me))is there any other method maybe just some option or shortcut or something like that ?

Thanks in advance,and sorry for bad english

Are you in object mode or edit mode? Either way, applying rotation resets the orientation of the object.  But what you can do (and this is better) is use the 3D cursor tool to snap the 3D cursor to the geometry, and use 3D cursor transform orientation. You can create an empty with the 3D cursor's rotation and create a custom transform orientation, too. It will create the orientation from whatever is the active selection.


Bake texture from view I have a wooden crate with textures and all. Its hard to explain. I want to turn this (figure1) into this (figure2) the only way i can think to explain it would be projection baking. Where i project my 3d view into a new image to get my desired image. Im trying to lower my poly count so i need to take the second images 3d view and actually turn it into an image so that i can use a single poly on it instead of multiple. Its hard to explain.  So like if you just finished making a hight poly model with textures and its unwrapped and everything. Then you make a low poly. If you switch to the high poly front view and were to take a picture then that is what i would want the image to be for the low poly.

Fig 1
Fig 2

Create a new material
Create a new texture
Now set your Type: to Image or Movie, Open up your Image then set your coordinates (under mapping) to UV
Lastly UV unwrap your mesh, unless it's already unwrapped then that's fine.


How to make stripes on a cylinder I'm trying to make a Saturn V rocket in blender 2.8 but I have some difficulty with making stripes on a cylinder.

I'm trying to make the black and white stripes of some stages but I don't know how to do it. I tried with UV Map but my cylinder has too many edges so it's hard to modify the UV map. I also tried with wave texture, mapping and color ramp nodes but I can't adjust the position of the stripes and if I change the scale it just adds more stripes.

Does someone have an idea of what I could do ?

While it's certainly possible to do this procedurally (as the comment from HenrikD is suggesting) I think I'd probably do this via material assignment.

It looks like you already have sufficient numbers of faces on the cylinder to pick the appropriate width, so I'd put an all black material on some faces and an all white material on others.  The white material is simply the default I get when I press the New material button, and the Black material is that default but with the colour changed to a very dark grey.

First add the two material slots (button marked 1) and then with the slot you want (probably Black, assuming the object starts out White by default), select some faces in Edit mode and press Assign (button marked 2).  The Assign button will only show up when actually in Edit mode though.

Here's what this looks like in edit mode (lookdev):

And here's the result in object mode (lookdev) with overlays off:

This way you can specify exactly which faces you'd like black and which faces you'd like white.  This works very well for cylinders as they tend to have faces exactly where you want to separate the materials, though you may need to plan ahead to have a number of faces divisible by the number of stripes you want.  A procedural solution would not have this issue and would be better in some other ways, but requires more setup and tweaking.

If I needed this to be a single material UV mapped texture, I'd then probably bake it out to a diffuse texture map.  I think explaining the process for doing so is a bit long for this answer but you can check out the blender manual on the subject or find one of many video tutorials on that subject, but I'll link one or attempt to expand the answer if requested.


Why there is no light coming inside from the window I have made the model with Archimesh addon. I want light should produce voulmetric type from the window inside the room. I have used spot as light source and strength as 100 default. But there is no light coming inside the light. What setting im missing so that light should transparent the glass windows.

Besides the glass issue pointed out by @Timaroberts your model has lots of problems The most important one is that Materials created in blender internal will not work on cycles, you need to create new materials using cycles shaders.

Then: Unconnected nodes have no effect.

Never connect nodes on a redundant loop (see the red line?)

Then you have a big box with a solidify modifier surrounding all of the "room", so that even if your materials were correctly set, that box would not let light through the glass anyway...

Fix all of that before you can have volumetrics... to set it up read this post:

Atmospheric lighting in cycles


Making first intricate mesh on my own after tutorials, need some pointers I have done a number of Blender tutorials and feel confident in making my first complex mesh. I am attempting to model a drum machine that I own. It's almost all simple shapes, nothing with a lot of contour or texture, so I feel confident about this as a first project. I am using background images from renders that the company use as promotional photos as I model, so I know everything is roughly to scale.

I am not wanting step by step directions from anyone, but rather general tips and advice to help me move forward. I have done tutorials that are more complex than this, but obviously I wasn't using my noggin for those :)

The drum machine is an Analog Rytm

I have created the body and faceplate as separate objects. I have modeled the nuanced beveling that the body case has under the faceplate through subsurf + mean crease. The faceplate also has a subsurf modifier. I created the drum pad indentations with a mixture of loop cuts, mean crease on certain surfaces and extruding them downward to make pockets. I am running into a road block on how to progress next: my idea was to tackle the sixteen buttons along the bottom

I am wanting to clear up the subdivisions that using loop cuts has created. When I click on edges I want to clear and use "dissolve edge", it removes the edge but it also turns the faces into warped textures that I can not use loop cuts on anymore. Here is a small screenshot that illustrates what I mean. From what I've seen on other forum posts, dissolving the edge is making that face no longer a quad so its unable to interact with loop cuts anymore ... do I have that right?

My dilemma: how do I keep cutting into the faceplate to make room for the buttons in a way that won't make the faceplate increasingly difficult to work with? Also, what would be the best way to make circular + oblong cuts into the faceplate for the rounded buttons? Also, have I gone about making the faceplate the wrong way entirely? I was basing this off of a laptop tutorial I followed since it handled building the keyboard in a very easy way, and since this has a number of buttons it seemed like a good guide to emulate

One element of the eventual solution might be to model each button group as its own mesh and then join the different button groups into a complete object at the end of the process (and keep a copy of the separated versions in a second .blend file in case you need to make some tweaks).

Loop cuts are not the ONLY tool available to you.  Subdivision (of faces or edges) can be of considerable utility as well.  However, it can lead to inconvenient temporary situations if you do things in the "wrong" order.  Expect to do things inefficiently for many many tries until you get a feel for the "right" way to do things.  It is just part of the learning process.

Yes: non-quads can be inconvenient when dealing with subsurfs.  Their problems are mostly concealed when they happen to be coplanar will all their neighbors, so you can exploit that.

Another thing you can exploit is that loop cuts try to be straight across, but you can relocate some of the edges of the loops in another part of the mesh to deal with different button dimensions or spacing.


Using joint angles to animate a character I work on modeling of human locomotion, I have a physical model of walking that runs on a gazebo like software (ODE based). I extracted the joint angles of a walking cycle in a file and want to use that to animate a body in blender.

I have an already rigged model in blender and I would like to animate the model using the joint angles extracted from my model. I need some hints, because I am new to blender and don't know where to start. I guess it should be possible to directly access the armature from python for example and specify the orientation of each joint. Is that possible ? Is there any tool or example showing that ?

Many thanks

Yes it can be done, no I don't know any existing examples. The best I can think of is the bvh import script or the Motion Capture tools addon.

Blender's python api is available online but you may find it easier to use the autocomplete feature in the python console.

As a hint to get started -

bpy.data.objects['metarig'].pose.bones["head"].rotation_mode = 'XYZ'

bpy.data.objects['metarig'].pose.bones['head'].rotation_euler[0] = 32

bpy.data.objects['metarig'].pose.bones['head'].keyframe_insert(data_path="rotation_euler", frame = 10)

I can't say if this is the best or correct way to pose armatures by script.


Can't add rocks from Rock Generator Addon I successfully added the addon and enabled it:

But I can't execute it, because it is grayed out:

The blender console shows the following:

Calling the function to add rocks via Python gives the following error, if this is of any help:

Any ideas why this addon won't work?

Strangely, rock generator requires that you have an object selected. Try adding a cube, then it should be available.


Why aren't bpy.props defined on the WindowManager saved on permanently? I can create a checkbox with bpy.props.BoolProperty. I can set a default for it. True or False. Let's say we start with False. And my user wants the value to be True. Permanently. The problem is, when i restart Blender, then the bool is reset to the default value. And this also when i save the user preferences or the startup.blend

Is there a way to save the current state of the BoolProperty so that the user doesn't have to adjust it all the time?

Examplecode:

import bpy

class LayoutDemoPanel(bpy.types.Panel):
    bl_label = "Checkbox"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'

    def draw(self, context):
        layout = self.layout

        wm = context.window_manager # Our bool is in the windows_manager
        layout.prop(wm, "checkbox_bool") # Our checkbox

def register():
    bpy.utils.register_class(LayoutDemoPanel)
    #Our bool
    bpy.types.WindowManager.checkbox_bool = bpy.props.BoolProperty(
    name="A checkbox", description="Do this or that", default = False)

def unregister():
    del bpy.types.WindowManager.checkbox_bool # Unregister our flag when unregister.
    bpy.utils.unregister_class(LayoutDemoPanel)

if __name__ == "__main__":
    register()

The window-manager is an exception when it comes to data-blocks, having some characteristics that make it work differently then meshes, scenes... etc.

Can't be added or removed.
Its a singleton (there is only ever one).
Its not saved in the blend file (this is why properties aren't set on reload).

This can be handy, for example - this is used for the add-on and key-map search text fields.

For persistent data, its normally best to use...

the current scene (context.scene).
add-on-preferences
in a sub-directory of user resources (as json/xml/pickled data... etc).


Removing a few unwanted triangles and ngons/tsplines - is it necessary? I've got these triangles and ngon on my mesh.  Can anyone give some advice on how to make these quads and will it effect my mesh if i want to unwrap it?  Every time I try and dissolve or merge the verts I end up creating more triangles or tsplines.

I've tried seeing if the previous question Removing triangles and ngons might help but I'm still stuggling

Many thanks

Here are some ideas to try, since I don't know what the parts of the mesh outside the viewport look like.

For the first one:
1. Add the green edge via the knife tool
2. Delete the red edge (or merge the verts so it's effectively gone)
3. Combine the triangles in the bluish triangle.

This will leave you with one triangle but the rest will be quads.  If you want to eliminate the triangle, you could try adding the yellow edge and then combining the resulting triangles and you'll have all quads.

For the T-spline, I'd try to remove it if it were me.  If not, you're basically trusting Blender to deal with it because at some point it'll triangulate it internally to render, and it might not choose the edges ideally.  In this case there are many options, and any of the ones in this image would probably work ok.  Personally I'd probably go with the light blue one.

The green one is ok, but it will give you a triangle, if that matters.  The orange one would just give you a tiny triangle, but it might be small enough to not look bad.

Modeling is definitely an art and these might not be the perfect answers for your situation. I doubt it would affect your unwrapping even if you left it as-is, but your shading might be odd in the problem areas.  Hope this is helpful!


mesh rotation error after i attached the bones firstly , i create a toy with several boxes, then i create several bones

seconldly , i set the mesh's parent to any bone

and last, i found the body mesh's orientation changed by the bone, what's the problem with my model?

Once you've parented your mesh, you often need to corect the IK Pole Angle so that the mesh doesn't get twisted by the IK:

Also, always bend a bit the knees and elbows in Edit mode so that Blender knows how to bend these limbs once rigged:


Beveling with different adjecent faces I have a problem with the Bevel tool. I'm fairly new to Blender and don't know if I'm misunderstanding how the Tool works or just missing a point.

I have the following (simplest example) blend file :

This Object was created by joining two objects of different materials (Dielectric (green) and Conductor (blue)). After setting those materials and joining the Objects i removed the doubled Vertices. The result is the provided .blend file.

On this prepared object i want to apply a beveling with Offset:0.2 , Segments: 4 and Profile:0.5 .

This is where i get confused. Applying the Bevel with above parameters works as expected every where BUT the Top Edges of the middle part (middle part refers to the 3 faces in x-z-plane adjacent to the top plane between the 2 cuboid like bars).

My question is now : Why does it not work ?

After a while i tried "subdividing" the top face like the, above referred to as x-z-plane faces, and it worked for the middle part.

From this i concluded that:

The Bevel tool only works for edges that exactly share 2 Vertices.

Reason: The 3 faces define their own vertices ON the already existing edge of the top face. In this way only the left and right face share one vertex with the top face. This does not fulfill the above condition and hence the beveling does not work.

Am I right with that Conclusion ?

Thanks for all help in advance.

If I've correctly understood your question, here is an answer. Actually you can't automatically create an edge loops (and therefore a bevel) through a ngon, because as it's a surface with more than 4 vertices, by definition it can't tell what other edge it is supposed to cut through.


Problems with clipping I've managed to get my animation to a point where it works properly, now I'm trying to render it. When I go to render, or even to the Camera View in the 3D view, the scene is clipped and none of my objects are visible! I've tried altering the camera's "Clip Start" and "Clip End" values, doing so had no effect.

My scene in the 3D view:

The same scene, from the same perspective, in Camera view:

How do I get it to render correctly, even from the Camera View perspective?

Edit: .blend file available at http://www.pasteall.org/blend/36540

You changed the clipping value for the 3D View, but you should change it (with camera selected) in:


Extracting a UV layout I have a 3D truck model already textured and properly imported into Blender. This is a game model and I need to "re-paint" with design from other transport companies. The problem is that I don't have a UV layout (skin template) to serve as a guide for future paintings.

Is there a way to "extract" an UV Layout to .JPG or .PNG to serve as guide for .DDS texture editing?

Please note that I don't want to remap the model. I still want to use the actual UV Mapping and just need to edit the actual textures.

Yes.

In Image editor > Header > UVs, select Export UV layout:

This will take you to the file manager and allow you to set the export options:


How to make a foggy background I wanted to know how I can make this foggy effect on the background just like in the image below, that the far parts are hidden by the fog.

Thank you.

Another option is to surround your scene with a cube and give it a Volume based on a Volume Scatter node, with it's density controlled by the Z-Depth or View Distance output of a Camera Data node. In the example below, I used "multiply", as this gives the best generalized effect, whereas, "add" will make the fog "fill in" the caverns as the camera scrolls out. Have a try with both if you like.

This is the scene in solid mode:

As you can see, all I did was surround the scene with a cube, remove the surface color from the cube, and connect the Volume Scatter with a low density (governed by the Math nodes)


How can we create a Bar code with the Texture Node Editor? I had seen a post about how to create lines but one of the Answers by Lemon was excellent.. He used the Shader Node Editor to create a Barcode Generator.

Here is the Link: How to make a barcode like stripes texture

I would love to be able to recreate this within the Texture Node editor. I tried to adapt it but it's not the same..

waaow!! here is a zany bar code shader for eevee simpletons such as i


Particles System not showing up on Viewport I'm having some trouble with the Particles System here.
You guys may know the Grass Essentials pack by Andrew Price.
For those who don't know it, I have the scene below with some grass meshes in a group.

I'm trying to apply this group of meshes on the selected plane by their side, but (I don't know why) It's not working. By the pack default, the plane is already set with the particles system, but it's not showing up.

I have the file here in this link (Ball.blend - 25,087 KB): http://pasteall.org/blend/index.php?id=45847

If someone can help me, I would be very thankful.

You Particle System modifier has disabled visibility.

Go into the plane object modifier stack and turn on visibility for the particle system modifier


How can I increase the darkness of shadows without increasing the strength of the lamp? I want to create a shallow and dim lighting effect around my scene, but I also want the shadows to be slightly darker. Unfortunately the only method I have found to make shadows sharper and darker is to increase the strength of the lamp, which creates an extremely bright scene.

Is there any way to make shadows artificially darker?

Perhaps it's possible using the Shadow output of the Lightpath node but I couldn't do it.
What I could do, is enable the Shadow pass tick box in the Render Layers panel and then use that shadow pass to darken the shadows of the render with a mix(darken) node. Use a very small factor though as darken can be very intense.
Hope this helps you.


AI denoiser removing detail I've created a simple procedural wood texture for a ceiling fan I'm modeling. Unfortunately the usually excellent AI denoiser from 2.81 is smoothing out most of the texture details. Any suggestions for how to preserve the details better besides cranking up my samples a ton? Even at 1000 samples it washed out a lot of the details, though it was better.

Here's comparison pics, with a evee render up top showing the wood detail and the denoised image at the bottom.

And here's how I have my denoiser node setup based on tutorials I've seen (I'm not at all familiar with the compositor stuff so I keep wondering if there's something there I'm doing wrong).

AI Denoisers use algorithms to guess which pixels are fireflies, and what colour that pixel was supposed to be. The algorithms are limited to the data that it can collect from the Denoising Data and the surrounding pixels. Thus, if insufficient data has been passed to it (not enough samples), the denoiser will create a "washed out" effect where you're losing detail. In truth, the denoiser will almost always cause loss of detail, it's just that when the sampling is high enough, the loss of detail is negligible.

You haven't done anything wrong with the compositor nodes, you're going to have to increase the samples in this case.

If you're worried about render times, check out this video by BlenderGuru. It was created pre-2.80, but much of the content is still relevant.


"Add Action Strip" in NL animation panel is introducing mystery motion I have some unwanted foot movement in a standing character. I have looked for ages for the keyframes to adjust but can't find them. I then tried to add a "Copy Location" bone constraint to pin the foot to an empty but it still moves. I then thought of using the nonlinear editor to copy the action. Weirdly the unwanted foot motion comes back.
https://youtu.be/NEViNE4JLNE
Any ideas?

The original armature and the problematic one aren't identical: the thigh bones have a different pivot point.
In this kind of rigs (pure FK) only the hip bone has loc infos, all the others bones are driven by rotations, and by parent-child relations.
If you move the pivot point of thoose rotations, the animation will start to be screwed up.
To solve, move in edit mode the heads of the thigh bones up on Z axis until they return to their original location (if this is compatible with your character)
If this is not possible, you have to either manually adjust the animation or (better) create an IK chain to lock the feet movements.


Duplicating surface of cube adds a circle to it I have recently started learning 3D modelling in Blender and I am making model of a Rubik's Cube.

Here is what I have done:

Added Bevel and Subdivision Surface to the default cube for smoothing its edges.
Duplicated one face of cube so that I can color it.

But when I duplicate the face it gives me a circle on top of that side instead of exactly duplicating the face. What am I doing wrong?

Here is what I am getting:

EDIT: I am duplicating the face because I want to keep the grey boundary while apply the material in central area. I solved the problem mentioned above by adding 4 loop cuts to the face. But when I apply color on faces they all appear kinda jittery when I rotate the cube. Can anyone tell me why is that so?

This is because when you duplicate the face, it is now a flat plane and the subdivision surface modifier is treating it as a separate mesh and rounding it.

To get around this, you can disable or hide the modifier while working by clicking the eye icon  on the Subsurf modifier.

If I also understand what you are trying to do, it's also worth noting that you don't need to duplicate the face to apply a material to it or to modify it specifically. Objects can have multiple materials in Blender. You can go to the material tab, select a specific face, add a new material and apply it specifically to that face by clicking Assign.


Change pole angle without affecting mesh I have rigged a zombie, and when I change the pole angle it affects the mesh's flow. I have tried applying the armature both before and after changing the poles, but nothing works. Examples:

Is it possible to change the pole angle without affecting the mesh?

Yes the pole angle is messing the mesh up due to an IK Constraint. Disable the constraint, change the bone roll instead of pole angle, then re-enable and adjust pole angle to correct.


Membrane material in Cycles? I'm using Blender Cycles to model a strand of DNA. Ideally, I'd like to make certain parts of the model look like they're encased in a clear, sticky membrane, like this:

How would I make this material with the Cycles Node Editor?

More or less something like that ?

The membrane is simply a mix between glass and glossy and a manual adjustment of a fresnel node to handle the mix factor.

The DNA is base on the same principle, but with diffuse and emission :

But for the sticky effect this is mainly a displacement texture (a cloud texture) on the membrane :


Transparent Plane with Screw Modifier I'm having trouble making a plane using the screw modifier transparent, because "the plane" is shining through?
In this video, using an old version of Blender (2.78), it looks as easy as enabling transparency, and adjusting the alpha https://youtu.be/owid9yrq97s?t=2494
However in the "new" version of blender (2.92.0), it seems they've quite reworked the way materials work. I've created a material that uses an Emission and Transparent BDSF shader, through a mix-shader, so I can adjust the transparency, and while it's working great for "solid?" objects, it doesn't work for the object using a screw modifier:
I've tried to create a minimal example below:
Fac ("alpha") 1 is great. There is no transparency.

But when I adjust it down.. I get two different colors.

I'm using the screw modifier for the object, so I imagine that it's being drawn over itself? And that I'm seeing the object over itself. Because if I delete one of the vertices, like in the gif below, suddenly I get the color that I want? But then I don't get the shape that I want anymore.

Furthermore I would really like to keep using the screw modifier, so I can lock different angles to keyframes and do the "radial animation"-thing.
I've tried enabling Backface Culling, it has the same result as deleting the vertice: (I reckon it's probably not "the same," but it looks identical.)

Disabling "Show Backface" and "Backface Culling" gives this really weird color, that I believe is due to some clipping:

It feels like I'm missing something super simple, but I was at it for 4 hours the other day, and since I very recently picked up Blender, I'm simply not aware of what tools I have at my disposal.
I've tried searching online, but I'm just not sure what I should be searching for, "transparent plane screw modifier" isn't giving me anything other than tutorials on the "screw modifier" or "transparent planes."
Thank you.
PS: I am using the Eevee render engine. I don't know if this bears significance.

Alright, so I'm not entirely happy with this solution, but maybe I should be?
I've managed to work around it by.. enabling Backface Culling on the material:

I've been here before, but I also noticed that you can "flip normals" under the Screw Modifier:

Now I can duplicate the shape and remove the Screw Modifier:

.. and finally set the "plane with the screw modifier" as a parent object:

Setting it as parent isn't strictly necessary for the color part, but it makes it quite nice to scale and manipulate otherwise...

If anyone has a good solution that just uses the single object with the screw modifier, I would like to see that!
This feels quite hacky, but "if it's stupid and it works, it's not stupid"


Animation node get particle system points around a radius I'm trying to recreate an effect similar to this one:

As far my result:

My workflow is to create a spline using a particle system. The problem is that I want to use just points inside a radius i.e. for each point in the particle system, loop and create splines only with points with a distance less than, let's say, 10
This is my node system

I was thinking about using a script node, but the documentation for animation nodes it's not really clear about it

Welcome to Blender StackExchange! The Find Close Points node can be used here:

The max distance option defines the proximity of points as you want. This example is actually included in the documentation: