text:
Light areas appearing larger and dark areas appearing smaller in Cycles
As part of a scene I have a white diffuse surface with some black icons on it. Right below it I have the same icons in white on a black surface.
I use the same texture for both surfaces, with a node set up like this:

As a minimal example I have a texture containing the letter A. I have it applied to two surfaces like this:

However, when the camera is further away (or it is rendered at a super low resolution) The white A looks significantly thicker than the black one:

When rendered at a higher resolution and scaled down the results are as expected:

The difference between the white and the black A's becomes even greater the smaller it is on the rendered image. Top is rensered at a higher resolution and scaled down, bottom is rendered at low resolution:

Currently the only way I can think of working around this issue is rendering at a higher resolution and scaling down the final image. This is fine for this example, but for the scene I'm working on render times are already high and I really don't want to increase the resolution.
Is there any way I can fix this and have both render at an equal thickness? Is it just a product of how the Cycles works? Is there a setting that can compensate for it? Or am I doing something completely wrong? The only possibly related question I found was this unanswered one here.
Here is the .blend file for this example:

The optical illusion could certainly account for part of the difference, but there is still a difference in cycles. See the following image. Top is rendered at a higher resolution scaled down, bottom  is rendered at a lower resolution. image

Further to @cegaton answer: I think the difference between the last two examples is exaggerated by the difference between antialiasing in 3D (while rendering), and antialiasing when scaling in 2D, as discussed in this question: https://blender.stackexchange.com/questions/105515/why-does-increasing-resolution-and-then-downsampling-to-desired-size-increase-re/105521#105521

I guess it must just be a combination of the optical illusion and the difference in antialiasing. I have accepted @David Oulton's answer as correct.

I'm probably going to get laughed into next week for this one.......but I think it's an optical illusion. Not only that but I think it also has to do with 3d world as opposed to 2d screen. A white A on a black background is always going to look bigger than a black A on a white background. Take the Olympic rings for example ......there is an actual formula for how thick each ring should be so that they all look the same thickness. The greatest example of this that I have ever seen is as you look up towards the alter in St. Peter's in the Vatican where Bernini makes the letters at the top of the columns larger than the ones at the bottom of each pillar as you look up the nave so that they all look the same hight from ground level. Anyway put a cube or a plane in the scene and measure it.

This could certainly account for part of the difference, but there is still a difference in cycles. See the following image. Top is rendered at a higher resolution scaled down, bottom  is rendered at a lower resolution. image

@user123456 All you have to do is get photoshop and over lay the two images and use difference mode and see if they images really does have any difference in their placement by the pixel. It's an optical illusion by my graphics knowledge of how images can trick the eye.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
How to set vertex weight influence for bones based on x asis?
I usually only used ".. With automatic weights" when using Armatures. Now I hit a limitation and need help.
I am modeling a book (and want to do Pages later too, which are less stiff than the book cover!)
I'd be fine with 2 lanes of bones, but many vertices bent unwanted so I added more...
But for the Pages I'd like to have 3-5 lanes to make them bend more.

As you can see, the "belt" (brown) isn't affected by the bones at all.

Which makes sense, as there is 0 weight linked from the belt to the closest bone. I tried using envelope bones and "... with envelope weights" but that's also a bit strange to work with.

I don't want to paint the weight for every bone by hand. That's a really destructive workflow. I'd rather write a python script to assign weight based on x asis (which would be enough in this case)
Is there a builtin function, or how would you approach it? Otherwise, does anyone have a script that does something simliar (to get me started)? looping over bones and setting weights?
Thanks!

edit: Here is a .blend file:

can you upload the file?

@mqbakamqbaka - I added the file

I wrote a script for the pages and hand-assigned some vertex groups for the book cover. Here is a comparison of problems and my solutions:
The Page Mesh

Compare the Deformation of "With Automatic Weights" vs my Scripted weights. Automatic is a bit crooked and the center bone-row leaves the mesh, because there is not enough weight assigned:

The lower side of the page is not static, see gif here:
https://i.imgur.com/2fzQFOn.mp4
Lets have a look at the actual weights:

See my script below. Now, here is how I fixed the book cover and belt:
I used "[Vertex Groups] -> Remove from All" and then assigned the vertices to a single group with 100% weight to make it stiff.

Here is the before/after comparison:

Here is a video where you can see the book and the pages in action:
https://i.imgur.com/3DrMeiV.mp4
And here is my script, if anyone is interested:
import bpy
from math import sqrt, pow

# HowTo: Select Armature, then Mesh, then go to WeightPaint mode.
# Clear all Vertex Groups / create them by parenting with automatic weights/empty groups
# make sure object is scaled uniformly (1,1,1)
# Replace 'Armature.005' with your Armatures Name
# run script

# ensure we are in edit mode
bpy.ops.object.mode_set(mode="EDIT")

obj = bpy.context.edit_object
mesh = obj.data

# bpy.ops.object.mode_set(mode="OBJECT")
bpy.ops.object.mode_set(mode="WEIGHT_PAINT")

print("Working")

for i in mesh.vertices:
    # obj.vertex_groups[dst_group].add([i], 1 - obj.vertex_groups[src_group].weight(i), 'REPLACE')
    for group in obj.vertex_groups:
        boneName = group.name
        armature = bpy.data.armatures['Armature.005']
        bone = armature.bones[boneName]

        vertexPos = i.co # .co = coordinates aka position

        center_local = (bone.head_local + bone.tail_local) / 2

        ydist = abs(center_local.y - vertexPos.y)
        zdist = abs(center_local.z - vertexPos.z)

        zFactor = 4
        yFactor = 1
        weight = min((1 - zdist * zFactor), (1 - ydist * yFactor))

        obj.vertex_groups[group.name].add([i.index], weight, 'REPLACE')

print("Finished")

imgur album: https://i.sstatic.net/l12xy.jpg

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How is Cycles different from Blender Internal?
How does Cycles work and how is it different from Blender Internal?
Which is better?

Related, What are the technical differences between F12 render and viewport preview?, What are the main differences between lamps in Cycles vs lamps in Blender Internal?.

Cycles
Cycles is unbiased, physically based, *path tracing engine* designed for animations, which means that it produces an image by tracing the paths of "rays" through the scene.
Specifically, cycles is a "backwards" path tracer, which means that it traces light rays by sending them from the camera instead of sending them from the light source(s).
From Wikipedia:

Path tracing is a computer graphics method of rendering images of three-dimensional scenes such that the global illumination is faithful to reality. Fundamentally, the algorithm is integrating over all the illuminance arriving at a single point on the surface of an object. This illuminance is then reduced by a surface reflectance function to determine how much of it will go towards the viewpoint camera. This integration procedure is repeated for every pixel in the output image. When combined with physically accurate models of surfaces, accurate models of real light sources (light bulbs), and optically-correct cameras, path tracing can produce still images that are indistinguishable from photographs.

Path tracing naturally simulates many effects that have to be specifically added to other methods (conventional ray tracing or scanline rendering), such as soft shadows, depth of field, motion blur, caustics, ambient occlusion, and indirect lighting. Implementation of a renderer including these effects is correspondingly simpler.

Due to its accuracy and unbiased nature, path tracing is used to generate reference images when testing the quality of other rendering algorithms. In order to get high-quality images from path tracing, a large number of rays must be traced to avoid visible noisy artifacts.

To visualize this, take the following image:

The pixel the gray ray was sent from will be dark, as it did not encounter any light sources. The pixel from which the orange-ray was sent will be bright, as it hit a light source after bouncing off a diffuse object.
Most materials scatter light, so Cycles needs to account for light bouncing in different directions. How this is done depends on which Integrator is used.
Progressive Integrator
When using the Progressive integrator, this is done by taking multiple samples of the scene.
A sample refers to a single ray being sent from each pixel. For materials that scatter light, many samples are required to account for every possible angle at which a ray could be reflected/transmitted.
Branched Path Integrator
The Branched path integrator splits the ray at the first bounce.
To visualize this, take the following animation:

For more information on the mechanics of cycles, see the following questions:

What are the differences between lamps in Cycles and Blender Internal?

How are cycles lamp types different?

Why can't cycles cast one ray per image pixel, instead of rendering progressively to infinity?

Why does Cycles sampling give diminishing returns?

What is branched path tracing and how is it useful?

Spherical emitter does not illuminate very well?

Blender Internal
BI is a biased rasterization engine, which means that it works by calculating which objects are visible to the camera and not by simulating the behavior of light.
Comparison
Neither engine is necessarily "better", they both have strengths and weakness.
To visualize some of the differences between BI and Cycles, take the following example inspired by Mike Pan's shaped bokeh demonstration:

In cycles this works because cycles is actually simulating light, so you will get a result similar to what you would get in the real world:

In BI, however, this does not work because the plane is calculated as "visible", and then everything behind it is obscured:

There are many more differences between cycles and BI, such as caustics:

Cycles can render caustics, however, due to its backward path tracing nature, rendering caustics under some conditions can be hard to the point of practically impossible. There are algorithms such as Bidirectional path tracing and Metropolis Light Transport (MLT) that are good at rendering caustics, unfortunately there are no plans to implement these in cycles anytime soon.

Update: There is now a working patch for metropolis sampling, which also includes working adaptive sampling and stopping for the existing path tracing integrator. There are also plans to add lightgroups and PIS to the same patch.

BI cannot render caustics, however there is a workaround.

This does not necessarily make cycles "better", for instance, BI usually renders noiseless images while cycles must sample a scene many times to reduce the noise to an acceptable level.
Both rendering engines have different advantages, which one is best depends on what you want.
Switching Render Engines
One thing to keep in mind is that each render engine is fundamentally different and so are its settings and most importantly its material and texture definitions. As such you can't render Cycles materials in Blender internal, and the opposite is also true.
Materials designed for one render engine will mostly only work for that one render engine they were created for. You have to stick with your choice, if you created a scene for Cycles you must always render it in Cycles, and vice versa; you can't just switch at will and expect things to work. At least, not without recreating all of your materials.
Check the active render engine in the header of the Window. The currently active render engine at any moment will determine which type of materials is created when you press the + button to add a new one.

Cycles usually produces more photo-realistic renders while Blender Internal is faster. If you're test-rendering a model to see how it looks rendered, I suggest Blender Internal, while I would use Cycles for final animations.

Why has this been downvoted?

Creating materials can be a big part of designing a scene.  Making your scene look right for both renderers may involve a lot of duplication of effort.

For quick render tests (especially animations), Viewport Render is the most practical.

@John-PaulGignac The Sam54123 might mean the shape/form, but, indeed, I wouldn't recommend using both render types simultaneously while developing, in general.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to specify the name of a node group when creating it from python?
I have been creating node groups with the group_make operator, but there doesn't seem to be any way to set properties such as the label or name of the resulting group node.
This makes it difficult to access this node later, and be sure that one is accessing the correct node.
How can I specify node properties on creation?

The problem with using operators in scripts is they return {FINISHED} rather than the object you wish to keep working with. Instead of using the make_group operator you could use
import bpy

test_group = bpy.data.node_groups.new('testGroup', 'ShaderNodeTree')
test_group.name = 'anotherGroupName'

node_groups.new() creates the group with the name set to the first pramater. The result returned into test_group can be used later to change that name.
You can also reference the group by name to change it.
bpy.data.node_groups['testgrp'].name = 'NewGroupName'

but without knowing the auto-generated name from the operator this isn't helpful.

You can use something like this:
node_grp = bpy.data.node_groups[-1] # to get last created group
node_grp.name = "Special Name" # to set a name

Its really bad practice to assume this kind of stuff (the position in a sequence of newly added data), that said, it does work and is unlikely to break any time soon. Ideally you would create the group using bpy.data.node_groups.new(name, type) but realize there may be cases where this isnt a drop-in replacement.

For some reason bpy.data.node_groups[-1] is not returning the last created node group.

@gandalf3: many bpy collections are ordered alphabetically, so indices may change as you rename or add items.

@ideasman42 bpy.data.node_groups.new works for me, thanks. @CoDEmanX I assigned the variable right after creating the nodegroup, but it still wasn't the right nodegroup.

The last created node is made active is it not?

To rename a new group you can after creating first get out of the group
# Get out of group
bpy.ops.node.group_edit( get_override('NODE_EDITOR') )

Then name the active node which is the group
groupname = bpy.context.active_object.active_material.node_tree.nodes.active

Then if needed get "back in the group"
bpy.ops.node.group_edit( get_override('NODE_EDITOR') )

The override function:
def get_override(area_type):
    for window in bpy.context.window_manager.windows:
        screen = window.screen

        for area in screen.areas:
            if area.type == area_type:
                for region in area.regions:
                    if region.type == 'WINDOW':
                        override = {'window': window,
                                    'screen': screen,
                                    'area': area,
                                    'region': region,
                                    'blend_data': bpy.context.blend_data}

                        return override

Please consider adding your get_override func, otherwise no one can tell whether that's a good or bad approach.

Thank you brockmann, done.


text:
How to unlink a node group datablock?
I have a nodegroup which has somehow gotten 3 users. I want to delete it, but I can't find where it's being used and there is no unlink button.
How can I delete it?
Is there someway to force unlink it or find its users?

I'm pretty sure that no item has a link to other items that it is used in, you need to loop through arrays and see if the item you are looking for exists.
If you only have a couple of materials in your blend file then you may want to press Home to bring every node into view - it may be located way off to the side. It could also be hiding under another node or inside another group.
If you have a lot of materials you can find which material they are in with a script like this -
import bpy

for mat in bpy.data.materials:
    for mat_node in mat.node_tree.nodes:
        if mat_node.type == 'GROUP' and mat_node.node_tree.name == 'BadGroupName':
            print ("nodegroup in "+mat.name)

If your sure you don't want the group you could remove it instead of showing the material name, I'd rather look to make sure deleting it doesn't break things unexpectedly. You could also select the group node and bring it into view.


text:
Is it possible to adjust the frame rate of viewport playback?
Is it possible to play an animation in the viewport at a slow framerate?
Just because of the rather heavy scene it's already going at about 8 fps, but I would like to be able to play it even slower (an in a controlled manner) for the purpose of recording an animation with automatic keyframes.

I wish Frame Rate in the render settings was an arbitrary value, instead of a pull-down list. That'd do exactly what you want :-/

@Matt ...? Really? Because there is a Custom option in that pulldown, perhaps that's the answer :) (will test shortly)

Lol, I had already typed up a whole answer before I remembered that it was a list, not an arbitrary value... but I also forgot about the custom option. Lemme know, and I'll post the answer.

@Matt It works, thanks. For some reason I didn't think the render frame rate affected the viewport..

I'm changing the frame rate and it doesn't affect viewport... also I didn't find this custom option under render tab.. any directions?

The Frame Rate in the render settings should also control viewport playback. If you choose the "custom" option and set it to 8, it should make the viewport also play at 8 fps.

I didn't get it, I set my to 29.97 fps and it is still slow (feels like 2fps)..

If you have a heavy scene it could be that your computer can't keep up with the specified framerate. Try enabling Frame Dropping in Timeline > Header > Playback and see if that makes a difference.

As gandalf3 pointed out, if your scene is heavy than Blender / your computer can't keep up with the set framerate. That's usually shown in the viewport by a framerate in red. Red color means "I know I'm supposed to play it faster, but I can't." The viewport playback should use that setting, but there are some factors that slow it down. A lot of geometry for example, setting the viewport to "Rendered" instead of "Solid" or "Wireframe", complex or high resolution simulations like smoke (even if baked)...

I've been looking into this for a long time. from what I found, there is no way to change the viewport fps as of right now. That may change as more new versions of blender are created. For now, the viewport fps is determined by how fast your computer runs. While your animation is playing in the viewport, it will give you the fps it is playing at in the top left or right corner. It should change very frequently as your animation continues playing. I guess if you want it to play slower, than you have to make your computer slower.

That's not true as others already commented. The viewport uses the render fps setting, but the scene might take up to much resources to play it (shown in red if it can't keep up). Which means, if your computer can play it at 8 fps, than you can set it to 4 fps and it should work fine. The other way round it's much the same. Let's say you want an animation at 30 fps and it's a simple scene, Then the computer might be able to play it at 30 fps in the viewport and it will not play at 60 fps even if it could since it's set 30 fps. But if you change it to 120 fps it might get slower again.


text:
Help to create a texturized material
I need help to reproduce this material with this "texture". It is a playing card, it can be vynil, or simple hard plastic. I know it is not that hard, but I still have some problems with nodes. The main objective is to replicate the bumps perfectly. I'm more interested on bumps, and this kind of "texture" than on colors or lightning. You can ignore this gradient, and even the colors white and black. Look only to the pattern of the bumps.

Thanks in advance Blender People

Hello, in this case the lighting will have a big impact on the way the material reflects light. Does your scene have a light in the top right corner or do you want the light fading effect to be "baked" into the texture ?

I'm more interested on bumps, and this kind of "texture" than on colors or lightning. You can ignore this gradient, and even the colors white and black. Look only to the pattern of the bumps. I can imagine something using the wave node, mixed with another node in another direction (90°). Like that https://docs.blender.org/manual/en/latest/_images/render_shader-nodes_textures_wave_example.png

But I still didn't get there

Is it necessary to have it as procedural texture? If not, possibly just throw something with a flat color and similar texture (a blank playing card or a possibly a coarsely woven dish towel) on a flatbed scanner and try using the scanned image as bump texture...

Yes, I would like to create it procedural, because I don't have the object, or nothing similar, I have just this piece of image as reference.

But I'm open to try anything with ready normal/bump maps, I just don't have the object to create it.

Try something like this.

All I really did was warp the vectors of a couple of Noise Textures by adding the Vectors of Wave Textures using a Vector Math Node. This produces "uneven" wave lines. I made a second of the same, rotated 90 degrees with a Mapping node. so it has that crossed thatch appearance, and then increased the wave distortion slightly, so it doesn't look linear, even, and fake. I also incorporated another Noise Texture to give some underlying bumps. You can see that I lightened both the values by mixing with white before multiplying them together, but even then the effect was almost still too strong - make sure to check your strength/appearance, and mix with white when needed before connecting to the Bump Node. You might be surprised how much more realistic a "slight" effect looks compared to a "deep" one (if that makes any sense)
Lastly, I just took some Ambient Occlusion from the Wave combo and multiplied it with a neutral grey to make the ridges pop slightly more. Have a try and see if it works for you.
If you want to go one farther, you can use yet another Noise Texture to "block" some portions of the wave mix, so it's not so uniform, and thus more realistic. I also elaborated on what I mentioned before about a "slight" bump effect, by mixing the whole mix with white again before the Bump node. I also lightened the color slightly, and increased the roughness (both things also can work to reduce bump effect as well). Here is the final result of the (more complex but improved) new mix:

I gonna try that second one, can you tell me what are the two first nodes that don't appear on image please? This on left side of the image. Thanks anyway

It's the same as the first graph, I just moved things around a little to accommodate the new Noise Texture (the top one attached to the ColorRamp - it is connected to Object Texture coordinate like the rest). The MixRGB on the lefthand side is the same one that's connected directly to the Ambient Occlusion node in the first image. So to sum up, all I added was a Noise Texture, a ColorRamp, and a MixRGB to mix it with what was previously there.

So good. I got it. But to be honest I didn't mind about the base color, because I want to use it once as red, another time as blue, another as black. So to me the most important thing here, is the nodes that goes on Normal Input of the Principled BSDF Node. I'm a bit confused if you kept the first 4 nodes of the first part of the nodes (wave texture, mix, vector math and the noise texture). Can you show me all the nodes of the second image please?

Sorry, I can't show you because I already closed the file and didn't save. But, it's like I said before, the 2 graphs are identical, the only difference is I added one extra step (Another MixRGB node) to the existing connections. The new mix (second yellow node from the left) just replaces the connections that were previously connected to the first mix (leftmost yellow node). In both cases, the connections went to both the bump map and the base color.

That is ok, I got it now. Thank you


text:
Particlesystem bugged // Evee Blender 2.8
My Particle system is working fine but as soon as I try to render the animation all my particles get emitted at once.
Here is the particle distribution in the viewport as intended:

And this is what it looks like after rendering (it usually resets when I change the particle system settings but the glitch reappears after rendering)

but whenever I render the animation there's a hole in the prerendering of the particle movement and after stopping the render the particles all get emitted at once.

The timeline clearly shows that the particle system doesn't respond for at least 10 frames or so at the start of the animation although I set the starting frame of the particles to -100


text:
Depth of Field on glossy surfaces (cycles)
I have made a scene in Blender where there is a glossy ball on an icy lake. I noticed that there is no Depth of Field on the reflection of the ball.
I could add a fake Depth of Field in post-processing, but are there any other options?

This is a lovely question .. because it's what happens in real life .. I'm still trying to figure out the optics diagram that demonstrates why. Ithink it's because, when reflected in a curved surface, there's only one route to the focal plane from reflected points ..  the rest miss the aperture altogether. So a curved mirror is a bit like a pinhole camera.

Light travels in straight lines so the rules for depth of field are applied to the reflection in the same way as line of sight. Meaning objects closer to the surface (of the ball in this case) would be more in focus than objects further away like the sky. In addition the ball is exponentially closer to the floor plane (Ice) than it is to the sky so the fall-off of "in focus" to "out of focus" in the reflection would be substantial around the equator.

... So, the reflection from the bottom of the ball would be in sharp focus and the top of the ball would be slightly more out of focus than the background behind it (If possible). The reflection of the horizon line from the ball would be just about as out of focus as that in the scene because it's almost the same distance from the camera. The math for this I do not know but could be faked in a pinch. Yes, wonderful question!

If the reflective ball is inside the FOV, it will probably still preserve the sharp image due to light path has been concentrate from outer light, it will be harder to tell the blur effect if a convex mirror is presented.
And also, they do have a Depth of Field reflection, if you turn down the F-Stop to extremely small,  and using a giant sensor that have ever been made in camera history. You should see the blur inside the Convex mirror
 You can notice that the little tiny Susanne is clear while the whole mirror even around the tiny Susanne is blur, due to the natural light path.
What you encounter is because normally, we don't have this kind of lens, way too impossible to make it perfectly. If we only get the ordinary lens with a long focus len (125mm) and big enough Aperture (F/2.8 or something). The depth of field should be narrow enough to see the blur effect in object easily. But that only occur in diffuse object not the convex reflective.
Assume that your reflective scene is in far far away (like an HDR environment map or sky). You should get the maximal blur effect right? See the figure below with a normal lens:

"Hey, the light path change a lot of angle. Reflective should be blur as well". Unfortunately, Blender didn't show the real effective aperture size in camera icon. So I made one for it:

See that ridiculous tiny circle in front of camera? That is the real effective aperture size in Blender default 1 meter as 1 unit. So it is almost a dot for that reflective mirror if you put it in a distance. And follow up the light path you should see clear image unless you properly setup the scene size.

The ball's reflected image is not supposed to be blurry, since there is no blurring kernel between it and what it reflects. The DoF in the background is caused by the aperture of your camera not being a single point. The sphere is situated somewhat in focus, so it is not blurry.
There is a distinction to be made between requiring the reflection only to be blurry, and requiring the sphere with the reflection to be blurry. For the latter you have to take it out of focus.
For the former you have to introduce a blurring kernel in-between the sphere and the environment. This could be achieved through some participating medium resulting in a specific point spread function in real life. It could also be achieved by encasing the sphere in another one that introduces that PSF. The simplest solution would be to change the bsdf to not be an ideal mirror, then it will essentially integrate over a small region, resulting in a similar blurring effect (basically convolve your bsdf with the projection of the psf onto the hemisphere).
Note that this objectively makes the reflection blurry, as opposed to only perceived as it would be if you were to take the sphere out of focus. In your image the environment is not blurry - it's the camera film that sees it that way because of the lens system used. Introducing what I mentioned would make it objectively blurry (for any observer).


text:
Object not complete showing on Layout While on Modeling its shows completely
Im kinda lost. Im not sure why on Layout iS just shows Limited section of the object like i was on mask while on Modeling is shows the object completely.

Added 3rd Picture

Heres the File so you could check it out.
https://drive.google.com/file/d/1ld4AJKD_xWs9actJQT3nvtem_44qFe1l/view?usp=sharing

Try Alt+h to show hidden vertices in Edit mode

No luck bro already did that.

You should share the file so we can take a look

I added the file hope you could help me. Thanks

Found the fix. Press Alt B


text:
Create an outline mesh around another structure / edges with equal distance
I am having a big problem creating an outline mesh around a number of edges.
I found a lot of solutions to that topic like extrude along individual normals (after creating faces) or using the mesh-offset-plugin but all solutions I found so far do not work the way I would them expect to work.
eg How do I Inset a face equally? and How to offset the edges?
The following screenshot shows my problem:

The top object is my source where I want an outline object... Or just another object where all points have the same distance to the origin.
The second object just shows the result of an extrusion along the z axis where the distance on the hitches are too small..
The third object shows my "normal" results using any of the hints google shows me... including the result of the mesh-offset-plugin... the hitches are to big compared to the "flat" faces...
The last object at the bottom shows the result I created in 2D with corel draw and 2 mintues time...  (the reimport through Inkskape Import and Export to blender took a little longer...)
Using the Inset toolset did not work the way I want nor the shrink/fatten tool nor the extrude individual faces does the job...
A possible but very unsatisfying solution is to first extrude along the y-axis to get faces instead of edges and then extrude every single selected face by an identical amount using "e" to extrude and "1" for the distance of 1 eg.

After that I have to delete and merge all the new overlapping vertices in order to get the outline I wanted... And even that does not rally work the way I wand becaus extruding the faces on the sides does not extrude orthogonally to the face but somewhere else...
What am I missing here? I thought of a problem of the direction of my normals but did not find any possibility to make the orthogonal to the face they are connected to...
Thanks for your thoughts!
Update / Edit:
Here is what I got from the skin modifier:

I really have no idea what the problem is... I think maybe my line is the problem... here is a blender file with the line I am trying to outline:
Edit: finally ;-) THANKS very much for the hint with the wrong scale in my line... that was the problem which caused every solution to fail!

Have you tried the Skin modifier? The skin modifier automatically generates geometry around mesh edges to specified distances.

The skin modifier creates more or less the same structure as number 3 in my first screenshot... It also seems to extrude along individuals...  So yeah I tried but it did not work...  ;-)

Convert to curve and use "Extrude" in the "geometry" section?

@StefanMöller I don't get the same as your 'number 3' and I don't really understand what you mean by 'extrude along individuals'. I've added an answer along with an image to show the result I get with Skin - please explain what is bad with this.

Considering the base shape has no surface and is edges only, you can convert it to a curve with AltC, then use the "extrude" parameter:

Doing that the distance from the outer edges to the base vertices is constant.
Edit: in meantime I've downloaded your file. From both solution the problem is your shape is scaled. So you need to apply scale CtrlA before any other thing.

Great spot with the scale - that certainly explains the issue.

Yeah.. thank you so much... I am new to blender and try to model things for my 3d printer... and that issue took me hours...  did not know that these scale things affect everything so hard...

Scale and rotation can often cause issues, when something is weird you should always think about them

The Skin modifier can be used to build geometry around mesh edges, controllable via the Mean Radius settings in Edit mode. Setting the Mean Radius to the same value for all vertices should produce an evenly distanced surface.


text:
What does the F in front of brush names mean?
What does the F in front of brush names in the selector stand for?

This question may seem a little trivial, but it always made me wonder..

It stands for Fake User. Since the default brushes all have fake users, the "F" shows up in front of the name.
Note: This applies to many other data-blocks, not just brushes, its just noticeable since fake-user is enabled by default, but it can be used used for meshes, curves, actions, fonts... too.

Yes: the "fake user" means the brush will be saved with the file even if nothing is using it.


text:
Is it possible to quit blender from the command line?
Is there a way to quit blender from the command line?
I tried
killall -s QUIT blender

However, blender does not quit the same way as it does when pressing CtrlQ, and no quit.blend is saved.
Is there a way to properly and politely quit blender (with a saved quit.blend) from the command line?

I know it's not usable in the command line, but you could use bpy.ops.wm.quit_blender() in a python script.

@CharlesL Exactly :/

I think you could try with wmctrl instead of kill. However it's behavior may be application and windows manager dependant.
wmctrl -xc <WIN>

By default, <WIN> is treated as string to be searched in window title (wmctrl -c blender will close any window containing "blender" in the title). With -x, it will be interpreted as window class, so this invocation:
wmctrl -xc blender

... only closes any window having "blender" as its class name, which is usually Blender itself.

This makes me wonder, how does pressing the X on the window tell blender to close? I always assumed that it sent some signal, but now..

@gandalf3 Not a signal like those sent by kill, gui apps receive an event to closewindow which it then handles in it's event loop mixed in with other events like keypress or mousedown. If your quitting blender from the cli then there's a good chance your running blender in background mode - without a window to get a closewindow event.

    sudo pkill -9 blender

Does the job under Linux.

Was looking at this re killing firefox recently.  Using killall or pkill as suggested pretty much does as shown in question, instead of "gracefully" quitting blender as suggested in other answer here (which IMO could be accepted) , or in link re firefox.

Hello, a little bit more information about what the command does would be nice for newbies :)

Ah thanks for the answer! Though as batFINGER points out this KILLs Blender with signal 9 which leaves it no opportunity to save a quit.blend (the file loaded by the "restore previous session" button)


text:
Is there a way to unwrap a mesh without scaling the UVs to match the aspect ratio of the texture?
Is there a way to use Project from view without the resulting UVs scaled to match the aspect ratio of the image?
For example, if I unwrap with Project from view the result looks like this:

I want it to be exactly how the mesh appears in the 3D view, e.g.:

Is this possible?

It is possible. Plain UV Unwrap and Project from View commands have the option Correct Aspect to take into account currently displayed image's aspect ratio. The image must already be opened and displayed in the Image Editor before unwrapping.
EDIT: It seems this feature only works correctly, when the active render engine is anything but Cycles.
Checking Orthographic also avoids perspective distortion if you happen to unwrap from Ortho view:

Ortho or not, the resulting UV map is always of the right proportion by using Correct Aspect, even on images with aspect ratio far from 1:1 (this one after scaling down the UV map proportionally):

Strange.. Correct Aspect is enabled by default, however the result is scaled regardless if it is enabled or not. Perhaps a bug? Tested on linux with 2.68a and 2.69.

@gandalf3: I also tested on those versions (in Ubuntu) with images of various aspect ratio, and Correct Aspect worked fine for all of them. Can't figure out what goes wrong in your case.

I'm on Arch, but I tested with the official builds from blender.org.. Could you upload a .blend? Here's the one I've been testing with.

Here's my test blendfile. In the file, I tried Project from View on a plane and a cube, and it worked correctly on both. Tried yours, and curiously it doesn't work on that image. Maybe it has something to do with image format, still testing it.

@gandalf3: I linked the image in your test file to mine, and unwrapping the objects using its aspect ratio  works. There's gotta be some different setting in your test file.

@gandalf3: Correct Aspect doesn't work when the active render engine is Cycles. That's very unexpected. Will update my answer.

Sounds like a bug, added a report.

It appears that this is caused because there is no material setup for the plane object.
From this bug report:

Correct aspect for Cycles uses material's image, not face texture (because Cycles doesn't have face textures).
In your ca[s]e [the plane] doesn't have any materials. If you'll create new material for [the plane] and use 100.png as Image Texture for it aspect correction will go fine for you.


text:
Is it possible to get render time per tile?
Is it possible to ask blender when each render tile starts/finishes rendering?
e.g. for a render time estimator
This used to be somewhat possible from the command line:
For example in blender 2.65a the elapsed time was printed, along with what tile was being traced:
Fra:1 Mem:12.59M (9.89M, peak 27.51M) | Mem: 6.82M, Peak: 6.96M | Scene, RenderLayer | Elapsed: 00:04.28 | Rendering | Path Tracing Tile 10/135
Fra:1 Mem:12.59M (9.89M, peak 27.51M) | Mem: 6.82M, Peak: 6.96M | Scene, RenderLayer | Elapsed: 00:04.41 | Rendering | Path Tracing Tile 11/135
Fra:1 Mem:12.59M (9.89M, peak 27.51M) | Mem: 6.96M, Peak: 6.96M | Scene, RenderLayer | Elapsed: 00:04.56 | Rendering | Path Tracing Tile 12/135
Fra:1 Mem:12.59M (9.89M, peak 27.51M) | Mem: 6.82M, Peak: 6.96M | Scene, RenderLayer | Elapsed: 00:05.99 | Rendering | Path Tracing Tile 13/135

though now with later versions of blender the elapsed time is no longer printed.
while you might be able to read blender's output with a script and get the time, is this possible with python?
Is there any way to get similar information to what is printed in the terminal with python?

from datetime import datetime
from bpy.app import handlers

TIMER = None

def start_timer(scene):
    global TIMER
    TIMER = datetime.now()

def elapsed(dummy):
    print("Elapsed:", datetime.now() - TIMER)

handlers.render_pre.append(start_timer)
handlers.render_stats.append(elapsed)

Example output:

Elapsed: 0:00:10.819869
Fra:1 Mem:7.10M (9.89M, Peak 17.07M) | Mem:1.21M, Peak:1.29M | Scene, RenderLayer | Path Tracing Tile 133/135
Elapsed: 0:00:10.863458
Fra:1 Mem:7.10M (9.89M, Peak 17.07M) | Mem:1.29M, Peak:1.29M | Scene, RenderLayer | Path Tracing Tile 134/135
Elapsed: 0:00:10.931486
Fra:1 Mem:7.10M (9.89M, Peak 17.07M) | Mem:1.21M, Peak:1.29M | Scene, RenderLayer | Path Tracing Tile 135/135
Elapsed: 0:00:11.466759
Fra:1 Mem:7.10M (9.89M, Peak 17.07M) | Mem:0.02M, Peak:1.29M | Scene, RenderLayer | Finished
Elapsed: 0:00:11.467813
Fra:1 Mem:7.08M (9.89M, Peak 17.07M) Sce: Scene Ve:0 Fa:0 La:0
Elapsed: 0:00:11.841684
Saved: /tmp/0001.png Time: 00:11.84 (Saving: 00:00.37)

The render_stats handler prints per tile? Will need to investigate.

As far as I know, this is not currently accessible from the Python API (and I looked, because I'd love to add that to my Render Time Estimation add-on (shameless plug, I know)).

Perhaps there is some way to read the output with a script and feed that to python? (hacky, I know..) BTW, awesome addon, I use that all the time :)

Worth investigating... will take a gander. Also, thank you. :)

Did a quick check... in order for that to work, you'd need to run Blender as a Python subprocess and capture the strings that print to standard out. A better solution would probably be to add an event handler on the C side that fires each time a tile finishes... but even then you'd have to time each tile in C and expose that data to Python (since Python runs single-threaded in Blender, it can't reliably time multiple rendering tiles on multi-core system).


text:
Decal shrinkwrap black background
I don't know how to make the background of my image transparent. The file is a PNG with a transparent background and the image material is already in alpha mode. I want to render in Cycles.

What are you mixing your shader with?

Sorry, it was useless, I removed it.

Please pack your image before sharing (File > External Data > Pack Resources)

You are using a shrinkwrap modifier with a non-zero offset:  this is causing a shadow.  I downloaded your file that doesn't pack the image, but used my own PNG image with alpha channel. But I'm thinking how to get rid of the bleed-throught I see.

I think you just have to disable "shadows" or "cast shadows" or whatever it's called on the object as a setting in eevee

I refreshed the link to download the file with the file packed

@james_t and Gorgious were right: I removed the shadows from cycles settings. But the background of the image (although now softer) is still visible. I refresh the download link so you can see it

You should increase light bounces to something more reasonable than 1. Transparent bounces are the issue here.


text:
whats the "Difference" between these identical meshes
I am just learning Python although have plenty of experience in Javascript and C++ amongst other languages.
As a "fairly straight forward" (lol) project I am creating Brio Train track pieces.
Straights and curves are easy but to create the junctions I decided to create two meshes, the block, and the rails which I can then use a boolean modifier to remove to create the grooves in the track piece (at this time I was going to do this outside of the script). This worked fine for the curved section of the junction but the for the straight section one rail (one half of the rail mesh) will not work as a boolean. I refactored my code to make each rail its own mesh and made the one that wasn't working a copy of the one that was but it still doesn't work when used as part of the boolean modifier.

import bpy
import math

width=0.3
length=1
height=0.05
turnRight=False
railHeight=-0.01
railWidth=0.03
guage=0.2

width=width/2
guage=guage/2

# make mesh
verts = []
edges = []
faces = []

negVerts1=[]
negEdges1=[]
negFaces1=[]
negVerts2=[]
negEdges2=[]
negFaces2=[]

#start of track
#righthand base
verts.append([width,0,0])
#righthand top edge
verts.append([width,0,height])
#lefthand rail edge
verts.append([-width,0,height])
#lefthand base
verts.append([-width,0,0])
#end of track
#righthand base
verts.append([width,length,0])
#righthand top edge
verts.append([width,length,height])
#lefthand rail edge
verts.append([-width,length,height])
#lefthand base
verts.append([-width,length,0])

#extend the length for the negative mesh
length+=0.0001

"""#righthand rail joint
negVerts1.append([guage+railWidth,-0.0001,height+0.01])
#righthand rail outside
negVerts1.append([guage+railWidth,-0.0001,height+railHeight])
#righthand rail inside
negVerts1.append([guage,-0.0001,height+railHeight])
#righthand rail inside joint
negVerts1.append([guage,-0.0001,height+0.01])
#righthand rail joint
negVerts1.append([guage+railWidth,length,height+0.01])
#righthand rail outside
negVerts1.append([guage+railWidth,length,height+railHeight])
#righthand rail inside
negVerts1.append([guage,length,height+railHeight])
#righthand rail inside joint
negVerts1.append([guage,length,height+0.01])"""

#lefthand rail inside joint
negVerts2.append([-guage-railWidth,-0.0001,height+0.01])
#lefthand rail inside
negVerts2.append([-guage-railWidth,-0.0001,height+railHeight])
#lefthand rail outside
negVerts2.append([-guage,-0.0001,height+railHeight])
#lefthand rail joint
negVerts2.append([-guage,-0.0001,height+0.01])
#lefthand rail inside joint
negVerts2.append([-guage-railWidth,length,height+0.01])
#lefthand rail inside
negVerts2.append([-guage-railWidth,length,height+railHeight])
#lefthand rail outside
negVerts2.append([-guage,length,height+railHeight])
#lefthand rail joint
negVerts2.append([-guage,length,height+0.01])

faces.append([0,4,5,1])
faces.append([1,5,6,2])
faces.append([2,6,7,3])
faces.append([3,7,4,0])
faces.append([0,1,2,3])
faces.append([4,7,6,5])

negFaces1.append([0,4,5,1])
negFaces1.append([1,5,6,2])
negFaces1.append([2,6,7,3])
negFaces1.append([3,7,4,0])
negFaces1.append([0,3,2,1])
negFaces1.append([4,5,6,7])

negFaces2.append([0,4,5,1])
negFaces2.append([1,5,6,2])
negFaces2.append([2,6,7,3])
negFaces2.append([3,7,4,0])
negFaces2.append([0,3,2,1])
negFaces2.append([4,5,6,7])

for v in range(8):
    negVerts1.append(negVerts2[v].copy())
    negVerts1[v][0]*=-1

#negFaces.append([8,12,13,9])
#negFaces.append([9,13,14,10])
#negFaces.append([10,14,15,11])
#negFaces.append([11,15,12,8])
#negFaces.append([8,9,10,11])
#negFaces.append([12,15,14,13])

new_mesh = bpy.data.meshes.new('junctionTrack')
new_mesh.from_pydata(verts, edges, faces)
new_mesh.update()
rightRail = bpy.data.meshes.new('right rail')
rightRail.from_pydata(negVerts1, negEdges1, negFaces1)
rightRail.update()
leftRail = bpy.data.meshes.new('left rail')
leftRail.from_pydata(negVerts2, negEdges2, negFaces2)
leftRail.update()

# make object from mesh
new_object = bpy.data.objects.new('junctionTrack', new_mesh)
rightRailObject = bpy.data.objects.new('right rail', rightRail)
leftRailObject= bpy.data.objects.new('left rail', leftRail)

#sub=new_object.modifiers.new(type="BOOLEAN",name="groove")
#sub.object=new_negobject
#sub.operation="DIFFERENCE"

# make collection
new_collection = bpy.data.collections.new('junction_collection')
bpy.context.scene.collection.children.link(new_collection)
# add object to scene collection
new_collection.objects.link(new_object)
new_collection.objects.link(rightRailObject)
new_collection.objects.link(leftRailObject)

I should mention that I have checked the normals, this had been a problem prior to this but swapping the 2nd and 3rd vertices of the wrong faces solved it leaving the stated issue.

Just FYI, it's better (general etiquette) to click the "Edit" link below your post to include other/new information.

Hello and welcome. A screenshot and a complete, executable script would be very helpful to answer your question. I had to guess and added the missing variables. Now I have a part of a railroad line and wonder what the actual question and problem are. -- ok, faces are flipped. That's bad. But how do you want to create junctions? What is about the mentioned Boolean modifier?

Thanks Blunder, I have updated the code to contain my entire script and included a screenshot. The curved section of the junction is in a separate script and works without a problem, I am just trying to understand why this doesn't work, it would be tedious to do it without using a script but my problem is trying to learn scripting and I want to know what I did wrong/different between the two.

Thanks for the update. The question is now much more understandable and clear.

The mistake is in orientation of faces. You can check this by switching Face orientation overlay:

As you see, some faces marked red, which means whey are facing backwards. To make boolean work, they should face to us.
This is determined by the winding order of the face. Then you create faces like this faces.append([0,4,5,1]) the order matters.  Given an ordering of the  vertices, a face can appear to have a clockwise winding or counter-clockwise winding. Clockwise means that the vertices, in order, rotate clockwise around the center. Counter-clockwise means that the vertices, in order, rotate counter-clockwise around the triangle's center:

Ok, thanks, I had been checking the normals in edit mode rather than the face orientation, I understand the winding order, and I have just realised the mistake in the code: negVerts1[v][0]*=-1 this mirrors the vertices thus reversing the winding. Thank you

The weird results come from Boolean operations. They are not perfect and are sensitive to position, shape, overlapping geometry and so on. You could try using Fast solver, that most of the time is more exact than the Exact one or move your objects slightly, but if you aim to have geometry generated procedurally and you need it to work reliably in unknown situations, I  wouldn't recommend counting on Booleans because you never know when problems like this might happen.
If you stick with Booleans, it's probably better to use one Boolean modifier with Operand Type set to "Collection" and add your objects used for cutting to a collection:

Originally I was only creating 1 mesh to subtract which would mean only 1 modifier, but split it into two to try and identify the problem. I think I have resolved that now, thank you for your help.

What Martynas Žiemys wrote is correct but the main problem is the flipped normals. A few of the faces are turned inside out. The Boolean modifier does not like this in Exact mode. The Fast mode is more error-tolerant but the result will have flipped normals, too. That's bad and can cause further problems.
If you enable the Face Orientation overlay you will see red faces and actually, the left rail and right rail objects are not identical.

I guess you have to change the order of the vertices that create these faces in your script.
By the way, wouldn't it be easier to just create one rail object, then duplicate and move it to create the track? → fewer vertices that can be messed up.

In edit mode I checked all the normals and everything seemed fine, I didn't flip any normals but I did reverse the order I created some faces in order to get the normals I wanted/expected. Thanks for your help


text:
How to fix cloth getting sucked inside mesh?
So I was trying to make a sort of carpet on the surface of stairs. I ran the simulation but the cloth gets sucked inside the collision mesh.

I made sure there are no holes in the geometry, increased the amount of geometry but nothing seems to work. What could be done about it ?
Blend file :

Hello please share your file: https://blend-exchange.com/

Alright i uploaded

it seems to work fine, what Blender version do you use? https://zupimages.net/up/22/44/43st.jpg maybe apply the scale of the floor?


text:
How to transfer crease to another object with Data Transfer modifier?
I have two objects, both with the same level of sub-d.
I want to animate the edge crease by keyframing the mix factor of the Data Transfer modifier but I am unable to even make it work properly in the first place. Note that I made sure to create two vertex groups with the same name for both objects, assigned to the edges I want to crease so that the modifier knows which part I am referencing, and I unchecked the object transform toggle in the source.
EDIT : here is the blend file for anyone who might have an idea :

The Data Transfer works fine with edge sharpness but not with crease as you can see here :

did both objects have the same origin and are positioned on the same place? if yes, pls provide blend file

You don't need them to have the same origin when you uncheck the Object transform next to the Source selection. It works with weight painting and with edge sharpness but not with crease, which I find it more confusing. I will upload the blend file

can u pls upload a version of your blend file which is as you present the image here? thx. Because there is no data transfer modifier at all in your blend file

This might be an edge cases that isn't working properly. Could you please check if Blender's console shows any errors (e.g. complaining about dependency cycles)?


text:
Fluid particles keep flowing back on curve Force field
My goal is to have fluid particles pour into a cup and disappear inside. I kept experimenting with multiple settings but the closest solution gave me the result shown below.
The main issue is those particles flowing in reverse and spiraling back down the spiral and not leaving the domain through the cylinder outflow object.
The components of my sim are basic Inflow/Outflow/Domain/Curve Force Field and a Point Force field to try to suck in the particles at the end.
Please help, I've been stuck on this for two days now.
Blend file :

tbh simulations, which are a bit more complicated like yours cannot be solved by just some images of showing some settings. The are mathematically pretty complicated and i doubt that anybody can give your precise help why your simulation isn't working. They can guess - that's all. So if you really want to have help, upload your blend file or insert a link to your blend file so we can check it out.

Alright, file uploaded.

I know this is an older question, but in case anyone finds it like I did, the answer for me was increasing resolution divisions, as to a point less divisions means blockier which means less can occupy a given space at one time. More divisions means you don't get that sort of "splash back" if you will.
Edit - this is false. I worked around this by making my curves wider with less sharp turns.


text:
How to keyframe Force Field On/Off?
I want to make a rigid body simulation using a bunch of particles falling down on a plane then be lifted up using a Wind Force (after being grouped up using Vortex)
I tried with the following :
-Keyframing Disable in viewport at frame 0 and frame 90
-Keyframing Enable in viewport at frame 91

It resulted in the rigid body objects not being affected by the force even after turning it on
NB: I tried keyframing the strength of the force instead but that resulted in a slower simulation at the start.
EDIT: I want the particles to fall into the plane THEN get picked up by the force field.
Keyframing the strength value (0 at start/-10 at frame 90) of the Vortex makes the objects fall in a weird fashion.
TO ANYONE WHO WANTS TO GIVE IT A TRY :

i have no idea what you meant with "slower simulation at the start" but keyframing the strength is the way to go. Maybe you should show us an animation (post a link in your question) how it should look like.

I uploaded the blend and the result

i still don't know how you want the whole simulation to look like? do you have a link to an yt video? or some other link? And maybe the wind isn't even the right thing. Sometimes an "invisible" plane as passive rigid body object to make them move might be even better...e.g. like this: [1]: https://i.sstatic.net/KjyqQ.gif describing animations with words lets a lot of freedom how it should look - that's the problem.


text:
Blender can't find GPU on Quadro 4000 and Quadro 2000M
I've spent several days trying to figure out why Blender can't find my GPU in both of my workstations. On one, I have Quadro 4000. On the other, is Quadro 2000M.
One year ago I was able to install a special CUDA build from Graphic all and that version found my GPU for some reason. That version is now deleted from my PC, but none of the official builds of Blender show my GPU which is totally weird because there is nothing wrong with my hardware.
It feels such a waste of time digging for secondary builds on Graphic all when I know my hardware deserves better and I simply cannot understand why Blender refuses to find my perfectly fine equipment. (HP Z Workstation 420) plus another Z workstation laptop, on none of them finds Blender my GPU but Blender works fine on my CPU.
I have the latest Nvidia Quadro drivers for my graphic cards plus CUDA toolkit installed and all of this is perfectly healthy and running outside of Blender. Blender simply cannot see my existing CUDA stuff, visible in Nvidia Control panel.
My GPUs are not visible in ANY build of Blender (2.79 Official Stable Newest, 2.8 Official) I've installed so far, as I mentioned only was visible/usable (the GPU) in that single rare GraphicAll one (build) which I can't even find anymore. Forgot what to search/Google for.
Any tips would be super amazing.
Thanks
(Update: I was able to install 2.79b and it finds my GPU but it would still be nice to be able to use GPU on 2.8 which is still Mission Impossible for me) :/
// Daniel

Did you do anything differently that 2.79b suddenly works now? You say that you have the latest drivers installed, did you check this on the official driver dowload website by Nvidia (https://www.nvidia.com/Download/index.aspx)?

I didn't do something differently, it just worked. -- With the latest Nvidia drivers, and with latest drivers Eevee worked fine, but I've discovered my system works better with the Official HP 2013 Nvidia drivers from HP's site, because now Blender 2.8 can see my CUDA device (according to the debug log created).. But now after installed HP's Nvidia graphics driver I can't start 2.8, it crashes.

Did you find a solution?  Considering a M1000M

The Quadro 4000 supports CUDA compute capability v2.0 as seen here
https://en.wikipedia.org/wiki/Nvidia_Quadro#Quadro
Blender 2.79 supports NVIDIA cards with CUDA compute capability v2.0-v6.1 as seen here
https://docs.blender.org/manual/en/2.79/render/cycles/gpu_rendering.html#cuda
Blender 2.8 supports NVIDIA cards with CUDA compute capability v3.0 onwards as seen here
https://docs.blender.org/manual/en/2.80/render/cycles/gpu_rendering.html#nvidia-cuda
I believe the latest CUDA toolkit to still include support for the Quadro 4000 is v8.0 GA2 which can be found here
https://developer.nvidia.com/cuda-toolkit-archive
or here https://developer.nvidia.com/cuda-80-ga2-download-archive


text:
Why is my Weight Paint not deforming the mesh?
I parented the rig using Empty Groups then weight painted a section. The vertex group seems to not act according to the weight paint and the points all have a weight value of 1.

If you parent With Empty Groups, by default the vertices won't be assigned to any vertex group, you need to assign them in Weight Paint mode or with the Assign button.
If you assign a vertex to only one vertex group, even if the weight is very low (like 0.001), the influence of the bone on it will be 100%. So what you need to do is begin to assign the vertices to the other vertex groups, if a vertex is assigned to another vertex group, its weight will be taken into account.
For example if a vertex is part of 2 vertex groups with a weight of 0.001 in both cases, the influence will be shared 50/50 between the 2 bones. If it is part of a vertex group with a weight of 0.1 and of another one with a weight of 1, the second bone will be ten times more influential, etc.
But what you could have done in your case is parenting With Automatic Weights. There's an error message because you have overlapping vertices and very dense topology. To fix that select all in Edit mode and press M > Merge by Distance. Also unparent the object (AltP), shift select the armature, scale both the object and the armature like ten times (S10), it makes the calculation easier in the case of dense topology, parent With Automatic Weights, then scale down to the original size (S0.1).
To give some corrections afterwards, select the armature in Object mode, shift select the object, switch it to Weight Paint mode, select the desired bone and paint.

And how do I assign weight to vertex groups ?

Exactly like you are doing it right now: Select your armature, shift select the object, switch to Weight Paint mode, select a bone, paint, select another bone, paint again, and so on. You also could have tried a parentage With Automatic Weights, and if you ever have a correction, it is the same method

When parenting with automatic weights it showed : "Failed to find solution for one or more bones"
So I have to weight paint without parenting the mesh to the armature? or using another parenting option ?

It means that there's a problem with your mesh, could you please share the file? https://blend-exchange.com/

File uploaded, I removed the rig in order to fit the max file size

You have overlapping vertices and/or very dense topology. What you should do is select all in Edit mode and press M > Merge by Distance. Also unparent the object (Alt P), shift select the armature, scale both the object and the armature like ten times (S 10), parent With Automatic Weights, then scale down to the original size (S 0.1)

Oh wow it's working ! Thank you very much !! How come scale affects the way bones are parented ?

It makes the calculation easier in case of dense topology


text:
Messed up with Blender Animation and Armature and can't see Animation in Blender and GLB export
I have this 3D model with Animations (different Actions) and I don't know why I can't see the Animations in Blender and also not in the exported GLB file. I think I messed up the Armature and Model somehow... Could you show me in step by step Screenshots, what I am missing?

https://swissmade.xyz/CleanBreathFromOBJ.blend
I am also able to pay if you think this looks more like a "job" and not a knowhow question (not just with this reputation karma points.. real shotter)

In your screenshot, the model seems to be in rest pose (T-pose), the action "Jump" is active, and frame 22 is selected. The reason why you see the T-Pose and not a Jump pose might be the armature which could be in Rest Position and not in Pose Position. In your file, I cannot see any problem. When I open your file, the action "Running" is active, the model is in a running pose at frame 0, and the armature is in Pose Position. Everything looks good. The Jump action works, too.

and when you export it as GLB? Are the animations there?

OK I see thx! I was exporting ONLY the 3D model (limited to the mesh) and now I exported my whole scene and I see all the Animations.. and also thx for explaining me the Rest Position and Pose Position difference! If you like you can make an answer post, also describing what to select for GLB so I can accept your answer. thx <3

In your screenshot, the model seems to be in rest pose (T-pose), the action "Jump" is active, and frame 22 is selected. The reason why you see the T-Pose and not a "Jump" pose might be the armature which is in Rest Position and not in Pose Position.
In your file, the armature is in Pose Position and everything looks good. The Jump action works, too.
To export the animation as glTF Binary (.glb), make sure that you have ticked the animation export option and that the export is not limited to the mesh only - as you wrote in the comment ;-). The option [X] Animation is at the bottom right in the side panel of the export dialog in the Animation section.
Other things to consider (from the documentaion):

glTF allows multiple animations per file, with animations targeted to
particular objects at time of export. To ensure that an animation is
included, either

(a) make it the active Action on the object,
(b) create a single-strip NLA track, or
(c) stash the action.


text:
In my GLB I have Actions and Animations; I see them in Blender, but why not the Keyframes?

Can't see the keyframes. Where are they?
(Deselecting "only selected object" for the dopesheet:)

but how to see only keyframes for specific actions? only show keyframes for "walking"?

You are viewing keyframes for selected objects. Try disabling Only Show Selected  in the header of Dope Sheet:

Ok thx, but how can I see the keyframes belonging to just one specific action (e.g. for Walking)?

I see, first I need to select the specific action in the "Action editor" and then the dopesheet shows all the keyframes for that one action.


text:
how is that possible if I want add one specific plot around my city? somthings like close it
I use this vid tutorial to make a random road city (https://www.youtube.com/watch?v=baiIAJ_THIc) , now I want to add one specific plot around my city. somethings like close it.

(buildings are hidden)

I think I would do something like that...
It's done by something like this, thank you


text:
Using Meta Quest Pro for AR in Blender
I wanted to know if there is a workflow/plugin to be able to use the AR pass through capabilities of the Meta Quest Pro in Blender? I'd like to build a dog sized robot that has basic animations, and be able to view using the quest pro pass through in my office in AR.
Attached a YT link below of what I am trying to achieve (starting at minute 1:36, not concerned about hand tracking) :

AR ROBOT
Below is a picture of a free blender robot that I am trying to have in AR using a Quest pro headset :

Thank you!!

Please include a screen capture of you Blender work directly in the question.  This is in addition to the reference to the video.

Hi @atomicbezierslinger - thanks for the reply :)
I've uploaded 2 images to my original post : First one is of the AR visual im trying to achieve and second is of the free robot that I have in my blend file that I would like to view in AR.
Hope this helps, thanks!


text:
Why won’t my clouds from blender cloud generator work?

I’ve been trying to make lots of clouds with the explosion type of blender cloud generator, it appears in chunks when I render. Does anyone know what to do? Thanks.
(Edit: I found out that it comes from to cloudbounds overlapping. So the question is now how to fix that.)

can you post a link to the cloud generator? and have you checked the add-ons documentation?

The add on is integrated into blender. There’s no documentation.

I think you need to increase your transparency bounces.

cool! never seen that there before. https://en.blender.org/index.php/Extensions:2.6/Py/Scripts/Object/Cloud_Gen
I did try it out and did not get the same issue when rendering unless lowering the number of Transparency Bounces as per @sambler


text:
Importing multiple movie clips inside one directory via script
I want to import multiple movie files via script and add an offset to each file. What I came up with so far returns an error:
"Python script fail, look in the console for now"
but there is nothing in the console.
import os, bpy, sys
from bpy import context
scene = context.scene

path = "/Volumes/Temp/Grau_Benjamin/VIDEO/STab_Kippe_Einzelbilder"

files = os.listdir(path)
files.sort()

file_start_increase = 12
end = 5
i = 0 # count variable

# create the sequencer data

scene.sequence_editor_create()

while i <= end :

    starta = i * 48 + i * file_start_increase

    print (frame_range_back_start)

    bpy.ops.sequencer.movie_strip_add(
                filepath=os.path.join(path, files[i]),
                channel=i + 1, frame_start=starta)

    i += 1

Thank you!

Related IMO it's far easier to add strips  using API methods.

You mean strips as in image strips? I have a folder of 72 datamoshed avi files. I thought to import them directly would be a huge timesaver.

I mean strips as in sequencer strips, click the manual link above. This one   new_movie(...) looks promising. Replace the operator in your code with it. If error persists edit error into your question. (copy text from system console)

looks really good, but how do I implement it? Sorry I'm really bad at this, I just try to find and copy code.
py.types.sequences.new_movie("test",
filepath=os.path.join(path, files[i]),
channel=i + 1, frame_start=starta)
If I do it like this I get still an error message.

Related

Glob all movie files in a folder
Below is a script to glob all movie files in a given folder, and add them to the VSE as movie strips using Sequencer.new_movie an offset of 12 is added to start frame of each. Edit to suit.
Note the use of bpy.path.extensions_movie Blender's list of movie types it can open.  For my blender
>>> bpy.path.extensions_movie
frozenset({'.mpg2', '.mov', '.avi', '.vob', '.flc', '.mpeg', '.movie',
 '.avs', '.xvid', '.webm', '.mv', '.ogg', '.r3d', '.dv', '.mp4',
 '.flv', '.m2ts', '.mts', '.wmv', '.mpg', '.divx', '.ogv', '.mxf',
 '.mkv', '.m2t', '.m4v', '.ts', '.m2v'})

The script.
import bpy
import os, glob

# glob all movie files from
vid_dir = "/home/batfinger/Videos"
exts = bpy.path.extensions_movie
files = [f for ext in exts for f in glob.glob(os.path.join(vid_dir, "*%s" % ext))]
files.sort()

# get sequence editor
scene = bpy.context.scene
scene.sequence_editor_create()
seq = scene.sequence_editor.sequences

# add movie strips
for i, fp in enumerate(files):
    frame_start = i * 12 # some offset
    name = os.path.basename(fp)
    ms = seq.new_movie(
            name=name,
            filepath=fp,
            channel=i,
            frame_start=frame_start
            )
    # print some details
    print("%s ch: %d fs: %3.1f len: %d" %
            (name, i, frame_start, ms.frame_final_duration)
            )

StackOverflow
Script in question had simple python errors, in that you were trying to print an undefined variable. How to view python error messages?
For python questions like finding all files in a folder, or sorting lists strongly recommend searching on StackOverflow via google.  Eg this search
site:stackoverflow.com python list all files in folder

Thank you! Now the import is working. The files are out of order though. How do I fix that?


text:
Component Selection Distance
When selecting components, is there a way to control the "selection distance/area"? I don't want to select a component, even if I click ~20 pixels away from it.

Thanks in advance!

Regarding the highlighted edges see here https://blender.stackexchange.com/questions/6613/vertex-selection-without-edge-highlighting

There is currently no setting for this. You can see in the Interface tab of the user preferences menu that there's a 'hotspot' distance for the handles of manipulators and similar settings for Pie menus. This is probably where you'd expect to find such a setting and it isn't exposed there.

Maybe more substantially, in this mirror of the Blender source code on line 446 a comment mentions that the below function uses a hardcoded value (line 392) of 5px for unselected vertices. This isn't necessarily the only way to select vertices in Blender but it seems to be the default.


text:
Blender 2.79a X.files
Is there an .X file importer for 2.79 versions of Blender. From what I seen, the only .X file importer I could find doesn't work.
 Would I need to get an older version of Blender to use the .X file and import the addon or is there another way to use the 2.79 version with .X files.
https://github.com/Littleneo/Directx_Blender/wiki works with older versions of blender, I am going to try some things to see if it can work with 2.79

Since you don't even tell us which add-on you're using, I would suggest contacting the add-on's author instead. They should know which version of Blender is supported, and how to use it.

The only addon I found for .X files was for 2.6 and I seen a forum post linking it to 2.7, which is Littleneo's DirectX importer. The question was is there an importer for 2.79 versions of blender, if there isn't, then I can already get an older version of blender. I am reading this forum that is one of the more recent posts on the same importer, but they are mainly talking about the exporter.

limemidolin and I did some more work on this issue by forking littleneo's version (he isn't available or isn't accepting pull requests). It technically works with 2.79 now but I can't get most files to import. Assist if possible: github.com/poikilos/io_import_x


text:
particles render black
this is probably a simple thing but i just started using blender this week and made a particle system. the probleme i have now is that in material view the particles have the color they are supposed to but when i got to render view they are suddenly black. i've been looking around for the past 2 hours without finding anything and i've been trying to change settings i think it might be but nothing seems to work any help would be appreciated.
i'm using cycle render and there is also a spotlight shining straight on the particles
my material settings
the tutorial i partialy used for the particles

Are you using Blender Internal (default renderer) or Cycles ? Could you provide a screenshot of your material settings and your scene ?

i'm using cucles as the tutorial said to do but if i change to the other ones nothing shows up in render anymore. as for my settings

cycles sorry cant edit comment


text:
How to pop up this command" object.modifier_add"
I could not run the command object.modifier_add as explained here. What's up with this?

the linked page shows that there is a pop menu to set up shortup for "add_modifier" and I can't pop it up. How should i do ??Thanks

Using the instructions from linked page I can make the menu appear, so define what doesn't work / isn't clear for you - on step of opening User Prefs window, on step of searching for appropriate context for the shortcut, etc. See also https://blender.meta.stackexchange.com/q/2449/1245 and please format your questions in a bit more clear way, you can [edit] it to add any info.

means i cant pop up the shortcuts setting menu,  i run the script in python  console with the command “objects.modifier_add",and no menu mentioned in the linked page poped up

Where does it suggest run object.modifier_add  in python console? Be like putting milk in your petrol tank and wondering why your car wont start.  Add it in the keymap editor

Possible duplicate of Is there a way to call the Modifier menu with a keyboard shortcut?

emmmm...... ,seem you R right. so I find the keymap editor- - .however,it

I finished the answer .Thks to :Mr Zak ;batFINGER & orgin editor Mentalist.thk you~     // the problem i will post a pic under this page.

the final answer i've upload a newest img above the last question picture.thk you ！

The string you type in the shortcut configuration screen is not Python code. It just happens to look somewhat similar to it. To run the operator as Python code, prefix it with bpy.ops, so bpy.ops.object.modifier_add().
However, it's better to not use operators at all, and use a regular Python function instead:
bpy.context.active_object.modifiers.new('operatorname', 'BEVEL')

See the documentation for more info on all the operator type names. This function returns the new modifier, so you can set properties on it directly.

have voted your answer. it seems i find the solution,thkyou

cause i am a new guys.why i cant write another answer  instead of my last deleted one by moderator??...........So I cant past the answer here.emmmm...............


text:
No Lights at Final Render
When I try to render my scene, there are no Lights at Final Render.

But if I use Shift+Z shortcut to see a preview, all works fine.

I really don't understand what is going on... Can you guys help this newbie? I installed Filmic Renderer that BlenderGuru recommended. Other than that, everyting are default, I think.

They are in the same layer. I mean interior lights are. The one behind the windows are in 3rd layer.

I did that, lets wait..

Odd, the lights don't show up in the preview/viewport render for me. That said, the reason the lights aren't showing up in the final render is because layer 3 (the layer with the lights) is not enabled in the renderlayer (as cegaton suggested)

But here, all  the same layer.

But here, all is in the same layer. Preview can show the lights too. Very annoyed.


text:
How to make pencil pleat curtains
Anyone have any idea how to make pencil pleat curtains? The problem I'm having is that the pleat at the top of the curtain is random thicknesses and shapes. Like this. Would it be a case of modelling the curtain and then running some kind of cloth simulation as though a drawstring is pulling it together?

I think some kind of visualisation would be helpful to make your problem clear.

Maybe this one: https://blender.stackexchange.com/questions/71721/how-to-make-a-curtain/71727#71727

Something like this https://www.johnlewis.com/john-lewis-barathea-pair-blackout-lined-pencil-pleat-curtains/p1926244


text:
Why the mirror modifier is not applied on my half-cube?
I've applied a mirror modifier on my half-cube but even though the pivot point is centered correctly (in the center of the half cube) in both object mode and edit mode. It is still not mirroring my half cube. Why is it not working?
The pivot point in object mode:

The pivot point in edit mode:

You are mirroring in the X direction, while your half cube is oriented along the Y direction. So the mirror works, but the generated vertices coincide with existing vertices.

How can I change the orientation of the half cube to be oriented on the X direction?

you don't have to, just uncheck "X AXIS" under mirror modifier to "Y Axis"


text:
Why I can't select the vertices of both my objects?
I've created two objects (according to a tutorial) and I would want to select the upper vertices of the lower object and the lower vertices of the upper object in order to create a bridge between them but even though I can select both objects in Object mode (with Shift+LMB - only like this I can select them) only the first one selected can be modified. In the following picture I've selected both objects but only one can be modified:

What should I do in order to create the bridge between the two objects?

Blender only allows us to edit one object at a time (2.80 will add the ability to edit multiple objects). By having your mesh in different objects you need to edit them separately.
One option is to join the objects and edit them as one ⎈ CtrlJ. After you have finished you can separate them again if you wish with P and choosing by selection or loose parts.
Another option is to use snapping to align the verts of one object with the verts of another.

You can only do this in a single mesh (which can consist of multiple distinct parts). Select both objects, and press CTRL+J to join the two meshes into one. Then you can bridge them together.


text:
Is it possible to set the viewport render maximum resolution when using Cycles?
When working on a retina MacBook Pro screen, the cycles viewport renders feel slow compared to a non-retina screen because it's rendering at full retina resolution. While this is sometimes useful, most of the time I'm looking for fast feedback when lighting, so a coarser but faster resolution would be better. Is there a setting or a way to limit the viewport renders to bigger pixels without running the entire application in low resolution?

Not that I know of, but would Viewport border be useful?

@gandalf3 Indeed I make heavy use of the viewport border. Thanks for the suggestion.

There isn't really a way to do that yet. You can play with the Start Resolution under the render properties panel to force Cycles to start rendering at a lower resolution, however, it will still eventually progress to a full, retina-resolution render.
Although one could argue that because of the high resolution, it takes less sample iterations to get to a visually 'smooth' image (even though each sample iteration does take longer), so you can probably try lowering the Preview Samples count.

Thanks for your answer. I think part of my issue is that I use the Branched Path Tracing algorithm and so each cycle takes longer, but it's working much better for the scene that I'm currently working on.


text:
Cannot keyframe visibility in outliner "Groups" view
I need to animate visibility for a large number of objects which are separated into groups. Typically to toggle visibility one clicks the eye and camera icons in the outliner and presses "I" over them. Unfortunately, this does not work for the "Groups" view in the outliner.

Does anyone know why this is, and how I can go about quickly keying the objects organized into groups?

There's no straight forward way here. If the toggle action needs to be keyed quite often, you may consider to use Keying Sets.

The group visibility in the outliner is just there for convenience to control the visibility of objects, but is not actually a property of the group.
Objects can be apart of more then one group so it wouldn't really make sense for visibility to be a group property.
Some alternatives are...

Assign the same action to all objects, then use that action to control visibility.May conflict with existing animation, so you could check on using the NLA too.
Assign a driver to objects visibility and use a single toggle to control it.
Use a frame change callback from Python and have a script inspect some property and set the visibility of the group based on it.Basically a hack to do something similar to a driver
Instance the group and change the visibility of that.Realize this isn't always a workable solution.
Solve it elsewhere, use compositing for example to enable/disable different scenes, in some cases material alpha can be used too.

Thank you so much for you thorough explanation. Can you explain the first option to me?

Regarding the "Instance of group", here is a great how-to:
https://www.youtube.com/watch?v=9WshXRndeOM&list=LL&index=2

Or try the advantage of Graph Editor, like this:

Note, editing many fcurves at once may become annoying, you might want to apply one action to all objects.

@ideasman42 Agree. Btw, according to your answer, is that also the reason why we cannot do it by using Keying Set like this, while still works in this way?

"Few clicks" workaround:
Move whole group to separate layer and exclude this layer from render.


text:
Object Stretching When in Pose Mode

I rigged my first character and all looks good expect for the foot. When I move the spine bone, the heel of the foot stays on the ground while the rest of the model moves.
I thought it was an issue with weight painting so I selected the body, went into weigh paint mode, then selected the bone and went into pose mode. From there I could see what I thought was the issue so I weight painted it out.
It looks good to my eyes, see the screenshot, but I must still be missing something. Any thoughts?

Hello could you please share your file? https://blend-exchange.com/

The bone called ik.leg.L should not have its Deform option enabled, because it's a controller bone that is not supposed to deform the mesh. So disable this option:

The pixel is mainly part of the vertex group of the same name, remove it from all groups...

and assign it to the group called foot1.L:

Thank you so much, I thought I did this already but I either missed it or reverted back to an old save before I had done it.

Also maybe parent the foot bone to the controller?

Those bones below the feet, make sure they don't have any unwanted weight attached to them. Seems like the issue

Apart from the footbone which has weights, I checked the toes and those other bones. Really stumped on this. I see no other weights from other bones.


text:
Displace Modifier Not Turning my Sphere Into a Blob
I've exported an STL from Rhino / Grasshopper and would like to turn my sphere into a blob shape. As I'm new to Blender, I asked around and someone suggested the Displace Modifier with a cloud texture.
File: https://blend-exchange.com/b/WJ3XEPme
I'd like to apply a blob shape like this to my current sphere:

But unfortunately, I get a wrinkled paper effect instead:

Does anyone know what settings I should modify to get an effect more like this?

Thank you!

hello could you please share your file? https://blend-exchange.com/

Sure thing @moonboots the file is https://blend-exchange.com/b/WJ3XEPme

Hi. Please don't post essential information like links, file downloads or additional details in the comments section where it can be easily missed. Instead edit them into your original post with the [Edit] button above. Comments are transitory by nature, are hard to index or search for, and may be erased at any moment.

Even without the file I would say, you haven't applied the scale to the sphere and therefore the settings might not look like expected... or no, the other way round: the scale is applied, but the sphere is really large and the settings would rather work on a smaller sphere.

Weight painting would solve it i guess

@MehdiBelhous How would weight painting solve this? Can you elaborate on that?

Your sphere is simply too large to show a real effect of the Displacement modifier settings.
The size of the Clouds texture for example is 0.55, that's almost nothing with a sphere of 100 m in diameter. I've set the Size to 20 (you have to do it manually, the slider only goes up to 2) and the Strength in the modifier to 20 as well (and set the object to Shade Smooth). This is the result:


text:
Object with texture in Look Dev mode appears black in render mode
So I am rendering this character. For some reason it's rendering black but in Look Dev it shows the proper texture. Why?

maybe you have overlapping faces, please check or share your file: https://blend-exchange.com/

@moonboots Added.

You have given thickness to your object, you have 2 meshes almost overlapping, one with black color faces, the other with colored faces. The mesh with black faces has its faces inverted. As you've enabled the Backface Culling option in the Material > Viewport Display, we can't see these black faces in Material Preview, only the colored ones beneath.
To fix that, either remove the black mesh, or, if you need to keep them for some reason, select all your pieces, switch to Edit mode and recalculate the normals.


text:
How to create a dropdown consisting of object types and display data accordingly the type i have selected?
I am trying to create a basic crud tool in blender and my requirements are create a dropdown on top of the panel and once i select one of the types from the dropdown it shows data below accordingly.
for example in the given picture if mesh is selected then in the body box only mesh objects will be shown like cube,sphere and if light is selected then different light objects will be shown similarly for other object types.

Hello, the content of your question is a little vague, could you maybe add a diagram or a little bit more information ? Where should the panel be located ? what type of data should it show ? What types of objects can you select from ?

@Gorgious Thanks for your input i'll make sure to be more clear from now on, hope this helps a bit more now

So you want it to be an interactable UI list of objects or simply have the information diplayed with labels ?

@Gorgious i am working for an interactive UI with basic display and delete functionality for ex. objects list based upon the option selected in dropdown as i already mentioned and i can select any specific object and delete it as well.

So you're basically trying to re-create the outliner ?

@Gorgious can say , but instead of grouping on the basis of collection , i'll segregate them on the basis of their object types.

So, this ? https://i.sstatic.net/Jx2WY.png

@Gorgious I said similar to it, but a custom panel with UI i shown in the picture , like initially dropdown will be set to All and we'll all objects present in the scene but as we proceeds to select options from the dropdown , list of object changes.

So, this ? https://i.sstatic.net/deWjI.png

@Gorgious: might be the first time i think i understood - and you didn't ;) normally it's the other way around :D

@Chris hehe most certainly :) But I still don't understand how this is different from the plain old outliner editor

@Gorgious Thanks to you as well and you are right it's not that different , it's just i am new to blender so I am figuring things out and was trying to create a custom panel that's it.

@Chris Thanks Chris.

Hehe no problem, just trying to help you figure things out, too :) you can reward chris with accepting the answer and clicking the grey tick in the top left of his answer if it helped you. Cheers

@Gorgious already tried it but it seems like I need atleast 15 reputations for that, ain't got enough yet , will definitely starts accepting answer once i got enough reputations. :)

@KartikeySinha: you can. You tried to upvote (up arrow). But you just have to click on the checkmark left of my answer.

you can try this code here:
import bpy

class MATERIAL_UL_matslots_example(bpy.types.UIList):
    # The draw_item function is called for each item of the collection that is visible in the list.
    #   data is the RNA object containing the collection,
    #   item is the current drawn item of the collection,
    #   icon is the "computed" icon for the item (as an integer, because some objects like materials or textures
    #   have custom icons ID, which are not available as enum items).
    #   active_data is the RNA object containing the active property for the collection (i.e. integer pointing to the
    #   active item of the collection).
    #   active_propname is the name of the active property (use 'getattr(active_data, active_propname)').
    #   index is index of the current item in the collection.
    #   flt_flag is the result of the filtering process for this item.
    #   Note: as index and flt_flag are optional arguments, you do not have to use/declare them here if you don't
    #         need them.
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        ob = data
        slot = item
        ma = slot.material
        # draw_item must handle the three layout types... Usually 'DEFAULT' and 'COMPACT' can share the same code.
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            # You should always start your row layout by a label (icon + text), or a non-embossed text field,
            # this will also make the row easily selectable in the list! The later also enables ctrl-click rename.
            # We use icon_value of label, as our given icon is an integer value, not an enum ID.
            # Note "data" names should never be translated!
            if ma:
                layout.prop(ma, "name", text="", emboss=False, icon_value=icon)
            else:
                layout.label(text="", translate=False, icon_value=icon)
        # 'GRID' layout type should be as compact as possible (typically a single icon!).
        elif self.layout_type == 'GRID':
            layout.alignment = 'CENTER'
            layout.label(text="", icon_value=icon)

# And now we can use this list everywhere in Blender. Here is a small example panel.
class UIListPanelExample(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "UIList Panel"
    bl_idname = "OBJECT_PT_ui_list_example"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):

        layout = self.layout

        obj = context.object

        layout.prop(context.scene, "preset_enum")

        # template_list now takes two new args.
        # The first one is the identifier of the registered UIList to use (if you want only the default list,
        # with no custom draw code, use "UI_UL_list").

        if context.scene.preset_enum == "Materials":

            layout.template_list("MATERIAL_UL_matslots_example", "", obj, "material_slots", obj, "active_material_index")

        # The second one can usually be left as an empty string.
        # It's an additional ID used to distinguish lists in case you
        # use the same list several times in a given area.
            layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
                             obj, "active_material_index", type='COMPACT')
        else:

            for ob in context.scene.objects:
                print(ob.type)
                if ob.type == "LIGHT":
                    row = layout.row()
                    row.label(text = ob.name)

def register():
    bpy.utils.register_class(MATERIAL_UL_matslots_example)
    bpy.utils.register_class(UIListPanelExample)

    bpy.types.Scene.preset_enum = bpy.props.EnumProperty(
        name = "my name",
        description ="choose",
        items = [
        ('Materials', "Materials", "Materials"),
        ('Lights', "Lights", "Lights")
    ])

def unregister():
    bpy.utils.unregister_class(MATERIAL_UL_matslots_example)
    bpy.utils.unregister_class(UIListPanelExample)

if __name__ == "__main__":
    register()

result looks like this, if you select an object with materials and you have some lights:


text:
How to add custom menu in blender in header?
I am trying to add custom menu and sub menu into this header strip consists of workspaces. How can i do it if i want to add a custom option after Scripting option?

Hello ! In the API these are not called Menus but Workspaces (https://docs.blender.org/api/current/bpy.types.BlendDataWorkSpaces.html#bpy.types.BlendDataWorkSpaces and https://docs.blender.org/api/current/bpy.types.WorkSpace.html#bpy.types.WorkSpace, and AFAIK you have to use an operator. You can eg duplicate the current one with bpy.ops.workspace.duplicate()

@Gorgious first of all thanks and actually i just meant about the row which consists of workspaces, can we add a custom option of ours either there or in the header next to Add and Object row.
I tried to achieve this but i can only find a way to add my custom as a sub menu of the given one but not as a new option directly into the bar. Sorry i am new to it so might mess up the names , let me know if i need to be more clear.


text:
How can I parent a rig to another rig?
I have a rigged object that I'd like one of my characters, who is also rigged, to be holding even as his arms move. How can I attach this object to his hand?

When animating a character they may need to pick up objects and move them around. The ChildOf constraint is useful for this. The advantage of using the ChildOf constraint is that you can animate the influence to allow the character to pick up and put down the object.
As you can specify an armature and bone to parent to you can also parent different object bones to different character bones, allowing you to have the character hold a piece in each hand and stretch them, or hold the doll body in one hand and lift the doll arm in the other.

If I got what you want, you could use a copy location constraint on the "held" armature, to one of the other bones, like:

First position the "held" rig to a bone in the "holding hand". This can be done by selecting a bone in the hand in edit-mode and pressing Shift S and choosing "Cursor to selected", then selecting the other rig in object-mode and pressing Shift S and choose "Object to cursor".

2.In pose-mode right-click on the rig that's to be held and then, holding Shift right-click the other rig. Still holding Shift, Right-click on same bone you postioned the cursor to before. Press Control-P and and choose "Bone" to parent the the second rig to the first.