Render fails at tesselation with out of memory error Blender (Cycles) won't render the .blend file linked below with the new OpenSubdiv/Adaptive subsurface turned on.

In render preview, all is fine, I see "tesselating" pop by, it is done in no time at all. If I hit F12, Cycles goes into lockdown while it is tesselating. After about a minute, it comes up again with "out of memory error", with peak memory usage at about 0.05Mb. If I turn off the new feature, there's no problem (except I have to use the old subdiv modifier).

Would anyone know if there is a fix for this (yet), other than turning off Experimental features? (And yes, I know, it says "Experimental" :))

TIA,

Rob.

Blend file available here: https://www.dropbox.com/s/7tb31dm85hmw4rg/Hex%20Planet-tesselationerror.blend?dl=0

The linked blend file does not have anything connected to the displacement output, and the displacement mode is set to "bump". Are you sure you supplied the correct version of the file?

In any case, the most likely explanation is the preview vs render tessellation options. The default adaptive setting on the modifier is to subdivide until triangles are 1 pixel in size. In the geometry panel under render settings are some option to scale this setting:

The preview setting is "8", which increases the target size of the triangles by a factor of 8. Meaning Cycles will subdivide only until it gets 8px triangles. The render time setting of 1, however, does not scale the target triangle size. Cycles will keep subdividing until it either gets those single pixel triangles, or hits the subdivision limit (12 by default). Or, in your case, until it runs out of memory and pukes.

You can adjust either the subdivision surface modifier or the render scale setting in the geometry panel to target a less dense mesh (say, 2px or 4px triangles). If you start loosing surface detail from this, you can change the displacement mode in the material settings from "true" to "both":

Choosing "both" will further adjust the surface normal to fit a theoretical perfectly subidivded mesh, rather than the limited mesh you actually have. This creates a bump mapping effect which fills in the missing detail. As long as the sillouhette of the mesh is basically correct, this can be quite convincing.


How to render over camera border or overscan? i want to render over camera border, i don't know what it's called in Blender, but in Nuke it's called OVERSCAN which you can render outside the camera border (or bigger than the actual resolution) which then saved as .exr (exr can save area outside your visible resolution). Of course i'm not allowed to change the focal length. The camera tracking was done in Nuke and sent to Blender to build the 3d and i need to send the render files back to Nuke with exact focal length except i need to render beyond the border (overscan) because in Nuke it will be added lens distortion which will shrink the images (render files) a bit. If i don't do overscan , there will be a black around the images after applying lens distortion in Nuke.

So how can i do OVERSCAN in Blender ?

There is currently no builtin way to correctly setup an overscan. However you can simply use the workaround Andrew Price mention in his twitter feed from 2015.

  In the render dimensions set to 105%. Then with the camera selected, go to focal length, click edit, add *0.95 to end of whatever is current.

To add 20% to the image:

Go to the render dimensions and enter 120% under the Resolution section.

Then click into the focal length field of the camera and divide the current focal length by 1.2

This obviously won't produce a true overscan, like an .exr image supports. You'll have to add a Reformat node (centered) in Nuke manually.


Do Cycles nodes run on CPU or GPU? I've been looking through the blender source code and noticed that nearly all cycles shaders are programmed in OSL.

However, the Wiki mentions the following:

  It is also possible to create your own nodes using Open Shading Language (OSL). Note that these nodes will only work for CPU rendering; there is no support for running OSL code on the GPU.
  (source)

Does this imply that most of the Cycles shader nodes only support CPU rendering?

Cycles implements the shaders for both CPU and GPU through the shader virtual machine which can be found in /intern/cycles/kernel/svm. The same nodes are also separately implemented in the Open Shading Language (OSL) and can be found in /intern/cycles/kernel/shaders. For instance you will see that the brick texture node exists both as svm_brick.h and node_brick_texture.osl. OSL only runs on the CPU and integrating a OSO to SVM compiler was previously discussed but abandoned due to maintenance and performance concerns. Therefore your own OSL scripts have the same limitation and will only be executed on the CPU.

Note that using OSL is entirely optional and it's not enabled by default. OSL can be enabled in the Render Properties.

Additional information about Cycles can be found in the wiki. The articles may not always be fully polished, but they should be a good starting point to dig deeper into the code. The structure of Cycles source code is documented in the Source Code Layout page.


Mesh Noise Glitch in X-Ray Mode Blender Version: 2.91 (also 2.83)
GPU: Radeon RX 590 (with and without updated drivers)
Edit:
I stumbled upon the problem in another context which lead me to a way to recreate the glitch in a clean file:

Open Default File (named General)
Go to the material of the default cube (in Solid Mode)
Under Viewport Display go to Color and set the Alpha to anything else than 1
Add a new material

This creates the glitchy mesh seen in the image below.

Original Problem:
My viewport shows weird noise when I toggle x-ray mode only in solid view.
I had In Front (under Object Properties>Viewport Display) enabled for my mesh and after a lot of searching I found out that I can toggle the glitch by disabling that.
I cannot seem to recreate the glitch in a clean file though and I'm a bit afraid that something is broken in my file.
Things I tried before the "In Front" toggling:

deleting all vertex groups, materials, modifiers and all other objects in the file
switched from smooth to flat shading
cleared all marked edges
disabled auto-smooth
disabled all addons (and later used a clean install)

Changing the workspace resets the view but the glitch returns on toggling x-ray view.
At least when I export the mesh as an FBX file that seems to be glitch-free. Though that way I lose all my vertex groups.
Any ideas what is happening here?

The glitch appears to be a driver issue with Radeon GPUs, especially with recent Blender versions. It is, as of yet, unresolved.
Link to the Bug Ticket:
https://developer.blender.org/T83022


Cycles material node set-up for diffuse, specular, reflection/refraction, normal and illumination/emission map I have 5 different images one each for diffuse, specular, reflection/refraction, normal and illumination/emission map. Can someone please help me to set-up cycles material node including all the 5 maps to get the best physical render as possible? A screenshot after setting up all the nodes would be much helpful.

Here is how the maps you mentioned are usually arranged.

There is an error in the image, the normal map node should be plugged into both the glossy and diffuse shaders.

The diffuse texture is just plugged directly into the color of a diffuse shader.  The diffuse shader is mixed with a glossy shader using the spec map as a mix factor; for further control of the specularity I stuck an RGB curves node in to adjust the falloff curve, that part is optional.  The normal map is put through a normal map node which is then plugged into the normal input sockets on the shaders.  The emission map is plugged into an emission shader, which is added to (not mixed with) the rest of the shaders.  If your emission map is colored, plug it into the color of the emission shader, otherwise plug it into the strength and set the color to whatever you want.

Note: make sure all maps which are used to drive values (e.g. specularity), not colors (e.g. diffuse color), are set to non-color data.

I noticed that you said you have a specularity map, and a reflection map.  But I am not quite sure what the difference between these two maps is, since for cycles (as in the real world), gloss and specularity are the same thing.  And technically all surfaces you see reflect light (you couldn't see it if it didn't reflect light to your eyes); though what people usually mean when they say reflective is glossy.


Is it right to use Blender for such kind of animation? Animated caption for video I want to make animated caption for video. It will be in the lower third part of frame.

Example. https://www.youtube.com/watch?v=e0lpjHQRWEc&t=28

0:30. Two rectangles appeared - blue and light gray. Next step letters appeared on rectangles. Next step letters disappeared. Next step rectangles disappeared.

I am not going to copy one to one this animation. I want to use another colors, another font.

Is it right to use Blender for such kind of animation?

It will work. There are probably customizable effects in video editing softwares that will do a similar thing.

Cons

Blender isn't specialized for this kind of task. It is more generic to solve tasks like it.
Blender has no in built function to do this. You will have to build it from scratch using geometry or bitmaps.

Pros

You will have ultimate control over everything
Blender is free
The community is great

In a video editing software you can maybe find a title effect that is (almost) like this. You can edit the text. You can change the colors. You can maybe change the timing. But you may not get exactly this.

So it comes down to what kind of person you are, and how long time you have.

If you are picky, have time and want to get everything right. Use blender.
If you are less picky or are in a hurry. Don't use blender.


Saving UV mesh Selection Is there a way saving a selected UV selection so when I click on the selected area it gets the mesh active again? Most times I accidentally click off the area of the UV selection, and then I have to reselect all mesh of the UV area I want to map again.

Thank you.

This can be done via vertex group. As you choose your selection open "object data properties" create new vertex group and click "assign" now whenever you click on that group and choose select, your verteces will be selected again.


Material libraries in Blender 2.8 for Eevee Helo everyone! Is there any way to make or create a material library in the last version of blender (2.8)?
I just figurate out how to append the materials into a new file but would b super cool if I  could collect all of them in a typical library, as key shot can have.
If you have found a tutorial or a way go ahead and send it to me!
Thank you very much in advance!
Nerea.

Now, there is BlenderKit included right into Blender core add-ons. It provides free materials from online database through simple drag & drop.

The add-on also allows to upload user models and serve as library.


Editing an android screen capture video in blender I recently started video editing with the video editing function in blender.
Until now there was no problem, but today I made a screen capturing video on my android phone using the play store application AZ screen recorder. I transfered the video to my computer an imported it into blender.  The video is a mp4 file  1920x1080 p 30fps  and about 1 minute long, but after importing the video sequence editor showed over 6000000 frames.

After closing blender rebooting my computer and updating blender I tried importing the video again.  Now the VSE says my video is only about 1800 frames long  -  so that is good,  but if I want to play the video and watch it in the VSE preview window it seams frozen. I can hear the audio but the video isn't playing.

Is there any way to fix this?

Maybe try to change video format before importing to blender? Idk in which format the app is recording the video file, maybe this may cause issues. :)


Depth of Field with Grease Pencil Objects not working I have two grease pencil objects: one at origin and the other at Y: 92m (far back from the camera.) I'm trying to get the background to be blurred using the camera. (I know I can blur the object itself but in another scene I'm going to be moving the camera in between objects.) I'm using the Eevee render engine and I am in the Rendered viewport setting, but depth of field is not working. I have the camera focused on the character in front with an F-stop of 3.6.

I added some spheres to test if DOF was working at all, and it does work for the spheres.
(In eevee)

(In cycles with F-stop of 0.5)

Am I missing something?

Unfortunately Grease Pencil doesn't have true camera DOF enabled yet, but there are several workarounds available:

1) Add the "blur" effect under the "visual effects properties" tab and check "Use Depth of Field". The grease pencil object will then blur with camera movement(but it only blurs the GP object as a whole instead of parts of the GP object as in true DOF)

2) Convert the grease pencil object to geometry, which will then react properly to camera DOF: https://www.youtube.com/watch?v=Fl8PXZWnxr4

3) All grease pencil objects come with a depth map.  Use the "Defocus" Node and "lens distortion" node in the compositor.  You can download an example file of the node setup here: https://www.local-guru.net/blog/2019/7/13/grease-pencil-experiment-4---depth-of-field

It's likely that true camera DOF will be enabled in a future version of Blender, but for now these workarounds may provide the result you are looking for.

Hope that helps!


When I render something, there's an indent in the model, but when It's not rendered there is no indent. how do I fix this? I just can't find what's wrong

Here's the file of it, if that can help with it

There are some problems with your topology. Also, if you want to stay low-poly without any Subdivision Surface, you have to use the Auto Smooth, otherwise the twisted planes of your object will always create artifacts.

First of all, you have unwanted faces. If you go in Edit / Face Select mode, you can see some faces squeezed between faces. It has nothing to do with the problem you're talking about but anyway you need to correct that because it's not good to keep this kind of topology. It must have been created by some accidental extrusions. So select all your vertices with A and click W > Remove Double, it will merge all overlayed vertices and remove all these unwanted faces. It's not the only problem of your topology but it's the most obvious.

Now, about your problem: Your object is made of several planes that are not flat but twisted like chips, so, as you didn't smooth your object with Smooth Shading and Subdivision Surface modifier, which would have helped to smooth these surfaces, they do appear like triangles and not like planes.

If you want to avoid these artifacts you have several solutions, you can either:

Use the Smooth Shading (in the 3D view Tool panel displayed with T > Tools tab > Edit > Shading). But it will give non very aesthetic gradients as your object doesn't have enough polygons.
Keep this Smooth Shading but add a Subdivision Surface modifier so that your object has virtually more polygons.

But these solutions are interesting only if you want to give your object a smooth and high-poly appearance. If you want to keep it low-poly you should use this trick:

Keep your object Flat and with no Subdivision Surface modifier.
Go to the Properties panel > Data > Normals and enable Auto Smooth. The Auto Smooth option is supposed to determine the angle below which the Smooth Shading will happen, but in Flat Shading it will also make your twisted plane look flat and uniform.


How to align or mirror half armature I have installed Rigify Addon added the armature and scale and align the half of my mesh. I want to align the other half is there any option or mirror way the half armature. Any help or suggestion. Thanks

In edit mode, you can access to the "symmetrize" function:

Select the left part of the character
The use the menu "Armature">"Symmetrize"

It will work if the bones are correctly named (".L" or ".Left" suffix for the left part, ".R" or ".Right" for the right part).

Note that it is working also if the bones are not already created:

You can also use the "X axis mirror" option:

Note: all these functions work well if the armature is along X with no rotation. So if you have rotations, apply them before CrtlA and choose rotation)


Assigned material only shows up in Edit mode? quick question. I've assigned a material to the rim of the windows in the picture in Edit mode, but in Object mode they are overwritten. Why is this happening and how could I prevent this?
Window rim in Edit mode with material correctly displayed:

Window rim in Object mode where the material is overwritten by the brick material:

Your window rim material needs to be separate (and not the brick material).  Try putting a new material on the window rim and clear the UV mapped picture from it.
That's my best guess. A blend file would help reproduce.


Shoulder deformation when moving bone I downloaded this rigged model and works fine until I try to move the elbow above the shoulder. Whenever it goes pass the shoulder, the shoulder moves down.

Here is my blender file:

The rigging is bad, the arm has too much influence on the shoulder while the chest should be the only one to have influence on it with this kind of armature. I've made some corrections and it works "fine". Note that you could create a shoulder (last picture), it would make the rigging better i my opinion:


If I scale this part, I can see some empty space there If I scale it more, this empty space is more bigger. this other mirror part
'-'..help me.. how can I make no space there

From the looks of it you appear to be using a mirror modifier. To fix this tearing caused by scaling; enable "clipping" in the mirror modifier window.

Use the GIF below for an example:
https://imgur.com/pZNoMDe


Why does Eevee render hairs wrong in Blender 2.9? I am currently trying to make fur/ grass for a fantasy character using Eevee as the renderer (because Cycles really does not provide that much of a visual upgrade in this specific case).
The problem I am running into is that the hairs seem to merge together into an ill-defined blob. I thought this was because of resolution, but every other detail is so much clearer.
I have tried fixing the issue by decreasing the filter size in the render options, and nothing in the hair options seemed to fix this issue. Everything looks good in the preview, but the render itself fails. I also tried messing with near clip in the camera, which also fixed nothing.
Here is the link to the blend file: https://www.dropbox.com/s/jtf1esgqvd8o1ll/Dryad_Hair.blend?dl=0
Attached is a screenshot from the viewport (Which is my desired look)

and the render.

The viewport and the render being different likely has to do with the children settings. Change the number of children to be the same for render and viewport. If this doesn't work, check out the render and viewport display panels, then finally the Hair panel in the Render tab (as opposed to the PArticles tab).


Can the SVG export export edges? I would like to export the visible edges of a shape into SVG lines.
At the moment, I am only able to export lines that are made visible by lighting:

But I would like to export all the edges (for example the ones on top of the head here which were not rendered).
I accept answers for both 2.79 and 2.8+ versions of Blender.

Add-on Viewport to SVG can do this ... and many other things.
Tested with Blender 2.92 (2.93 will need attention ...)

Edit: Any add-on contains location info ... 3D View Editor > Sidepanel N > SVG tab


Bevel segments on bevel modifier not working properly i'm modeling a box with rigging in order to make it easier to get realistic effect but when i use the bevel modifier and increase the segments it doesn't curve the bevel edge it creates the bevel, but it keeps a straight angle and not a curved bevel.

This is the result i'm getting:

This are the bevel settings:

The intended result:

Thank you!!

Changing the Mitre type to Arc should resolve this.  You will likely need to do this for both internal and external, but play with the settings and see what works for you.


Why does an object with a glossy shader render in black? When I apply a glossy shader to the material of my text, the text becomes just black. Why?

I have lamp and everything, but the problem persists.
The text is red before I add the glossy shader.
I'm using Cycles render.

Thanks!

What you are missing is proper lighting and an environment to be reflected on the object.
Since this question gets asked a lot I'll try to address some common misunderstandings on dealing with glossy objects in general, this shoudl be helpful not only black shiny objects, but metallic or glass ones
A glossy surface is like a mirror.
When you stand in front of a mirror what do you see?
Yourself and whatever is behind you...
Do you see the surface of the mirror?
Hardly, unless is dirty, fogged or scratched.
If you shine a flashlight into the mirror what happens? Does the mirror get brighter? Or is the light reflected back at you? What should you pay attention to, lighting the mirror or lighting the objects that are being reflected in the mirror?...
Problem #1
Glossy objects render black, glossy material is not working "as expected":

A perfectly glossy object, with no roughness, will reflect all the light perfectly "as expected" If the scene has no environment or other objects, glossy surfaces will reflect... nothing: hence the blackness...
Problem #2
The glossy object is dark or I just see small bright dots
If my glossy objects are dark I can just add lights or make the light in the scene brighter and then my objects will not be dark.
Yes and No.
Adding more lights or making them brighter will not work as well, the tiny spots where the lights are reflected on the object will get brighter but the shape of the object will not be revealed.
Light rays hitting on a glossy surface or mirror like surfaces get reflected from the surface in an equal amount and a the symmetrical angle to the one of incoming light. – in comparison with diffuse reflection – in which the light gets scattered all along the surface of the object in different amounts on other directions, depending on roughness.
As an example:

Image by GianniG46
Light on a diffuse shader gets scattered all over the surface in many directions and reveals the complete shape of the object. All surfaces will reflect some light one way or another.

Light on a glossy shader bounces straight back or out of view, and will only visible in a very small part of the surface of the object: in this example is only a tiny little white spot.

So what that means in plain English is that that the lights, no matter how bright or how many they are in the scene, will only be visible at a certain angle. If they happen to be at the angle in which the light rays get reflected straight into the camera lens they will be visible as bright spots, but they are not really "lighting" the object.
Here's an example with a ridiculous amount of lamps, the more lamps the harder it is to understand the shiny objects.

Problem #3
If I just set the environment to be something else other than black things look odd and flat
Let's set the environment to be gray for example.

Yes! We're finally getting seeing the objects and reflections!... But wait.. it look very strange and flat indeed and I don't want a cartoon look...
Since the environment is irradiating light evenly in every direction it can be be hard to tell the object apart from the background. All surfaces are getting equal amounts of light she shapes are not clear.
In the image above there is some color on the glossy shader... but for other objects with no color, this kind of homogeneous lighting, the object could appear totally camouflaged: where the reflections are all essentially the same color and as bright as the background. To understand shapes we need a variety of values that will help our brain know if the object is straight of curved or if it has any depth.

OK I get it, but how do I see my glossy object properly?
To reveal the surface of a glossy object you need to reflect something on it.
In this case, a few large planes (or area lights) with an emission shader strategically placed at an angle to maximize reflections, will make our object finally look like something!

Start by placing a single very large plane with an emitter in the scene and see how is being reflected on the surface. Move it around the scene, and notice how the placement helps you reveal or not the shape and qualities of your object. Add additional emitters or just planes with a white surface. Find the correct placement for them. Having gaps in between the emitters/reflectors will help you reveal the contours and subtle shapes of the object.
But don't limit yourself to planes or lights, be creative. The challenge is finding something interesting to reflect on the surface of your objects!

Depending on what you are after, using an HDR image as the environment and light source might give you more natural reflections.

Look online for links on "how to photograph reflective objects",  The same techniques apply for 3D rendering.
You will realize that they all do the same: they are not just photographing an object, but mostly focusing on what is being reflected on the surface of the object.
This link might help: http://project52pros.com/2014pros/assignment-thirty-five-photographing-a-very-shiny-object/


How to loop material node animation? I animated parameters of the shader nodes in Cycles, now I need to loop this animation, but I can't find those keyframes in the graph editor.

Is it possible to see those keyframes in the graph editor?
Is there any other way to loop such animation?

Thank you!

To see the keyframes in the Graph editor select the object that has the keyframes.

To make a loop:

Press N to access the modifiers tab int he Graph editor. Then create a cycle.

That will create a loop for the keyframes automatically.

If you want to interrupt the cycle or make it start at a particular frame, play with the values for the Before and Ater.

A different way to do the same is using the Channel Extrapolation mode and set it to cycle.


How can I get the color in the middle of a face using Python? Say I have a mesh and I have colored the vertices using vertex paint, how can I then get the average of the colors or rather the color in the middle of the face or the color under the normal (shown below) using blender python?

In the middle of a face is an average color of all the vertices. For triangle this means:

Col_RGB = ((R1+R2+R3)/3, (G1+G2+G3)/3, (B1+B2+B3)/3)

Where each vert has color in form of (Rn, Gn, Bn) for n in (1..3).


Control transparency of image texture in nodes? Here is my problem, i am trying to recreate a handrawn painted texture, and for that i have to mix a crosshatch texture with a watercolour texture using ambient occlusion as the factor in the mix shader. but the crosshatch texture has a white background and looks odd against my watercolour texture.  is there any way i could make my crosshatch texture transparent? i also have a transparent png of the crosshatch if that works better.

Thanks in advance.

Change it from opaque to alpha blend under the texture box in properties, Then apply any sort of color related node, connect it to a mix shader with a transparent node connected too. Make sure your wire is black and white, if not just change it whith a color ramp. The topmost image texture, I'm pretty sure can be changed to your image beneath it, that way you don't see through the cube.


Mirror Causes Left Handed Local Transform Notice how the object local transform axes are left handed after the mirror.  Is this a problem?  It's a little odd for me from a python scripting, I often transform objects with python matrices.  Is it just that the word matrix represents a left handed set of axes?

So to test, I use the world matrix on each of these objects to inspect what Blender thinks is the positive local x axis.  Strangely, I get 2 different answers depending on how I ask what the local x axis is!

import bpy
from mathutils import Vector

X = Vector((1,0,0))
for ob in bpy.data.objects:
    mx = ob.matrix_world
    mxrot = mx.to_3x3()
    quat = mx.to_quaternion()

    print(mxrot*X)
    print(quat*X)

result:
Vector (1.0000, 0.0000, 0.0000)

Vector (1.0000, 0.0000, 0.0000)

Vector (-1.0000, 0.0000, 0.0000)

Vector (1.0000, 0.0000, 0.0000)

Turns out  the "problem" is that the scale was -1 after the mirror operator.   After applying scale, the coordinate system was right handed again.

-P


Addon for Particle System Trying to use 'GRASS FREE' from http://3dwolf.weebly.com/grass.html . But i don't know where to put the python file, I have tried many but it's not working... I am on mac!

To install a plugin in Blender:

1) Open Blender.
2) Select File > User Preferences or CTRLALTU.
3) Go to the addon tab, and select install from file at the bottom of the panel.
4) Then simply find and select your .py file, and press OK.
5) Activate the addon you want, then select Save user settings.


Make blender viewer look like 3D Builder So ignoring the measurements and the reflective grid floor is there any way to make blenders viewport look like that of 3D Builder? Having shadows cast real time and the mesh being that nice perfect white?

3D Builder:

Blender:

And I have already tried using a matcap and ambient to emulate the look; however, it is not the look that I'm trying to achieve.

Unless of course, you can change the strength of the matcap to make the white on it much stronger, or even create a custom matcap.

Blender Game Engine

While waiting for EVEE, Clay Engine and other things that are currently under development, this should be somehow possible with the good old Blender Game Engine. Here's a possible result:

First step is to switch the Engine in the Info bar (usually is on the top of the screen).

Real time shadow

Add a Sun lamp to the scene and go to the Properties editor and open the Object Data tab (sun icon). You'll see options that differ from the ones exposed in Blender Internal. If you enable Shadow, you should immediately see the cast shadow in the viewport once you have set it to Material Shading mode.

Here's a summary of the fields you'll have to work with:

You can now tweak the parameters of the rendering of the shadow (color, resolution, algorithm,..) to fit your needs.

In my example I parented the light to the camera (notice the dotted line in the previous image) in order to make it move accordingly to the view and not fixed with the scene. So light always comes from top left regardless the point of view as it happens in 3D Builder.

White material

For the whiteness of the materials, it's now just a matter of picking the right shade of white as diffuse color, bump up the intensity, and if you are not satisfied, also adding some Emission (called Emit in the material editor).


Animation of proportional editing deformation (cylinder to figure eight) I want to create simple animation where cylinder gets deformed into figure eight. I can do this by proportional editing turned on and moving both edges to the center, but animation keyframes won't "capture" that. Moreover, it would be better if parts of the shape were more "circle-shaped" - imagine 2 invisible cylinders and our cylinder wrapping them around when deforming. Maybe I could really simulate that with some physics modifiers?
Thanks in advance!

You can do it the other way around:

Create your 8 shape:

Once you are good, in Object mode, create a basic shapekey and a second shapekey:

Keep the second shapekey selected and in Edit mode, select all and right click > LoopTools > Circle:

Back in Object mode, use the shapekey Value to morph from the circle to the 8 shape:


Background picture in animation Im trying to make an animation like universal, but I don´t know how to put a backgroud picture that doesn´t shows the same all the time. For example, in the intro of universal the stars on the background change when the camera focuses in a different direction. someone knows how to do it?
thanks

Try a skybox, or skydome https://en.wikipedia.org/wiki/Skybox_%28video_games%29
or even a simple Import Image as Plane and warp it a bit, if you don't need a full 360.


Blender crashes in Manjaro Linux version I was curious, I was installing Blender from the Manjaro repos and it never loads at startup and gives me a SIGILL. My specs are as below:
██████████████████  ████████   greg@manjaro
██████████████████  ████████   ------------
██████████████████  ████████   OS: Manjaro Linux x86_64
██████████████████  ████████   Kernel: 5.7.0-3-MANJARO
████████            ████████   Uptime: 1 day, 2 hours, 47 mins
████████  ████████  ████████   Packages: 1745 (pacman)
████████  ████████  ████████   Shell: fish 3.1.2
████████  ████████  ████████   Resolution: 1920x1080, 1920x1080
████████  ████████  ████████   DE: Xfce
████████  ████████  ████████   WM: Xfwm4
████████  ████████  ████████   WM Theme: Matcha-sea
████████  ████████  ████████   Theme: Matcha-dark-sea [GTK2], Adwaita [GTK3]
████████  ████████  ████████   Icons: Papirus-Dark-Maia [GTK2], Adwaita [GTK3]
████████  ████████  ████████   Terminal: xfce4-terminal
                               Terminal Font: Cascadia Mono 14
                               CPU: AMD Phenom II X4 810 (4) @ 2.600GHz
                               GPU: NVIDIA GeForce GTX 750 Ti
                               Memory: 3075MiB / 16014MiB

The error I'm receiving when trying to start blender:
greg@manjaro:~
➤ blender --factory-startup
fish: “blender --factory-startup” terminated by signal SIGILL (Illegal instruction)
greg@manjaro:~
➤ blender
fish: “blender” terminated by signal SIGILL (Illegal instruction)

Granted, my system is old, but I also downloaded a recent version of blender 2.83.2 and that one works right out of the box.
So, I'm not sure how to debug this.

Ok, 2020-07-20 Blender update for Manjaro solved the problem.


How to Make Copy of Scene but change some things So I am working on a scene with objects, cameras, lights, paths, etc. My goal is to make almost a complete linked scene, however I want to change key frames, minor positional changes, swapping out assets. In prior attempts I made a full copy and that duplicated the entire material list, a linked copy doesn't work because both scenes change, and only settings would just be settings.
Maybe there is a workaround, perhaps saving a version of a scene, and then maybe you could go back to previous versions and change new ones? Perhaps make a scene linked, then unlink specific obj or animations.

Have you tried making an collection?
A - to select all, shift+D to duplicate, Ctrl+G to create new collection that is NOT Linked to the active scene.
See Blender Guru's Doughnut tutorial Part 5, Level 1 timestamp 2:07
https://www.youtube.com/watch?v=6OTX3ZdYvEA&list=PLjEaoINr3zgEq0u2MzVgAaHEBt--xLB6U&index=6
https://docs.blender.org/manual/en/latest/scene_layout/collections/collections.html

Too low rep to post as comment. Hope this helps.


How to make a tye die texture? Does anyone know how to do a texture like this?

I tried to do with a voronoi texture and overlay it with another voronoi node, but the problem is that the voronoi has always the same distance to each cell. I want the texture to be more dense in some areas and total white in others as it is in this shirt.

Thanks for any help!

The best way I'd do this is by mixing different noise textures with a Mix RGB node, and using a high contrast noise texture as the fac of the mix RGB node. I'd the add a color ramp at the end to get the colors you want.

The image below is a simple node setup mixing the two noise textures with a high contrast noise texture fac.

The image below is a bit more complicated, but is creates more detail in the texture, and more can be changed and customized.

This final one is to show how much you can do to modify the texture to your needs.

There is no specific hack to making certain textures. It is mostly just using what you have properly to make what you want. I hope I helped. If you have any questions let me know.


Need help with soft body physics for noodle legs character I've been trying to figure out how to recreate this character animation in Blender.

https://www.instagram.com/p/BU8x8TNhQbW/?taken-by=laurierowan

But I just can't figure out how to do it.. I have made the noodle legs with "Bezier Curves" and added "Soft Body" physics to them, so they look pretty much identical to the video I linked above.

My main problem is that I don't know how I can make the character's body attach to the noodle legs, and should the character's body be a "Soft Body" or "Riggid Body"?

Is it even possible to connect "Soft Bodies" to "Riggid Bodies"? Or is there another way to recreate this video?

Any help is highly appreciated!

I've been using Blender for modelling for around 1 year now, but just recently started experimenting with animation physics.

You can use the Soft Body Goal in conjunction with a Vertex Group to 'pin' one or more vertex to the 'body' of the character - either directly (using Hook to Selected) or via an Empty.

Start by creating your character's body - in my case I'll stick with the default cube.

Create a leg as a string of vertices. The simplest way of achieving this is to add a Curve/Path and convert it to a mesh (select it and go to Object/Convert To/Mesh. Position it and scale it so that it is roughly in place. Add a plane for the floor, make it a Passive Rigid Body, and add Collision in the physics panel.

Select the 'leg' and subdivide it so it's got sufficient vertices to bend realistically but don't subdivide too much - the distance between vertices should ideally be comparable to the eventual 'thickness' of the 'legs'.

Next, in Edit mode (Tab), select the vertex at the top of the leg, press Control+H, for the Hook menu, and select Hook to New Object. This will create an Empty and hook the selected vertex to it.

While that single vertex is still selected go to the Mesh properties panel, add a new Vertex Group (click the '+') and Assign that vertex to the group. You can rename the Vertex Group to something appropriate by double clicking it and typing the new name (eg, 'Pin').

Swap back to Object mode (Tab), select the Empty, hold down Shift and select the 'body' - so that both are selected, and Control+P and Set Parent to Object to parent the empty to the 'body'. Moving the 'body' should now drag the vertex along with it. Move the 'leg' in position so it starts the simulation in the correct place.

Select the 'leg' and add Soft Body in the Physics panel. In the Soft Body Goal, set the Vertex Group to the 'pin' vertex group you created earlier. Set Soft Body Goal Strength and Goal Stiffness to their maximum values to bind the vertex strongly to the parent - the other vertices will be affected only by the Soft Body simulation.

Add Active Rigid Body physics to the 'body' or animate it with keyframes. The soft body leg will follow the motion of the 'body', pinned by the single vertex. You can add some variation to the leg (which assists with it 'folding' rather than getting stuck in a vertical line of perfectly aligned vertices) by selecting all vertices in Edit mode and selecting 'Randomize' in the Tool panel and setting a suitably small Amount of random variation.

Adjust the Soft Body Edges properties to tune the begaviour and stretchiness of the soft body. For example, increase the Pull spring strength to 0.9999 and maybe increase Bending Spring to, say, 0.5 to give the leg some resistance to bending. Also consider enabling Edge collision so edges don't pass through sharp edges of rigid bodies.

To give the leg some thickness, enable Soft Body Self Collision. The self-collision is based around a series of spheres around each vertex that repel other vertices. The size of the 'collision ball' around each vertex is usually based on the length of the edges connected - setting the Calculation to 'Average' will use the average spring length for the radius of the collision sphere and this is further adjusted by the Ball Size setting. Setting this to 0.45 (the default) and Average (the default) results effectively in spheres along the length of the soft body leg that almost touch when the leg is straight. This should give reasonable results providing the distance between the vertices are of a similar length to the intended thickness of the leg -  otherwise adjust the Ball Size until you get the desired effect. Note, however, that ball sizes > 1.0 can produce strange effects since the ball will be larger than the neighbouring edge and will push away the adjacent vertices. If this occurs, reduce the number of vertices (so the spacing is close to the desired thickness of the soft body) and try again.

To generate a mesh around the 'leg' add a Skin modifier followed by a Subdivision Surface modifiers. To adjust the thickness of the 'skin', go into Edit mode, select all vertices (A) and press Ctrl+A or manually adjust the Mean Radius X/Y properties in the Properties panel (N). You can also add an additional Subdivision Surface modifier before the Skin to add additional smoothness to the coils (otherwise it can appear a bit angular).

Duplicate the same for the other 'leg'. Add Collision to the 'body' and adjust the collision on the 'body' and the 'floor' to set the 'Outer' Soft Body margin to match the thickness radius of the 'leg' - this will result in the appearance that the outer surface of the 'leg' collides with the surface (since it's actually the vertex that performs the collision, setting the 'Outer' to the radius of the soft body gives the surface a collision distance that matches what would occur if it were the outer edge of the soft body that was colliding).

Note : If you get strange behaviour with the soft body after changing the 'Hook' or the Soft Body settings, c heck the sequence of your modifiers since the order is very important. You should always have the Hook first, followed by the Soft Body, followed by the geometry modifiers (ie, Subsurface, Skin, etc.). In my case I used Hook, Soft Body, Subsurface (set to level '1' to smooth out the bends in the leg), Skin, Subsurface (set to level '2' to smooth out the Skin). It can also help to adjust the Soft Body Solver settings - decrease Error Limit (eg, from 0.1 to 0.01) and try increasing the Min Step (eg, 10 to 40) - vary one setting at a time and re-run the simulation to evaluate how this affects the simulation.

Blend file (free all bakes and re-run the animation to rebuild the Soft Body Cache) :


Is there a workaround for error: "Could not write image: Too many open files"? I'm on windows 10, version 2.79 of blender. I've rendered a small (<1080p) image and when I attempt to save it it fails with error:

Could not write image: Too many open files.

I have tried saving by using Image>Save As Image(F3) as well as rendering a one-frame animation. This error does not occur with any smaller projects. But this project contains 1,275 textures. I have tested up to 485 textures without issues. Deleting and removing a few of these textures doesn't seem to make a difference. Any thoughts would be appreciated. Cheers!

Message me if a blend file is necessary to solve this.

The workaroud that I have developed is as follows.

Render my scene.
View>Toggle Fullscreen Area
View>View Fit
Zoom in to a level where the pixels in the image are larger than the pixels of your display.
Take screen captures of each part of the image. (On Windows, Shipping Tool works well)
Stitch these together in an image editing software. I used Photomerge in Photoshop Elements.
Remove the border using a pixel color select tool and crop (in Photoshop Elements, the magic wand works well)
Resize your image to the original desired resolution. This is also an opportunity to touch up those nasty fireflies.
Save and share.

I hope this helps.


How do I make an object attract another object? I have a ball and a cube a bit above it. I want to make the cube attract the ball towards it. I am new to blender so how do I do it?

What you could do is: Create a floor, a cube, a ball. The cube and the floor are Rigid Body, Type > Passive. The ball is Rigid Body, Type > Active. Into the cube, create (A) a Force Field > Force. In the Physics tab, give it a Strength of - 100 or whatever negative value. Play the animation, the force field should attract the ball.


Can cycles Wireframe Input be coerced into displaying Tris, Quads and Ngons edit 2 years later: Here is an alternative answer that meets the desired end-result using FreeStyle.

Is there a way to make the wireframe input show the geometry as BMesh polygons instead of the raw triangulated mesh? The example below displays the wireframe of a mesh in edit mode (as you can see it doesn't have any triangles).

When I render the mesh it appears triangulated, but being able to show quads and ngons (instead of only tris) would be more useful to me.

As of yet it hasn't been implemented. Although there was no specific mention of improving the wireframe node, Thomas Dinges is working on some Cycles things this GSoC. I think it's just a matter of time before he, or another developer, gets to it.


Billions of loop cuts Been modeling for 1.5 month now, and realized that my biggest struggle in every model are proximity loops cuts. Particularily in this model when I wanted to "cut-out" sound pickups (green) I had to make somewhat of a couple dozen loop cuts, which of course affected other parts of the model (distorting the smooth shape, generating shape-ruining angles). So I wonder how do professionals handle this (probably one of the most common) problem? Do they also make a lot of loop cuts? Or would they in this case just add another cylinder mesh, and array-clone it into desirable amount of pickups? In this case I also read that it's a bad practice to have a lot of separate meshes in your model file as they affect file size etc. I saw some ppl using mean crease thing, but as I'm intending to sell my model on Turbosquid, such creases are prohibited.

The 2nd question is when I was cutting out the notch for pickup selector (red), new loop cuts went through the top surface of one of the knobs (blue), distorting their rounded shape. How would one go around that? Deleting obsolete edges creates N-gons which is obviously not acceptable, at least for Turbosquid CheckMate Pro.

Thanks!

You don't have to make several objects, you can keep all of your geometry in a single mesh, but if the pieces are separate in the real world referece, then separate them in modeling.
You must have misunderstood some of the guidelines, this also won't increase your files size. It will likely decrease it because you can use simpler geometry. You can also Separate P and combine CtrlJ meshes at any time.

Good models will have good topology and edge flow. The edge flow should also be subdividable. Topology-Guides on tumblr has very good references on this topic.

If you really don't want to use separate pieces in your geometry (although you should), there is no problem with using triangles in planar areas. If you absolutely only want to use quads, here is some ugly topology.

Start with the base quad, inset it, add a supporting loop on each axis.

Extrude it and  add additional supporting loops. Make sure, subdivision works well

For the top pieces, make a single one and duplicate them with the array modifier. During modeling, rely on mirror and array modifier, apply them only before exporting. The topology is going to be almost the same as at the base, but we can use the adjacent connections to our advantage.

Here is, how one piece could connect to an adjacent piece using the mirror and array modifier.

This would be the resulting geometry. It subdivides well, but is extremely convoluted with meaningless edges just for the sake of okay-ish topology.
Third time's a charm: Use disconnected pieces of geometry for disconnected objects.


Can a single object in an array be exported? Just wondering if a single object which is part of an array can be easily selected for export. I have tried in edit mode pressing the P key but can't work out how to quickly select every face in the object (I can hold down the shift key and LMB on each face but there are heaps of them).

To avoid unexpected behaviours, it's better to duplicate the object (Shift D) and apply the array modifier.
Then in edit mode there are several ways of fast selecting, some of them:
B to box select, C to paint select, L to select all the area where the mouse is hovering, Ctrl L to select all the geometry linked to the selected area, H to hide every unwanted or occluding geometry, Ctrl I to invert the selection, vertex groups select/unselect buttons (if there are vertex groups), Alt left click to select loops, ....
When all the desired area is selected you can press P to separate it into a new object and delete the duplicate.


How do I find out what tool a shortcut is triggering? I used to have problem with connecting two objects, because when I smooth the final object, there was a darker line on the connected parts (for example when I was making head, I've had eyes darker this way). Then I found out that I can get rid of it by hitting Ctrl+N, but I don't realy know what it does. I can just see that the lines are gone. So, what does Ctrl+N do?

In future, to find out what tool is being triggered by a shortcut, you can search in the 'Input' section of the 'User Preferences'.

Going to File> User Preferences (Ctrl+Alt+U)> Input, you can use the search field to search for tools assigned to shortcuts. The 'Filter Method' drop down box must also be set to 'Key-binding' for this to work:

This will yield a list of all tools in blender using that shortcut. For example, "ctrl n" would result in showing that that shortcut will 'Make Normals Consistent' for meshes in edit mode. 'Make Normals Consistent' will make sure all faces of the mesh are facing the right way and shaded correctly see: Render has strange artifacts. It also lists other commands that use the same shortcut such as 'Reload Start-up File':

You can also look in the bottom of the toolbar (T) in the 3D view immediately after using the shortcut to see what was triggered:


Creating an irregular array for these rooftop tiles I'm trying to create this pattern of rooftop tiles I saw while travelling, I'm pretty new to Blender so I'm trying to work this out using two arrays but I'm not quite getting there.
This is what I got so far

Are there certain methods I could use to achieve this pattern? Since they also have an offset of 50% on the x-axis.

Just offset it on multiple axis at once.

One Array modifier with X offset
Second Array modifier with X, Y and Z offset (you can also add start/end caps)
Third Array modifier to repeat this result


How to cull the backside of a mesh but keep the lights inside? First off: the "backface culling" option for materials doesn't seem to do anything.
Second: I got the effect I wanted (almost) by using the Geometry node to mix a Transparent shader with a Principled BSDF using Backfacing as the Factor:

I need to keep the lights inside the rooms "trapped". The light should not be escaping like it is. How can I fix this?

In your picture, lights look like point. try with out lights and change the color of cubes:
picture 1

secondly, add black ground with a material with many roughness: picture 2

And play with cube's nodes
according to me it's the only solution.


how to avoid gaps on the distribution of hair on a model? How do I get particle hair on a model I made, with out it resulting in many spots on the mesh with no hair at all?
Here is a picture of the problem.

Often the gaps are on the tail arms and legs.

Particles with Interpolated Children

Probably in some parts of your mesh, the particles (hair in this case) are not dense enough.

Interpolate option creates children based on the "main" particles properties (location, orientation...)

if these particles (main) are not enough, increasing the number of children would not help in filling the gaps. Notice how the spiral patter is similar to the one in your screenshots.

The image was made by adding a Particle system (Hair type) and tweaking the following values:

Emission Number = 100
Interpolated Display = 280

By disabling the Interplated children option, you can see the particles that actually are generated. These are the only one that will be truly affected by simulations, hair editing...the children will simply follow their properties.

You must ensure that the "main" particles are well distributed upon the mesh, and only at that point you can increase the overall density with childrens.

The image was made by adding a Particle system (Hair type) and tweaking the following values:

Emission Number = 4000
Interpolated Display = 7

Notice how the thinner part of the mesh is full of "guiding" particles.

Result:


What causes this mist pass glitch? The problem, and what I've tried so far

From the screen shot you can see that sky-blue from the mist color is leaking through the trees due to white spots that are occurring in the mist pass on the tree particles. I have no idea what is causing these anomalous white patches in the mist pass.

I created this very simple file to illustrate the problem, but the tree itself was pasted in from a larger project and was created using the Sapling add-on then converted to a mesh for particle use. I gave it a new and very basic leaf material, but the problem persisted, so I believe it is not a problem originating with the material. I tried increasing the number of bounces, thinking it was an issue with the transparency of all the leaf planes, but that didn't help either. I tried flipping the normals of the leaf planes, as well as checking "Double Sided" in the Mesh Context, but it made no difference. To clarify, I am using Cycles.

A similar issue

I found another question here that at first looked to be the same, but that person was using Blender Internal, and using hair particles instead of object particles. The solution is their case was specific to Blender Internal, it seems.

More details

When I tried reproducing the problem using simple cube particles I could not. It appears there is something different about these trees. It's quite puzzling. And notice that some parts of the tree have the correct mist depth while others have the problem. Also note that the problem does not show up in viewport rendering, only in the final render. It's not specific to particles either.

Thanks!

Multiple transparent planes with low Max Transparecy Bounces

The "Tree1" object is made by multiple overlapping planes. Their shading properties comes out from a sharp Mix of a Transparent shader and a Diffuse shader.

As there are multiple intesection and your Max Transparency Bounces is set to 8, light can't filter trough all the planes.

We can clearly see this by giving to the material a full Transparent shading.

More Bounces leads to the expected shading behaviour:

Now that the shader works as expected, you'll have no issue in Mist pass calculation:

Thought about Mist pass caluculation. I didn't find any evidence of the following lines in documentation, so take it as my (current) opinion, and feel free to discuss about

When Light reaches the max number of bounces stadted by the Light Path settings the simulation is "over". This means that the path tracer cosider the light information in the same way as the light would have reached the background. And as is considered "background", its mist pass value will be the higer possible (1=fullwhite).


How to properly texture this cylinder For some reason, this hollow cylinder gets textured differently than a normal cylinder, and it's auto generated as a column, just like doors and windows.
I like the way it looks better than texturing a normal cylinder, but it stops looking good at one point and the texture seems to clip.

You can see in the left column that at the bottom, it's well textured, but as it goes up, it becomes weird. It's a poliigon texture I applied with nodes.
What can I do to fix it, or achieve a result like the bottom part of the column?

In the Edit mode delete the top and bottom faces. As we do not need extra faces here.

With the edge selected. Select the top and bottom and any center edge with shift select

With the edge selected press Ctrl+E and select Mark Seam

Now Press A to select all Faces. Press U and select Unwrap

Drag and make a new window -> UV Editor

Click on the new button and navigate the image.

Now in the material tab -> New and select the image from drop down

Note : Before you process the above steps. Press Ctrl+A select Rotation and Scale

Click on the small dot -> image texture

Then click the drop down here (find the same texture you have used in UV editor)


How to illuminate the darkness inside glass objects in Cycles? My model has a clear plastic (or glass) dome with objects inside.  The objects appear dark.  I've tried the glass shader with color 100% RGB, with very small IOR, and using just a refraction shader.

I know Cycles has problems with caustics, but I just want broad illumination to fall clean through the glass.  The light-to-column path can ignore refraction, but is blocked or tremendously attenuated. The camera-column path needs refraction, and seems to work fine anyway.

This demo image offers all optical paths of interest:

light upon object, seen directly
light upon object, seen through glass (looks okay)
light through glass onto object, seen directly. This is the shadow on
the lit side of the column just below the glass tubing.  I expect
full illumination, but there is shadow.  There is some light, but
it's diffuse light from the floor.
light through glass onto object, seen through glass. This

I did at one point try non-progressive rendering, and find extremely coarse light where there shouldn't be shadow, but this is not a practical way to make nice images. I've even tried cranking up certain sampling settings to many thousands, but still get bad noise though less, at the cost of long render times. I  would like to finish my creations sometime before "Star Trek, the Generation After the Next" becomes real life, if you know what I mean.  The next image is an example. I think Transmission in Sampling was 5000, but not sure.

I'm using Cycles in Blender 2.67 on a quad core Linux machine, 16GB RAM. Machine limits have never been a problem for 3D rendering.

Possibly, I screwed up some setting when I made my startup file, and just need to fix it. OTOH maybe this is just a limitation of path tracing, or of the way Cycles does it. If that's the case, what to real-world Blender artists do when they need to produce images on a budget and schedule?  What is the practical real-world fix?

This may be caused by Cycles's rendering of caustics.
From the wiki, Glass and Transparent Shadows:

Glass and Transparent Shadows
With caustics disabled, glass will miss shadows, and with filter glossy they might be too soft. We can make a glass shader that will use a Glass BSDF when viewed directly, and a Transparent BSDF when viewed indirectly. The Transparent BSDF can be used for transparent shadows to find light sources straight through surfaces, and will give properly-colored shadows, but without the caustics. The Light Path node is used to determine when to use which of the two shaders.

To clarify the node setup a bit:

The Light Path node determines the type of the current ray being traced. For each socket, it outputs a 0 if it is not that type or a 1 if it is. Thus, getting the maximum of those two values is equivalent to a boolean inclusive-or operation. The Maximum node will therefore output a 1 if the ray Is Shadow Ray or if it Is Reflection Ray; this will cause the transparent BSDF to be used (as it is the bottom input of the Mix Shader). Otherwise, it will output a 0, and the top shader (the glass shader) will be used.

The following diagram demonstrates some of the various ray types:

The node setup used is part of a node group called "TrickyGlass," which you can see at the top. A node group is a reusable chunk of nodes that can be parameterized just like any other nodes – in this case, with the three inputs on the left – and output, in this case, a shader. Thus, you can use this setup in a node tree like any other shader node.

Here's an image using just a regular glass shader:

And after switching to the TrickyGlass node group:


Can't assign weights as expected Blender File Link I have been rigging a mushroom character having hands.The model has a mirror modifier. When I'm assigning weights automatically, in non-mirrored hands,i.e left hand, weights assigned well but also assinged weights of right hand in left hand bone. Whenever I move Left hand bone it moves both the left and rights hands. I flipped names,recreated armature from the beggining but the result is still the same.

What you need to do is apply the mirror modifier.  Then you can re-parent the bones to the mesh with automatic weights with no problem.
Hope this is the answer you needed.


Determining "hidden" values in nodes Assume you have a colour mix node that you are using to determine the roughness value of a Glossy BSDF. Is there any way to actually see the roughness value?
 Is there a way to see set values of nodes in general, if they are not set "in place"?

Plainly as a number, no.  Approximately, yes.

You can plug anything into the color input of an emission node and plug that into the surface material output.  This will let you visualize the values across the mesh in the viewport with rendered viewport mode.

There is a handy addon written by Greg Zaal, called node wrangler, which (along with a billion other useful things) will do this automatically by Ctrl + Shift + LMB (left clicking) on a node.

To make numerical values easier to distinguish you can plug the value into a color ramp node first, then you can create a colorful gradient in the color ramp which will make it easier to see the value in the viewport.


Making a circular fade to transparent with nodes So I have made my y axis of this plane 'fade' to transparent ...

any idea how I can set up some nodes to make it start fading from the blue circle and then be fully transparent by the time it reaches the red circle?

I have been trying a lot of different setups but can't seem to make a circular fade work

Any help is appreciated!

I think you need a simple circle (spherical)gradient, to control the transparency. Here a simple basic set up.You could add a math node before the ramp to control it, if the texture coordinate node is not enough.The texture could be, also,connected in the object space of the sphere,to let the transparency follow the object around


Animation: create a rotation around the object z-axis instead of global z-axis I'm creating an animation where I rotate an object, insert a LocRotScale keyframe (via the I key), select another frame, rotate the object again and insert a LocRotScale keyframe.

For example I use this:

Z, 190, Enter

Now I want to rotate the object around its own z-axis instead of the global z-axis.
I've found out if you press the [Z] two times you get the Local axis instead of Global.

For example I do this now:

ZZ, 190, Enter

The rotation is ok, but when I insert the LocRotScale keyframe it did the rotation, but not around the Normal axis, but it used the Global axis.

Any suggestion on what I'm doing wrong here?

Set  Rotation type to ZXY Euler, then the animation around the local axes works like a charm.

Here is an Example Blend File for inspection: http://www.pasteall.org/blend/31685


Why can't I plug in vertex normals to rotation of Object Transforms Output I have a node setup which allows me to retrieve the vertex locations of an icosphere and position instanced cubes at those locations.

The Object Transforms Output node has sockets that say location and rotation, when I plug in the vertex locations from the Object Mesh Data node the socket changes from location to locations, as does the socket that said object changes to objects which I believe is because its a vecorized socket.

Why can I not plug in the vertex normals to the rotation socket? It is also transparent which makes me think its vectorized, if I can't plug it in what needs to go inbetween and why?

Vertex normals are vectors (transparent blue) and Rotation of object is in 'Euler' format (transparent purple). So, you have to first convert Vertex Normals Vectors to Euler then you can plug into the rotation socket. There are two nodes in animation nodes which can do this, 'Vector to Euler' node and 'Direction to rotation' node. However, 'Direction to rotation' node has many controls so you can choose 'guide axis (here is 'x')' and 'track axis (here is 'z')'.

Vector to Euler Node

Direction to Rotation Node

:)


Counting amount of lines in a text object How would I go about getting the line count for a text object in Blender using Python?

Example:

Line 1
Line 2

Line count = 2

TextCurve.body

Split the text curve body by a newline. Count the result.

>>> D.objects['Text'].data
bpy.data.curves['Text']

>>> D.curves['Text'].body

'Line 1\nLine 2'

>>> len(D.curves['Text'].body.split("\n"))
2

for overflowing text,

one method to guestimate this would be to set overflowing textbox X size to desired width and Y size to 0. A copy of the object with only one character will have the height of one line.

import bpy
context = bpy.context

text = context.object
copy = text.copy()
font = copy.data = text.data.copy()
font.body = "0"
context.collection.objects.link(copy)
context.scene.update()
print(round(text.dimensions.y / copy.dimensions.y))
bpy.data.objects.remove(copy)

If there is line spacing then two lines will be 2 x line height + line space.  I vaguely recall a more accurate way to calculate font dimension, but have not fount the link.

Related Any idea how to fit text width to screen

Text.lines

Python console code.

>>> D.texts['Text']
bpy.data.texts['Text']

>>> len(D.texts['Text'].lines)
2

>>> for line in D.texts['Text'].lines:
...     line.body
...
'line 1'
'line 2'


Is there a way to make a shortcut comment the current line? I'm used to CtrlD commenting the current line rather than duplicating it.

This is easy enough to change in the user preferences, however it only works when there is a highlighted selection.

Is it possible to make this work even when nothing is highlighted, so the line with the cursor is commented?

You could create a custom operator and map the following to a shortcut.

bpy.ops.text.move(type='LINE_BEGIN')
bpy.ops.text.insert(text="#")

or if selecting the line is tiresome you can just automate the selection step then comment

bpy.ops.text.select_line()
bpy.ops.text.comment_toggle()

Creating a custom operator would look something like this

import bpy

class CommentLineOperator(bpy.types.Operator):
    bl_idname = 'text.comment_line'
    bl_label = 'Comment a line'

    def execute(self, context):
        bpy.ops.text.select_line()
        bpy.ops.text.comment() >> bpy.ops.text.comment_toggle() since 2.8

        return {'FINISHED'}

bpy.utils.register_class(CommentLineOperator)
bpy.utils.unregister_class(CommentLineOperator)

After that, you should be able to map a shortcut easily to text.comment_line.

To have this load at startup, just save it with a .py extension and drop it into your scripts/startup/ folder. See How could a single Python script run when Blender is started?.


function 'register' is not defined I am trying to run a custom script when Blender starts.

My script location is

  C:\Program Files (x86)\Blender Foundation\Blender\2.70\scripts\startup

My idea is to start a TCP server on Blender start up, but Blender is complaining:

  NameError: name 'register' is not defined

This is my script:

import bpy
import socketserver

class MyTCPHandler(socketserver.BaseRequestHandler):

def handle(self):
    # self.request is the TCP socket connected to the client
    self.data = self.request.recv(1024).strip()
    print("{} wrote:".format(self.client_address[0]))
    print(self.data)
    # just send back the same data, but upper-cased
    self.request.sendall("[MOVE]MessageReceived[END]")

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

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

if __name__ == "__main__":

    register()

    # Create the server, binding to localhost on port 9999
    server = socketserver.TCPServer(("localhost", 9999), MyTCPHandler)

    # Activate the server; this will keep running until you
    # interrupt the program with Ctrl-C
    server.serve_forever()

The script has a few issues, first indentation seems not correct and seems to cause the error (could be caused by copy and paste).

Python relies on the indentation of code because it doesn't use braces to separate code segments syntactically.

Before a class can be registered as an operator the class must be inherit from bpy.types.Operator or bpy.types.Menu (see the docs whether there're more options).

The socketserver constructor is not invoked.

Related:

https://stackoverflow.com/questions/3277367/how-does-pythons-super-work-with-multiple-inheritance
Blenders build-in text editor provides some examples of operators as Templates acessible from the Menu.


Where is the cleanup menu in 2.74? I can't find any sort of mesh clean-up menu. I'd like to be able to find Ngons/degenerated faces/ect. quickly on large, complex meshes. Maya is great for this (highlights their locations without auto-fixing them). Can Blender do this?

I've checked the manual. It says to go to Mesh >> Cleanup. Where is this exactly?

First, you need to be in Edit mode, then check the 3d view header (the bar at the bottom) of the 3d view and you will see the Mesh menu item.

Additionally, you can press Space and search for the operation you want to perform if you know the name.

You can use Select Faces by Sides[citation] to select all the n-gons like maya


"No suitable context info for active keying set" I m trying to make an animation using keyframes.When I press on "I"and location nd rotation,this error comes up no suitable context info for active keying set.
Plz provide a solution in a simple manner.I am new to this,so I need a descriptive answer.I need to know exactly what to do,what to press,where to find.

It seems to be related to to Keying Set ... see Blender Manual.

Try to delete under Scene Properties > Keying Sets > Keying Set (if accidentally created)

or clean under Timeline editor > Keying menu > Active Keying Set slot

... if not your case provide more info as Chris suggested.
Some useful links ...
What is a keying set and how does it fit into the animation workflow?
Why can I not keyframe this armature?


Select points down a loop with a script I am trying to write a script that will take a selected edge loop with a point at one end set as the active vertex, and make a separate vertex group for each vertex on the loop, numbered in order. From what I can tell, there is no tool in the API to work on edge loops in this way. I could load each vertex into an array and make a vertex group from them, but they would not necessarily be in the right order.

I can do it based on location in relation to something, but this may not work on loops that are not straight. I could also use vertex index, but this won't work if the indices are not in order. Before I go ahead with using one of these flawed methods, I want to be sure that there's no way to get the order of points down a loop. Can anyone confirm, or suggest another method of handling this problem?

You will have to use bmesh.

A bmesh object provides a much more advanced way of interrogating a mesh than as merely a set of vert/edge/face sequences.  Given only raw vert/edge/face data, consisting of indices and lists of indices, you could of course build your own model of the inter-relations between elements of the mesh, making several passes over the mesh, noting various states such as selection, deducing which vertex is 'neighbor' to which others, and so forth.  Thank Joe, you don't have to do all that.

All you have to do is bm = bmesh.from_edit_mesh(mesh), and that bm will have topological-relationship information already figured out.  For examples of what I mean by topological-relationship information:  You are able to ask a vertex for it's link_edges, and subsequently ask one of those edges for it's other_vert(vert) given the one you already have, to find the other, and then if it's selected, that is your next group.

There is even a selection history for you: BMesh.select_history, such that bm.select_history.active will be your group zero vertex. (If you are in vertex mode.)

While I can't write your script for you – only you know the particulars – I'd hate to leave you hanging without some code example, so here's a template I had from a while ago, from when I was testing some things in bmesh.  It's just a bunch of boilerplate, but it puts you at a convenient place to test bmesh things:

import bpy
import bmesh

class BMOPEX_OT_bmop(bpy.types.Operator):

    bl_idname = "bmopex.bmop"
    bl_label = "Bmopex:Bmop"

    def execute(self,context):
        ob = context.active_object
        mesh = ob.data
        bm = bmesh.from_edit_mesh(mesh)
        print("self,context,ob,mesh,bm:",self,context,ob,mesh,bm)
        return {"FINISHED"}

    @classmethod
    def poll(self,context):
        return context.active_object and \
        context.active_object.type == 'MESH' and \
        context.active_object.mode == 'EDIT' and \
        context.scene.tool_settings.mesh_select_mode[0]
        #                                vertex mode ^


Vector component in Python cannot exceed 10 radians I'm using this python code to rotate a bone in the blender game engine, the code works fine until bone angle reaches 10.0 or -10.0 radians then it stops

import bge
import mathutils

cont = bge.logic.getCurrentController()
armature = cont.owner

up_pressed = cont.sensors['up_sensor'].positive
down_pressed = cont.sensors['down_sensor'].positive
currentAngle = armature.channels['Bone'].rotation_euler

speed = 0.1
increment = mathutils.Vector((0.0, speed, 0.0))

if up_pressed:
    armature.channels['Bone'].rotation_mode = bge.logic.ROT_MODE_XYZ
    armature.channels['Bone'].rotation_euler  = currentAngle + increment
    armature.update()

if down_pressed:
    armature.channels['Bone'].rotation_mode = bge.logic.ROT_MODE_XYZ
    armature.channels['Bone'].rotation_euler  = currentAngle - increment
    armature.update()

print(currentAngle)

I guess it has something to do with the mathutils.Vector type but I can't figure it out.

is there another way to handle .rotation_euler data other than vectors?

I think the easy answer is just replace your actual rotation statements with an if statement that says something like the following:

up_pressed:

if armature.channels['Bone'].rotation_euler.y < 2*math.pi:
    armature.channels['Bone'].rotation_euler.y = currentAngle + increment
else:
    armature.channels['Bone'].rotation_euler.y = 0

down_pressed:

if armature.channels['Bone'].rotation_euler.y > 0:
    armature.channels['Bone'].rotation_euler.y = currentAngle - increment
else:
    armature.channels['Bone'].rotation_euler.y = 2*math.pi


How do I change strength of emission at Principled BSDF I want to keep the settings except emission and only change the strength of it like the emission node. Any ways?

Blender 2.92 + :
In the newer versions the principled BSDF shader actually has a field for emission strength, right below the emission color field. You can use it much like the simpler Emission Shader.
You can still input color values superior to 1, but there is no need anymore with the new strength field.

Older Versions :
You can manually input values higher than 1 in the red,green,blue fields of the emission color of the principled shader. Keep in mind that this is a workaround and will not mimic exactly how a classic emission shader works when you tweak its strength.

For ease of use you can use such a setup : Add an rgb node in order to input the exact color you want the emission to be, a value node for the strength of the emission, and link both of them to the color inputs of a mix rgb node set to multiply with a factor of 1, then set the output of the mix rgb to the emission input of the bsdf.


Animate two objects with different armatures I need to animate the weapon and the arms in the same project, but both of them are different objects with different armatures. How can I achieve this? Or maybe I can use just one armature for both weapons but export them separately (each armature should have their own mesh)?!

The weapon mesh is a child of the Weapon Rig and the arms mesh is a child of the Arms Rig.

For this I see two Solutions:

use for each armature an own animation
put all animations into a single animation

What is now the best to choose?

That depends on in which way you use these animations.

If your arm- or gun-animation is alway the same, then it is probably better to make seperate animations. But if the arm-animation is dependend on the gun (or reversed), then I suggest to put all animations into a single one.

For declaration:

Action ~ combination of animations that are working together

Examples: Idling, Aiming, Shooting, Reloading

Animation ~ A set of keyframes

Examples: IdlingArms, IdlingGun, AmingArms, AminingGun

OPTION: Use for each armature an own animation

Foreach Armature and foreach action you create an animation. Make sure you give your animations meaningful names.

Note: This option is simple but animating can get hard, because for each action you have to make sure, each armature has it's own animation. And you will have many animations to handle.

OPTION: Put all animations into a single animation

Foreach action repeat following process:

For each armature go into 'Pose Mode'
Go to the DopeSheet-Editor
Change Mode from 'Dope Sheet' to 'Action Editor'
Add a new Animation by clicking '+ New'
Maybe give your animation a name
Select all other armatures and select the created animation

Any Keyframe you insert will be in the same animation

In that way you will have the same amount of animations as you have of actions.

Note: In the 'Dope Sheet Summary' you will only see the keyframes from the selected armature.

I hope I could help.


How to triangulate both ways? (2.80) I want to triangulate all my faces (quads) in a way that it makes an X. Effectively making four triangles for each face. How would I do that without having to manually do it for each face?

Unlike "Poke Faces", it should not create a vertex in the intersection.

Select a square grid of faces.  Make sure that you have a face as an active selection.  Use the checker deselect tool (from search menu) to select a checker of these faces.  Triangulate and set "Fixed" as the method in the operator box.  Select inverse and triangulate.  Set "Fixed Alternate" as the method in the operator box.


How do I make a crescent? I want to make a perfectly round crescent but no matter how I tweak it ends up looking lumpy when I use a curve extrusion. As I subdivide segments and try to eyeball each point's radius scale... it just looks bad.

I am stumped how does one make a perfectly circular crescent?

Like this?

I used a bezier curve, The less points you put the smoother it is.


Lens specs of smartphones for camera tracking in Blender I've been trying to track a footage taken by my Samsung Galaxy Note 8.0 (GT-n5100) tablet. It has a good 5 mp camera and I tracked the footage well. But the problem arises at the time of solving the camera. The solve error is too high (more than 2). I don't know the width the tablet's camera sensor or the focal length or any other specifications. So my question is, has anybody been able to solve the camera on footage shot by a smartphone and if yes,  what camera and lense specs did you feed to the Blender?

For proper tracking you don't necessarily have to know the sensor dimensions or lens size. What matters is to determine the field of view or angle of coverage for your particular camera.

That value can then be applied to any combination of sensor size and lens sizes.

One way to get a good estimate of your camera's field of view it is to shoot video of an object of known dimensions, for example: a wall that you know is 4 meters wide. Using your camera, walk to the point where the wall fits perfectly in the frame. Then measure the distance from the wall to the camera (2 meters in this particular example).

In blender create a solid that reproduces your wall and place camera at the measured distance from the wall.

On the camera lens settings move the Focal Length numbers until you can see the wall filling the frame.

You can then use those values (lens and sensor size) for your track. The perspective of your real camera and Blender's should match very closely for tracking purposes.

(for even more accuracy don't forget to calculate the distortion for your lens. See: https://blender.stackexchange.com/a/15622/1853)


Vertex Coloring After Parenting in BGE I am trying to use a python script during runtime of bge to vertex color a mesh. The idea is to click the mouse and vertex color a mesh (the color is not uniform so I can't use object color). A simple version of the code is below and can be illustrated on the standard cube. Put in a logic brick for a mouse left button click and call it "click" along with a python controller running to this script.

cont=bge.logic.getCurrentController()
own=cont.owner
mesh=own.meshes[0]
click=cont.sensors["click"]
if click.positive:
    vertex=mesh.getVertex(0,1)
    vertex.color=[1,0,0,1]

This setup will color one vertex red. However when I parent the object to an armature (single bone) the code fails to do anything to the mesh.

If anyone can tell me where I am wrong or what I can do to achieve the end result in another way please let me know.

cont=bge.logic.getCurrentController()
own=cont.owner
mesh=own.meshes[0]
click=cont.sensors["click"]
if click.positive:
    vertex=mesh.getVertex(0,1)
    vertex.color=[1,0,0,1]

This code has no relation to a parent of the (controller owning) object. So this should never be an issue.

I can only guess you execute this code at the armature. An armature has no mesh and will fail when you try to access it (line 3).

Hint: When using code you should always have a console window open to see any error messages. If you already have ... please post error messages together with your question.


How overlap UV of repeating faces I have cylindrical mesh. I need to unwrap it in a way that stacks its segments on each other. So that I can save space and make a nice repeating pattern.

How can I do that? This question obviously is a repeat, but I couldn't find an even proper term for what I want.

UPD. I'd like to keep parts proportional(I want to do the same with upper portion)

Select all the faces and press u for unwrap and press reset, so all will be squares (Enable stretch in right properties in uv editor for better seeing). Now select the faces you want to repeat then enable uv and mesh sync in uv editor. Now select faces in 3d view then scale down in uv editor and move aside, similarly, repeat manually (press two adjacent faces and press shift+cltr+(numpad +) to grow selection based on previous selection). Finally press A to select all and cltr+a to average all islands. using box select b select group of islands move them where you needed. I hope this helps.


Objects using Nurbs Curve disappear in game engine I was trying to create train tracks using a NURBS curve and everything seems to work correctly during modeling. (I am working in Blender Game Engine with GLSL textures)

As soon as I press Play, the tracks created by NURBS path disappear. Am I missing some setting somewhere?

Here's the blend file

I kinda figured out the problem. I had to select the Nurbs Path and then click on
Object --> Apply --> Make Duplicates Real in the bottom menu of 3D view.


Bump material for landscape too flat I'm trying to add a dirt texture with small rocks as a foundation for a landscape, but I have a familiar problem: when the camera is directly overhead, the texture looks 3 dimensional.  However, when looking horizontally, it goes flat.  How do I make it bump at all angles?  I should mention there is a colour image in the image texture input node going into the colour input of the principled shader as well as a height image in the bump and roughness).

Here's the overhead view:

Here's the horizontal:

Here's the node setup:

The best way achieve a "bump" from all angles is using micro-displacement.

Replace your Bump node with a Math node and set it to Multiply. Then connect the Math node with the Displacement input of your Shader Output node. Play with your Multiply value to get the result that fits your scene.

This will not work until you add extra geometry to the plane. The most efficient way to do that is using a Subsurf modifier. Set it to Simple so it doesn't smooth the plane and Adaptive so you get optimized memory and render times. If there's no option that says "Adaptive" you have to change from "Supprted" to "Experimental" feature set in the Renders tab under "Render". Then down in the Material tab in the Properties under "Settings" set your Displacement to either "Both" or "True". "Both" gives you the option to still add a bump map on top of your displacement.

Then you can enter rendered view and enjoy your displacement! Note that the displacement doesn't update in rendered view. Switch from and back to rendered view to refresh the displacement.


How to build Blender as a Python module? I have seen this question now many times and every question here and on other forum points to build blender as python module experimental tutorial by ideaman42. Now sadly a lot of answers are invalid right now because this central link is down. I couldn't find anything by Googling so if anybody has a fork of the tutorial or a second source that would be great? The link can't be gone for too long, I saw an answer with it 4 months ago.

The only other thing I have found is this tutorial for windows, but it also references the now missing tutorial. Any ideas how to find it?

Here it is pulled from the archive.is (all Ideasman42 cited):

Overview

The official blender.org embeds a Python interpreter (CPython 3.x). This makes sense from the perspective of a user, who's primary needs are to have an application which can be extended with scripts.

However from the perspective of a Python developer, it can be useful to being Blender into your existing scripts and access its feature set.

The option to build Blender as a Python module is not officially supported, in the sense Blender.org isn't distributing it along with regular releases, Currently, its a build option you can enable, for your own use.

Rationale

This is a build option to be able to import blender into python and access its modules

Possible uses include:

rendering animations.
image processing using Blender's compositor.
video editing (using Blender's sequencer).
importers, exporters (convert 3D file formats).
development, accessing bpy from Python IDE's and debugging tools for example.
automation.

This is mainly limited to features which can be usable in background mode, so you cant for instance do OpenGL preview renders.

Prerequisites

OSX

get Python3.6-Framework from Python.org and install it.

Building

Assuming you have a CMake out-of-source build setup, see: http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake

Change these CMake options from the defaults:

WITH_PYTHON_INSTALL=OFF
WITH_PLAYER=OFF
WITH_PYTHON_MODULE=ON

Everything should build as normal except in the cmake directory you will have ./bin/bpy.so instead of ./bin/blender

Installation

Linux

System Wide Install

You may want install the module to the systems Python path, eg:

/usr/lib/python3.6/site-packages

For a system wide installation:

WITH_INSTALL_PORTABLE=OFF

note, PYTHON_SITE_PACKAGES will be used as the target path, but this is auto detected, nevertheless, you may want to modify.

Once these optiosn are set, run:

make install

Local Install

Alternately you might want to use your user Python path (see https://www.python.org/dev/peps/pep-0370/)

$HOME/.local/lib/python3.6/site-packages

For a local install use the following options:

WITH_INSTALL_PORTABLE=ON
CMAKE_INSTALL_PREFIX=$HOME/.local/lib/python3.6/site-packages

Once these optiosn are set, run:

make install

Windows

copy bin\bpy.pyd C:\Python36\Lib\site-packages\
copy bin\*.dll C:\Python36\Lib\site-packages\
del C:\Python36\Lib\site-packages\python36.dll
xcopy /E bin\2.79 C:\Python36\

OSX

After compiling and "make install", copy needed files to your python framework

cp ./bin/bpy.so
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/
cp -R ./bin/2.79
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/

Note. Unlike on *nix C:\Python36\2.79 is not in the site packages, this is because of a difference in how Windows finds the scripts path and should eventually be fixed.

Testing

This allows 'bpy' to be imported from python or other applications/IDE's which embed python, eg:

python -c "import bpy ; bpy.ops.render.render(write_still=True)"

This runs in background mode and has similar restrictions to running a script:

blender --background --python test.py

Troubleshooting

The Python version requirements are the same with building a regular blender binary (if Blender us using Python3.6 then there is NO WAY to use another version - 2.7/3.2/3.6 will all fail).

On Windows, you probably won't want to use a debug build, since this requires a debug python installation (python36_d.dll rather then python36.dll), so while it can be made to work, its more trouble.


How to Prepend to Delete Operator? I know that OBJECT_OT_delete is not in bpy.types, how can i do something before the delete operator is called ?

import bpy

def prepend(self, context):
    print("test")

def register():
    bpy.types.OBJECT_OT_delete.prepend(draw_func_below)

def unregister():
    bpy.types.OBJECT_OT_delete.remove(draw_func_below)

if __name__ == "__main__":
    register()

Override the operator

I'm not sure how a  pre delete handler or event would work?.  Whenever I model, a delete could be coming  at any time lol.

However can override any operator with another.

If another operator (or panel for that matter) is registered with the same bl_idname, then it will override the one defined previously. Giving it the same properties as the original will see existing key-maps and UI use the new one seamlessly.

For some operators and panels where the python code is available can import them and use their methods in our own. AFAIK Not the case with bpy.ops.object.delete

To override the object delete operator (very basically) run the following script

import bpy
from bpy.props import BoolProperty

class OBJECT_OT_delete(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.delete"
    bl_label = "Delete Objects Override"
    use_global : BoolProperty()
    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        print("do something here")
        for o in context.selected_objects:
            bpy.data.objects.remove(o, do_unlink=True)

        return {'FINISHED'}
    def invoke(self, context, event):
        return context.window_manager.invoke_confirm(self, event)

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

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

if __name__ == "__main__":
    register()

and it will replace the delete operator. Is this good practice or recommended.. not sure (shrug) .. but it is one way to "do something before the delete operator is called"

Note: the prepend and append as shown in question is more associated with adding UI to a panels draw method.


Why does my displacement map have jaggies Can someone help me determine why my displacement map has jagged edges. The steps i took in Gimp were black dots on a white background and used a gausian blur filter assuming the black dots would give me the indentation i was looking for, although i'm getting the desired effect the edges contain jaggies

First in first, EEVEE is not ready for fully support of displacement in 2.81 and below.

The node connect to displacement socket will become bump only solution. And there doesn't exist the displacement setting block inside the material panel with EEVEE. When you switch back to cycle, you can choose the type of displacement.

Using cubic interpolation might get the best result in cycles

Once upon user zoom-in into a ridiculous close place to look into mesh, linear method will become pixelated for some reason(smart will adapt linear in scaling up). But cubic retain smooth detail.

There might be some case that I don't know, so you should try it yourself to test what cause the situation.

Oh, and 2049x2049 might be the worst case that a map can be use in computer graphic. Try to let the map resolution in exponential of 2. e.g. 2048


Why are Texture Coordinate or UV map used before mapping node? I learned how to use textures. To control the size texture, I use the Map node. The input of the Map node should be a Texture Coordinate or UV map and it seems that they are very important because when I remove them, the texture disappears. I don't understand what they are and why they must be used. I tried to read the manual but it seems that I'm too beginner to understand it :D I'm not trying to do a specific thing. I'm just asking about the general concept. Thank you,

Mapping node only transforms texture coordinates(rotates, scales and moves) while UV Map or Texture Coordinate nodes provide the actual coordinates. It is possible to transform various kinds of vectors with the Mapping node.


How to add faces to a cylinder top? (cookie) I am an absolute beginner, and while completing the donut tutorial I have been trying to model this industrial cookie just for fun.

I have modeled the top cookie as a cylinder, beveled the edge and extruded it to create the border, and added a couple of loop cuts to sharpen rounded angles, and I am at this stage:

Now I would like to sculpt the "shield" (and then carve holes and add text), but the center face has not enough resolution. How can I add enough poligons into that face so that sculpt works?

If I were you I would make the text apart, you won't notice it's another mesh, or join it with the rest with some tris. I would just model the ornement then join with the outer circle:


Particle System Slot vs Settings Why is the name of a particle system slot different from the name of the particle system settings it contains?

This is not the same as material slots, where the slot and the material share a name.

Particle System name is different from Particle Settings name because you can have Multiple setting for each Particle System. By creating multiple settings you can quickly switch between them to see the difference instead of replacing the Particle System.


Mirror Gradient Texture? I have this fish-shaped pastry with a gradient texture which makes it brown around the details. However, I can only get the gradient on the top side of the fish, and I'd like it on the bottom side of the fish too. Is it possible to mirror the gradient effect? Thanks!

Mirroring is a pretty simple operation-- you just take the absolute value of your coordinates-- but any transformations like this occur about the "0" point of the coordinate system.
For generated coordinates, the center of your coordinate system is at the lower, left, front corner of your object's bounding box.  If you just mirror about the generated texture origin, you'll only be affecting samples outside the bounding box-- it won't affect the visible model!  Likely, the point across which you want to mirror the gradient is the midpoint of your model, which is located at 0.5,0.5,0.5 in the generated texture coordinate space.
But you can change the origin point of transformations like this by moving the texture coordinates, applying the transformation, and then moving the coordinates back, like on the middle Suzanne:

Notice where it leaves the mirror line: in the middle of the gradient.  This can be addressed, if desired, by changing our mapping, such that we're mapping the center of the model to 0 and the outer edge of the bounding box to 1, as with the third Suzanne.
Similar techniques--translate, transform, untranslate-- can also be used to rotate or scale about different origins.


How do I rotate a group of objects? I have a group of objects, 3 cylinders and 2 text objects. I am able to rotate a single cylinder by adding a rotation keyframe on scene 1 and setting the z rotation to 359 and adding a keyframe on the last frame.

How do I do this for a group of objects?

You have a couple options:
Parenting:
You could Parent (CtrlP) the other objects to an empty or another object, and then rotate that empty/object.
Keyframe all the objects:
Select all the grouped objects by selecting one and the pressing ShiftG> Group, then insert keyframes for them all by pressing I> Rotation.